/* Intent Handcraft — 共用樣式 */
:root {
  --cream: #FBF6F1;
  --blush: #F6E3E1;
  --oat: #EFE6DA;
  --line: #E6D8CC;
  --line-soft: #EDE2D7;
  --sand: #D9C7B3;
  --ink: #43342E;
  --muted: #76625A;
  --muted-2: #6B5444;
  --rose: #9C4F45;
  --rose-dark: #7A3B33;
  --rose-ink: #8A443B;
  --sage-bg: #E3E9DC;
  --sage-ink: #4E5F46;
  --white: #FFFFFF;
  --radius: 24px;
  --sans: 'Noto Sans TC', system-ui, -apple-system, 'PingFang HK', sans-serif;
  --serif: 'Noto Serif TC', 'Songti TC', serif;
  --display: 'Cormorant Garamond', 'Noto Serif TC', serif;
  --header-h: 76px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] .serif { font-family: var(--display); font-weight: 600; letter-spacing: 0.01em; }
img { max-width: 100%; display: block; }
a { color: var(--rose); }
a:hover { color: var(--rose-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #C98A80; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); }
.eyebrow { font-size: 13px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); }
.page-title { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4.5vw, 44px); line-height: 1.25; }
.page-intro { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; max-width: 44em; }
.page-head { padding: 44px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.section { padding-top: 64px; padding-bottom: 64px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 28px; }
.section-head h2 { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.3; }
.link-arrow { font-weight: 500; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: 16px; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--rose); color: var(--white); }
.btn-primary:hover { background: var(--rose-dark); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #2f2420; color: var(--white); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--sand); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { min-height: 54px; padding: 0 30px; }
.btn-block { width: 100%; }
.chip { flex-shrink: 0; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--cream); color: var(--ink); font-size: 15px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); font-weight: 500; }
.chip.chip-rose[aria-pressed="true"] { background: var(--rose); border-color: var(--rose); }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--white); color: var(--rose); }
.badge-rose { background: var(--rose); color: var(--white); }
.tag { align-self: flex-start; display: inline-block; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 999px; }
.tag-blush { background: var(--blush); color: var(--rose-ink); }
.tag-oat { background: var(--oat); color: var(--muted-2); }
.tag-sage { background: var(--sage-bg); color: var(--sage-ink); }
.card { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); }

