/* =============================================
   OneiRoaM — Style Sheet
   Ethereal Dream Aesthetic
   ============================================= */

/* ---- Variables ---- */
:root {
  --ivory:        #FAFAF7;
  --ivory-warm:   #F6F1EC;
  --blush:        #F2E8EC;
  --blush-deep:   #E0CDD5;
  --dusty-rose:   #C4A0A8;
  --lilac:        #C8BDD0;
  --misty-blue:   #B8C4D0;
  --gold:         #C4A882;
  --gold-light:   #D9C4A8;
  --gold-pale:    #EDE0CE;

  --text-dark:    #2A2220;
  --text-mid:     #6B5C58;
  --text-light:   #9E8F8A;
  --text-faint:   #C4B8B4;
  --white:        #FFFFFF;
  --line-green:   #06C755;

  --serif:  'Cormorant Garamond', 'Noto Serif TC', Georgia, serif;
  --sans:   'Noto Sans TC', -apple-system, sans-serif;

  --ease:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --trans:  0.4s var(--ease);

  --shadow: 0 8px 40px rgba(42, 34, 32, 0.07);
  --shadow-hover: 0 16px 60px rgba(42, 34, 32, 0.12);
}

/* ---- 配色主題（後台網站設定選用；default = :root 原值） ---- */
:root[data-theme="sage"] {          /* 米綠 · 參考站色系 */
  --ivory:      #F5F4EA;
  --ivory-warm: #ECEADB;
  --blush:      #E4E8D8;
  --blush-deep: #C9D0B5;
  --dusty-rose: #8F9A6E;
  --lilac:      #C6CDB4;
  --misty-blue: #B4C0AC;
  --gold:       #9A9160;
  --gold-light: #BDB489;
  --gold-pale:  #E2DEC2;
}
:root[data-theme="latte"] {         /* 奶茶 · 溫暖大地 */
  --ivory:      #FAF6F0;
  --ivory-warm: #F2EAE0;
  --blush:      #EDDFD2;
  --blush-deep: #D8C2AC;
  --dusty-rose: #B08968;
  --lilac:      #D5C4B4;
  --misty-blue: #C4B8A8;
  --gold:       #A8845C;
  --gold-light: #C4A882;
  --gold-pale:  #E8D9C4;
}
:root[data-theme="mist"] {          /* 霧藍 · 清冷夢境 */
  --ivory:      #F5F7F8;
  --ivory-warm: #EAEEF1;
  --blush:      #DFE6EB;
  --blush-deep: #C2CED8;
  --dusty-rose: #7E93A8;
  --lilac:      #BDC8D4;
  --misty-blue: #A8BACB;
  --gold:       #7A8FA0;
  --gold-light: #9FB2C0;
  --gold-pale:  #D8E1E8;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: var(--trans); }
button { cursor: pointer; }

/* ---- Utility ---- */
.js-hidden { display: none !important; } /* CSP style-src 未開 unsafe-inline，行內 style="display:none" 會被忽略，一律用這個 class；!important 確保贏過同權重的元件 class（如 .modal-checkout 設 display:inline-flex） */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.section-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-dark);
}
.section-sub {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.15em;
}

/* =============================================
   HEADER
   ============================================= */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  transition: background 0.5s ease, box-shadow 0.5s ease;
}
#header.scrolled {
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(42, 34, 32, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 72px;
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1;
  flex-shrink: 0;
}
.logo-brand {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--text-dark);
}
.logo-sub {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--text-light);
  font-weight: 300;
}

/* Nav */
#main-nav {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}
#main-nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  position: relative;
  padding-bottom: 2px;
}
#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}
#main-nav a:hover::after { width: 100%; }
#main-nav a:hover { color: var(--text-dark); }

/* 原創設計下拉選單 */
.nav-drop { position: relative; display: inline-flex; align-items: center; }
.nav-drop > a::after { transition: width 0.3s ease; }
.nav-drop:hover > a::after { width: 100%; }
.drop-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 148px;
  padding: 0.9rem 0;
  background: rgba(250, 250, 247, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(196, 168, 130, 0.18);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}
