:root {
    color-scheme: light;
    font-family: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MingLiU", "Microsoft JhengHei", serif;
    --ink: #2f3742;
    --muted: #7b8794;
    --line: #d9dee5;
    --soft: #f7f8fa;
    --gold: #c69a62;
    --sign-red: #b8202a;
    --sign-yellow: #f6c33b;
    --sky-soft: #eaf7ff;
    --black: #050505;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.shop-header {
    min-height: 86px;
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
    border-top: 4px solid var(--sign-yellow);
}

.brand {
    position: relative;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
}
.brand::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -7px; height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--sign-red), var(--sign-yellow)); }

.top-nav {
    display: flex;
    justify-content: center;
    gap: 46px;
    width: 100%;
    padding: 18px 18px 0;
    color: #3d4651;
    font-size: 15px;
}

.top-nav a:hover { color: #111827; }

.breadcrumb {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 28px;
    border-bottom: 1px solid #edf0f3;
    background: linear-gradient(180deg, #fff 0%, var(--sky-soft) 100%);
    color: #8b97a5;
    font-size: 13px;
}

.breadcrumb strong { color: #5c6673; font-weight: 700; }

main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 28px 72px;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
    gap: 62px;
    align-items: start;
}

.gallery {
    position: relative;
    min-width: 0;
}

.gallery-stage {
    width: 100%;
    height: 620px;
    display: grid;
    place-items: center;
    background: #fff;
    cursor: zoom-in;
}

.gallery-image {
    grid-area: 1 / 1;
    display: block;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0;
    transform: scale(.985);
    transition: opacity .22s ease, transform .22s ease;
}

.gallery-image.is-active {
    opacity: 1;
    transform: scale(1);
}

.gallery-arrow {
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
    color: #a6adb5;
    font-size: 46px;
    line-height: 1;
    cursor: pointer;
}

.gallery-arrow:hover { color: #5f6770; }
.gallery-arrow.prev { left: 0; }
.gallery-arrow.next { right: 0; }

.thumb-row {
    display: flex;
    gap: 12px;
    margin-top: 34px;
    padding-left: 8px;
}

.thumb {
    width: 68px;
    height: 68px;
    padding: 4px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
}

.thumb.is-active { border-color: #111827; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

.purchase-panel { padding: 30px; border-radius: 22px; background: #f5f6f8; }
.category-label { margin: 0 0 8px; color: #98a2ad; font-size: 14px; }
.purchase-panel h1 { margin: 0; color: #050505; font-size: 34px; line-height: 1.28; letter-spacing: 0; }
.subtitle { margin: 12px 0 22px; color: #68717d; font-size: 15px; line-height: 1.7; }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; color: #050505; }
.price { color: #050505; font-size: 22px; font-weight: 900; letter-spacing: .04em; }
.price-row del { color: #646b75; font-size: 15px; }
.price-badge { min-height: 24px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 6px; background: #050505; color: #fff; font-size: 12px; font-weight: 900; }
.purchase-benefits { display: grid; gap: 12px; margin: 0 0 26px; padding: 0; list-style: none; color: #1f2937; font-size: 15px; font-weight: 800; }
.purchase-benefits li { position: relative; min-height: 24px; display: flex; align-items: center; padding-left: 36px; }
.purchase-benefits li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid #111827; border-radius: 999px; color: #111827; font-size: 15px; line-height: 1; }
.promotion-box { margin-bottom: 22px; }
.promotion-box h2, .field-title { margin: 0 0 11px; color: #111827; font-size: 14px; line-height: 1.4; font-weight: 900; }
.promotion-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.promotion-chips span { min-height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px dashed #2f80c1; border-radius: 4px; background: #fff; color: #2f80c1; font-size: 13px; font-weight: 900; }
.addon-jump { min-height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #2f80c1; border-radius: 4px; background: #fff; color: #2f80c1; font-size: 13px; font-weight: 900; }
.option-picker { margin-bottom: 22px; }
.option-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.option-pill { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.option-pill input { position: absolute; opacity: 0; pointer-events: none; }
.option-pill span { min-height: 48px; display: inline-flex; align-items: center; gap: 7px; padding: 0 18px; border: 2px solid #d9dee5; border-radius: 6px; background: #fff; color: #111827; font-size: 14px; font-weight: 900; }
.option-pill small { color: #6b7280; font-size: 12px; font-weight: 800; }
.option-pill input:checked + span { border-color: #050505; box-shadow: 0 0 0 2px rgba(5,5,5,.06); }
.option-pill.is-disabled { cursor: not-allowed; opacity: .55; }
.option-pill.is-disabled span { background: #eef1f4; }
.stock-chip { color: #2f80c1 !important; }

.meta-list {
    display: grid;
    gap: 18px;
    margin: 0 0 34px;
    font-size: 15px;
}

.meta-list div { display: grid; grid-template-columns: 88px 1fr; gap: 10px; }
.meta-list dt { color: #4b5563; }
.meta-list dd { margin: 0; color: #334155; }

.quantity-control {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    width: min(100%, 620px);
    height: 44px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}

.quantity-control button {
    border: 0;
    background: #fff;
    color: #3f4751;
    font-size: 24px;
    cursor: pointer;
}

.quantity-control input {
    width: 100%;
    border: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    text-align: center;
    color: #6d4e28;
    outline: none;
}

.primary-action {
    width: min(100%, 620px);
    min-height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: #050505;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.favorite-action {
    min-height: 38px;
    margin-top: 24px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #8a929c;
    cursor: pointer;
}
.favorite-form { margin: 0; }
.favorite-action.is-active {
    border-color: #050505;
    background: #050505;
    color: #fff;
}
.primary-action:disabled {
    background: #d8dde2;
    color: #7b8794;
    cursor: not-allowed;
}
.status {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #bde3cb;
    border-radius: 8px;
    background: #ecfbf1;
    color: #166534;
    font-weight: 800;
}

.addon-promotions { margin-top: 56px; }
.addon-promotions > h2 { margin: 0 0 24px; padding-left: 12px; border-left: 3px solid #2f80c1; color: #111827; font-size: 22px; font-weight: 900; }
.addon-group { position: relative; width: min(100%, 980px); padding: 44px 20px 24px; border: 1px solid #edf0f3; border-radius: 8px; background: #fff; box-shadow: 0 18px 38px rgba(15,23,42,.06); }
.addon-group + .addon-group { margin-top: 22px; }
.addon-ribbon { position: absolute; top: 18px; left: 0; min-height: 34px; display: inline-flex; align-items: center; padding: 0 30px 0 18px; background: #2f80c1; color: #fff; font-weight: 900; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); }
.addon-group p { margin: 0 0 18px; color: #667085; line-height: 1.7; }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.addon-card { display: grid; gap: 12px; align-content: start; padding: 18px; border: 1px solid #edf0f3; border-radius: 8px; background: #fff; box-shadow: 0 12px 26px rgba(15,23,42,.06); }
.addon-check { display: flex; align-items: center; gap: 8px; color: #1f2937; font-weight: 900; line-height: 1.5; }
.addon-image { width: 100%; aspect-ratio: 1 / .86; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: #f7f8fa; cursor: zoom-in; }
.addon-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.addon-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.addon-price strong { color: #111827; font-size: 18px; }
.addon-price del { color: #9aa3ad; }
.addon-quantity { width: 128px; height: 34px; display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; border: 1px solid #d9dee5; border-radius: 999px; overflow: hidden; }
.addon-quantity button { border: 0; background: #fff; color: #111827; font-weight: 900; cursor: pointer; }
.addon-quantity input { width: 100%; border: 0; text-align: center; outline: none; }
.addon-action { min-height: 42px; border: 0; border-radius: 999px; background: #050505; color: #fff; font-weight: 900; cursor: pointer; }

.detail-tabs { margin-top: 54px; }

.tab-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 5px;
    overflow: hidden;
}

.tab-buttons button {
    min-height: 46px;
    border: 0;
    border-right: 1px solid var(--line);
    background: #fff;
    color: #8a929c;
    cursor: pointer;
}

.tab-buttons button:last-child { border-right: 0; }
.tab-buttons button.is-active { color: #2f3742; background: var(--sky-soft); }

.tab-panel {
    display: none;
    padding: 34px 0 0;
    color: #1f2937;
    line-height: 1.85;
    font-size: 17px;
}

.tab-panel.is-active { display: block; }
.tab-panel h2 { margin: 0 0 16px; padding-left: 12px; border-left: 3px solid var(--sign-yellow); font-size: 22px; }
.tab-panel p { max-width: 780px; margin: 0 0 14px; }
.tab-panel ul { margin: 0; padding-left: 22px; }

.related-products { margin-top: 64px; }
.related-products h2 {
    margin: 0 0 34px;
    padding-left: 12px;
    border-left: 3px solid var(--sign-yellow);
    color: #3d4651;
    font-size: 22px;
    font-weight: 800;
}

.related-shell {
    position: relative;
    padding: 0 42px;
}

.related-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 244px;
    grid-template-columns: repeat(4, 244px);
    justify-content: center;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.related-grid::-webkit-scrollbar { display: none; }

.related-card {
    display: grid;
    justify-items: stretch;
    align-content: start;
    gap: 10px;
    min-width: 0;
    scroll-snap-align: start;
    padding: 14px 14px 18px;
    border: 1px solid #eef1f4;
    border-radius: 8px;
    background: #f4f5f6;
    text-align: left;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255,255,255,.82);
    transition: transform .18s ease, box-shadow .18s ease;
}

.related-card:hover { transform: translateY(-3px); box-shadow: 0 22px 42px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255,255,255,.9); }

.related-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.9), 0 10px 22px rgba(15,23,42,.08);
    cursor: zoom-in;
}

.related-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.related-name { min-height: 44px; color: #050505; line-height: 1.45; font-weight: 900; }
.related-card strong { color: #050505; }

.related-action {
    min-width: 118px;
    min-height: 40px;
    margin-top: 4px;
    border: 1px solid #c8ccd1;
    border-radius: 999px;
    background: #fff;
    color: #a3a8ae;
    font-weight: 900;
}

.related-action.is-available {
    border-color: #050505;
    background: #050505;
    color: #fff;
    cursor: pointer;
}

.lightbox-open { overflow: hidden; }
.image-lightbox { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 22px; background: rgba(4, 8, 14, .72); backdrop-filter: blur(5px); }
.image-lightbox.is-open { display: grid; }
.image-lightbox-panel { position: relative; width: min(92vw, 980px); max-height: 90vh; display: grid; place-items: center; padding: 18px; border-radius: 10px; background: #fff; box-shadow: 0 28px 70px rgba(0,0,0,.32); }
.image-lightbox img { max-width: 100%; max-height: calc(90vh - 36px); display: block; object-fit: contain; border-radius: 6px; }
.image-lightbox-close { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 999px; background: #050505; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }

.related-arrow {
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 38px;
    height: 52px;
    border: 0;
    background: transparent;
    color: #a6adb5;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
}

.related-arrow:hover { color: #5f6770; }
.related-prev { left: 0; }
.related-next { right: 0; }

@media (max-width: 860px) {
    .shop-header { min-height: 74px; }
    .top-nav { gap: 20px; overflow-x: auto; justify-content: flex-start; padding: 16px 18px 0; }
    .breadcrumb { padding: 0 16px; overflow-x: auto; white-space: nowrap; }
    main { padding: 28px 16px 54px; }
    .product-layout { grid-template-columns: 1fr; gap: 24px; }
    .gallery-stage { height: 360px; }
    .gallery-arrow { top: 34%; width: 36px; height: 36px; font-size: 38px; }
    .thumb-row { margin-top: 18px; overflow-x: auto; padding-bottom: 4px; }
    .purchase-panel { padding: 22px 18px; border-radius: 16px; }
    .purchase-panel h1 { font-size: 24px; }
    .subtitle { margin-bottom: 24px; }
    .price { font-size: 24px; }
    .tab-buttons { grid-template-columns: 1fr; }
    .tab-buttons button { border-right: 0; border-bottom: 1px solid var(--line); }
    .tab-buttons button:last-child { border-bottom: 0; }
    .related-shell { padding: 0 26px; }
    .related-grid {
        grid-template-columns: none;
        grid-auto-columns: 100%;
        justify-content: start;
        gap: 18px;
        scroll-snap-type: x mandatory;
    }
    .related-arrow { width: 26px; font-size: 38px; }
    .addon-promotions { margin-top: 36px; }
    .addon-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1160px) and (min-width: 861px) {
    .gallery-stage { height: 520px; }
}

@media (max-width: 520px) {
    .meta-list div { grid-template-columns: 76px 1fr; }
    .quantity-control { grid-template-columns: 42px 1fr 42px; }
    .related-grid { grid-auto-columns: 100%; }
}