/* announcement + header */
.announce { background: var(--rose); color: var(--white); font-size: 14px; text-align: center; padding: 9px 16px; line-height: 1.5; }
.announce strong { letter-spacing: 0.06em; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 246, 241, 0.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header .wrap { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.1; }
.logo:hover { color: var(--ink); }
.logo-main { white-space: nowrap; font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.logo-sub { font-size: 12px; color: var(--muted); letter-spacing: 0.3em; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; }
.main-nav a { padding: 10px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; }
.main-nav a:hover { background: var(--oat); }
.main-nav a[aria-current="page"] { background: var(--blush); font-weight: 500; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; background: var(--white); padding: 3px; }
.lang-toggle button { min-width: 42px; height: 38px; border: none; border-radius: 999px; background: none; font-size: 14px; font-weight: 500; }
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--rose); color: var(--white); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cart-count[hidden] { display: none; }
.menu-btn { display: none; }
.mobile-nav { display: none; }
.header-cta { white-space: nowrap; }

/* footer */
.site-footer { background: var(--ink); color: #F3EAE2; padding: 48px 0 32px; margin-top: 24px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.site-footer a { color: #F3EAE2; }
.footer-brand { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.footer-brand .logo-main { font-size: 26px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.footer-col strong { margin-bottom: 2px; }
.footer-copy { width: 100%; border-top: 1px solid #5C4A42; padding-top: 18px; font-size: 13px; color: #D8C9BC; }

/* product / fabric grids */
.grid { display: grid; gap: 20px; }
.grid-auto-240 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-auto-260 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-auto-280 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-card .media { position: relative; background: var(--oat); }
.product-card .media .badge { position: absolute; top: 14px; left: 14px; }
.product-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.product-card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.price { font-size: 18px; font-weight: 700; }
.sold-veil { position: absolute; inset: 0; background: rgba(251, 246, 241, 0.7); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: var(--ink); }
.fabric-card { display: flex; flex-direction: column; background: var(--white); border-radius: 22px; padding: 10px 10px 14px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--line-soft); text-align: left; color: var(--ink); width: 100%; }
.fabric-card[aria-pressed="true"] { border-color: var(--rose); box-shadow: none; }
.fabric-card:disabled { cursor: not-allowed; }
.fabric-card .swatch { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--oat); }
.fabric-card .swatch img { width: 100%; height: 100%; object-fit: cover; }
.fabric-card .swatch .badge { position: absolute; top: 10px; left: 10px; font-size: 12px; padding: 4px 10px; }
.fabric-card .swatch .badge-new { left: auto; right: 10px; background: var(--ink); color: var(--white); }
.fabric-card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 4px 0; }
.fabric-card .name { font-size: 14px; padding: 2px 4px 0; }
.fabric-card .tags { font-size: 12px; color: var(--muted); padding: 4px 4px 0; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.loading { padding: 40px 20px; text-align: center; color: var(--muted); }

/* toolbar (fabric filters) */
.toolbar { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; min-height: 48px; }
.search input { flex: 1; min-width: 0; border: none; background: transparent; font-size: 16px; outline: none; min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; }
.chip .dot { width: 14px; height: 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(67, 52, 46, 0.25); flex-shrink: 0; }
.filter-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.filter-label { flex: 0 0 auto; font-size: 14px; font-weight: 500; color: var(--muted-2); min-width: 3em; }
.filter-row .chips { flex: 1; }
.select-wrap select { min-height: 48px; border: 1px solid var(--line); border-radius: 999px; padding: 0 40px 0 18px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2376625A' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center; appearance: none; -webkit-appearance: none; font-size: 15px; color: var(--ink); }

/* picked bar */
.picked-bar { position: sticky; bottom: 16px; z-index: 20; margin-top: 24px; background: var(--ink); color: var(--white); border-radius: 22px; padding: 12px 14px 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; box-shadow: 0 12px 30px rgba(67, 52, 46, 0.25); }
.picked-bar .info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.picked-bar img { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--white); object-fit: cover; flex-shrink: 0; }
.picked-bar small { display: block; color: #D8C9BC; font-size: 12px; }
.picked-bar .btn { background: var(--white); color: var(--ink); font-weight: 700; }

/* drawer (cart) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(67, 52, 46, 0.38); z-index: 80; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--cream); z-index: 90; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(67, 52, 46, 0.2); }
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 16px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--serif); font-size: 22px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { padding: 16px 24px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; background: var(--white); }
.cart-item { display: flex; gap: 12px; background: var(--white); border-radius: 18px; padding: 12px; }
.cart-item img, .cart-item .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--oat); }
.cart-item .ci-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item .ci-title { font-weight: 700; font-size: 15px; }
.cart-item .ci-detail { font-size: 13px; color: var(--muted); line-height: 1.5; }
.cart-item .ci-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--sand); border-radius: 999px; }
.qty button { width: 40px; height: 40px; border: none; background: none; font-size: 18px; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.text-btn { border: none; background: none; color: var(--rose); font-size: 14px; padding: 8px 0; min-height: 40px; text-decoration: underline; }
.sum-row { display: flex; justify-content: space-between; font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; }
.sum-total strong { font-family: var(--display); font-size: 36px; color: var(--rose); }
.promo { display: flex; gap: 8px; }
.promo input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--sand); border-radius: 999px; padding: 0 16px; background: var(--white); text-transform: uppercase; }
.promo button { min-height: 44px; }
.form-msg { font-size: 13px; }
.form-msg.ok { color: var(--sage-ink); }
.form-msg.err { color: #A03A2E; }

@media (max-width: 400px) { .logo-main { font-size: 18px; letter-spacing: 0.02em; } .logo-sub { letter-spacing: 0.15em; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: 999px; z-index: 100; font-size: 15px; box-shadow: 0 8px 24px rgba(67, 52, 46, 0.3); max-width: calc(100% - 32px); text-align: center; }
.toast[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .main-nav, .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-nav { display: flex; flex-direction: column; padding: 4px 24px 20px; border-top: 1px solid var(--line); background: var(--cream); }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a { min-height: 52px; display: flex; align-items: center; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font-size: 17px; }
  .mobile-nav a[aria-current="page"] { font-weight: 700; color: var(--rose); }
  .mobile-nav .btn { margin-top: 14px; border-bottom: none; color: var(--white); justify-content: center; }
}
@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .wrap { padding: 0 16px; }
  .logo-main { font-size: 19px; letter-spacing: 0.04em; }
  .logo { min-width: 0; overflow: hidden; }
  .icon-btn { width: 42px; height: 42px; }
  .logo-sub { font-size: 10px; letter-spacing: 0.25em; }
  .header-tools { gap: 4px; }
  .lang-toggle { border: none; background: none; padding: 0; }
  .lang-toggle button[aria-pressed="true"] { display: none; }
  .lang-toggle button { min-width: 44px; height: 44px; font-size: 14px; font-weight: 700; }
  .announce { font-size: 12px; padding: 8px 12px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .page-head { padding: 26px 0 12px; }
  .page-intro { font-size: 15px; }
  .grid { gap: 14px; }
  .grid-fabrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .fabric-card { border-radius: 16px; padding: 8px 8px 12px; }
  .fabric-card .swatch { border-radius: 12px; }
  .fabric-card .tags { display: none; }
  .toolbar { padding: 14px; }
  .chips.scroll-mobile { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .chips.scroll-mobile::-webkit-scrollbar { display: none; }
  .filter-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .select-wrap { flex: 1 1 100%; }
  .select-wrap select { width: 100%; }
  .site-footer { padding: 32px 0 24px; }
  .btn { font-size: 15px; }
}

/* 多張相片＋放大 */
.photo-block { display: flex; flex-direction: column; }
.pb-main { position: relative; display: block; width: 100%; padding: 0; border: none; background: var(--oat); cursor: zoom-in; }
.pb-main img { width: 100%; object-fit: cover; display: block; }
.pb-count { position: absolute; right: 10px; bottom: 10px; background: rgba(67, 52, 46, 0.75); color: var(--white); font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.pb-thumbs { display: flex; gap: 8px; padding: 10px 12px 2px; overflow-x: auto; background: var(--white); }
.pb-thumbs button { flex: 0 0 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; }
.pb-thumbs button[aria-pressed="true"] { border-color: var(--rose); }
.pb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(30, 22, 19, 0.95); display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: min(92vw, 1100px); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 8px; background: var(--oat); }
.lightbox figcaption { color: #E6D8CC; font-size: 14px; min-height: 1em; }
.lb-close, .lb-nav { position: absolute; border: none; background: rgba(255, 255, 255, 0.14); color: var(--white); border-radius: 999px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.28); }

/* 寄送及付款資料 Checkout form */
.co-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.co-form legend { font-size: 14px; color: var(--ink); font-weight: 500; padding: 0; margin-bottom: 8px; }
.co-form .field { color: var(--ink); font-weight: 500; }
.co-form .field small { font-weight: 400; font-size: 13px; }
.co-form .field textarea { min-height: 84px; }
.co-options { display: flex; flex-direction: column; gap: 8px; }
.co-opt { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--sand); border-radius: 12px; background: var(--white); cursor: pointer; }
.co-opt:has(input:checked) { border-color: var(--rose); background: #FDF5F3; box-shadow: inset 0 0 0 1px var(--rose); }
.co-opt input { accent-color: var(--rose); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.co-opt span { display: flex; flex-direction: column; gap: 2px; }
.co-opt strong { font-weight: 500; font-size: 15px; }
.co-opt small { font-size: 13px; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.price-was { text-decoration: line-through; color: var(--muted); font-size: 14px; font-weight: 400; margin-left: 6px; }
.badge-sale { background: var(--rose); color: #fff; }
.product-card .row .price { display: inline-flex; flex-direction: column; line-height: 1.25; }
.product-card .row .price .price-was { margin-left: 0; font-size: 13px; }

/* 付款方式頁 */
.co-ship-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: var(--oat); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.co-ship-sum div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.co-ship-sum strong { font-weight: 500; margin-bottom: 2px; }
.pay-list { display: flex; flex-direction: column; gap: 12px; }
.pay-card { border: 1px solid var(--sand); border-radius: 14px; background: var(--white); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pay-card.on { border-color: var(--rose); box-shadow: inset 0 0 0 1px var(--rose); background: #FDF5F3; }
.pay-head { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 32px; }
.pay-head input { accent-color: var(--rose); width: 18px; height: 18px; margin: 0; flex: none; }
.pay-head strong { font-weight: 500; font-size: 16px; }
.pay-detail { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted-2); white-space: pre-line; overflow-wrap: anywhere; }
.pay-detail .text-btn { flex: none; }
.pay-qr { align-self: center; padding: 8px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; cursor: zoom-in; }
.pay-qr img { display: block; width: 180px; height: 180px; object-fit: contain; }
