/* CSS Reset & 基礎設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
}

a {
  text-decoration: none;
}

.fig-frame {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  overflow: hidden;
  container-type: inline-size;
}

.fig-frame:last-child {
  margin-bottom: 0;
}

.fig-frame__layer {
  position: absolute;
}

.fig-frame__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile-only Layout */
:root {
  --mobile-breakpoint: 414;
  --theme-bg-color: #E25F2A;
  --mobile-menu-height: 70;
  /* Fallback theme color */
}

body.mobile-only-layout {
  background-color: var(--theme-bg-color);
}

body.mobile-only-layout .mobile-view {
  display: block;
  /* 覆蓋預設的 none */
  max-width: 800px;
  /* 與 breakpoint 相同 */
  margin: 0 auto;
  background-color: #ffffff;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  min-height: 100vh;
  overflow: hidden;
}

body.mobile-only-layout .desktop-view {
  display: none !important;
}

/* body.mobile-only-layout .mobile-menu {
  max-width: 800px;
  left: 50%;
  transform: translateX(-50%);
} */
.mobile-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--mobile-menu-height);
  background-color: #3E3A39;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
}

.mobile-menu--logo {
  width: clamp(100px, 40%, 160px);
}

.mobile-menu--container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(20px, 5vw, 28px);
  width: 50%;
}

.mobile-menu--item {
  display: block;
  width: clamp(12px, 5vw, 20px);
  aspect-ratio: 1 / 1;
}

.mobile-menu--item svg {
  width: 100%;
  height: 100%;
}

.desktop-view {
  display: block;
}

.mobile-view {
  display: none;
  padding-bottom: var(--mobile-menu-height);
}

@media (max-width: 800px) {
  .desktop-view {
    display: none;
  }

  .mobile-view {
    display: block;
  }
}

/* Swiper Overrides */
.swiper-container-wrapper {
  overflow: hidden;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Custom Swiper Arrows */
.custom-arrows-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.custom-prev,
.custom-next {
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.custom-prev::after,
.custom-next::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.custom-prev::after {
  border-right: 12px solid #926127;
  margin-right: 4px;
}

.custom-next::after {
  border-left: 12px solid #926127;
  margin-left: 4px;
}

/* Swipe Hint Overlay */
.swipe-hint-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
  z-index: 10;
}

.swipe-hint-overlay.hidden {
  opacity: 0 !important;
}

.swipe-hint-circle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  color: white;
  font-family: sans-serif;
}

.swipe-icon-container {
  animation: swipeHandAnim 2.5s infinite ease-in-out;
}

.swipe-icon-container svg {
  width: 45px;
  height: 45px;
}

.swipe-text {
  margin-top: 8px;
  font-size: 1rem;
  letter-spacing: 2px;
  font-weight: bold;
}

@keyframes swipeHandAnim {

  0%,
  100% {
    transform: translateX(8px);
  }

  50% {
    transform: translateX(-8px);
  }
}

/* ==========================================================================
   Swiper Pagination Custom Styles (Figma Reference)
   ========================================================================== */
.swiper-pagination {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid #ffffff;
  opacity: 1;
  border-radius: 50%;
  transition: all 0.3s ease;
  margin: 0 !important;
  /* Override swiper default margins since we use flex gap */
}

.swiper-pagination-bullet-active {
  background: rgba(255, 255, 255, 0.8);
}

/* Custom Click Animation */
@keyframes click-diagonal {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-20%, -20%);
  }
}

.anim-click-diagonal {
  animation: click-diagonal 1.5s infinite ease-in-out;
}