:root {
  --ink: #12313a;
  --ink-soft: #41636a;
  --sea: #e8f4f2;
  --foam: #f7fbfa;
  --white: #ffffff;
  --coral: #d85f51;
  --coral-deep: #b9473d;
  --sun: #f2b568;
  --line: #d3e0de;
  --muted: #64797d;
  --display: "Noto Serif TC", "Microsoft JhengHei", serif;
  --body: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--foam); color: var(--ink); font-family: var(--body); line-height: 1.55; margin: 0; padding-bottom: 88px; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header { align-items: center; background: rgba(247, 251, 250, .96); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto auto; gap: 18px; padding: 14px clamp(18px, 5vw, 76px); position: sticky; top: 0; z-index: 10; }
.brand { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: .11em; white-space: nowrap; }
.brand span { font-size: 9px; letter-spacing: .16em; margin-left: 3px; vertical-align: middle; }
.catalog-link, .header-line { font-size: 13px; font-weight: 700; }
.header-line { border-bottom: 2px solid var(--coral); padding-bottom: 2px; }

#product-detail { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); margin: 0 auto; max-width: 1320px; padding: clamp(20px, 4vw, 58px) clamp(16px, 4vw, 52px) 88px; }
.product-media { align-self: start; display: grid; gap: 12px; grid-column: 1; grid-row: span 3; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-right: clamp(20px, 4vw, 58px); }
.media-tile { aspect-ratio: .72; background: var(--sea); overflow: hidden; position: relative; }
.media-tile:first-child { grid-column: 1 / -1; }
.media-tile img { display: block; height: 100%; object-fit: cover; object-position: center top; width: 100%; }
.media-index { background: var(--ink); bottom: 12px; color: var(--white); font-size: 10px; left: 12px; letter-spacing: .12em; padding: 5px 7px; position: absolute; }

.product-summary, .product-options, .product-size-help { border-bottom: 1px solid var(--line); grid-column: 2; padding: 0 0 27px; }
.product-summary { align-self: end; }
.product-kicker { color: var(--coral-deep); font-size: 11px; font-weight: 700; letter-spacing: .15em; margin: 0 0 10px; }
.product-title { font-family: var(--display); font-size: clamp(31px, 3.4vw, 49px); letter-spacing: 0; line-height: 1.12; margin: 0 0 16px; }
.product-price { color: var(--coral-deep); font-family: var(--display); font-size: 25px; font-weight: 700; margin: 0 0 20px; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.feature-list li { border: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; padding: 7px 9px; }

.product-options { padding-top: 25px; }
.option-heading { align-items: baseline; display: flex; justify-content: space-between; margin-bottom: 12px; }
.option-heading h2, .product-size-help h2, .product-faq h2, .related-products h2 { font-family: var(--display); font-size: 21px; letter-spacing: 0; margin: 0; }
.option-note { color: var(--muted); font-size: 12px; }
.color-options, .size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.color-choice, .size-choice { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); cursor: pointer; min-height: 44px; padding: 9px 12px; }
.color-choice[aria-pressed="true"], .size-choice[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.size-options { margin-top: 23px; }
.fit-preference { display: grid; gap: 8px; margin-top: 23px; }
.fit-preference label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.fit-preference select, .weight-field input { background: var(--white); border: 1px solid var(--line); border-radius: 0; color: var(--ink); min-height: 44px; padding: 0 11px; width: 100%; }

.product-size-help { background: var(--sea); margin-top: 20px; padding: 22px; }
.size-help-grid { display: grid; gap: 11px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.weight-field { display: grid; gap: 8px; }
.weight-field label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.size-help-button { background: var(--ink); border: 1px solid var(--ink); color: var(--white); cursor: pointer; min-height: 44px; padding: 10px; }
.size-result { border-left: 3px solid var(--coral); color: var(--ink-soft); display: none; font-size: 13px; margin: 17px 0 0; padding: 2px 0 2px 12px; }
.size-result.is-visible { display: block; }

.product-faq, .related-products { grid-column: 1 / -1; padding-top: clamp(56px, 8vw, 100px); }
.section-kicker { color: var(--coral-deep); font-size: 10px; font-weight: 700; letter-spacing: .15em; margin: 0 0 11px; }
.faq-grid { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 25px; }
.faq-item { border-bottom: 1px solid var(--line); min-height: 162px; padding: 20px 20px 20px 0; }
.faq-item + .faq-item { border-left: 1px solid var(--line); padding-left: 20px; }
.faq-item h3 { font-family: var(--display); font-size: 18px; margin: 0 0 8px; }
.faq-item p { color: var(--muted); font-size: 13px; margin: 0; }

.related-products { padding-bottom: 20px; }
.related-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.related-product { border-top: 2px solid var(--ink); display: grid; gap: 12px; padding-top: 13px; }
.related-product img { aspect-ratio: .86; background: var(--sea); display: block; object-fit: cover; object-position: center top; width: 100%; }
.related-product h3 { font-family: var(--display); font-size: 18px; margin: 0; }
.related-meta { align-items: center; display: flex; justify-content: space-between; }
.related-price { color: var(--coral-deep); font-size: 13px; font-weight: 700; }
.related-link { border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 700; justify-self: start; padding-bottom: 3px; }

.purchase-bar { background: var(--white); border-top: 1px solid var(--line); bottom: 0; display: grid; gap: 10px; grid-template-columns: 1.22fr .78fr; left: 0; padding: 10px max(16px, calc((100vw - 1320px) / 2 + 52px)); position: fixed; right: 0; z-index: 12; }
.order-button, .line-button { align-items: center; border: 1px solid transparent; cursor: pointer; display: inline-flex; justify-content: center; min-height: 48px; padding: 10px 12px; text-align: center; }
.order-button { background: var(--coral); color: var(--white); font-weight: 700; }
.order-button:hover { background: var(--coral-deep); }
.line-button { border-color: var(--ink); color: var(--ink); font-size: 13px; font-weight: 700; }
.order-status { background: var(--ink); bottom: 79px; color: var(--white); display: none; font-size: 13px; left: 50%; max-width: min(520px, calc(100vw - 32px)); padding: 13px 16px; position: fixed; transform: translateX(-50%); z-index: 13; }
.order-status.is-visible { display: block; }

dialog { border: 0; box-shadow: 0 24px 70px rgba(15, 45, 53, .28); max-width: min(440px, calc(100% - 32px)); padding: 32px; }
dialog::backdrop { background: rgba(12, 39, 46, .66); }
dialog h2 { font-family: var(--display); font-size: 27px; margin: 0 0 12px; }
dialog p { color: var(--muted); font-size: 14px; margin: 0; }
.dialog-kicker { color: var(--coral-deep); font-size: 10px; font-weight: 700; letter-spacing: .15em; margin-bottom: 10px; }
.dialog-close { background: none; border: 0; cursor: pointer; font-size: 27px; line-height: 1; position: absolute; right: 12px; top: 10px; }

.missing-product { grid-column: 1 / -1; min-height: 52vh; padding: clamp(48px, 9vw, 120px) 0; }
.missing-product h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 60px); margin: 0 0 14px; }
.missing-product p { color: var(--muted); max-width: 34rem; }
.missing-product a { border-bottom: 2px solid var(--coral); font-weight: 700; padding-bottom: 3px; }