.nav-drop:hover .drop-menu,
.nav-drop:focus-within .drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.drop-menu a {
  padding: 0.45rem 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  text-align: center;
}
.drop-menu a::after { display: none; }
.drop-menu a:hover { color: var(--gold); }

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--text-faint);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-mid);
  transition: var(--trans);
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
.l-div { opacity: 0.35; }
.lang-toggle .active { color: var(--text-dark); font-weight: 500; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text-dark);
  transition: var(--trans);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
}
.mobile-overlay.open { transform: translateY(0); }
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.mobile-nav a {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-dark);
}
.mobile-nav a:hover { color: var(--gold); }
.mobile-subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.4rem;
  max-width: 300px;
  margin-top: -1.4rem;
}
.mobile-subnav a {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--text-light);
}
.mobile-subnav a:hover { color: var(--gold); }
.lang-toggle-mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--text-faint);
  border-radius: 20px;
  padding: 0.5rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-mid);
}
.lang-toggle-mobile .active { color: var(--text-dark); font-weight: 500; }

/* =============================================
   HERO
   ============================================= */
#hero {
  position: relative;
  height: clamp(360px, 56vh, 600px);
  padding-top: 72px; /* fixed header 讓內容視覺置中 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Animated gradient fallback */
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(-45deg, var(--blush), var(--lilac), var(--misty-blue), var(--blush-deep));
  background-size: 400% 400%;
  animation: gradientShift 10s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 對焦人物上半身；實際焦點由 inline style object-position 覆寫 */
  object-position: center 35%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250,250,247,0.08) 0%,
    rgba(250,250,247,0.25) 50%,
    rgba(250,250,247,0.72) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
  animation: heroUp 1.2s var(--ease) both;
}
@keyframes heroUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  animation: heroUp 1.2s 0.15s var(--ease) both;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.16em;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 0.5rem;
  animation: heroUp 1.2s 0.25s var(--ease) both;
}
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-mid);
  letter-spacing: 0.22em;
  margin-bottom: 1rem;
  animation: heroUp 1.2s 0.35s var(--ease) both;
}
.hero-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-mid);
  letter-spacing: 0.06em;
  margin-bottom: 1.8rem;
  animation: heroUp 1.2s 0.45s var(--ease) both;
}

/* Desktop (>960px): split layout — text left / uncropped photo right.
   ≤960px is untouched (rules above this block still apply as-is). */
@media (min-width: 961px) {
  #hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    height: auto;
    min-height: clamp(480px, 62vh, 720px);
  }

  .hero-bg {
    position: relative;
    inset: auto;
    order: 2;
  }
  .hero-bg::after {
    content: "";
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 45%;
    height: 45%;
    border: 1px solid var(--gold-light);
    z-index: -1;
    pointer-events: none;
  }

  .hero-overlay { display: none; }

  .hero-content {
    order: 1;
    z-index: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 3rem clamp(1.5rem, 5vw, 4rem);
    background: linear-gradient(-45deg, var(--blush), var(--lilac), var(--misty-blue), var(--blush-deep));
    background-size: 400% 400%;
    animation: heroUp 1.2s var(--ease) both, gradientShift 12s ease infinite;
  }

  .hero-eyebrow { color: var(--text-mid); }
}

@media (min-width: 961px) and (prefers-reduced-motion: reduce) {
  .hero-content {
    animation: heroUp 1.2s var(--ease) both;
    background-position: 30% 50%;
  }
}

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.88rem 2.6rem;
  border: 1px solid var(--text-dark);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--text-dark);
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease;
  animation: heroUp 1.2s 0.55s var(--ease) both;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text-dark);
  transform: translateX(-101%);
  transition: transform 0.42s var(--ease);
}
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary:hover { color: var(--ivory); }
.btn-primary span { position: relative; z-index: 1; }


/* =============================================
   ABOUT
   ============================================= */
#about {
  padding: 8rem 0;
  background: var(--ivory-warm);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
  gap: 6rem;
  align-items: center;
}
.about-img-wrap {
  position: relative;
}
.about-img-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  background: linear-gradient(135deg, var(--blush), var(--lilac));
  min-height: 300px;
}
.img-deco {
  position: absolute;
  bottom: -18px;
  right: -18px;
  width: 55%;
  height: 55%;
  border: 1px solid var(--gold-light);
  z-index: -1;
  pointer-events: none;
}
.about-text { padding: 1rem 0; }
.about-text .section-label { text-align: left; }
.about-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 300;
  line-height: 1.45;
  margin: 0.6rem 0 1.4rem;
  color: var(--text-dark);
}
.about-text p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.95;
  margin-bottom: 1rem;
}
.about-text p.about-etymology {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.8rem;
}
.about-tags span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  padding: 0.38rem 1rem;
  border: 1px solid var(--gold-light);
  color: var(--gold);
  font-weight: 400;
}

