/* ============================================================
   NOBIRDY storefront — 2026-07 redesign, ported from
   design/Nobirdy官網獨立設計項目 (index.html + mobile.html,
   __om-edit-overrides baked in). Kept beyond the design kit:
   the real checkout form, order page, policy pages, footer,
   mobile hamburger — the prototype faked or omitted those.
   ============================================================ */
:root { --r-lg: 22px; --r-xl: 30px;
  --glass: rgba(255,255,255,0.62); --glass-line: rgba(255,255,255,0.7); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--white); color: var(--navy-700); font-family: var(--font-sans); }
html { min-height: 100%; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body > main { width: 100%; flex: 1 0 auto; }
body > .bar { width: 100%; flex: none; }
body > .foot-note { width: 100%; margin-top: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-sans); }

/* timed storewide sale — fixed-height so the sticky navigation can sit below it */
.sale-banner {
  position: sticky; top: 0; z-index: 50; min-height: 36px; flex: none;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 7px 16px; background: var(--navy); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: .04em; text-align: center;
}
.sale-banner[hidden] { display: none; }
.sale-banner strong { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cream-100); }
.sale-banner a {
  color: var(--cream-100);
  font-weight: 700;
  text-underline-offset: 2px;
}
.sale-banner a:hover { color: #fff; }
body.sale-active .bar { top: 41px; }
body.sale-active .searchbox { top: 104px; }
body.sale-active .hero-pin { top: 108px; }

/* backdrop glow */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg .blob { position: absolute; border-radius: 50%; filter: blur(64px); background: var(--cream); }
.wrap { position: relative; z-index: 1; max-width: 1600px; margin: 0 auto; padding: 0 28px; }

/* frosted bar */
.bar { position: sticky; top: 5px; z-index: 40; margin: 5px auto 0; max-width: 1600px; padding: 0 32px; }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 50px;
  background: rgba(226,236,255,0.5); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--glass-line); border-radius: 999px; padding: 10px 14px 10px 24px; box-shadow: var(--shadow-sm); }
.bar .wm { height: 30px; width: auto; transform: translateY(15%); cursor: pointer; }
.index { display: flex; gap: 6px; }
.index a { font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--navy); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.index a.on { background: var(--navy); color: #fff; }
.tools { display: flex; align-items: center; gap: 6px; }
.iconbtn { background: none; border: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--navy-700); cursor: pointer; position: relative; }
.iconbtn:hover { background: rgba(255,255,255,0.6); }
.iconbtn img.uavatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.fly { position: fixed; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 14px; background: var(--navy); z-index: 80; pointer-events: none; opacity: .95; transition: transform .6s cubic-bezier(.5,-0.15,.25,1), opacity .6s ease; }
@keyframes nbbump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.iconbtn.bump { animation: nbbump .42s var(--ease-out); }
.cartcount { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 14px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.cartcount.show { display: flex; }
@media (max-width: 720px) { .index { display: none; } }

/* search popover (the bar's 搜尋 button) */
.searchbox { position: fixed; top: 68px; right: max(24px, calc((100vw - 1600px) / 2 + 32px)); z-index: 45; width: min(360px, calc(100vw - 32px));
  background: rgba(255,255,255,0.78); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-line); border-radius: 999px; box-shadow: var(--shadow-lg); padding: 6px 8px 6px 18px;
  display: none; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(-8px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.searchbox.open { display: flex; opacity: 1; transform: translateY(0); }
.searchbox svg { flex: none; color: var(--navy-400); }
.searchbox input { flex: 1; min-width: 0; height: 38px; border: none; background: none; outline: none; font-family: var(--font-sans); font-size: 15px; color: var(--navy-700); }
.searchbox input::placeholder { color: var(--taupe-400); }

/* hero — dictionary entry lockup (nirdy on top, wordmark + slogan below) */
.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(20px,3vw,34px); flex-wrap: wrap; padding: 64px 0 32px; }
.hero .nirdy { width: clamp(118px,14vw,168px); height: auto; flex: none; }
.entry { display: flex; flex-direction: column; align-items: center; text-align: center; }
.entry .ewm { height: clamp(58px,8vw,92px); width: auto; display: block; }
.lockup { display: flex; align-items: flex-end; gap: clamp(12px,1.6vw,22px); }
.slogan { font-family: var(--font-serif); font-style: italic; font-weight: 500; color: var(--navy);
  font-size: clamp(30px,4.2vw,48px); line-height: .96; letter-spacing: -0.01em; margin: 0; padding: 0 0 20px; }
.senses { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.senses li { display: flex; justify-content: center; gap: 14px; font-family: var(--font-sans); font-size: clamp(18px,2.2vw,28px); font-weight: 400; line-height: 1.45; color: var(--navy); }
.senses .num { color: var(--navy-400); font-variant-numeric: tabular-nums; min-width: 1.1em; }
.hero-pin { position: sticky; top: 72px; z-index: 1; }
.hero { position: relative; will-change: opacity, transform; }
.home-body { position: relative; z-index: 2; background: transparent; padding-top: 6px; }

/* skeleton loading */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--cream-200);
  border-radius: 14px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: nb-skeleton-shimmer 1.15s ease-in-out infinite;
}
.skeleton-line { display: block; border-radius: 999px; width: 100%; height: 14px; }
.skeleton-title { width: 42%; height: 24px; }
.skeleton-meta { width: 58%; height: 13px; }
.skeleton-def { width: 88%; height: 14px; }
.skeleton-price { width: 110px; height: 20px; }
.skeleton-buy { width: 38px; height: 28px; border-radius: 999px; }

