:root {
  --paper: #f6f2eb;
  --paper-deep: #ece4d9;
  --white: #fffdf9;
  --ink: #201b17;
  --muted: #756d65;
  --line: #e4ddd4;
  --wood: #8d4e2a;
  --wood-deep: #69361d;
  --wood-soft: #bb7a50;
  --sage: #65755e;
  --danger: #b64035;
  --shadow: 0 18px 60px rgba(57, 38, 24, .14);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.site-shell { max-width: 720px; min-height: 100vh; margin: 0 auto; background: var(--white); box-shadow: 0 0 80px rgba(42, 29, 19, .08); }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: rgba(255,253,249,.92); border-bottom: 1px solid rgba(216,207,197,.7); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(15px); }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 11px; }
.brand-cn { font: 900 25px/1 var(--serif); letter-spacing: -.08em; }
.brand-meta { padding-left: 10px; border-left: 1px solid #baafa4; display: flex; flex-direction: column; line-height: 1; }
.brand-meta b { font: 600 10px/1.15 var(--serif); letter-spacing: .18em; white-space: nowrap; }
.brand-meta small { margin-top: 5px; font: 600 6px/1 var(--sans); letter-spacing: .42em; }
.topbar-side { display: flex; gap: 15px; align-items: center; color: var(--muted); font-size: 13px; }
.icon-button { width: 38px; height: 38px; border: 0; background: transparent; display: grid; align-content: center; justify-items: end; gap: 5px; padding: 8px 2px 8px 10px; cursor: pointer; }
.icon-button span { display: block; height: 1.5px; background: var(--ink); }
.icon-button span:nth-child(1) { width: 23px; }
.icon-button span:nth-child(2) { width: 16px; }
.icon-button span:nth-child(3) { width: 20px; }

.search-wrap { margin: 14px 18px 12px; height: 44px; border-radius: 22px; background: #f0eeeb; display: flex; align-items: center; padding: 0 14px; gap: 9px; position: relative; }
.search-wrap svg { width: 19px; fill: none; stroke: #77716a; stroke-width: 1.8; }
.search-wrap input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); font-size: 14px; }
.search-wrap input::placeholder { color: #a39c95; }
.clear-search { display: none; border: 0; background: #d9d3cb; color: #6c655e; width: 20px; height: 20px; padding: 0; border-radius: 50%; line-height: 18px; cursor: pointer; }
.search-wrap.has-value .clear-search { display: block; }

.hero { margin: 0 12px; height: 370px; border-radius: 4px; overflow: hidden; position: relative; display: flex; align-items: flex-end; background: #d6cdc1 center 48%/cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(22,15,11,.72) 0%, rgba(22,15,11,.16) 56%, transparent 100%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.hero-copy { color: #fff; padding: 33px 28px; text-shadow: 0 2px 14px rgba(0,0,0,.24); animation: rise .65s ease-out both; }
.eyebrow, .section-kicker { margin: 0 0 10px; font-size: 9px; letter-spacing: .28em; font-weight: 700; }
.hero h1 { margin: 0; font: 800 39px/1.22 var(--serif); letter-spacing: .04em; }
.hero-copy > p:not(.eyebrow) { margin: 15px 0 20px; font-size: 13px; letter-spacing: .15em; opacity: .86; }
.hero-link { padding: 0 0 6px; border: 0; border-bottom: 1px solid rgba(255,255,255,.7); background: transparent; color: #fff; font-size: 12px; letter-spacing: .1em; cursor: pointer; }
.hero-link span { margin-left: 7px; }

.category-nav { display: flex; gap: 9px; padding: 17px 18px 13px; overflow-x: auto; scrollbar-width: none; position: sticky; top: 72px; z-index: 15; background: linear-gradient(var(--white) 80%, rgba(255,253,249,0)); }
.category-nav::-webkit-scrollbar { display: none; }
.category-pill { min-width: 75px; flex: 1 0 auto; height: 38px; border: 1px solid var(--line); border-radius: 20px; background: #faf8f5; display: inline-flex; gap: 7px; align-items: center; justify-content: center; color: #625b55; font-size: 13px; cursor: pointer; transition: .22s ease; }
.category-pill i { font: normal 16px/1 var(--serif); }
.category-pill.active { color: #fff; background: var(--wood); border-color: var(--wood); box-shadow: 0 6px 15px rgba(127,67,35,.18); }

.product-section { padding: 8px 12px 120px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 6px 15px; }
.section-kicker { color: var(--wood); }
.section-heading h2 { margin: 0; font: 800 24px/1.1 var(--serif); letter-spacing: .04em; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.product-card { min-width: 0; border: 1px solid var(--line); background: #fff; border-radius: 5px; overflow: hidden; animation: rise .45s ease-out both; box-shadow: 0 5px 22px rgba(50,35,25,.055); }
.product-image-button { width: 100%; aspect-ratio: 4 / 4.25; border: 0; padding: 0; background: #eee9e2; position: relative; overflow: hidden; cursor: pointer; }
.product-image-button img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.product-image-button::after { content: "查看详情"; position: absolute; right: 8px; bottom: 8px; padding: 5px 8px; color: #fff; background: rgba(31,24,19,.68); font-size: 9px; letter-spacing: .08em; border-radius: 2px; opacity: 0; transform: translateY(4px); transition: .22s; }
.product-card:hover .product-image-button img { transform: scale(1.035); }
.product-card:hover .product-image-button::after { opacity: 1; transform: none; }
.product-info { padding: 11px 10px 10px; }
.product-title-row { display: flex; gap: 6px; align-items: baseline; }
.product-title-row b { font-family: var(--serif); font-size: 14px; flex: 0 0 auto; }
.product-title-row h3 { min-width: 0; margin: 0; font: 700 14px/1.35 var(--serif); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.product-subtitle { margin: 5px 0 9px; color: var(--muted); font-size: 11px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-button { width: 100%; height: 36px; border: 1px solid #a96d48; color: var(--wood); background: #fff; border-radius: 3px; font-size: 12px; font-weight: 600; cursor: pointer; transition: .2s; }
.add-button:hover, .add-button:active { color: #fff; background: var(--wood); }
.add-button.added { color: var(--sage); border-color: #b3c0ae; background: #eef3ec; }
.empty-state { padding: 75px 20px; text-align: center; color: var(--muted); }
.empty-mark { font: 300 60px/1 var(--serif); color: #b3a89c; }
.empty-state h3 { color: var(--ink); margin: 15px 0 6px; font: 700 20px var(--serif); }
.empty-state p { margin: 0 0 22px; font-size: 13px; }

.shop-footer { padding: 40px 20px 120px; text-align: center; color: #a29a91; background: #221d19; }
.footer-brand { color: #eee5db; font: 700 22px var(--serif); letter-spacing: .1em; }
.footer-brand span { display: block; margin-top: 6px; font: 600 7px var(--sans); letter-spacing: .5em; }
.shop-footer p { font: 14px var(--serif); letter-spacing: .12em; }
.shop-footer button { border: 0; border-bottom: 1px solid #777068; color: #bbb2a8; background: transparent; padding: 5px 0; cursor: pointer; }

.cart-dock { position: fixed; z-index: 30; left: 50%; bottom: 0; width: min(720px, 100%); transform: translateX(-50%); min-height: 76px; padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: rgba(255,253,249,.96); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(47,32,22,.12); backdrop-filter: blur(16px); display: flex; align-items: center; gap: 11px; }
.cart-summary { height: 48px; flex: 1; border: 0; background: transparent; padding: 0; display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left; }
.cart-summary > span:last-child { color: #534b45; font-size: 12px; }
.bag-icon { display: inline-block; width: 27px; height: 28px; border: 2px solid var(--ink); border-radius: 2px; position: relative; }
.bag-icon i { position: absolute; left: 6px; top: -8px; width: 11px; height: 10px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; }
.cart-summary b { width: 21px; height: 21px; display: grid; place-items: center; color: #fff; background: var(--wood); border-radius: 50%; font-size: 10px; margin-left: -15px; margin-top: -28px; z-index: 1; }
.primary-button, .outline-button { height: 46px; border-radius: 3px; padding: 0 20px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 13px; }
.primary-button { color: #fff; border: 1px solid var(--wood); background: linear-gradient(115deg, var(--wood-deep), #a36139); box-shadow: 0 7px 18px rgba(114,58,28,.16); }
.outline-button { color: var(--wood); border: 1px solid #ad795b; background: transparent; }
.cart-primary { min-width: 180px; }
.full { width: 100%; }

.modal { position: fixed; inset: 0; z-index: 60; visibility: hidden; opacity: 0; transition: .22s; }
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(24,18,14,.56); backdrop-filter: blur(3px); }
.detail-sheet, .cart-sheet { position: absolute; z-index: 1; left: 50%; bottom: 0; width: min(720px, 100%); max-height: calc(100dvh - 16px); transform: translate(-50%, 30px); overflow-y: auto; background: var(--white); border-radius: 16px 16px 0 0; box-shadow: var(--shadow); transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.modal.open .detail-sheet, .modal.open .cart-sheet { transform: translate(-50%, 0); }
.sheet-close { position: absolute; z-index: 5; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: rgba(24,19,15,.72); font-size: 26px; line-height: 32px; cursor: pointer; }
.detail-gallery { height: min(53vh, 490px); position: relative; background: #dfdad3; }
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.image-counter { position: absolute; right: 16px; bottom: 15px; border-radius: 18px; padding: 5px 10px; color: #fff; background: rgba(27,21,17,.62); font-size: 11px; }
.detail-content { padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
.detail-model { color: var(--wood); margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.detail-content h2 { margin: 0; font: 800 28px/1.35 var(--serif); }
.detail-material { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.detail-rule { margin: 18px 0; border-top: 1px solid var(--line); }
.choice-group { margin: 16px 0; }
.choice-label { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.choice-label b { font: 700 14px var(--serif); }
.choice-label span { color: #9b938a; font-size: 11px; }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-option { min-width: 76px; height: 39px; border: 1px solid var(--line); border-radius: 3px; background: #fff; cursor: pointer; font-size: 12px; }
.size-option.selected { color: var(--wood); border: 1.5px solid var(--wood); background: #fbf4ee; box-shadow: inset 0 0 0 1px #e6c6b2; }
.color-display { width: fit-content; min-width: 116px; padding: 8px 14px; border: 1px solid #d5b19a; display: flex; gap: 9px; align-items: center; border-radius: 3px; }
.color-display span { width: 22px; height: 22px; border-radius: 50%; background: repeating-linear-gradient(100deg, #825335 0 4px, #a77756 4px 6px); }
.color-display b { font-size: 12px; color: var(--wood); }
.quantity-row { display: flex; align-items: center; gap: 18px; }
.quantity-row .choice-label { margin: 0; }
.stepper { display: grid; grid-template-columns: 42px 52px 42px; height: 40px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.stepper button, .stepper span { border: 0; background: #fff; display: grid; place-items: center; }
.stepper button { cursor: pointer; font-size: 20px; }
.stepper span { border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 13px; }
.detail-description { margin: 21px 0; padding: 17px; background: #f7f3ed; border-left: 2px solid var(--wood-soft); }
.detail-description h3 { margin: 0 0 7px; font: 700 14px var(--serif); }
.detail-description p { margin: 0; color: #6d655e; font-size: 12px; line-height: 1.8; }
.soft-tip { margin: 15px 0; padding: 12px 13px; border-radius: 5px; color: #73685e; background: #f4efe9; font-size: 11px; }
.soft-tip span { width: 19px; height: 19px; margin-right: 5px; border: 1px solid #897a6e; display: inline-grid; place-items: center; border-radius: 50%; font-family: var(--serif); }
.detail-add { width: 100%; height: 52px; font-size: 15px; letter-spacing: .08em; }
.mini-bag { font-size: 20px; }

.sheet-header { height: 62px; padding: 0 18px; display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; background: rgba(255,253,249,.96); backdrop-filter: blur(12px); }
.sheet-header h2 { margin: 0; text-align: center; font: 800 18px var(--serif); }
.back-button, .text-button { border: 0; background: transparent; cursor: pointer; }
.back-button { padding: 0; text-align: left; font: 35px/1 var(--serif); }
.text-button { padding: 0; color: var(--muted); font-size: 12px; text-align: right; }
.cart-cover { min-height: 136px; padding: 23px 20px; background: linear-gradient(100deg, rgba(255,253,249,.92), rgba(255,253,249,.5)), url('/assets/products/bathroom-cabinets/D77.jpg') center 58%/cover; }
.brand.mini .brand-cn { font-size: 20px; }
.brand.mini .brand-meta b { font-size: 8px; }
.cart-cover h3 { margin: 19px 0 4px; font: 800 25px var(--serif); }
.cart-cover p { margin: 0; font-size: 12px; color: #655c54; }
.cart-items { padding: 0 15px; }
.cart-item { display: grid; grid-template-columns: 105px 1fr; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); position: relative; }
.cart-item img { width: 105px; height: 112px; object-fit: cover; border-radius: 4px; background: #eee8e0; }
.cart-item-info { min-width: 0; }
.cart-item-info h3 { margin: 1px 27px 6px 0; font: 700 16px var(--serif); }
.cart-item-info p { margin: 3px 0; color: var(--muted); font-size: 11px; }
.cart-item .stepper { margin-top: 12px; transform-origin: left; grid-template-columns: 33px 38px 33px; height: 34px; }
.remove-item { position: absolute; top: 12px; right: 0; width: 28px; height: 28px; border: 0; background: transparent; color: #9d958c; cursor: pointer; font-size: 18px; }
.cart-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.cart-empty b { display: block; color: var(--ink); font: 700 19px var(--serif); margin-bottom: 8px; }
.note-field { display: block; margin: 13px 15px; position: relative; }
.note-field > span { display: block; margin-bottom: 8px; font: 700 13px var(--serif); }
.note-field small { color: var(--muted); font-weight: 400; }
.note-field textarea { width: 100%; height: 76px; resize: vertical; padding: 11px 13px 23px; border: 1px solid var(--line); border-radius: 5px; outline: 0; font-size: 12px; background: #fff; }
.note-field textarea:focus { border-color: #bd8c6e; }
.note-field i { position: absolute; right: 9px; bottom: 7px; color: #aaa199; font: normal 10px var(--sans); }
.share-tip { margin: 13px 15px 16px; display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 7px; background: #f6efe5; color: var(--wood); }
.share-tip > span { font-size: 24px; }
.share-tip b, .share-tip small { display: block; }
.share-tip b { font: 700 12px var(--serif); }
.share-tip small { margin-top: 4px; color: #8d796b; font-size: 10px; }
.cart-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,249,.98); }
.cart-actions > div { min-width: 85px; font-size: 11px; }
.cart-actions > div b { color: var(--wood); }
.cart-actions .outline-button { padding: 0 12px; }

.centered { display: grid; place-items: center; padding: 18px; }
.guide-card, .poster-card { position: relative; z-index: 1; width: min(460px, 100%); padding: 30px 25px 24px; border-radius: 10px; background: var(--white); box-shadow: var(--shadow); transform: translateY(15px) scale(.98); transition: transform .28s; }
.modal.open .guide-card, .modal.open .poster-card { transform: none; }
.guide-card .sheet-close, .poster-card .sheet-close { top: 12px; right: 12px; color: var(--ink); background: #eee8e0; }
.guide-card h2, .poster-card h2 { margin: 0; font: 800 27px var(--serif); }
.guide-card ol { margin: 24px 0; padding: 0; list-style: none; }
.guide-card li { display: flex; gap: 15px; padding: 14px 0; border-top: 1px solid var(--line); }
.guide-card li > span { color: var(--wood); font: italic 700 19px var(--serif); }
.guide-card li b { font: 700 15px var(--serif); }
.guide-card li p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.poster-card { max-height: calc(100dvh - 30px); overflow: auto; }
.poster-card > p:not(.section-kicker) { color: var(--muted); font-size: 12px; }
.poster-preview { max-height: 53vh; overflow: auto; margin: 15px 0; padding: 8px; background: #e9e2d9; border-radius: 5px; }
.poster-preview img { width: 100%; box-shadow: 0 5px 20px rgba(43,31,22,.12); }
.poster-actions { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 105px; transform: translate(-50%, 15px); padding: 10px 17px; color: #fff; background: rgba(31,25,21,.9); border-radius: 4px; font-size: 12px; pointer-events: none; opacity: 0; transition: .25s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.modal-open { overflow: hidden; }

@keyframes rise { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: none; } }
@media (min-width: 720px) {
  .hero { height: 430px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart-sheet { border-radius: 16px 16px 0 0; }
}
@media (max-width: 430px) {
  .topbar { height: 64px; padding: 0 15px; }
  .brand-cn { font-size: 22px; }
  .category-nav { top: 64px; }
  .hero { margin: 0; border-radius: 0; height: 350px; }
  .hero h1 { font-size: 36px; }
  .hero-copy { padding: 28px 22px; }
  .product-section { padding-left: 8px; padding-right: 8px; }
  .product-grid { gap: 7px; }
  .product-info { padding-left: 8px; padding-right: 8px; }
  .cart-primary { min-width: 156px; padding: 0 13px; }
  .cart-summary > span:last-child { font-size: 11px; }
  .detail-content h2 { font-size: 24px; }
  .cart-actions { grid-template-columns: 1fr 1.4fr; }
  .cart-actions > div { grid-row: 1; }
  .cart-actions .primary-button { grid-row: 1; }
  .cart-actions .outline-button { grid-column: 1 / -1; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