/* =============================================
   COLLECTIONS
   ============================================= */
#collections {
  padding: 8rem 0;
  background: var(--ivory);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}
.filter-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 0.48rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
  transition: var(--trans);
}
.filter-btn:hover {
  color: var(--text-dark);
  border-color: var(--gold-light);
}
.filter-btn.active {
  color: var(--text-dark);
  border-color: var(--gold);
  background: rgba(196, 168, 130, 0.08);
}

/* Select goods section */
#select {
  padding: 8rem 0;
  background: var(--ivory-warm);
}
.select-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-light);
  letter-spacing: 0.1em;
  padding: 3.5rem 2rem;
  border: 1px dashed rgba(196, 168, 130, 0.4);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.select-more { text-align: center; margin-top: 2.5rem; }

/* ===== 商品獨立頁 (product-{id}.html) ===== */
.product-page { padding: 10rem 0 6rem; }
.breadcrumb { font-size: .8rem; color: var(--text-light); letter-spacing: .04em; margin-bottom: 2rem; }
.breadcrumb a:hover { color: var(--gold); }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.pd-img-wrap { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; background: linear-gradient(135deg, var(--blush), var(--lilac)); }
.pd-img-wrap .pd-img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 300; letter-spacing: .05em; color: var(--text-dark); margin: .3rem 0 1rem; }
.pd-desc, #modalDesc { white-space: pre-line; }
.pd-desc { font-size: .92rem; color: var(--text-mid); line-height: 1.9; margin-bottom: 1.2rem; }
.pd-price { font-size: 1.3rem; font-weight: 500; color: var(--text-dark); margin-bottom: 1.4rem; }
@media (max-width: 640px) {
  .product-page { padding: 8rem 0 4rem; }
  .pd-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* 選品獨立頁 */
.select-page #select { padding: 10rem 0 6rem; min-height: 70vh; }
#main-nav a.nav-active { color: var(--text-dark); }
#main-nav a.nav-active::after { width: 100%; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
}

.product-card { transition: var(--trans); }
.product-card.hidden { display: none; }

.product-img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blush) 0%, var(--lilac) 50%, var(--misty-blue) 100%);
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.65s var(--ease);
}
.product-card:hover .product-img { transform: scale(1.06); }

.product-hover {
  position: absolute;
  inset: 0;
  background: rgba(250,250,247,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.38s ease;
}
.product-card:hover .product-hover { opacity: 1; }

.btn-inquire {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  background: var(--text-dark);
  color: var(--ivory);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  transform: translateY(10px);
  transition: transform 0.38s var(--ease), background 0.3s ease;
}
.product-card:hover .btn-inquire { transform: translateY(0); }
.btn-inquire:hover { background: #444; }

/* Badge */
.product-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(250,250,247,0.9);
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--gold-pale);
  backdrop-filter: blur(4px);
}