.skeleton-card { border: 1px solid rgba(255,255,255,0.45); cursor: default; pointer-events: none; }
.skeleton-card .pic { padding: 0; align-items: stretch; justify-content: stretch; }
.skeleton-card .pic .skeleton-photo { width: 100%; height: 100%; border-radius: 0; }
.skeleton-card .body { gap: 9px; }
.skeleton-card .foot { padding-top: 6px; }
.skeleton-card .skeleton-title { width: 56%; height: 24px; }
.skeleton-card .skeleton-meta { width: 46%; height: 13px; }
.skeleton-card .skeleton-def { width: 88%; height: 14px; }
.skeleton-card .skeleton-price { width: 80px; height: 20px; }
.skeleton-card .skeleton-buy { width: 38px; height: 28px; border-radius: 999px; }

.skeleton-hero { padding-bottom: 6px; }
.skeleton-nirdy { width: clamp(118px,14vw,168px); aspect-ratio: 1; border-radius: 50%; }
.skeleton-wordmark { width: 220px; max-width: 68vw; height: 56px; }
.skeleton-slogan { width: min(310px,82vw); height: 48px; margin-top: 2px; }
.skeleton-sense { width: min(300px,78vw); height: 32px; margin: 0 auto; }

@keyframes nb-skeleton-shimmer {
  0% { transform: translateX(-70%); }
  100% { transform: translateX(70%); }
}

.sectitle { font-family: var(--font-sans); font-weight: 500; font-size: 22px; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe-600); margin: 8px 0 22px; }

/* product grid + cards — frosted gradient glass */
.grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 36px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3,1fr); gap: 28px; } }
@media (max-width: 700px) { .grid { grid-template-columns: repeat(2,1fr); gap: 20px; } }
.card { background: linear-gradient(180deg, rgba(255,255,255,0.38) 0%, rgba(255,255,255,0.22) 48%, rgba(32,53,95,0.06) 100%); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid var(--glass-line); border-radius: var(--r-xl); box-shadow: 0 8px 22px rgba(28,31,61,0.05); padding: 0; min-width: 0;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  cursor: pointer; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.card:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(28,31,61,0.08); }
/* Whole-card deep-link to /product/<slug> (an overlay <a>), with the add-to-cart
   button raised above it so it stays independently clickable. */
.cardlink { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card .body { pointer-events: none; }
.card .buy { position: relative; z-index: 2; pointer-events: auto; }
.pic { position: relative; aspect-ratio: 1/1; flex: none; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 18px 18px 6px; }
.pic img.photo { width: 100%; height: 100%; object-fit: contain; transition: transform var(--dur-slow) var(--ease-out); border-radius: 18px; }
.card:hover .pic img.photo { transform: scale(1.04); }
.pic img.ph { width: 46%; opacity: .16; }
.body { position: relative; z-index: 2; margin-top: 0; padding: 16px 18px 14px; flex: 1; display: flex; flex-direction: column; gap: 7px;
  background: transparent; border-top: none; border-radius: 0; }
.hw { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--navy-700); line-height: 1.15; letter-spacing: -0.01em; }
.meta { font-size: 13px; color: var(--navy-400); margin: 0; display: flex; align-items: baseline; gap: 8px; }
.meta .pos { font-style: italic; }
.def { font-size: 14.5px; line-height: 1.55; color: var(--navy-700); font-weight: 400; margin-top: 1px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding: 10px 1px 0; }
.pr { font-weight: 700; font-size: 17px; color: var(--navy-700); }
.buy { display: flex; align-items: center; gap: 12px; }
.icon { background: none; border: none; padding: 0; cursor: pointer; color: var(--navy); display: inline-flex; }

