/* Yuyangzi Studio — style.css */
:root {
  --paper: #f6f1e6;
  --paper-2: #efe7d4;
  --card: #fbf8f0;
  --ink: #211d19;
  --ink-2: #5c554a;
  --line: #e0d6bf;
  --cinnabar: #9e2b25;
  --cinnabar-2: #7c1f1a;
  --gold: #c9a24a;
  --gold-2: #a98a52;
  --serif: "Noto Serif SC", "Noto Serif JP", "Noto Serif KR", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 10px 30px rgba(33, 29, 25, .08);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15.5px;
}
/* ---------- bagua watermark background (fixed, ink 25%) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../assets/bg-bagua.jpg?v=15") center no-repeat;
  background-size: max(100vmin, 62vmax) auto;
  pointer-events: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--ink-2); font-size: .85rem; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

/* ---------- announce ---------- */
.announce {
  background: var(--cinnabar-2);
  color: #f2dfae;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .06em;
  padding: 7px 14px;
}

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: flex; align-items: center; gap: 26px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 58px; height: 58px; border-radius: 12px; box-shadow: 0 3px 10px rgba(33, 29, 25, .22), 0 0 0 1px rgba(243, 231, 207, .55); }
.brand-txt b { font-family: var(--serif); font-size: 1.42rem; letter-spacing: .12em; display: block; line-height: 1.15; color: var(--gold); font-weight: 700; }
.brand-txt span { font-size: .68rem; letter-spacing: .16em; color: var(--gold-2); font-weight: 600; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a {
  font-size: .92rem; padding: 6px 2px; color: var(--ink-2);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--ink); border-bottom-color: var(--gold); }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-select {
  font-family: inherit; font-size: .85rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 10px; outline: none;
}
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 12px; font-size: .9rem;
}
.member-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 12px; font-size: .9rem;
}
.member-btn:hover { border-color: var(--gold-2); }
.cart-btn:hover { border-color: var(--gold-2); }
.cart-badge {
  position: absolute; top: -7px; right: -7px;
  min-width: 19px; height: 19px; border-radius: 10px;
  background: var(--cinnabar); color: #f7efdd;
  font-size: .7rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
  padding: 0 5px;
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}
.kicker {
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 700; margin-bottom: 16px;
}
.hero h1 {
  font-family: "Pirata One", var(--serif);
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  font-weight: 400;
  line-height: 1.12; letter-spacing: .04em; margin-bottom: 18px;
  text-transform: uppercase;
}
.hero h1 em { font-style: normal; color: var(--cinnabar); }
.hero h1 [data-i18n] { display: block; }
/* hand-drawn squiggly divider between the two title lines */
.hero-wave {
  display: block; width: 236px; max-width: 60%; height: 14px;
  margin: 10px 0 12px; overflow: visible;
}
.hero-sub { color: var(--ink-2); max-width: 46ch; margin-bottom: 26px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
  transform: rotate(1.2deg);
}
.hero-art img { border-radius: 12px; }
.hero-stats { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats b { font-family: var(--serif); font-size: 1.02rem; display: flex; gap: 8px; align-items: center; }
.hero-stats b::before { content: "❖"; color: var(--gold); font-size: .8rem; }

.hero-collage {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.hero-collage .hc {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
}
.hero-collage .hc img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.hero-collage .hc:nth-child(2) { transform: translateY(10px); }
.hero-collage .hc:nth-child(3) { transform: translateY(-6px); }

/* ---------- perks ---------- */
.perks { border-block: 1px solid var(--line); background: var(--paper-2); }
.perks-in {
  display: grid; grid-template-columns: 1fr;
  gap: 18px; padding: 26px 0;
}
.perk b { display: block; font-size: .95rem; margin-bottom: 2px; }
.perk p { font-size: .82rem; color: var(--ink-2); }
.perk-ic { color: var(--cinnabar); font-size: 1.05rem; margin-right: 6px; }

/* ---------- sections ---------- */
.sec { padding: 64px 0 30px; }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 26px; }
.sec-head h2 { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .04em; }
.sec-head .kicker { margin: 0 0 4px; }
.sec-link { margin-left: auto; font-size: .88rem; color: var(--cinnabar); border-bottom: 1px solid currentColor; }

/* ---------- featured grid (vertical layout, replaced horizontal carousel) ---------- */
.carousel { position: relative; }
.car-track {
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
/* grid columns follow the same breakpoints as .grid-4 */
@media (min-width: 768px) { .car-track { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) { .car-track { grid-template-columns: repeat(4, 1fr); } }
/* legacy slide styles kept harmless; grid mode ignores flex-basis */
.slide {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.slide:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.slide img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.slide-cap {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 10px 12px 12px; font-size: .82rem;
}
.slide-cap b { color: var(--cinnabar); white-space: nowrap; }
.car-btn {
  position: absolute; top: 38%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); font-size: 1rem; z-index: 2;
  box-shadow: var(--shadow);
  display: none; /* arrows unused in grid mode */
}
.car-btn:hover { background: var(--cinnabar); color: #f7efdd; border-color: var(--cinnabar); }
.car-prev { left: -14px; }
.car-next { right: -14px; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cat-tile {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 14px;
  text-align: center; transition: transform .2s, border-color .2s;
}
.cat-tile:hover { transform: translateY(-3px); border-color: var(--gold); }
.cat-ic { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.cat-tile b { font-size: .88rem; display: block; }
.cat-tile span { font-size: .72rem; color: var(--ink-2); }

/* ---------- grids & cards ---------- */
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .22s, box-shadow .22s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; display: block; }
.card-media img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.badge-sale {
  position: absolute; top: 10px; left: 10px;
  background: var(--cinnabar); color: #f7efdd;
  font-size: .7rem; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
}
.badge-feat {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #3c2a08;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.card-name { font-family: var(--serif); font-size: .98rem; line-height: 1.4; }
.card-name:hover { color: var(--cinnabar); }
.card-rating { display: flex; align-items: center; gap: 8px; }
.star { color: #d8cba8; font-size: .8rem; }
.star.on { color: var(--gold); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; }
.price .now { font-weight: 700; color: var(--cinnabar); font-size: 1.05rem; }
.price .was { color: var(--ink-2); font-size: .8rem; }

.btn-add, .btn-ghost {
  border-radius: 9px; font-size: .82rem; padding: 8px 14px;
  border: 1px solid var(--line); background: var(--paper);
  transition: all .18s; white-space: nowrap;
}
.btn-add:hover { background: var(--cinnabar); color: #f7efdd; border-color: var(--cinnabar); }
.btn-ghost:hover { border-color: var(--gold-2); }
.sm { font-size: .78rem; padding: 7px 12px; }

/* ---------- shop toolbar ---------- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 30px; padding: 7px 15px; font-size: .84rem;
  color: var(--ink-2); transition: all .18s;
}
.chip:hover { border-color: var(--gold-2); color: var(--ink); }
.chip.active { background: var(--cinnabar); border-color: var(--cinnabar); color: #f7efdd; }
.sort-select {
  margin-left: auto; font-family: inherit; font-size: .85rem;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 9px; padding: 8px 10px; color: var(--ink);
}
.shop-count { font-size: .82rem; color: var(--ink-2); margin-bottom: 14px; }

/* ---------- story ---------- */
.story { background: var(--paper-2); border-block: 1px solid var(--line); padding: 70px 0; }
.story-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 52px; align-items: center; }
.story-art img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.story h2 { font-family: var(--serif); font-size: 2rem; margin-bottom: 18px; letter-spacing: .06em; }
.story p { color: var(--ink-2); margin-bottom: 14px; max-width: 58ch; }
.story-sign { font-family: var(--serif); color: var(--cinnabar) !important; font-size: 1.02rem; }

/* ---------- quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  font-size: .92rem;
}
.quote .q-mark { color: var(--gold); font-size: 1.6rem; font-family: var(--serif); line-height: 1; }
.quote-by { margin-top: 12px; font-size: .8rem; color: var(--ink-2); }

/* ---------- product page ---------- */
.crumb { font-size: .8rem; color: var(--ink-2); padding: 22px 0 0; }
.crumb a:hover { color: var(--cinnabar); }
.crumb span { margin: 0 6px; color: var(--gold-2); }
.pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 28px 0 10px; align-items: start; }
.pd-gallery {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 14px;
  position: sticky; top: 96px;
}
.pd-mainimg { position: relative; }
.pd-mainimg img { border-radius: 14px; width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; cursor: zoom-in; }
.pd-zoombtn {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(246, 241, 230, .5);
  background: rgba(33, 29, 25, .6); color: #f6f1e6;
  font-size: 1.05rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.pd-zoombtn:hover { background: var(--cinnabar); }

/* ---------- image lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(33, 29, 25, .93);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-figure { margin: 0; max-width: min(92vw, 1000px); display: flex; flex-direction: column; align-items: center; }
.lb-figure img {
  max-width: 92vw; max-height: 84vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
.lb-figure figcaption {
  margin-top: 14px; font-family: var(--serif); font-size: .92rem;
  color: #e8dcc0; text-align: center; letter-spacing: .04em;
  max-width: 80vw;
}
.lb-close {
  position: absolute; top: 20px; right: 24px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(246, 241, 230, .35);
  background: rgba(255, 255, 255, .08); color: #f6f1e6;
  font-size: 1.05rem; transition: background .18s;
}
.lb-close:hover { background: var(--cinnabar); }
.pd-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pd-thumb {
  width: 76px; height: 76px; padding: 0; overflow: hidden;
  border: 2px solid var(--line); border-radius: 10px;
  background: none; transition: border-color .18s;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.pd-thumb:hover { border-color: var(--gold-2); }
.pd-thumb.active { border-color: var(--cinnabar); }
/* video thumbs: dark frame, ▶ badge, video fills the tile */
.pd-thumb.pd-thumb-video { position: relative; background: #111; }
.pd-thumb.pd-thumb-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb.pd-thumb-video .thumb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; line-height: 26px;
  text-align: center; pointer-events: none; z-index: 2;
}
.pd-thumb.pd-thumb-video.active .thumb-play { background: var(--cinnabar); }
/* main video fills the stage like the main image */
.pd-mainimg video { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
/* sound toggle for the autoplaying (muted) main video */
.pd-sndbtn {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 17px; line-height: 1;
  background: rgba(0,0,0,.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.pd-sndbtn:hover { background: var(--cinnabar); }
.pd-name { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.3; margin: 6px 0 10px; }
.pd-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pd-tagline { color: var(--gold-2); font-size: .95rem; margin-bottom: 14px; }
.pd-price { margin-bottom: 14px; }
.pd-price .now { font-size: 1.9rem; font-weight: 700; color: var(--cinnabar); font-family: var(--serif); }
.pd-price .was { color: var(--ink-2); }
.pd-desc { color: var(--ink-2); margin-bottom: 22px; }
.pd-block { margin-bottom: 20px; }
.pd-h { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .05em; margin-bottom: 12px; }
.pd-h::after { content: ""; display: block; width: 34px; height: 2px; background: var(--gold); margin-top: 6px; }
.pd-buyrow { display: flex; gap: 12px; align-items: stretch; margin: 6px 0 16px; }
.qty {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
}
.qty button {
  width: 40px; height: 46px; background: none; border: none;
  font-size: 1.1rem; color: var(--ink-2);
}
.qty button:hover { color: var(--cinnabar); }
.qty span { min-width: 30px; text-align: center; font-weight: 600; }
.btn-solid {
  background: var(--cinnabar); color: #f7efdd; border: none;
  border-radius: 10px; font-size: .95rem; padding: 12px 26px;
  transition: background .18s; flex: 1;
}
.btn-solid:hover { background: var(--cinnabar-2); }
.btn-solid.lg { font-size: 1rem; }
.pd-meta { font-size: .84rem; color: var(--ink-2); display: grid; gap: 5px; }
.pd-meta div::before { margin-right: 6px; }
.pd-section { padding: 34px 0 6px; }
.pd-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.reasons { list-style: none; display: grid; gap: 12px; }
.why-text { color: var(--ink-2); max-width: 72ch; line-height: 1.8; }
.style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.style-grid.grouped { grid-template-columns: 1fr; }
.style-group { grid-column: 1 / -1; margin-top: 14px; font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--cinnabar); letter-spacing: .06em; }
.style-group:first-child { margin-top: 0; }
.style-card { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.style-card.hot { border-color: var(--gold-2); background: #fdf6e7; }
.style-card.wide { grid-column: 1 / -1; }
.hot-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 99px; background: var(--cinnabar); color: #f7efdd; font-size: .66rem; font-weight: 600; vertical-align: 2px; letter-spacing: .05em; }
.faq-list { display: grid; gap: 10px; max-width: 72ch; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; }
.faq-q { display: block; font-family: var(--serif); font-size: .92rem; font-weight: 700; color: var(--ink); }
.faq-a { margin-top: 6px; font-size: .88rem; color: var(--ink-2); line-height: 1.7; }
.disclaimer { font-size: .86rem; color: var(--ink-2); }
.style-no { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--cinnabar); color: #f7efdd; display: flex; align-items: center; justify-content: center; font-size: .76rem; font-weight: 700; }
.style-card b { display: block; font-family: var(--serif); font-size: .9rem; line-height: 1.45; }
.style-card p { font-size: .8rem; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.wish-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.style-card.clickable { cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; }
.style-card.clickable:hover { border-color: var(--gold-2); box-shadow: var(--shadow); }
.style-card.selected { position: relative; border-color: var(--cinnabar); background: #fbf3e4; }
.style-card.selected::after {
  content: "✓"; position: absolute; top: 8px; right: 10px;
  color: var(--cinnabar); font-weight: 700; font-size: .85rem; line-height: 1;
}
.style-card.hide { display: none; }
.reason { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.reason-dot { color: var(--cinnabar); margin-top: 2px; }
.reason b { font-weight: 600; font-size: .95rem; }
.specs { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.specs th, .specs td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: none; }
.specs th { color: var(--ink-2); font-weight: 500; width: 38%; }
.size-table-wrap { max-width: 560px; }
.size-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.size-table th, .size-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; text-align: center; }
.size-table thead th { background: var(--paper-2); color: var(--cinnabar); font-weight: 600; font-family: var(--serif); letter-spacing: .04em; }
.size-table tbody tr:last-child th, .size-table tbody tr:last-child td { border-bottom: none; }
.size-table tbody tr:nth-child(even) { background: rgba(224, 214, 191, .18); }
.size-table td:first-child { font-weight: 600; }
.scenario { color: var(--ink-2); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.kw { margin-top: 14px; font-size: .8rem; color: var(--ink-2); line-height: 1.7; }
.kw-t { color: var(--gold-2); font-weight: 700; }

/* ---------- cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(33, 29, 25, .4);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 94vw); background: var(--paper);
  border-left: 1px solid var(--line); z-index: 100;
  transform: translateX(105%); transition: transform .28s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-family: var(--serif); font-size: 1.15rem; }
.drawer-close { background: none; border: none; font-size: 1.4rem; color: var(--ink-2); }
.drawer-close:hover { color: var(--cinnabar); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 22px; display: grid; gap: 14px; align-content: start; }
.cart-empty { color: var(--ink-2); text-align: center; padding: 40px 0; }
.ci { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.ci img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.ci-mid { flex: 1; min-width: 0; }
.ci-name { font-size: .84rem; font-family: var(--serif); line-height: 1.35; }
.ci-var { font-size: .74rem; }
.ci-qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; background: var(--paper); }
.ci-qty button { border: none; background: none; font-size: .95rem; color: var(--ink-2); }
.ci-qty button:hover { color: var(--cinnabar); }
.ci-right { text-align: right; display: flex; flex-direction: column; justify-content: space-between; }
.ci-price { font-weight: 700; color: var(--cinnabar); font-size: .92rem; }
.ci-rm { border: none; background: none; font-size: .74rem; color: var(--ink-2); text-decoration: underline; }
.ci-rm:hover { color: var(--cinnabar); }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 22px 20px; }
.ship-bar { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 8px 0 6px; }
.ship-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--cinnabar)); border-radius: 4px; transition: width .3s; }
.ship-txt { font-size: .78rem; color: var(--ink-2); margin-bottom: 12px; }
.subtotal { display: flex; justify-content: space-between; font-size: 1rem; margin-bottom: 12px; }
.subtotal b { font-size: 1.15rem; color: var(--cinnabar); }
.checkout-btn {
  width: 100%; background: var(--ink); color: #f7efdd;
  border: none; border-radius: 10px; padding: 14px;
  font-size: .95rem; letter-spacing: .04em;
}
.checkout-btn:hover { background: var(--cinnabar); }
.drawer-note { font-size: .72rem; color: var(--ink-2); text-align: center; margin-top: 8px; }

/* ---------- newsletter & footer ---------- */
.news { background: var(--cinnabar-2); color: #f2dfae; padding: 46px 0; }
.news-in { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.news h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 4px; }
.news p { font-size: .88rem; opacity: .85; }
.news-form { display: flex; gap: 10px; }
.news-form input {
  border: 1px solid rgba(242, 223, 174, .5); background: rgba(255,255,255,.08);
  color: #f7efdd; border-radius: 10px; padding: 12px 14px;
  min-width: 260px; font-family: inherit; outline: none;
}
.news-form input::placeholder { color: rgba(242, 223, 174, .6); }
.news-form button {
  background: var(--gold); color: #3c2a08; border: none;
  border-radius: 10px; padding: 12px 22px; font-weight: 700;
}
.news-form button:hover { background: #e2c274; }
.footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 46px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.footer h4 { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 12px; }
.footer a { display: block; font-size: .88rem; color: var(--ink-2); padding: 3px 0; }
.footer a:hover { color: var(--cinnabar); }
.footer-tag { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid var(--line); margin-top: 34px; padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .78rem; color: var(--ink-2);
}

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px);
  background: var(--ink); color: #f7efdd; padding: 11px 22px;
  border-radius: 30px; font-size: .86rem; opacity: 0;
  pointer-events: none; transition: all .3s; z-index: 120;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- member modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(33, 29, 25, .55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  padding: 18px;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative; width: min(420px, 100%);
  max-height: 88vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 26px 24px;
}
.modal-card .drawer-close { position: absolute; top: 12px; right: 12px; }
.reg-title { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 6px; }
.reg-sub { font-size: .85rem; color: var(--ink-2); margin: 0 0 16px; line-height: 1.55; }
.reg-label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
.reg-input {
  width: 100%; font-family: inherit; font-size: .92rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 9px; padding: 10px 12px; outline: none;
  transition: border-color .15s;
}
.reg-input:focus { border-color: var(--gold-2); }
.reg-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
#regGender { margin-bottom: 4px; }
.reg-err { color: var(--cinnabar); font-size: .82rem; margin: 10px 0 0; }
.reg-submit { width: 100%; margin-top: 18px; }
/* maker QR dialog */
.qr-card { text-align: center; }
.qr-frame {
  margin: 18px auto 0; width: 300px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; padding: 12px;
}
.qr-frame img { width: 100%; height: auto; border-radius: 6px; }
.qr-hint { color: var(--ink-2); font-size: .82rem; margin: 12px 0 0; }
.reg-user-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.reg-user-line b { font-weight: 600; }
.reg-logout { width: 100%; margin-top: 18px; }
.reg-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--cinnabar); color: #f7efdd;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.4rem; margin: 0 auto 12px;
}

/* ---------- cart item blessing note ---------- */
.ci-note { margin-top: 8px; }
.ci-note-label {
  display: block; font-size: .72rem; font-weight: 600;
  color: var(--gold-2); margin-bottom: 4px;
}
.ci-note-input {
  width: 100%; font-family: inherit; font-size: .8rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 9px; outline: none;
  resize: vertical; min-height: 52px; line-height: 1.5;
  transition: border-color .15s;
}
.ci-note-input:focus { border-color: var(--gold-2); }
.ci-note-input::placeholder { color: #b3a98f; }

/* ---------- coupon banner (home) ---------- */
.cp-banner {
  background: linear-gradient(135deg, var(--cinnabar) 0%, var(--cinnabar-2) 100%);
  padding: 14px 0;
  border-bottom: 3px solid var(--gold);
}
.cp-in { display: flex; align-items: center; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.cp-ticket { display: flex; align-items: center; gap: 18px; min-width: 0; }
.cp-amount {
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  color: #f7efdd; padding-right: 16px;
}
.cp-amount b { font-family: var(--serif); font-size: 2.1rem; }
.cp-amount span { font-size: .68rem; letter-spacing: .28em; margin-top: 4px; }
.cp-divider {
  width: 2px; align-self: stretch; margin-right: 2px;
  background: repeating-linear-gradient(to bottom, rgba(247,239,221,.55) 0 6px, transparent 6px 12px);
}
.cp-txt { display: grid; gap: 3px; color: #f7efdd; min-width: 0; }
.cp-txt b { font-family: var(--serif); font-size: 1.06rem; }
.cp-txt span { font-size: .82rem; opacity: .88; }
.cp-cta { flex-shrink: 0; background: var(--gold); color: #211d19; font-weight: 600; }
.cp-cta:hover { background: #b8913d; }
/* coupon ticket shown after successful registration + inside member card */
.cp-ticket-card {
  border: 2px dashed var(--gold-2); border-radius: 12px;
  background: linear-gradient(135deg, var(--cinnabar) 0%, var(--cinnabar-2) 100%);
  color: #f7efdd; padding: 14px 16px; margin: 16px 0 4px;
  display: grid; gap: 8px;
}
.cp-ticket-card .cp-big { font-family: var(--serif); font-size: 1.7rem; line-height: 1; }
.cp-ticket-card .cp-code-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: rgba(255,255,255,.12); border-radius: 8px; padding: 8px 10px;
}
.cp-ticket-card .cp-code-row code { font-family: "Inter", monospace; letter-spacing: .08em; font-weight: 700; }
.cp-ticket-card .cp-conds { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-ticket-card .cp-conds span {
  font-size: .72rem; border: 1px solid rgba(247,239,221,.4);
  border-radius: 999px; padding: 3px 10px; opacity: .92;
}
.cp-card-line-ok { color: var(--gold-2); }

/* ---------- responsive (mobile-first) ----------
   <768px  phone   : single column
   768-1024 tablet : two columns
   >1024px desktop : three/four columns  */

/* ===== tablet & up (>=768px): base grids widen ===== */
@media (min-width: 768px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .perks-in { grid-template-columns: repeat(2, 1fr); }
}

/* ===== desktop (>1024px): three/four columns ===== */
@media (min-width: 1025px) {
  .menu-btn { display: none; }   /* full nav menu on desktop */
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
  .perks-in { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 64px 0 40px; }
  .sec { padding: 56px 0 28px; }
}

/* ===== tablet tweaks (768-1024px) ===== */
@media (min-width: 768px) and (max-width: 1024px) {
  .header-in { height: 64px; gap: 10px; }
  .brand-txt b { font-size: 1rem; letter-spacing: .08em; }
  .brand-txt span { font-size: .58rem; letter-spacing: .1em; }
  .nav { gap: 13px; }
  .nav a { font-size: .86rem; }
  .head-tools { gap: 7px; }
  .lang-select { max-width: 78px; padding: 9px 4px; font-size: .78rem; }
  .cart-btn { padding: 9px 10px; }
  .member-btn { padding: 9px 10px; }
  .hero { padding: 40px 0 26px; }
  .hero-grid { gap: 30px; }
  .hero-stats b { font-size: .88rem; }
  .sec { padding: 44px 0 24px; }
  .sec-head h2 { font-size: 1.35rem; }
  .story { padding: 46px 0; }
}

/* ===== phone (<=767px): single column ===== */
@media (max-width: 767px) {
  .menu-btn { display: flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column; gap: 0;
    padding: 8px 22px 14px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 60;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:last-child { border-bottom: none; }
  .car-btn { left: 4px; }
  .car-next { left: auto; right: 4px; }

  .style-grid, .style-block-grid { grid-template-columns: 1fr; }
  .hero-grid, .story-grid, .news-in, .quotes { grid-template-columns: 1fr; }
  .pd-layout, .pd-2col { grid-template-columns: 1fr; }
  .grid-4, .grid-3, .cats { grid-template-columns: 1fr; }
  .perks-in { grid-template-columns: 1fr; gap: 14px; padding: 20px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
  .header-in { height: 62px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-txt b { font-size: .84rem; letter-spacing: .04em; }
  .brand img { width: 40px; height: 40px; }
  .cart-btn span:not(.cart-badge) { display: none; }
  .cart-btn { padding: 10px 10px; }   /* thumb-friendly */
  .member-btn span { display: none; }
  .member-btn { padding: 10px 10px; } /* icon-only in thumb zone */
  .head-tools { gap: 5px; margin-left: auto; }
  .lang-select { padding: 9px 4px; font-size: .76rem; max-width: 68px; }
  .brand-txt span { display: none; }  /* keep only the wordmark on phones */
  .modal-card { padding: 20px 18px 18px; }
  .announce { font-size: .72rem; }
  .hero { padding: 30px 0 22px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-wave { width: 170px; margin: 7px 0 8px; }
  .hero-stats { gap: 10px 16px; margin-top: 18px; }
  .hero-stats b { font-size: .82rem; }
  .hero-ctas .btn-solid, .hero-ctas .btn-ghost { flex: 1; text-align: center; min-height: 46px; }
  .sec { padding: 38px 0 18px; }
  .sec-head h2 { font-size: 1.28rem; }
  .pd-name { font-size: 1.32rem; }
  .pd-price .now { font-size: 1.55rem; }
  .pd-buyrow { flex-wrap: wrap; }
  .pd-buyrow .btn-solid { min-width: 100%; min-height: 48px; }  /* primary CTA in thumb zone */
  .pd-buyrow .qty { flex: 1; }
  .pd-buyrow .qty button { width: 44px; height: 44px; }
  .pd-2col { gap: 26px; }
  .story { padding: 42px 0; }
  .story h2 { font-size: 1.5rem; }
  .news-form { flex-direction: column; }
  .news-form input { min-width: 0; }
  /* chip rows: taller touch targets, horizontal scroll instead of wrap */
  .chips { gap: 8px; }
  .chips .chip { min-height: 38px; padding: 8px 14px; }
  .wish-filter .chip { min-height: 38px; }
  /* coupon banner stacks on phones */
  .cp-in { flex-direction: column; align-items: stretch; gap: 10px; }
  .cp-amount b { font-size: 1.7rem; }
  .cp-txt b { font-size: .95rem; }
  .cp-cta { width: 100%; min-height: 46px; }
}