.product-info { padding: 1rem 0.3rem 0; }
.product-name-link { color: inherit; }
.product-name-link:hover h3 { color: var(--gold); }
.product-info h3 {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  margin-bottom: 0.22rem;
}
.product-info p {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-mid);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.product-tag {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
}
.puff-tag      { background: rgba(232, 213, 218, 0.5); color: var(--dusty-rose); }
.collar-tag    { background: rgba(237, 224, 206, 0.6); color: #A8894F; }
.set-tag       { background: rgba(216, 206, 220, 0.5); color: #8B7DA0; }
.top-tag       { background: rgba(200, 189, 208, 0.5); color: #8B7DA0; }
.bottom-tag    { background: rgba(184, 196, 208, 0.5); color: #7090A0; }
.accessory-tag { background: rgba(196, 168, 130, 0.18); color: var(--gold); }
.select-tag, .select_top-tag, .select_bottom-tag, .select_acc-tag { background: rgba(180, 220, 200, 0.4); color: #4A8A72; }

/* Price */
.product-price {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

/* Tag + status row */
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Status badge */
.product-status {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
}
.status-instock  { background: rgba(180, 220, 180, 0.5); color: #4a8a4a; }
.status-preorder { background: rgba(232, 210, 170, 0.5); color: #a07030; }
.status-soldout  { background: rgba(200, 200, 200, 0.5); color: #888; }

/* Sold-out card */
.product-card.is-sold-out .product-img   { opacity: 0.4; }
.product-card.is-sold-out .product-hover { display: none; }
.product-card.is-sold-out .product-price { color: var(--text-mid); text-decoration: line-through; }

/* =============================================
   LOOKBOOK
   ============================================= */
#lookbook {
  padding: 8rem 0 0;
  background: var(--ivory);
}

.lookbook-scroll {
  margin-top: 2.5rem;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.lookbook-scroll::-webkit-scrollbar { display: none; }
.lookbook-scroll.grabbing { cursor: grabbing; }

.lookbook-track {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem;
  padding: 0 2rem 4rem;
  width: max-content;
}

.lookbook-item {
  flex-shrink: 0;
  width: 320px;
  height: 420px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blush), var(--lilac));
}
.lookbook-item.tall {
  height: 500px;
  margin-bottom: -80px;
}
.lookbook-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
  pointer-events: none;
}
.lookbook-item:hover img { transform: scale(1.04); }

/* =============================================
   HOW TO ORDER
   ============================================= */
#order {
  padding: 8rem 0;
  background: var(--ivory);
}

.order-notes {
  list-style: none;
  max-width: 720px;
  margin: 0 auto 5rem;
  padding: 2.5rem 2.75rem;
  background: var(--white);
  border: 1px solid rgba(196,168,130,0.18);
  border-radius: 16px;
}
.order-notes li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.9;
  letter-spacing: 0.03em;
}
.order-notes li + li { margin-top: 1.1rem; }
.order-notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-light);
}

/* Contact block */
.contact-block {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  padding: 3.5rem 2.5rem;
  background: var(--white);
  border: 1px solid rgba(196,168,130,0.18);
  border-radius: 16px;
}
.contact-label {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: var(--line-green);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  border-radius: 4px;
  transition: var(--trans);
}
.btn-line:hover {
  background: #04a847;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6,199,85,0.22);
}
.contact-note {
  margin-top: 1.5rem;
  font-size: 0.73rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}

/* =============================================
   FOOTER
   ============================================= */
#footer {
  padding: 4.5rem 2rem;
  background: var(--text-dark);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.footer-logo-en {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--ivory);
}
.footer-logo-zh {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--gold-light);
  font-weight: 300;
}
.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: rgba(250,250,247,0.45);
}
.footer-nav a:hover { color: var(--ivory); }
.footer-social {
  display: flex;
  gap: 1.5rem;
}
.footer-social a {
  color: rgba(250,250,247,0.45);
  transition: color 0.3s;
}
.footer-social a:hover { color: var(--ivory); }
.footer-copy {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: rgba(250,250,247,0.25);
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
.fade-up, .fade-left, .fade-right {
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.9s var(--ease);
}
.fade-up    { transform: translateY(32px); }
.fade-left  { transform: translateX(-32px); }
.fade-right { transform: translateX(32px); }

.fade-up.visible,
.fade-left.visible,
.fade-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
  #main-nav { display: none; }
  .hamburger { display: flex; }
  .lang-toggle { margin-left: auto; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-img-wrap { max-width: 420px; margin: 0 auto; }
  .img-deco { display: none; }
  .about-text .section-label { text-align: center; }
  .about-text h2 { text-align: center; }
  .about-tags { justify-content: center; }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 1.25rem;
  }

}