/* PDP */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,64px); align-items: start; padding-top: clamp(32px,5vw,56px); }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } }
.pvisual { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pdp .gal { aspect-ratio: 1/1; border-radius: var(--r-xl); overflow: hidden; background: var(--cream-100); border: 1px solid var(--cream-300); display: flex; align-items: center; justify-content: center; padding: 6%; }
.pdp .gal img.photo { width: 100%; height: 100%; object-fit: contain; }
.pdp .gal img.ph { width: 44%; opacity: .16; }
.pthumbs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.pthumb { flex: 0 0 72px; width: 72px; aspect-ratio: 1/1; border: 1.5px solid var(--cream-300); border-radius: 16px; background: var(--cream-100); padding: 7px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pthumb:hover { border-color: var(--navy-400); }
.pthumb.on { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(32,53,95,0.08); }
.pthumb img.photo { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.pthumb img.ph { width: 50%; opacity: .18; }
.pdp h1 { font-family: var(--font-sans); font-weight: 600; font-size: clamp(26px,3.4vw,38px); color: var(--navy-700); margin: 0; line-height: 1.15; }
.pdp .pmeta { font-size: 15px; font-weight: 400; font-style: italic; color: var(--navy-400); margin: 6px 0 0; }
.pdp .pdef { font-size: 16px; line-height: 1.7; color: var(--navy-700); margin: 0; padding: 10px 0 0; }
.pdp .price-lg { font-weight: 700; font-size: 24px; color: var(--navy-700); margin: 10px 0 20px; }
.rule { height: 1px; background: var(--cream-300); margin: 0; }
.pinfo { display: flex; flex-direction: column; gap: 5px; }
.lbl { font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--taupe-600); text-transform: uppercase; }
.pdp .lbl { margin: 10px 0; }
.lbl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sizelink { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--navy); padding: 2px 0; }
.sizelink:hover { color: var(--navy-hi); }
.sizelink svg { width: 15px; height: 15px; }
.sizelink u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.sizes button { min-width: 46px; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--navy-400); background: none; color: var(--navy-700); font-weight: 700; font-size: 14px; line-height: 1.3; cursor: pointer; }
.sizes button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
/* PDP colour picker: selectable swatches; selected color name in the label row. */
.lbl-sel { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--navy-700); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches .sw { width: 34px; height: 34px; padding: 3px; border-radius: 50%; border: 1.5px solid var(--cream-300); background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s ease; }
.swatches .sw span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--sw, #ccc); box-shadow: inset 0 0 0 1px rgba(24,24,32,0.1); }
.swatches .sw:hover { border-color: var(--navy-400); }
.swatches .sw.on { border-color: var(--navy); }
/* Card colour dots (non-interactive hint of the available colourways). */
.card .dots { display: inline-flex; gap: 5px; align-items: center; margin-left: 8px; vertical-align: middle; }
.card .dots .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--sw, #ccc); box-shadow: inset 0 0 0 1px rgba(24,24,32,0.14); }
.addbar { display: flex; flex-direction: column; gap: 40px; align-items: flex-start; margin-top: 20px; padding: 20px 0 0; }
.btnrow { display: flex; gap: 14px; width: 100%; }
.btnrow .bigbuy { flex: 1; padding: 0; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--navy-700); border-radius: 12px; }
.qty button { width: 40px; height: 46px; background: none; border: none; font-size: 18px; color: var(--navy-700); cursor: pointer; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.bigbuy { padding: 0 36px; height: 50px; border: none; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .04em; cursor: pointer; }
.bigbuy:hover { background: var(--navy-hi); }
.bigbuy:disabled { opacity: .5; cursor: not-allowed; }
.back { background: none; border: none; cursor: pointer; color: var(--taupe-600); font-size: 14px; font-weight: 600; letter-spacing: .06em; padding: 0; margin-bottom: 8px; }
.stocknote { font-size: 14px; color: var(--navy-400); min-height: 18px; margin-top: 4px; }

/* PDP extra photos — admin-uploaded gallery shots (模特實穿 / 詳情圖…).
   Renders only when the product actually has gallery photos (nobirdy-shop.js
   galleryHTML() returns '' otherwise) — no empty-state placeholder tiles. */
.pdp-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(14px,1.8vw,26px); margin-top: clamp(48px,7vw,80px); }
.mslot { position: relative; min-height: clamp(280px,36vw,420px); border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--cream-300); background: var(--cream-100); }
.mslot img.mphoto { width: 100%; height: 100%; object-fit: cover; }

