/* Odelia 美的異想世界 — 瓷藍底、白色標本盒、直角細線；Noto Serif TC 標題、Fraunces 字標與數字、Noto Sans TC 內文；珊瑚色唯一強調色 */
:root {
  --porcelain: #EEF1F4;
  --white: #FFFFFF;
  --navy: #111A2B;
  --slate: #56617A;
  --coral: #E4572E;
  --coral-deep: #C4441F;
  --rule: #C9D1DB;
  --rule-soft: #DDE3EA;
  --plate: #DCE4EC;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --fraunces: "Fraunces", "Noto Serif TC", serif;
  --rail: 232px;
  --gutter: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--porcelain); color: var(--navy);
  font-family: var(--sans); font-size: 15.5px; line-height: 1.8;
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0 0 14px; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.2vw, 52px); font-weight: 900; letter-spacing: .01em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0 0 14px; }
.serif { font-family: var(--serif); }
.fr { font-family: var(--fraunces); }
.num { font-family: var(--fraunces); font-variant-numeric: tabular-nums; font-weight: 600; }
.eyebrow { font-family: var(--fraunces); font-style: italic; font-weight: 400; font-size: 15px; color: var(--coral); display: block; margin-bottom: 8px; letter-spacing: .01em; }
.wrap { max-width: 1080px; padding-inline: clamp(20px, 5vw, 64px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

/* ── 左側導覽欄 ── */
.rail {
  position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; padding: 32px 26px 26px; background: var(--porcelain);
}
.wordmark { display: block; margin-bottom: 40px; }
.wordmark .od { font-family: var(--fraunces); font-style: italic; font-weight: 300; font-size: 40px; line-height: 1; display: block; letter-spacing: -.01em; }
.wordmark .od::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); margin-left: 4px; vertical-align: super; }
.wordmark .zh { font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .28em; display: block; margin-top: 8px; }
.rail-nav { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.rail-nav a { padding: 11px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; display: flex; justify-content: space-between; align-items: baseline; }
.rail-nav a .fr { font-size: 11.5px; color: var(--slate); font-style: italic; }
.rail-nav a:hover, .rail-nav a[aria-current="page"] { color: var(--coral); }
.rail-cart { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--navy); font-weight: 500; font-size: 14.5px; }
.rail-cart:hover { background: var(--navy); color: #fff; }
.count { font-family: var(--fraunces); font-weight: 600; background: var(--coral); color: #fff; min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; font-size: 13px; }
.count[hidden] { display: none; }
.rail-foot { margin-top: auto; font-size: 12px; line-height: 1.7; color: var(--slate); }
.rail-foot b { color: var(--navy); font-weight: 500; display: block; }
.rail-foot a { text-decoration: underline; text-underline-offset: 3px; }

/* ── 手機頂欄（桌機隱藏） ── */
.mobile-bar { display: none; }

/* ── 內容區 ── */
.page { min-width: 0; }
main { min-height: 60vh; }
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { margin-bottom: 26px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-head p { color: var(--slate); margin: 0; max-width: 56ch; }
.link { color: var(--coral); border-bottom: 1px solid currentColor; padding-bottom: 1px; font-weight: 500; white-space: nowrap; }
.link:hover { color: var(--coral-deep); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 26px; background: var(--coral); color: #fff; font-weight: 500; border: 1px solid var(--coral); cursor: pointer; letter-spacing: .04em; }
.btn:hover { background: var(--coral-deep); border-color: var(--coral-deep); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.line { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.line:hover { background: var(--navy); color: #fff; }
.btn.block { width: 100%; }
.btn.lg { padding: 16px 32px; font-size: 16px; }
.box { background: var(--white); border: 1px solid var(--rule); }
.spec-img { background: var(--white); border: 1px solid var(--rule); display: grid; place-items: center; overflow: hidden; }
.spec-img img { width: 100%; height: 100%; object-fit: contain; }

/* ── 首頁封面 ── */
.cover { padding-block: 64px 48px; display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: center; }
.cover h1 { margin-bottom: 20px; }
.cover .lead { font-size: 16.5px; color: var(--slate); max-width: 44ch; }
.cover .actions { display: flex; gap: 22px; align-items: center; margin-top: 28px; flex-wrap: wrap; }
.specimens { position: relative; height: 460px; }
.specimens .spec-img { position: absolute; width: 58%; aspect-ratio: 348 / 448; }
.specimens .s1 { left: 0; top: 0; }
.specimens .s2 { right: 0; top: 18%; }
.specimens .s3 { left: 22%; bottom: 0; width: 46%; }
.specimens figcaption { position: absolute; left: 0; bottom: -28px; font-family: var(--fraunces); font-style: italic; font-size: 13px; color: var(--slate); }

/* ── 三個系列（目錄） ── */
.series { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.series li { display: grid; grid-template-columns: 90px 1fr auto; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.series .no { font-family: var(--fraunces); font-weight: 300; font-size: 52px; line-height: 1; color: var(--slate); }
.series h3 { margin: 0 0 4px; font-size: 22px; }
.series h3 em { font-family: var(--fraunces); font-style: italic; font-weight: 400; color: var(--slate); font-size: 15px; margin-left: 10px; }
.series p { margin: 0; color: var(--slate); font-size: 14.5px; }
.series a.link { justify-self: end; }

/* ── 精選（水平陳列） ── */
.shelf { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
.shelf .item { flex: 0 0 220px; scroll-snap-align: start; }
.item .spec-img { aspect-ratio: 348 / 448; }
.item .name { font-family: var(--serif); font-weight: 700; font-size: 15px; margin-top: 10px; line-height: 1.4; }
.item .meta { font-size: 12.5px; color: var(--slate); }
.item .price { font-family: var(--fraunces); font-weight: 600; font-size: 17px; margin-top: 2px; }
.item:hover .name { color: var(--coral); }

/* ── 購買方式 ── */
.howto { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); margin: 0; }
.howto div { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 20px 20px 22px; }
.howto dt { font-family: var(--fraunces); font-style: italic; color: var(--coral); font-size: 14px; margin-bottom: 6px; }
.howto dd { margin: 0; font-size: 14px; color: var(--slate); }
.howto dd b { color: var(--navy); font-weight: 500; display: block; margin-bottom: 2px; }

/* ── 全部商品：分組表格 ── */
.toolbar { display: flex; gap: 14px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.toolbar label { font-size: 14px; color: var(--slate); }
select, input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea {
  font: inherit; color: var(--navy); background: var(--white); border: 1px solid var(--rule); padding: 10px 12px; min-height: 44px; width: 100%;
}
select { width: auto; min-width: 180px; }
select:focus, input:focus, textarea:focus { border-color: var(--navy); outline: none; }
.group { margin-bottom: 44px; }
.group-head { display: flex; align-items: baseline; gap: 14px; border-bottom: 2px solid var(--navy); padding-bottom: 8px; margin-bottom: 0; }
.group-head .no { font-family: var(--fraunces); font-weight: 300; font-size: 28px; color: var(--slate); }
.group-head em { font-family: var(--fraunces); font-style: italic; font-weight: 400; font-size: 14px; color: var(--slate); }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 72px 1fr 110px 130px 110px 90px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.row .spec-img { width: 72px; height: 92px; }
.row .name { font-family: var(--serif); font-weight: 700; font-size: 16px; line-height: 1.35; }
.row .name small { display: block; font-family: var(--fraunces); font-style: italic; font-weight: 400; color: var(--slate); font-size: 12.5px; margin-top: 2px; }
.row .cat, .row .size { font-size: 13px; color: var(--slate); }
.row .price { font-family: var(--fraunces); font-weight: 600; font-size: 17px; }
.row:hover .name { color: var(--coral); }
.row[hidden] { display: none; }
.rows-head { display: grid; grid-template-columns: 72px 1fr 110px 130px 110px 90px; gap: 18px; padding: 8px 0; font-family: var(--fraunces); font-style: italic; font-size: 12.5px; color: var(--slate); border-bottom: 1px solid var(--rule); }
.empty-note { color: var(--slate); padding: 30px 0; }

/* ── 商品頁 ── */
.crumbs { font-size: 13px; color: var(--slate); padding-top: 24px; font-family: var(--fraunces); font-style: italic; }
.crumbs a:hover { color: var(--coral); }
.pdp { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; padding-block: 28px 64px; }
.pdp-gallery { display: grid; grid-template-columns: 1fr 64px; gap: 12px; align-items: start; }
.pdp-main { aspect-ratio: 348 / 448; }
.pdp-thumbs { display: flex; flex-direction: column; gap: 8px; }
.pdp-thumbs button { width: 64px; height: 82px; padding: 0; border: 1px solid var(--rule); background: var(--white); cursor: pointer; }
.pdp-thumbs button[aria-current="true"] { border-color: var(--coral); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pdp-info h1 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 4px; }
.pdp-info .en { font-family: var(--fraunces); font-style: italic; color: var(--slate); font-size: 16px; margin-bottom: 20px; }
.pdp-info .price { font-family: var(--fraunces); font-weight: 600; font-size: 34px; line-height: 1; margin-bottom: 22px; }
.pdp-info .price small { font-size: 15px; font-weight: 400; font-style: italic; margin-right: 6px; }
.specs { border-top: 1px solid var(--navy); margin: 0 0 22px; }
.specs div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; }
.specs dt { font-family: var(--fraunces); font-style: italic; color: var(--slate); margin: 0; }
.specs dd { margin: 0; }
.blurb { font-size: 16px; margin-bottom: 22px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13.5px; color: var(--slate); margin-bottom: 6px; }
.qty { display: inline-flex; border: 1px solid var(--navy); }
.qty button { width: 42px; height: 46px; border: 0; background: transparent; cursor: pointer; font-family: var(--fraunces); font-size: 20px; }
.qty button:hover { background: var(--plate); }
.qty input { width: 56px; min-height: 0; border: 0; border-left: 1px solid var(--navy); border-right: 1px solid var(--navy); text-align: center; font-family: var(--fraunces); font-weight: 600; font-size: 17px; padding: 0; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input { -moz-appearance: textfield; appearance: textfield; }
.buy { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 6px 0 26px; }
.terms { font-size: 13.5px; color: var(--slate); border-top: 1px solid var(--rule); padding-top: 14px; }
.terms p { margin: 0 0 6px; }
.terms a { text-decoration: underline; text-underline-offset: 3px; }

/* ── 購物袋／結帳 ── */
.page-head { padding-block: 48px 24px; }
.page-head p { color: var(--slate); margin: 0; }
.bag { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--navy); }
.bag li { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule-soft); }
.bag .spec-img { width: 72px; height: 92px; }
.bag .name { font-family: var(--serif); font-weight: 700; font-size: 16px; }
.bag .meta { font-size: 13px; color: var(--slate); }
.bag .end { text-align: right; display: grid; gap: 8px; justify-items: end; }
.bag .amount { font-family: var(--fraunces); font-weight: 600; font-size: 17px; }
.remove { border: 0; background: transparent; color: var(--slate); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.remove:hover { color: var(--coral); }
.totals { margin: 24px 0 0 auto; max-width: 420px; }
.totals .line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); font-size: 15px; }
.totals .line.total { border-bottom: 0; border-top: 1px solid var(--navy); margin-top: 6px; padding-top: 14px; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.totals .hint { font-size: 13px; color: var(--slate); margin: 12px 0 18px; }
.totals .actions { display: grid; gap: 10px; }
.empty { padding: 48px 0; border-top: 1px solid var(--navy); border-bottom: 1px solid var(--rule); }
.empty p { font-family: var(--serif); font-size: 20px; }
.checkout { max-width: 720px; padding-bottom: 72px; }
.step { margin-bottom: 40px; }
.step h2 { display: flex; align-items: baseline; gap: 14px; border-bottom: 2px solid var(--navy); padding-bottom: 8px; margin-bottom: 20px; font-size: 22px; }
.step h2 .no { font-family: var(--fraunces); font-weight: 300; font-size: 26px; color: var(--slate); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.fields .full { grid-column: 1 / -1; }
.options { display: grid; }
.option { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); cursor: pointer; }
.option input { margin: 6px 0 0; accent-color: var(--coral); }
.option b { display: block; font-weight: 500; }
.option span { font-size: 13.5px; color: var(--slate); }
.option .fee { font-family: var(--fraunces); font-weight: 600; white-space: nowrap; }
.option:has(input:checked) b { color: var(--coral); }
.err { color: var(--coral-deep); font-size: 13.5px; margin: -6px 0 12px; }
.err:empty { display: none; }
.alert { border: 1px solid var(--coral); color: var(--coral-deep); padding: 12px 16px; margin-bottom: 20px; font-size: 14.5px; }
.alert:empty { display: none; }
.mini { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.mini .spec-img { width: 44px; height: 56px; flex: none; }
.mini .n { flex: 1; line-height: 1.4; }
.mini .n small { display: block; color: var(--slate); }
.summary { border: 1px solid var(--navy); padding: 22px 24px; background: var(--white); }
.summary h3 { font-size: 17px; margin-bottom: 8px; }
.summary .hint { font-size: 13px; color: var(--slate); margin: 12px 0 16px; }
[hidden] { display: none !important; }

/* ── 內容頁 ── */
.prose { max-width: 68ch; padding-bottom: 72px; }
.prose h2 { font-size: 22px; margin-top: 36px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.prose h3 { margin-top: 22px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { border-collapse: collapse; width: 100%; margin: 14px 0 22px; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--fraunces); font-style: italic; font-weight: 400; color: var(--slate); }
.note { border-left: 3px solid var(--coral); padding: 12px 18px; background: var(--white); margin: 18px 0; }
.note b { display: block; }
.thanks { padding-block: 64px 24px; max-width: 640px; }
.thanks .oid { font-family: var(--fraunces); font-weight: 600; font-size: 30px; letter-spacing: .02em; }
.order-box { max-width: 640px; margin-bottom: 72px; border-top: 1px solid var(--navy); }
.order-box .line { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; }
.order-box .line:last-child { font-family: var(--serif); font-weight: 700; font-size: 17px; }

/* ── 頁尾 ── */
.foot { border-top: 1px solid var(--navy); padding-block: 36px 28px; }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot h4 { font-family: var(--fraunces); font-style: italic; font-weight: 400; color: var(--coral); margin: 0 0 8px; font-size: 14px; }
.foot p, .foot li { font-size: 13.5px; color: var(--slate); }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 4px; }
.foot .company b { display: block; color: var(--navy); font-weight: 500; font-family: var(--serif); font-size: 15px; }
.foot .company a { text-decoration: underline; text-underline-offset: 3px; }
.foot .fine { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--slate); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── toast ── */
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--navy); color: #fff; padding: 12px 18px; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; z-index: 99; border-left: 3px solid var(--coral); }
.toast.show { opacity: 1; transform: none; }

/* ── RWD ── */
@media (max-width: 1023px) {
  body { display: block; }
  .rail { display: none; }
  .mobile-bar { display: block; position: sticky; top: 0; z-index: 50; background: var(--porcelain); border-bottom: 1px solid var(--rule); }
  .mobile-bar .top { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); }
  .mobile-bar .wordmark { margin: 0; display: flex; align-items: baseline; gap: 10px; }
  .mobile-bar .wordmark .od { font-size: 28px; }
  .mobile-bar .wordmark .zh { margin: 0; font-size: 12px; letter-spacing: .2em; }
  .mobile-bar .rail-cart { margin: 0; padding: 8px 12px; gap: 10px; font-size: 13.5px; }
  .mobile-bar nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 var(--gutter) 10px; scrollbar-width: none; }
  .mobile-bar nav a { white-space: nowrap; padding: 6px 10px; font-size: 13.5px; border: 1px solid var(--rule); background: var(--white); }
  .mobile-bar nav a[aria-current="page"] { border-color: var(--navy); }
  .cover { grid-template-columns: 1fr; gap: 36px; padding-block: 36px 32px; }
  .specimens { height: 340px; }
  .pdp { grid-template-columns: 1fr; gap: 28px; }
  .howto { grid-template-columns: 1fr 1fr; }
  .foot .cols { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .section { padding-block: 40px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .series li { grid-template-columns: 56px 1fr; }
  .series .no { font-size: 36px; }
  .series a.link { grid-column: 2; justify-self: start; }
  .rows-head { display: none; }
  .row { grid-template-columns: 64px 1fr auto; }
  .row .spec-img { width: 64px; height: 82px; }
  .row .cat, .row .size, .row .go { display: none; }
  .howto { grid-template-columns: 1fr; }
  .pdp-gallery { grid-template-columns: 1fr; }
  .pdp-thumbs { flex-direction: row; }
  .fields { grid-template-columns: 1fr; }
  .bag li { grid-template-columns: 64px 1fr; }
  .bag .end { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: space-between; width: 100%; }
  .specimens { height: 300px; }
  .shelf .item { flex-basis: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