@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  #about, #collections, #select, #lookbook, #order { padding: 5rem 0; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .product-info h3 { font-size: 0.95rem; }
  .product-info p  { font-size: 0.7rem; }

  .lookbook-item { width: 260px; height: 340px; }
  .lookbook-item.tall { height: 400px; }

  .contact-block { padding: 2.5rem 1.5rem; }
  .order-notes { padding: 1.75rem 1.4rem; margin-bottom: 3.5rem; }

  .hero-title { letter-spacing: 0.08em; }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* =============================================
   LOADING SCREEN
   ============================================= */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: loaderPulse 1.8s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.loader-brand {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--text-dark);
}
.loader-sub {
  font-size: 0.65rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
}
.loader-line {
  margin-top: 1.2rem;
  width: 60px;
  height: 1px;
  background: var(--gold-light);
  position: relative;
  overflow: hidden;
}
.loader-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: loaderBar 1.4s ease-in-out infinite;
}
@keyframes loaderBar {
  0%   { left: -100%; }
  100% { left: 100%; }
}

/* =============================================
   PRODUCT MODAL
   ============================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal.open {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 34, 32, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.modal-box {
  position: relative;
  background: var(--ivory);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.4s var(--ease);
}
.modal.open .modal-box {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  z-index: 10;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-light);
  line-height: 1;
  padding: 0.2rem 0.5rem;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-dark); }
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.modal-img-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blush), var(--lilac));
}
.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.modal-info {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
.modal-info .section-label { margin-bottom: 0; }
.modal-info h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-dark);
  line-height: 1.3;
}
.modal-info p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.85;
}
.modal-note {
  font-size: 0.72rem !important;
  color: var(--gold) !important;
  letter-spacing: 0.08em;
}
.modal-line {
  align-self: flex-start;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-img-wrap { aspect-ratio: 4 / 3; }
  .modal-info { padding: 2rem 1.5rem; }
}

/* ===== CART BADGE ===== */
.member-link { display: inline-flex; align-items: center; color: inherit; }
.member-link:hover { color: var(--gold); }
.cart-link { position: relative; display: inline-flex; align-items: center; color: inherit; }
.cart-badge {
  position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--dusty-rose); color: #fff;
  font-size: .68rem; line-height: 18px; text-align: center;
}

/* ===== MODAL ORDER ===== */
.modal-order { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0; }
.modal-size-select, .modal-size-custom { padding: .45rem .6rem; border: 1px solid var(--blush-deep); border-radius: 4px; font: inherit; }
.modal-qty { display: inline-flex; align-items: center; border: 1px solid var(--blush-deep); border-radius: 999px; overflow: hidden; background: var(--ivory); }
.modal-qty button { width: 30px; height: 32px; border: none; background: none; font-size: 1.1rem; cursor: pointer; transition: color var(--trans); }
.modal-qty span { min-width: 24px; text-align: center; }
.modal-added { color: var(--text-light); font-size: .9rem; }

/* ===== ORDER PAGE ===== */
.order-page { padding: 120px 0 80px; min-height: 60vh; }
.cart-empty { text-align: center; padding: 3rem 0; }
.cart-empty .btn-primary { margin-top: 1.2rem; }
.cart-list { margin: 1.5rem 0; display: flex; flex-direction: column; gap: .7rem; }
.cart-row {
  display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem;
  background: var(--white); border: 1px solid rgba(196, 168, 130, 0.16);
  border-radius: 12px;
}
.cart-row-info { flex: 1; display: flex; flex-direction: column; gap: .2rem; }
.cart-row-name { font-weight: 500; }
.cart-row-size, .cart-row-price { font-size: .85rem; color: var(--text-light); }
.cart-row-img {
  width: 56px; height: 68px; object-fit: cover; border-radius: 8px;
  flex-shrink: 0; display: block;
  background: linear-gradient(135deg, var(--blush), var(--lilac));
}
.cart-row-qty { display: inline-flex; align-items: center; border: 1px solid var(--blush-deep); border-radius: 999px; overflow: hidden; background: var(--ivory); }
.cart-row-qty button { width: 30px; height: 32px; border: none; background: none; font-size: 1.1rem; cursor: pointer; transition: color var(--trans); }
.cart-row-qty .qval { min-width: 26px; text-align: center; }
.cart-row-del { border: none; background: none; font-size: 1.3rem; color: var(--dusty-rose); cursor: pointer; padding: 0 .4rem; transition: color var(--trans); }
.cart-summary {
  padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .5rem;
  background: var(--ivory-warm); border: 1px solid rgba(196, 168, 130, 0.14);
  border-radius: 12px;
}
.sum-row { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; color: var(--text-light); }
.sum-row.sum-total { font-size: 1.1rem; color: inherit; font-weight: 500; border-top: 1px solid var(--ivory-warm); padding-top: .7rem; margin-top: .3rem; }
.sum-row.sum-deposit { font-size: 1.1rem; color: var(--dusty-rose); font-weight: 600; }
.preorder-gate { text-align: center; font-size: .95rem; color: var(--dusty-rose); background: var(--ivory-warm); border-radius: 6px; padding: .8rem; }
.success-deposit { font-size: .9rem; color: var(--text-light); margin-top: 1rem; }