/* One-line fabric composition, centered below the detail-shot gallery (or
   directly below the PDP hero when there's no gallery). Label + value on one
   row so it reads as a caption, not another heading. */
.pdp-materials { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 8px 10px;
  margin-top: clamp(28px,3.4vw,40px); padding-top: clamp(28px,3.4vw,40px); border-top: 1px solid var(--cream-300); }
.pdp-materials .k { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--taupe-600); }
.pdp-materials .v { font-size: 13.5px; font-weight: 500; color: var(--navy-700); }

/* 尺碼對照表 + Fit Finder modal */
.sz-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(28,31,61,0.42); display: none; }
.sz-scrim.open { display: block; }
.sz-modal { position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(560px,94vw); max-height: 88vh; display: none; flex-direction: column; overflow: hidden; background: var(--white); border: 1px solid var(--cream-300); border-radius: 26px; box-shadow: var(--shadow-lg); }
.sz-modal.open { display: flex; }
.sz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--cream-300); }
.sz-head .k { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy-400); }
.sz-head h3 { font-family: var(--font-sans); font-weight: 600; font-size: 22px; color: var(--navy-700); margin: 6px 0 0; }
.sz-body { padding: 20px 24px 26px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
/* Admin-uploaded size-chart image (standalone /studio upload slot) — shown at
   the top of the modal, above the Fit Finder / measurement table. */
.sz-chart-img { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 14px; background: var(--cream-2); margin-bottom: 18px; }
.sz-close { width: 36px; height: 36px; flex: none; border: none; background: var(--cream-2); border-radius: 10px; cursor: pointer; color: var(--navy-700); display: inline-flex; align-items: center; justify-content: center; }
.sz-close:hover { background: var(--cream-300); }
.finder { background: var(--cream-2); border-radius: 20px; padding: 18px; }
.finder .eb { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.finder .eb svg { width: 15px; height: 15px; }
.finder .ins { display: flex; gap: 12px; }
.finder .fin { flex: 1; }
.finder .fin label { display: block; font-size: 12px; font-weight: 700; color: var(--taupe-600); margin-bottom: 6px; }
.finder .inwrap { display: flex; align-items: center; background: var(--white); border: 1.5px solid var(--cream-300); border-radius: 12px; padding: 0 12px; height: 48px; }
.finder .inwrap:focus-within { border-color: var(--navy); }
.finder .inwrap input { flex: 1; width: 100%; min-width: 0; border: none; background: none; outline: none; font-family: var(--font-sans); font-size: 17px; font-weight: 600; color: var(--navy-700); -moz-appearance: textfield; }
.finder .inwrap input::-webkit-outer-spin-button, .finder .inwrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.finder .inwrap .u { font-size: 13px; color: var(--taupe-600); font-weight: 700; }
.rec { margin-top: 16px; }
.rec-big { display: flex; align-items: center; gap: 14px; background: var(--navy); border-radius: 14px; padding: 14px 18px; color: #fff; }
.rec-big .sz { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1; flex: none; }
.rec-big .tx { font-size: 13.5px; line-height: 1.5; color: var(--cream); }
.rec-hint { font-size: 13.5px; color: var(--taupe-600); line-height: 1.6; padding: 2px; }
.bands { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.band { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--cream-300); border-radius: 12px; background: var(--white); }
.band.hit { border-color: var(--navy); background: rgba(32,53,95,0.05); }
.band .wr { font-size: 14px; color: var(--navy-700); font-weight: 600; }
.band .sz { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--cream-2); font-size: 13px; font-weight: 700; color: var(--navy-700); }
.band.hit .sz { background: var(--navy); color: #fff; }
.sz-table-t { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--taupe-600); margin: 22px 0 12px; }
.sz-table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); }
.sz-table th, .sz-table td { text-align: center; padding: 11px 8px; font-size: 14px; border-bottom: 1px solid var(--cream-300); }
.sz-table th { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--taupe-600); background: var(--cream-2); }
.sz-table th:first-child, .sz-table td:first-child { text-align: left; font-weight: 700; color: var(--navy-700); }
.sz-table td { color: var(--navy-700); font-variant-numeric: tabular-nums; }
.sz-table tr.hit td { background: rgba(32,53,95,0.06); }
.sz-note { font-size: 13px; color: var(--taupe-600); line-height: 1.7; margin-top: 16px; }