@media (max-width: 820px) {
  body { padding-bottom: 86px; }
  .site-header { gap: 13px; grid-template-columns: 1fr auto auto; padding: 13px 16px; }
  .catalog-link { font-size: 12px; }
  .header-line { font-size: 12px; }
  #product-detail { display: block; padding: 16px 16px 70px; }
  .product-media { grid-template-columns: 1fr 1fr; padding: 0; }
  .product-summary { padding-top: 28px; }
  .product-summary, .product-options { padding-bottom: 23px; }
  .product-size-help { margin-top: 18px; }
  .faq-grid { display: block; }
  .faq-item { min-height: auto; padding: 18px 0; }
  .faq-item + .faq-item { border-left: 0; padding-left: 0; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .related-product:last-child { display: none; }
  .purchase-bar { padding: 9px 16px; }
}

@media (max-width: 390px) {
  .site-header { gap: 9px; }
  .catalog-link { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .product-title { font-size: 34px; }
  .size-help-grid { grid-template-columns: 1fr; }
  .related-grid { gap: 12px; }
  .purchase-bar { gap: 7px; grid-template-columns: 1.1fr .9fr; }
  .order-button, .line-button { font-size: 12px; padding: 10px 6px; }
}

.shipping-badge { color: var(--coral-deep); font-size: 13px; font-weight: 700; }
.product-trust, .shipping-policy { grid-column: 1 / -1; padding-top: clamp(56px, 8vw, 100px); }
.sales-proof { background: var(--sea); border-left: 4px solid var(--coral); display: grid; gap: 5px; margin: 22px 0; padding: 18px; }
.sales-proof span { color: var(--muted); font-size: 12px; }
#cod-order-form { display: grid; gap: 12px; margin-top: 18px; }#cod-order-form label { display: grid; font-size: 13px; font-weight: 700; gap: 6px; }#cod-order-form input, #cod-order-form select { background: var(--white); border: 1px solid var(--line); font: inherit; min-height: 43px; padding: 8px 10px; }.policy-check { align-items: center; display: flex !important; font-size: 12px !important; line-height: 1.5; }.policy-check input { min-height: auto !important; }#order-form-status { color: var(--coral-deep); }#order-receipt { display: grid; gap: 10px; }#order-receipt h3 { font-family: var(--display); margin: 0; }
@media (max-width: 820px) { .product-trust, .shipping-policy { padding-top: 55px; } }