.order-form {
  display: flex; flex-direction: column; gap: 1.1rem;
  max-width: 560px; margin: 2rem auto 0;
  background: var(--ivory-warm); border: 1px solid rgba(196, 168, 130, 0.16);
  border-radius: 14px; padding: 2rem 1.8rem;
}
.order-form h3 { margin-bottom: .5rem; }
.order-form label { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; }
.order-form label > span { font-size: .8rem; color: var(--text-mid); letter-spacing: .06em; }
.order-form input, .order-form textarea {
  padding: .7rem .85rem; border: 1px solid var(--blush-deep); border-radius: 8px;
  font: inherit; background: var(--white);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.order-form input:focus, .order-form textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.15);
}
.order-form textarea { min-height: 80px; resize: vertical; }
.order-form .btn-primary { margin-top: .8rem; justify-content: center; border-radius: 8px; }
.form-error { color: #C05A5A; font-size: .9rem; text-align: center; }
.discount-code-input { text-transform: uppercase; }

/* 付款金額選項 */
.pay-choice {
  border: 1px solid var(--blush-deep);
  background: var(--white);
  border-radius: 10px;
  padding: .9rem 1.1rem .8rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2.2rem;
}
.pay-choice legend {
  font-size: .85rem;
  color: var(--text-mid);
  letter-spacing: .05em;
  padding: 0 .4rem;
}
.order-form .pay-choice label {
  flex-direction: row;
  align-items: center;
  gap: .55rem;
  font-size: .95rem;
  cursor: pointer;
}
.pay-choice input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--dusty-rose);
  margin: 0;
}