/* cart drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(28,31,61,0.4); opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 14px; right: 14px; height: calc(100% - 28px); width: min(420px,92vw); z-index: 61; transform: translateX(calc(100% + 24px)); transition: transform var(--dur-slow) var(--ease-out);
  background: rgba(255,255,255,0.62); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: translateX(0); }
.drawer .dhead { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid var(--cream-300); border-radius: 0; }
.drawer .dhead h3 { font-family: var(--font-sans); font-weight: 600; font-size: 22px; margin: 0; }
.ditems { flex: 1; overflow-y: auto; padding: 8px 26px; }
.ditem { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--cream-300); }
.ditem .tpic { width: 70px; height: 70px; flex: none; border-radius: 12px; overflow: hidden; background: var(--cream-100); display: flex; align-items: center; justify-content: center; }
.ditem .tpic img.photo { width: 88%; height: 88%; object-fit: contain; }
.ditem .tpic img.ph { width: 55%; opacity: .2; }
.ditem .dn { font-weight: 600; font-size: 14px; color: var(--navy-700); }
.ditem .dm { font-size: 14px; color: var(--taupe-600); margin: 3px 0 10px; }
.drow { display: flex; align-items: center; justify-content: space-between; }
.miniqty { display: inline-flex; align-items: center; border: 1px solid var(--cream-300); border-radius: 999px; }
.miniqty button { width: 28px; height: 28px; border: none; background: none; cursor: pointer; color: var(--navy-700); }
.miniqty span { min-width: 24px; text-align: center; font-size: 14px; font-weight: 700; }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; color: var(--taupe-600); }
.dfoot { padding: 18px 26px 26px; border-top: 1px solid var(--cream-300); background: rgba(255,255,255,0.28); }
.meter { font-size: 14px; color: var(--taupe-600); margin-bottom: 14px; }
.subt { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.subt .l { font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--taupe-600); }
.subt .v { font-weight: 700; font-size: 22px; }
.checkout { width: 100%; height: 50px; border: none; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.checkout[hidden] { display: none; }
.checkout:disabled { opacity: .5; cursor: not-allowed; }
.checkout.linepay { background: #06C755; }
.checkout.linepay:hover { background: #05b24b; }
.linepay-note { font-size: 13px; color: var(--taupe-600); line-height: 1.6; background: var(--cream-2); border-radius: var(--r-lg); padding: 13px 15px; }

/* member drawer */
.acct-body { padding: 24px 26px; overflow-y: auto; flex: 1; }
.acct-hint { font-size: 14px; color: var(--taupe-600); margin-top: 14px; text-align: center; line-height: 1.6; }
.acct-user { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.acct-user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--cream-300); }
.acct-user .an { font-family: var(--font-sans); font-size: 18px; font-weight: 600; color: var(--navy-700); line-height: 1.25; }
.acct-user .ae { font-size: 13px; color: var(--taupe-600); overflow-wrap: anywhere; }
.gsi-wrap { display: flex; justify-content: center; margin: 18px 0 6px; min-height: 44px; }
.pts { display: flex; align-items: baseline; gap: 10px; background: var(--cream); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 22px; }
.pts .n { font-family: var(--font-sans); font-weight: 700; font-size: 34px; color: var(--navy-700); }
.pts .u { font-size: 14px; color: var(--taupe-600); }
.order { border: 1px solid var(--cream-300); border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 10px; }
.order .oid { font-size: 14px; letter-spacing: .04em; color: var(--taupe-600); font-family: ui-monospace, Menlo, monospace; }
.order .ot { font-weight: 600; font-size: 14px; color: var(--navy-700); margin: 3px 0; }
.order .op { font-size: 14px; color: var(--taupe-600); }
.adminrow { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--cream-300); text-align: center; }
.adminrow button { background: none; border: none; cursor: pointer; font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--navy-400); letter-spacing: .02em; }
.adminrow button:hover { color: var(--navy); }

