/* ZONE 58 ✦ 潮流選物店 — 官網樣式 */
:root {
  --ink: #111;
  --ink-2: #333;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --bg-soft: #f4f4f4;
  --gray: #6b6869;       /* 公告列 / 浮動按鈕 */
  --btn-gray: #808080;   /* 查看更多 */
  --dark: #2b2b2b;       /* 現在預購 */
  --red: #7d1a12;        /* 立即購買 */
  --container: 1100px;
  --header-h: 64px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select { font: inherit; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.rule { border: 0; border-top: 1px solid #555; margin: 0; }

/* ---------- 公告列 ---------- */
.announce {
  background: var(--gray); color: #eee;
  font-size: 12px; letter-spacing: .08em; text-align: center;
  padding: 11px 16px;
}

/* ---------- 頁首 ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 28px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  transition: box-shadow .2s;
}
.header.scrolled { box-shadow: 0 1px 0 var(--line); }
.header-left { display: flex; align-items: center; gap: 20px; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.logo img { width: 40px; height: 40px; border-radius: 50%; transition: transform .3s var(--ease); }
.logo:hover img { transform: rotate(-8deg); }

.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; position: relative; transition: background .15s; }
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn.light { color: #fff; }
.icon-btn.light:hover { background: rgba(255,255,255,.12); }
.icon-btn svg { width: 19px; height: 19px; }

.text-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); padding: 6px 0; }
.text-btn .chev { width: 12px; height: 12px; }
.text-btn .globe { width: 15px; height: 15px; stroke-width: 1.5; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 120px;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.08);
  padding: 6px 0; opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a { display: block; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu a.active { background: var(--bg-soft); }

.badge {
  position: absolute; top: 0; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
  border: 1.5px solid #fff;
}
.badge.bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- 首頁 ---------- */
.home-hero { width: min(725px, 100% - 40px); margin: 16px auto 0; }
.home-hero .strip { height: 48px; overflow: hidden; margin-bottom: 18px; }
.home-hero .strip img { width: 100%; height: 100%; object-fit: cover; }
.slider { position: relative; overflow: hidden; aspect-ratio: 725 / 464; background: #ddd; }
.slider .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.slider .slide.on { opacity: 1; }
.slider img { width: 100%; height: 100%; object-fit: cover; }
.slider .dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.slider .dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.slider .dots button.on { background: #fff; }

.section { width: min(815px, 100% - 40px); margin: 40px auto 0; }
.section-title { text-align: center; font-size: 22px; font-weight: 500; letter-spacing: .06em; margin: 22px 0 26px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0 36px; }
.btn-more {
  display: block; width: 168px; margin: 38px auto 30px; padding: 3px 0;
  background: var(--btn-gray); color: #fff; text-align: center;
  font-size: 13px; font-weight: 500; letter-spacing: .4em; text-indent: .4em;
  transition: background .2s;
}
.btn-more:hover { background: var(--ink); }

/* ---------- 商品卡 ---------- */
.card { display: block; }
.card .thumb { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-soft); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; }
.card .thumb img.alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .thumb img.alt { opacity: 1; }
.card:hover .thumb img { transform: scale(1.03); }
.card .tag { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: 11px; padding: 1px 7px; letter-spacing: .05em; }
.card .quick-add {
  position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px 0;
  background: rgba(255,255,255,.92); font-size: 12px; letter-spacing: .1em; text-align: center;
  transform: translateY(130%); transition: transform .3s var(--ease);
}
.card:hover .quick-add { transform: none; }
.card .quick-add:hover { background: var(--ink); color: #fff; }
.card .name { text-align: center; font-size: 13px; margin-top: 10px; color: var(--ink-2); }
.card .price { text-align: center; font-size: 13px; font-weight: 700; }

/* ---------- 分類頁 ---------- */
.breadcrumb { background: var(--bg-soft); font-size: 12px; color: var(--muted); padding: 7px 0; margin-top: 8px; }
.breadcrumb a:hover { color: var(--ink); }
.shop { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 36px 0 60px; }
.cat-nav { font-size: 13px; position: sticky; top: calc(var(--header-h) + 20px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; }
.cat-nav > li { margin-bottom: 4px; }
.cat-nav .row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.cat-nav a { color: var(--ink-2); }
.cat-nav a.active { font-weight: 700; color: var(--ink); }
.cat-nav a:hover { color: var(--ink); }
.cat-nav .toggle svg { width: 13px; height: 13px; color: var(--muted); transition: transform .2s; }
.cat-nav li.closed .toggle svg { transform: rotate(180deg); }
.cat-nav .sub { padding-left: 6px; overflow: hidden; }
.cat-nav li.closed .sub { display: none; }
.cat-nav .sub a { display: block; padding: 6px 0; color: #999; letter-spacing: .03em; }
.cat-nav .sub a.active, .cat-nav .sub a:hover { color: var(--ink); }

.shop-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 22px; }
.shop-head h1 { font-size: 18px; font-weight: 400; margin: 0; letter-spacing: .05em; }
.shop-head h1 small { font-size: 12px; color: var(--muted); margin-left: 8px; }
.tools { display: flex; gap: 6px; align-items: center; }
.tools select { border: 1px solid var(--line); padding: 4px 8px; font-size: 12px; background: #fff; }
.tools .icon-btn svg { width: 16px; height: 16px; }
.tools .icon-btn.on { background: var(--bg-soft); }
.grid-shop { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 50px 8px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- 商品頁 ---------- */
.pdp { display: grid; grid-template-columns: 96px minmax(0, 336px) minmax(0, 346px); gap: 12px 12px; justify-content: center; padding: 14px 0 60px; }
.pdp-thumbs { display: flex; flex-direction: column; gap: 9px; position: sticky; top: calc(var(--header-h) + 14px); align-self: start; }
.pdp-thumbs button { aspect-ratio: 3 / 4; overflow: hidden; opacity: .55; transition: opacity .2s; outline: 1px solid transparent; }
.pdp-thumbs button.on, .pdp-thumbs button:hover { opacity: 1; }
.pdp-thumbs button.on { outline-color: var(--ink); outline-offset: 1px; }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-gallery { display: flex; flex-direction: column; gap: 10px; }
.pdp-gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--bg-soft); }
.share { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 8px 0 0 0; margin-left: -60px; }
.share a { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.share a svg { width: 13px; height: 13px; }

.pdp-info { padding-left: 42px; position: sticky; top: calc(var(--header-h) + 14px); align-self: start; }
.pdp-info h1 { font-size: 24px; font-weight: 400; letter-spacing: .08em; margin: 18px 0 14px; }
.pdp-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; padding-bottom: 14px; border-bottom: 1px solid #ccc; margin: 0; }
.promo { border-left: 2px solid var(--ink); padding: 2px 0 2px 8px; margin: 38px 0 0; font-size: 12.5px; line-height: 1.7; }
.promo .more-text { display: none; }
.promo.open .more-text { display: block; }
.btn-ghost { display: flex; align-items: center; gap: 2px; margin: 16px auto 0; border: 1px solid #ddd; padding: 1px 8px; font-size: 12px; color: var(--muted); border-radius: 3px; }
.btn-ghost svg { width: 12px; height: 12px; }
.pdp-price { font-family: "Noto Serif TC", serif; font-size: 18px; font-weight: 700; margin: 18px 0 10px; }
.preorder-box { background: var(--dark); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 3px; line-height: 1.6; }
.instock-box { background: var(--bg-soft); font-size: 12.5px; padding: 6px 10px; border-radius: 3px; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.select { position: relative; }
.select select { appearance: none; width: 100%; border: 1px solid #ddd; border-radius: 3px; padding: 6px 36px 6px 12px; background: #fff; cursor: pointer; }
.select svg { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke-width: 2.4; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid #ddd; padding: 4px 14px; font-size: 13px; border-radius: 3px; }
.chips button.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.qty { display: grid; grid-template-columns: 32px 1fr 32px; border: 1px solid #ddd; border-radius: 3px; height: 32px; }
.qty button { display: grid; place-items: center; }
.qty button svg { width: 14px; height: 14px; stroke-width: 2.6; }
.qty input { border: 0; border-inline: 1px solid #ddd; text-align: center; width: 100%; outline: 0; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm { grid-template-columns: 26px 36px 26px; height: 28px; width: 90px; font-size: 13px; }
.buy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 3px; font-size: 13.5px; font-weight: 500; letter-spacing: .05em; color: #fff; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 15px; height: 15px; }
.btn-dark { background: var(--dark); }
.btn-red { background: var(--red); }
.btn-outline { color: var(--ink); border: 1px solid var(--ink); background: #fff; }
.btn-outline:hover { background: var(--ink); color: #fff; filter: none; }
.btn-block { width: 100%; height: 44px; }
.wish { display: flex; align-items: center; gap: 3px; margin: 16px auto 0; font-size: 13px; }
.wish svg { width: 15px; height: 15px; }
.wish.on svg { fill: var(--red); stroke: var(--red); }

.pdp-desc { font-size: 12px; letter-spacing: .08em; line-height: 1.6; color: var(--ink-2); margin-top: 60px; }
.pdp-desc h3 { font-size: 12px; font-weight: 400; margin: 0 0 16px; }
.pdp-desc ol, .pdp-desc ul { padding: 0; margin: 0 0 40px; }
.pdp-desc li { margin-bottom: 16px; }
.pdp-desc ol { list-style: decimal inside; }
.pdp-desc ul li::before { content: "- "; }

.related { padding-bottom: 40px; }

/* ---------- 購物車 / 結帳 ---------- */
.page-title { text-align: center; font-size: 22px; font-weight: 500; letter-spacing: .1em; margin: 40px 0 8px; }
.steps { display: flex; justify-content: center; gap: 0; margin: 18px auto 36px; font-size: 12px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li + li::before { content: ""; width: 60px; height: 1px; background: var(--line); margin: 0 12px; }
.steps b { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #ccc; display: grid; place-items: center; font-weight: 500; font-size: 11px; }
.steps li.on { color: var(--ink); }
.steps li.on b { background: var(--ink); border-color: var(--ink); color: #fff; }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding-bottom: 70px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; padding: 10px 0; border-bottom: 1px solid var(--ink); }
.cart-table td { padding: 18px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table th:nth-child(n+2), .cart-table td:nth-child(n+2) { text-align: center; }
.cart-table th:last-child, .cart-table td:last-child { text-align: right; }
.line-item { display: flex; gap: 14px; align-items: center; }
.line-item img { width: 72px; aspect-ratio: 3/4; object-fit: cover; }
.line-item .meta { font-size: 13px; }
.line-item .meta small { display: block; color: var(--muted); font-size: 12px; }
.line-item .meta .pre { display: inline-block; margin-top: 4px; font-size: 11px; background: var(--dark); color: #fff; padding: 0 6px; }
.remove { font-size: 12px; color: var(--muted); text-decoration: underline; margin-top: 6px; display: inline-block; }
.remove:hover { color: var(--red); }
.td-qty .qty { margin: 0 auto; }

.summary { background: var(--bg-soft); padding: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.summary h3 { margin: 0 0 16px; font-size: 15px; font-weight: 500; letter-spacing: .08em; }
.summary .row { display: flex; justify-content: space-between; font-size: 13px; margin: 8px 0; }
.summary .row.total { border-top: 1px solid #ccc; margin-top: 14px; padding-top: 14px; font-size: 16px; font-weight: 700; }
.summary .btn { margin-top: 18px; }
.summary .continue { display: block; text-align: center; font-size: 12px; margin-top: 12px; color: var(--muted); text-decoration: underline; }
.ship-bar { font-size: 12px; margin-bottom: 18px; }
.ship-bar .track { height: 4px; background: #ddd; margin-top: 6px; border-radius: 2px; overflow: hidden; }
.ship-bar .fill { height: 100%; background: var(--ink); transition: width .4s var(--ease); }
.coupon { display: flex; gap: 6px; margin: 16px 0 6px; }
.coupon input { flex: 1; border: 1px solid #ccc; padding: 6px 10px; font-size: 13px; background: #fff; min-width: 0; }
.coupon button { padding: 0 14px; background: var(--ink); color: #fff; font-size: 12px; }

.checkout-form { display: grid; gap: 28px; }
.checkout-form fieldset { border: 0; padding: 0; margin: 0; }
.checkout-form legend { font-size: 15px; font-weight: 500; letter-spacing: .08em; padding-bottom: 10px; border-bottom: 1px solid var(--ink); width: 100%; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.input label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.input input, .input select { width: 100%; border: 1px solid #ccc; padding: 8px 10px; border-radius: 2px; background: #fff; }
.input input:focus, .input select:focus { outline: none; border-color: var(--ink); }
.radio-list { display: grid; gap: 8px; }
.radio { display: flex; align-items: center; gap: 10px; border: 1px solid #ddd; padding: 12px 14px; cursor: pointer; font-size: 13px; transition: border-color .15s; }
.radio:has(input:checked) { border-color: var(--ink); }
.radio input { accent-color: var(--ink); }
.radio .fee { margin-left: auto; color: var(--muted); font-size: 12px; }
.check { display: flex; gap: 8px; font-size: 12px; align-items: center; }
.check input { accent-color: var(--ink); }
.summary-items { display: grid; gap: 10px; margin-bottom: 14px; max-height: 260px; overflow: auto; }
.summary-items .it { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; font-size: 12px; align-items: center; }
.summary-items img { width: 48px; aspect-ratio: 3/4; object-fit: cover; }
.summary-items small { color: var(--muted); display: block; }

.done { text-align: center; padding: 60px 0 90px; }
.done .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; }
.done .ok svg { width: 30px; height: 30px; stroke-width: 2.4; }
.done p { color: var(--ink-2); }
.done .btn { padding: 0 28px; margin-top: 18px; }

.static-page { max-width: 720px; margin: 0 auto; padding: 20px 0 70px; font-size: 13.5px; line-height: 1.9; }
.static-page h2 { font-size: 15px; margin-top: 30px; }

/* ---------- 頁尾 ---------- */
.footer { margin-top: 40px; }
.footer-inner { width: min(815px, 100% - 40px); } /* 和上方內容區同寬 */
.footer-grid { display: grid; grid-template-columns: 1.25fr .9fr .9fr 1.45fr; gap: 24px; padding: 40px 0 32px; font-size: 12.5px; line-height: 1.7; }
.f-col h4 { font-size: 12px; font-weight: 600; letter-spacing: .12em; margin: 0 0 14px; color: var(--ink); }
.f-col h4 small { font-size: 10px; font-weight: 400; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-left: 4px; }
.f-col li { margin-bottom: 8px; color: var(--ink-2); }
.f-col a { color: var(--ink-2); transition: color .15s; }
.f-col a:hover { color: var(--ink); text-decoration: underline; }
.f-contact li { margin-bottom: 10px; }
.f-label { display: block; font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.f-contact .u { text-decoration: underline; }
.f-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; letter-spacing: .03em; }
.f-logo img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.socials { display: flex; gap: 6px; margin-top: 14px; }
.socials a { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .15s, background .15s; }
.socials a:hover { transform: translateY(-2px); background: #444; }
.socials svg { width: 14px; height: 14px; stroke-width: 2; }
.socials .dot { fill: currentColor; stroke: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 16px 0 30px; }
.f-legal { text-align: right; font-size: 11px; color: #999; line-height: 1.8; }
.f-legal p { margin: 0; }
.f-legal .sep { margin: 0 6px; color: #ccc; }
.payments { display: flex; flex-wrap: wrap; gap: 8px; }
.pay { font-size: 9px; font-weight: 700; border: 1px solid #e3e3e3; border-radius: 3px; padding: 2px 6px; color: #555; letter-spacing: .02em; display: inline-flex; align-items: center; }
.pay.visa { color: #1a1f71; font-style: italic; font-size: 10px; }
.pay.mc i { width: 10px; height: 10px; border-radius: 50%; background: #eb001b; display: inline-block; }
.pay.mc i + i { background: #f79e1b; margin-left: -4px; opacity: .9; }
.pay.seven { color: #e5761e; }
.pay.line { color: #06c755; }
.copyright { color: #aaa; font-size: 11px; margin: 0; }

@media (max-width: 900px) and (min-width: 641px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 浮動按鈕 / 聊天 ---------- */
.floating { position: fixed; left: 38px; bottom: 38px; z-index: 30; display: flex; flex-direction: column; gap: 10px; }
.fab { width: 41px; height: 41px; border-radius: 50%; background: var(--gray); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: transform .2s var(--ease), background .2s; }
.fab:hover { transform: scale(1.08); background: var(--ink); }
.fab svg { width: 18px; height: 18px; }
.floating.chat-open .fab:not(:last-child) { opacity: 0; pointer-events: none; }
.fab-toggle { display: none; }

.chat {
  position: fixed; left: 38px; bottom: 92px; z-index: 35;
  width: 230px; height: 462px; background: #fff; border: 1px solid #ddd;
  display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,.15);
  transform-origin: bottom left; transform: scale(.9); opacity: 0; visibility: hidden; transition: .2s var(--ease);
}
.chat.open { transform: none; opacity: 1; visibility: visible; }
.chat-head { background: var(--gray); color: #fff; display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; padding: 8px 4px; }
.chat-title { text-align: center; line-height: 1.3; }
.chat-title img { width: 20px; height: 20px; border-radius: 50%; margin: 0 auto 4px; }
.chat-title strong { font-size: 11px; display: block; }
.chat-title small { font-size: 8.5px; opacity: .85; }
.chat-body { flex: 1; overflow: auto; padding: 8px 10px; font-size: 10.5px; }
.chat-date { text-align: center; color: var(--muted); font-size: 9px; margin-bottom: 6px; }
.bubble { border-radius: 10px; margin-bottom: 8px; max-width: 92%; }
.bubble.bot { background: #e9e9ed; margin-left: 20px; }
.bubble.bot p { margin: 0; padding: 6px 8px 0; }
.bubble.bot p:last-of-type { padding-bottom: 8px; }
.bubble.me { background: var(--ink); color: #fff; margin-left: auto; padding: 6px 10px; }
.quick { background: #fff; border: 1px solid #e3e3e3; border-radius: 0 0 10px 10px; }
.quick button { display: block; width: 100%; color: #3c72d6; padding: 6px 0; border-top: 1px solid #eee; }
.quick button:first-child { border-top: 0; }
.chat-input { display: flex; align-items: center; gap: 4px; padding: 8px; border-top: 1px solid #eee; }
.chat-input input { flex: 1; min-width: 0; background: #f0f0f2; border: 0; border-radius: 14px; padding: 5px 10px; font-size: 11px; outline: 0; }
.chat-input .icon-btn { width: 28px; height: 28px; color: #999; }
.chat-input .icon-btn svg { width: 16px; height: 16px; }

/* ---------- 抽屜 / 遮罩 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 50; opacity: 0; visibility: hidden; transition: .25s; }
.overlay.on { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; transition: transform .35s var(--ease); }
.drawer-left { left: 0; width: 280px; background: #1b1b1b; color: #ddd; transform: translateX(-100%); }
.drawer-right { right: 0; width: 380px; max-width: 100%; background: #fff; transform: translateX(100%); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 14px 24px; font-size: 13px; letter-spacing: .2em; border-bottom: 1px solid rgba(255,255,255,.08); }
.drawer-head.dark-text { color: var(--ink); border-color: var(--line); font-weight: 500; }
.menu-nav { flex: 1; overflow: auto; padding: 12px 24px; font-size: 14px; }
.menu-nav > a, .menu-nav > details > summary { display: flex; justify-content: space-between; padding: 10px 0; cursor: pointer; list-style: none; }
.menu-nav summary::-webkit-details-marker { display: none; }
.menu-nav summary svg { width: 14px; height: 14px; transition: transform .2s; }
.menu-nav details[open] summary svg { transform: rotate(180deg); }
.menu-nav details a { display: block; padding: 7px 0 7px 12px; color: #999; font-size: 13px; }
.menu-nav a:hover { color: #fff; }
.drawer-foot { padding: 18px 24px; border-top: 1px solid rgba(255,255,255,.08); display: flex; gap: 18px; font-size: 12px; color: #999; }

.mini-cart-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mini-items { flex: 1; overflow: auto; padding: 4px 20px; }
.mini-item { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini-item img { width: 70px; aspect-ratio: 3/4; object-fit: cover; }
.mini-item small { display: block; color: var(--muted); font-size: 12px; }
.mini-item .bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.mini-foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); }
.mini-foot .row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.mini-foot .btn + .btn { margin-top: 8px; }
.mini-empty { flex: 1; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 16px; }
.mini-empty .btn { padding: 0 24px; }

/* ---------- 搜尋 ---------- */
.search { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #fff; transform: translateY(-100%); transition: transform .3s var(--ease); box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.search.open { transform: none; }
.search-form { display: flex; align-items: center; gap: 12px; width: min(720px, 100% - 40px); margin: 0 auto; padding: 22px 0; }
.search-form input { flex: 1; border: 0; border-bottom: 1px solid var(--ink); padding: 8px 0; font-size: 16px; outline: 0; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 20px; font-size: 13px; border-radius: 3px; opacity: 0; transition: .3s var(--ease); z-index: 80; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.fade-in { animation: fade .4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- 響應式 ---------- */
.menu-btn { display: inline-grid; }
@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; }
  .cat-nav { display: none; }
  .pdp { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .pdp-thumbs { display: none; }
  .pdp-gallery { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .pdp-gallery::-webkit-scrollbar { display: none; }
  .pdp-gallery img { flex: 0 0 100%; scroll-snap-align: start; }
  .pdp-info { padding-left: 0; position: static; }
  .share { margin-left: 0; }
  .cart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .header { padding: 0 10px; }
  .hide-sm { display: none !important; }
  .header-left { gap: 6px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); padding: 0; gap: 10px; }
  .grid-3 > :nth-child(3) { display: none; }
  .grid-shop { --cols: 2 !important; gap: 30px 8px; }
  /* 手機：品牌在上 → 兩欄連結並排 → 聯絡資訊 → 付款與版權 */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding: 32px 0 24px; }
  .f-brand, .f-contact { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding-bottom: 90px; }
  .f-legal { text-align: left; }
  .floating { left: 14px; bottom: 14px; flex-direction: column-reverse; }
  .fab { width: 42px; height: 42px; }
  .fab-toggle { display: grid; }
  .floating .fab:not(.fab-toggle) { opacity: 0; transform: translateY(12px) scale(.8); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
  .floating.expanded .fab:not(.fab-toggle) { opacity: 1; transform: none; pointer-events: auto; }
  .floating.expanded .fab:nth-child(2) { transition-delay: .03s; }
  .floating.expanded .fab:nth-child(3) { transition-delay: .06s; }
  .floating.expanded .fab:nth-child(4) { transition-delay: .09s; }
  .floating.expanded .fab:nth-child(5) { transition-delay: .12s; }
  .fab-toggle .ico-close, .floating.expanded .fab-toggle .ico-open { display: none; }
  .floating.expanded .fab-toggle .ico-close { display: block; }
  .floating.chat-open .fab-toggle { opacity: 0; pointer-events: none; }
  .chat { left: 14px; right: 14px; width: auto; bottom: 64px; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 8px; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .cart-table td { border: 0; padding: 0; }
  .cart-table td:first-child { grid-column: 1 / -1; }
  .cart-table td.td-price { display: none; }
  .td-qty .qty { margin: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .steps li + li::before { width: 24px; }
}

/* ---------- 銀行轉帳 / 訂單頁 ---------- */
.pay-hint { font-size: 12px; color: var(--ink-2); background: var(--bg-soft); padding: 10px 12px; margin: 10px 0 0; line-height: 1.7; }
.order-page { max-width: 560px; padding-bottom: 70px; }
.order-page > .ok { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.order-page > .ok svg { width: 26px; height: 26px; stroke-width: 2.4; }
.order-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--ink); padding: 18px 0 10px; font-size: 14px; }
.status { font-size: 12px; padding: 2px 10px; border-radius: 20px; background: #eee; }
.st-awaiting_transfer { background: #fff3d6; color: #8a5a00; }
.st-verifying { background: #e3ecff; color: #2a4fa0; }
.st-paid, .st-shipped { background: #e1f5e6; color: #1d6b34; }
.st-cancelled { background: #f3e1e1; color: var(--red); }
.st-desc { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.t-info { font-size: 13px; background: var(--bg-soft); padding: 10px 12px; }
.bank-card { border: 1px solid var(--ink); padding: 18px 20px; margin-top: 20px; }
.bank-card h3, .transfer-form h3 { margin: 0 0 12px; font-size: 14px; font-weight: 500; letter-spacing: .08em; }
.bank-card dl { display: grid; grid-template-columns: 80px 1fr; gap: 8px 10px; margin: 0; font-size: 13px; }
.bank-card dt { color: var(--muted); }
.bank-card dd { margin: 0; }
.bank-card .acct { font-size: 16px; letter-spacing: .05em; }
.link { font-size: 12px; text-decoration: underline; color: var(--muted); margin-left: 6px; }
.transfer-form { margin-top: 20px; display: grid; gap: 14px; }
.order-items { margin-top: 26px; border-top: 1px solid var(--line); }
.order-items .it { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.order-items small { display: block; color: var(--muted); font-size: 12px; }
.order-items .total { font-size: 15px; border-bottom: 0; }
.order-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 20px; }
.order-actions .btn { padding: 0 18px; height: 40px; }
.err { color: var(--red); font-size: 13px; margin: 0; }

/* ---------- 後端串接後新增 ---------- */
.loading { padding: 120px 0; text-align: center; color: var(--muted); }
.gift-hint { margin-top: 6px; color: var(--red); }
.recent-orders { margin-top: 30px; font-size: 13px; }
.recent-orders h3 { font-size: 13px; font-weight: 500; color: var(--muted); }
.recent-orders a { display: block; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bubble p { margin: 0; }
.bubble time { display: block; font-size: 9px; opacity: .55; padding: 0 8px 5px; text-align: right; }
.bubble.me time { padding: 2px 0 0; }
#chat-status.on { color: #9df0b4; }
.fab[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge); position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; border: 2px solid #fff;
}
.fab { position: relative; }
.pay { font-size: 11px; padding: 3px 10px; }

/* ---------- AI 客服 ---------- */
.bubble .who { display: block; font-size: 9px; color: var(--muted); padding: 5px 8px 0; letter-spacing: .05em; }
.bubble.typing p { display: flex; gap: 4px; padding: 10px 12px !important; }
.bubble.typing i { width: 6px; height: 6px; border-radius: 50%; background: #999; animation: blink 1.2s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .2s; }
.bubble.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- 客服：隱私說明、聯絡方式、找回對話 ---------- */
.chat-notice { font-size: 9.5px; color: var(--muted); background: #f6f6f6; border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; line-height: 1.5; }
.chat-notice a { color: #3c72d6; text-decoration: underline; }
.chat-card { display: grid; gap: 6px; background: #fff; border: 1px solid #ddd; border-radius: 10px; padding: 10px; margin: 6px 0 10px; font-size: 11px; }
.chat-card b { font-size: 11.5px; }
.chat-card small { color: var(--muted); font-size: 10px; margin-top: -4px; }
.chat-card input { border: 1px solid #ddd; border-radius: 6px; padding: 5px 8px; font-size: 11px; outline: 0; }
.chat-card input:focus { border-color: var(--ink); }
.chat-card-actions { display: flex; justify-content: flex-end; gap: 6px; }
.chat-card-actions button { font-size: 11px; padding: 3px 10px; border-radius: 12px; color: var(--muted); }
.chat-card-actions .primary { background: var(--ink); color: #fff; }
.chat-card.done { color: #1d6b34; background: #eef8f0; border-color: #cfe9d6; }

/* ---------- LINE 綁定 ---------- */
.line-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid #c8ecd5; background: #f2fbf5; padding: 12px 14px; margin-top: 16px; font-size: 13px; }
.line-card small { display: block; color: var(--muted); font-size: 12px; }
.line-card.bound { color: #1d6b34; }
.line-btn { background: #06c755; padding: 0 16px; flex: none; }
.line-help { border: 1px dashed #c8ecd5; border-top: 0; padding: 10px 14px; font-size: 13px; }
.line-help p { margin: 0 0 6px; }
.line-help ol { margin: 0 0 4px; padding-left: 20px; line-height: 1.9; }
.line-help a { text-decoration: underline; }
.line-help small { color: var(--muted); }
.bind-code { font-size: 15px; letter-spacing: .05em; }

/* ---------- 會員 ---------- */
.member-page { max-width: 560px; padding-bottom: 70px; }
.member-card { border: 1px solid var(--line); padding: 18px 20px; margin-top: 16px; display: grid; gap: 10px; font-size: 13.5px; }
.member-card small { display: block; color: var(--muted); font-size: 12px; }
.member-card.center { text-align: center; justify-items: center; }
.member-card .lead { font-size: 15px; margin: 0; }
.member-card .perks { text-align: left; margin: 0; padding-left: 20px; line-height: 2; color: var(--ink-2); }
.member-card.profile { grid-template-columns: 52px 1fr auto; align-items: center; }
.member-card.profile img, .member-card .avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); }
.member-h { font-size: 14px; font-weight: 500; letter-spacing: .08em; margin: 30px 0 0; }
.member-page .order-items a.it:hover { background: var(--bg-soft); }
.member-bar { background: var(--bg-soft); padding: 10px 14px; font-size: 13px; }
.member-bar a { text-decoration: underline; font-weight: 500; }
.line-btn.btn-block { height: 44px; color: #fff; }

/* ---------- 購物金 ---------- */
.credit-line { font-size: 13px; margin: 0 0 8px; }
.credit-line a, .credit-note a { text-decoration: underline; }
.credit-row { display: flex; gap: 8px; }
.credit-row input { width: 140px; border: 1px solid #ccc; padding: 8px 10px; }
.credit-row .btn { padding: 0 14px; height: 38px; }
.credit-note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.credit-card { grid-template-columns: 1fr auto; align-items: end; }
.credit-big { display: block; font-size: 26px; font-weight: 700; margin-top: 2px; }
.credit-card .warn { color: var(--red); }
.credit-links { display: grid; gap: 6px; text-align: right; font-size: 12.5px; }
.credit-links a { text-decoration: underline; }
.order-items .plus { color: #1d6b34; }
.order-items .minus { color: var(--ink-2); }
.static-page ul { padding-left: 20px; }
.static-page ul { list-style: disc; }
.static-page li { margin-bottom: 4px; }