/* 會員登入（結帳頁） */
.member-box { margin-bottom: .4rem; padding-bottom: .9rem; border-bottom: 1px dashed rgba(196, 168, 130, 0.3); }
.btn-google {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .6rem 1.2rem; background: var(--white);
  border: 1px solid var(--blush-deep); border-radius: 4px;
  font: inherit; font-size: .88rem; color: var(--text-dark);
  transition: var(--trans);
}
.btn-google:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.member-info { font-size: .88rem; color: var(--text-mid); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.btn-logout {
  border: none; background: none; font: inherit; font-size: .8rem;
  color: var(--text-light); text-decoration: underline; cursor: pointer;
}
.btn-logout:hover { color: var(--dusty-rose); }

.order-success { max-width: 520px; margin: 2rem auto 0; text-align: center; }
.order-success .success-mark { font-size: 2rem; color: var(--dusty-rose); }
.order-no { font-size: 1.3rem; letter-spacing: .05em; margin: .3rem 0 1.5rem; }
.bank-info { background: var(--ivory-warm); border: 1px solid rgba(196, 168, 130, 0.16); border-radius: 12px; padding: 1.3rem 1.4rem; margin: 1rem 0; text-align: left; }
.bank-detail { font-family: inherit; white-space: pre-wrap; margin-top: .6rem; line-height: 1.8; }
.success-note { font-size: .9rem; color: var(--text-light); margin: 1rem 0; }
.order-success .btn-line { margin: .5rem auto; }
.back-home { display: inline-block; margin-top: 1rem; font-size: .9rem; color: var(--text-light); }

/* ===== MODAL PRICE & CHECKOUT (cart UX) ===== */
.modal-price { margin: .6rem 0 .2rem; font-size: .95rem; color: var(--text-mid); }
.modal-price .mp-label { color: var(--text-light); font-size: .85rem; }
.modal-price .mp-sep { margin: 0 .5rem; color: var(--blush-deep); }
.modal-checkout { display: inline-flex; margin-top: .8rem; }

/* 會員專區 */
.member-page #member { padding: 10rem 0 6rem; min-height: 70vh; }
.member-login { text-align: center; padding: 2.5rem 0; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; color: var(--text-mid); }
.member-h { font-family: var(--serif); font-weight: 400; letter-spacing: .05em; margin: 2.5rem 0 1rem; }
.member-empty { color: var(--text-light); letter-spacing: .05em; padding: 1rem 0; }
.order-list { display: flex; flex-direction: column; gap: 1rem; }
.order-card {
  border: 1px solid rgba(196, 168, 130, 0.2); background: var(--white);
  padding: 1.2rem 1.4rem; border-radius: 12px;
  transition: box-shadow .3s ease;
}
.order-card:hover { box-shadow: var(--shadow); }
.order-card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.order-status-group { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.order-card-no { font-weight: 500; letter-spacing: .04em; }
.order-status { font-size: .72rem; letter-spacing: .1em; padding: .22rem .7rem; border-radius: 20px; }
.s-pending { background: rgba(232, 210, 170, 0.5); color: #A07030; }
.s-paid    { background: rgba(180, 220, 180, 0.5); color: #4A8A4A; }
.s-failed  { background: rgba(220, 180, 180, 0.5); color: #A04A4A; }
.s-expired { background: rgba(200, 200, 200, 0.4); color: #888; }
.order-card-date { font-size: .78rem; color: var(--text-light); margin: .2rem 0 .6rem; }
.order-card-items { list-style: none; font-size: .88rem; color: var(--text-mid); display: flex; flex-direction: column; gap: .25rem; }
.order-card-sum { margin-top: .6rem; font-size: .9rem; }
.member-profile { margin: 0; max-width: 520px; }
.member-msg { font-size: .88rem; color: var(--text-light); }

/* CSP 擋 style=""：初始隱藏用屬性，cart.js 載入後轉為 style.display */
[data-hide] { display: none !important; }
.turnstile-box:not(:empty) { margin: .5rem 0 1rem; }
.result-box { text-align: center; padding: 4rem 1rem; }
.pay-info { max-width: 22rem; margin: 1.5rem auto; padding: 1.25rem 1.5rem; text-align: left;
  border: 1px solid var(--dusty-rose); border-radius: 12px; line-height: 2; }
.pay-info .pay-no { font-size: 1.15rem; letter-spacing: .05em; word-break: break-all; }
.pay-info .pay-next { line-height: 1.7; margin-top: .75rem; }
.pay-info .pay-member { display: table; margin: 1rem auto 0; }
.pay-info .pay-hint { font-size: .85rem; opacity: .75; line-height: 1.6; margin-top: .5rem; }

/* ===== 商品多圖（gallery.js / product-pages.mjs） ===== */
.gallery { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.gallery .gallery-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.gallery .gallery-track::-webkit-scrollbar { display: none; }
.gallery .gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}
.gallery-thumbs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex: 0 0 auto;
  width: 64px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--blush);
  cursor: pointer;
  opacity: .55;
  transition: opacity var(--trans), border-color var(--trans);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { opacity: .85; }
.gallery-thumb.is-active { opacity: 1; border-color: var(--gold); }
.gallery-thumb:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.modal-gallery .gallery-thumbs { padding: 0 .75rem .75rem; }
@media (max-width: 640px) {
  .gallery-thumb { width: 52px; }
}

/* ===== 全額／訂金（render-products.priceBlock） ===== */
.product-prices, .pd-prices { display: flex; flex-direction: column; gap: .15rem; }
.product-prices { margin: .35rem 0 .5rem; }
.product-prices .product-price { margin-bottom: 0; }
.product-full-price, .pd-full-price {
  font-size: .72rem;
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: .03em;
}
.pd-full-price { font-size: .9rem; }
.pd-prices { margin-bottom: 1.4rem; }
.pd-prices .pd-price { margin-bottom: 0; }
.price-label { font-size: .78em; font-weight: 400; color: var(--text-mid); margin-right: .15em; }
.product-full-price .price-label, .pd-full-price .price-label { color: inherit; font-size: 1em; }
.modal-full-price { margin: .6rem 0 -.4rem; font-size: .85rem; color: var(--text-light); }
.modal-full-price .mp-label { font-size: .85rem; }