.foot-note { text-align: center; color: var(--taupe-600); font-size: 14px; padding: 56px 0 40px; }
.nb-footer { text-align: left; }
.nb-footer__top { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; text-align: center; }
.nb-footer__legal { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 28px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--cream-300); }
.nb-footer__legal div { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; line-height: 1.55; }
.nb-footer__legal strong { color: var(--navy-700); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.nb-footer__legal span, .nb-footer__legal a { color: var(--taupe-600); font-size: 13px; overflow-wrap: anywhere; }
.nb-footer__legal a { border-bottom: 1px solid var(--cream-300); padding-bottom: 1px; }
.nb-footer__game { margin-top: 18px; text-align: center; }
.nb-footer__game a { color: var(--navy-400); font-size: 13px; border-bottom: 1px solid var(--cream-300); padding-bottom: 1px; }
.nb-footer__version { margin-top: 8px; font-size: 12px; opacity: .45; letter-spacing: .04em; text-align: center; }
.langpill { display: inline-flex; border: 1px solid var(--cream-300); border-radius: 999px; padding: 3px; }
.langpill button { background: transparent; color: var(--navy-400); border: none; border-radius: 999px; padding: 5px 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
.langpill button.on { background: var(--navy); color: #fff; }

/* sale price (HIO 一桿進洞 9 折) */
.was { text-decoration: line-through; color: var(--taupe-600); font-weight: 500; margin-right: 8px; }
.now { color: var(--navy); font-weight: 700; }

/* toast notification */
.nb-toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(18px); z-index: 90;
  background: var(--navy); color: #fff; font-family: var(--font-sans); font-weight: 700; font-size: 15px; letter-spacing: .02em;
  padding: 14px 24px; border-radius: 999px; box-shadow: 0 16px 40px rgba(28,31,61,0.28); opacity: 0;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); white-space: nowrap; }
.nb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- real checkout form (kept from the live shop; the kit faked checkout) ---- */
.co { max-width: 720px; margin: 0 auto; padding-top: clamp(28px,4vw,48px); }
.co h1 { font-family: var(--font-sans); font-weight: 600; font-size: clamp(24px,3vw,34px); color: var(--navy-700); margin: 6px 0 18px; }
.cosum { display: flex; flex-direction: column; gap: 10px; background: rgba(0,0,0,0.04); border: 1px solid var(--glass-line); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 22px; }
.cosum .ci { display: flex; align-items: center; gap: 12px; }
.cosum .ci img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--cream-100); padding: 3px; }
.cosum .ci .n { font-weight: 600; font-size: 14px; } .cosum .ci .m { color: var(--taupe-600); font-size: 13px; }
.cosum .ci .p { margin-left: auto; font-weight: 700; }
.cosum .subrow { display: flex; justify-content: space-between; padding-top: 8px; font-size: 13.5px; color: var(--taupe-600); }
.cosum .tot { display: flex; justify-content: space-between; border-top: 1px solid var(--cream-300); padding-top: 10px; margin-top: 4px; font-weight: 700; }
.coform { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.coform .full { grid-column: 1 / -1; }
.coform label { display: block; font-size: 13px; color: var(--taupe-600); margin: 0 0 5px; font-weight: 600; }
.coin, .cosel { width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--cream-300); border-radius: 12px; background: rgba(255,255,255,0.7); font-family: var(--font-sans); font-size: 15px; color: var(--navy-700); }
.coin:focus, .cosel:focus { outline: none; border-color: var(--navy-700); }
.delivery-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; border: 1px solid var(--cream-300); border-radius: 16px; background: rgba(255,255,255,0.52); }
.delivery-toggle button { height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--taupe-600); font: 700 14px var(--font-sans); cursor: pointer; }
.delivery-toggle button.on { background: var(--navy); color: #fff; }
.co-cvs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; border: 1px solid var(--cream-300); border-radius: var(--r-lg); background: rgba(255,255,255,0.48); }
.co-cvs[hidden] { display: none; }
.co-cvs p { grid-column: 1 / -1; margin: -2px 0 0; color: var(--taupe-600); font-size: 13px; line-height: 1.55; }
.cvs-pick { width: 100%; height: 46px; border: 1.5px solid var(--navy); border-radius: 12px; background: var(--navy); color: #fff; font: 700 14px var(--font-sans); cursor: pointer; }
.cvs-pick:hover { background: var(--navy-hi); border-color: var(--navy-hi); }
.cvs-store { grid-column: 1 / -1; padding: 13px 14px; border: 1px solid var(--cream-300); border-radius: 14px; background: rgba(255,255,255,0.68); color: var(--navy-700); font-size: 14px; line-height: 1.45; }
.cvs-store[hidden] { display: none; }
.cvs-store strong { display: block; font-weight: 700; }
.cvs-store span { display: block; margin-top: 2px; color: var(--taupe-600); font-size: 12px; }
.tpf { height: 46px; padding: 0 14px; display: flex; align-items: center; border: 1.5px solid var(--cream-300); border-radius: 12px; background: rgba(255,255,255,0.7); }
.cardrow { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.carderr { color: #c0392b; font-size: 14px; min-height: 18px; margin-top: 6px; }
.pay-provider { margin-top: 2px; padding: 16px 18px; border: 1px solid var(--cream-300); border-radius: var(--r-lg); background: rgba(255,255,255,0.52); }
.pay-provider__head { display: flex; align-items: center; gap: 12px; }
.pay-provider__head img { width: 116px; height: auto; flex: none; }
.pay-provider__head span { color: var(--navy-700); font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.pay-provider p { color: var(--taupe-600); font-size: 13px; line-height: 1.65; margin: 10px 0 0; }
.coinv summary { cursor: pointer; font-size: 14px; color: var(--taupe-600); padding: 8px 0; }
/* Mandatory e-invoice choice (手機條碼 / 統編 / email 雲端發票) */
.coinvreq { margin-top: 18px; }
.coinvreq__t { font-size: 14px; font-weight: 700; color: var(--navy-700); margin: 0 0 10px; }
.invseg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.invseg__b { height: 44px; padding: 0 6px; border: 1.5px solid var(--cream-300); border-radius: 12px; background: rgba(255,255,255,0.7); font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--navy-700); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.invseg__b:hover { border-color: var(--navy-400); }
.invseg__b.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.invpane { margin-top: 12px; }
.invpane label { display: block; font-size: 13px; color: var(--taupe-600); margin: 0 0 5px; font-weight: 600; }
.invhint { font-size: 13px; color: var(--taupe-600); line-height: 1.6; background: var(--cream-2); border-radius: var(--r-lg); padding: 13px 15px; margin: 0; }
.invchoose-err { font-size: 13px; color: #c0392b; min-height: 16px; margin-top: 8px; }
@media (max-width: 620px) { .invseg { grid-template-columns: 1fr; } }
.paynote { font-size: 14px; color: var(--taupe-600); text-align: center; margin: 10px 0 0; }
.costatus { text-align: center; font-size: 14px; min-height: 20px; margin-top: 10px; }
.costatus.error { color: #c0392b; } .costatus.success { color: #1f8f4e; } .costatus.pending { color: var(--taupe-600); }

/* ---- simple policy pages ---- */
.nb-policy { max-width: 760px; padding-top: clamp(40px,6vw,72px); padding-bottom: 28px; }
.nb-policy__eyebrow { display: block; color: var(--taupe-600); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.nb-policy h1 { font-family: var(--font-sans); font-weight: 600; font-size: clamp(28px,4vw,42px); color: var(--navy-700); margin: 0 0 12px; }
.nb-policy__lede { color: var(--taupe-600); font-size: 16px; line-height: 1.75; margin: 0 0 34px; }
.nb-policy h2 { font-family: var(--font-sans); font-size: 20px; font-weight: 700; color: var(--navy-700); margin: 34px 0 10px; }
.nb-policy p { color: var(--navy-700); line-height: 1.75; margin: 0 0 12px; }
.nb-policy ul { list-style: none; padding: 0; margin: 0 0 14px; }
.nb-policy li { position: relative; color: var(--navy-700); line-height: 1.75; padding-left: 18px; margin-bottom: 6px; }
.nb-policy li::before { content: '·'; position: absolute; left: 3px; top: 0; color: var(--taupe-600); }
.nb-policy__box { margin-top: 34px; padding: 20px 22px; border: 1px solid var(--cream-300); border-radius: var(--r-lg); background: rgba(255,255,255,0.52); }
.nb-policy__box dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 18px; margin: 0; }
.nb-policy__box dt { color: var(--taupe-600); font-weight: 700; font-size: 14px; }
.nb-policy__box dd { color: var(--navy-700); margin: 0; }
.nb-policy__box a { border-bottom: 1px solid var(--cream-300); padding-bottom: 1px; }

/* ---- order confirmation ---- */
.ord { max-width: 560px; margin: 0 auto; text-align: center; padding-top: clamp(28px,5vw,52px); }
.oicon { width: 60px; height: 60px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 14px; }
.oicon.ok { background: rgba(31,143,78,.12); color: #1f8f4e; } .oicon.bad { background: rgba(192,57,43,.12); color: #c0392b; } .oicon.wait { background: var(--cream-100); color: var(--taupe-600); }
.ord h1 { font-family: var(--font-sans); font-weight: 600; font-size: clamp(24px,3vw,32px); margin: 0 0 8px; }
.olines { text-align: left; background: rgba(0,0,0,.03); border: 1px solid var(--cream-300); border-radius: var(--r-lg); padding: 18px 20px; margin: 22px 0; }
.olines dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.olines dt { color: var(--taupe-600); font-size: 14px; } .olines dd { margin: 0; text-align: right; }
@media (max-width: 620px) { .coform, .co-cvs { grid-template-columns: 1fr; } }

/* ============================================================
   手機版排版 — Mobile layout (≤720px)
   ============================================================ */
.menubtn { display: none; }
.catmenu, .catscrim { display: none; }
@media (max-width: 720px) {
  body { font-size: 16px !important; }
  .wrap { padding: 0 16px; }
  .sale-banner { gap: 8px; padding: 7px 10px; font-size: 12px; letter-spacing: .02em; }

  /* top bar — hamburger (left) + tools (right); wordmark hidden */
  .bar { top: 8px; padding: 0 12px; }
  body.sale-active .bar { top: 44px; }
  .bar-inner { padding: 7px 8px; gap: 10px; height: auto; }
  .bar .wm { display: none; }
  .tools { gap: 2px; }
  .iconbtn { width: 38px; height: 38px; }
  .menubtn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: none; background: none; color: var(--navy-700); cursor: pointer; }
  .menubtn.on { background: rgba(255,255,255,0.6); }
  .searchbox { top: 62px; right: 16px; }
  body.sale-active .searchbox { top: 98px; }

  /* category popover */
  .catscrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(28,31,61,0.3); opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-out); }
  .catscrim.open { opacity: 1; pointer-events: auto; }
  .catmenu { display: block; position: fixed; top: 60px; left: 16px; z-index: 45; min-width: 208px;
    background: rgba(255,255,255,0.74); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid var(--glass-line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 8px;
    opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top left; pointer-events: none;
    transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
  body.sale-active .catmenu { top: 96px; }
  .catmenu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
  .catmenu .index { display: flex; flex-direction: column; gap: 2px; }
  .catmenu .index a { display: flex; align-items: center; font-size: 16px; font-weight: 700; letter-spacing: .02em; color: var(--navy-700); padding: 13px 18px; border-radius: 13px; }
  .catmenu .index a.on { background: var(--navy); color: #fff; }

  /* hero — same centered lockup, scaled down; no sticky overlap */
  .hero { gap: 16px !important; padding: 34px 0 22px !important; }
  .hero .nirdy { width: 132px !important; }
  .entry .ewm { height: 52px !important; }
  .lockup { gap: 10px; }
  .slogan { font-size: 28px; padding: 0 0 12px; }
  .senses { margin-top: 12px; }
  .senses li { font-size: 16.5px; }
  .hero-pin { position: static; top: auto; }
  .home-body { padding-top: 0; }

  .sectitle { font-size: 16px; margin: 6px 0 16px; }

  /* product grid — two-up; cards size to content so the price/buy row never clips */
  .grid { grid-template-columns: repeat(2,1fr) !important; gap: 14px !important; align-items: stretch; }
  .card { border-radius: 22px; aspect-ratio: auto; height: auto; }
  .pic { aspect-ratio: 1/1; padding: 10px 10px 4px; }
  .body { padding: 13px 13px 12px; gap: 6px; }
  .hw { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; line-height: 1.15; }
  .meta { font-size: 12px; gap: 7px; align-items: baseline; }
  .def { font-size: 12.5px; line-height: 1.5; }
  .foot { padding: 9px 2px 0; }
  .pr { font-size: 15px; }
  .buy .icon svg { width: 20px; height: 20px; }

  /* PDP — single column, tighter */
  .pdp { gap: 20px !important; padding-top: 18px !important; }
  .pdp h1 { font-size: 26px !important; }
  .pdp .price-lg { font-size: 22px; margin: 10px 0 16px !important; }
  .btnrow { flex-wrap: wrap; gap: 12px; }
  .btnrow .bigbuy { min-width: 120px; }
  .addbar { gap: 40px !important; }
  .sizes button { min-width: 44px; min-height: 44px; }
  .pdp-media { margin-top: 40px; }
  .mslot { min-height: 240px; }

  /* drawers — full screen */
  .drawer { top: 0; right: 0; height: 100%; width: 100%; border-radius: 0; }
  .drawer .dhead { padding: 18px 20px; }
  .ditems { padding: 8px 20px; }
  .dfoot { padding: 16px 20px 22px; }
  .acct-body { padding: 20px; }

  /* real checkout form — single column on phones */
  .co { padding-top: 18px; }
  .coform { grid-template-columns: 1fr; }

  .foot-note { padding: 40px 0 32px; }
  .nb-footer__legal { grid-template-columns: 1fr; gap: 14px; margin-top: 20px; padding-top: 18px; }
  .pay-provider__head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pay-provider__head img { width: 104px; }
  .nb-policy__box dl { grid-template-columns: 1fr; gap: 4px; }
  .nb-policy__box dt { margin-top: 10px; }
  .nb-policy__box dt:first-child { margin-top: 0; }

  /* fit-finder inputs stack on small phones */
  .finder .ins { flex-direction: column; }
}
