:root {
  --pink: #f22f66;
  --pink-dark: #e51f57;
  --red: #ef3158;
  --ink: #202124;
  --muted: #73777d;
  --line: #e9e9eb;
  --surface: #fff;
  --soft: #f7f7f8;
  --yellow: #ffdd31;
  --teal: #1cc4bd;
  --green: #8ed23c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f0f1f3; font-family: Arial, Helvetica, sans-serif; line-height: 1.42; -webkit-font-smoothing: antialiased; }
body.drawer-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.page-shell { width: min(520px, 100%); min-height: 100vh; margin: 0 auto; background: var(--surface); box-shadow: 0 0 40px rgba(0,0,0,.08); }

.topbar { position: sticky; top: 0; z-index: 30; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid #f0f0f2; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.top-icon { position: relative; width: 28px; height: 30px; display: grid; place-items: center; border: 0; padding: 0; color: #111; background: none; cursor: pointer; }
.top-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; }
.top-icon .dots { font-size: 15px; letter-spacing: 2px; transform: translateY(-3px); }
.searchbox { flex: 1; height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 4px; color: #9a9ca1; background: #f0f0f2; font-size: 11px; overflow: hidden; white-space: nowrap; }
.searchbox svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cart-top b { position: absolute; top: -1px; right: -3px; min-width: 15px; height: 14px; padding: 1px 3px; border-radius: 8px; color: #fff; background: var(--pink); font-size: 8px; line-height: 12px; }
.tabbar { position: sticky; top: 46px; z-index: 29; height: 42px; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.tabbar a { position: relative; display: grid; place-items: center; color: #333; font-size: 12px; }
.tabbar a.active { font-weight: 800; }
.tabbar a.active::after { content: ""; position: absolute; right: 20%; bottom: 0; left: 20%; height: 2px; background: #171717; }

.gallery-section { background: #fafafa; }
.gallery-main { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #eee6dc; touch-action: pan-y; }
.gallery-main > img, .gallery-main > video { width: 100%; height: 100%; }
.gallery-main > img { object-fit: cover; }
.gallery-main > video { object-fit: contain; background: #181818; }
.gallery-main > .gallery-lifestyle,
.gallery-main > .gallery-sunny,
.gallery-main > .gallery-back,
.gallery-main > .gallery-color { object-fit: contain; background: #eee8e0; }
.media-hidden { display: none !important; }
.gallery-count { position: absolute; top: 10px; right: 12px; z-index: 2; padding: 4px 8px; border-radius: 12px; color: #fff; background: rgba(0,0,0,.54); font-size: 10px; }
.gallery-arrow { position: absolute; top: 47%; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.35); font-size: 25px; line-height: 1; cursor: pointer; }
.gallery-arrow-left { left: 10px; }
.gallery-arrow-right { right: 10px; }
.gallery-swipe { position: absolute; right: 12px; bottom: 12px; padding: 3px 8px; border-radius: 10px; color: #fff; background: rgba(0,0,0,.38); font-size: 9px; }
.thumb-row { display: flex; gap: 7px; padding: 8px 10px; overflow-x: auto; background: #fff; }
.thumb { width: 54px; height: 46px; flex: 0 0 auto; padding: 0; border: 1px solid #ddd; border-radius: 3px; overflow: hidden; background: #eee6dc; cursor: pointer; }
.thumb.active { border: 2px solid var(--pink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; background: #202124; }
.video-thumb span { font-size: 17px; line-height: 16px; }
.video-thumb small { color: #fff; font-size: 7px; font-weight: 800; letter-spacing: .08em; }

.flash-sale { margin: 0; background: var(--yellow); }
.bonus-row { display: flex; height: 31px; align-items: end; padding-left: 11px; }
.bonus { position: relative; height: 24px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; color: #fff; font-size: 9px; font-style: italic; font-weight: 900; letter-spacing: .02em; line-height: .9; }
.bonus small { font-size: 8px; font-style: normal; font-weight: 700; line-height: .9; }
.bonus.extra { background: var(--teal); }
.bonus.cash { margin-left: 2px; background: var(--green); color: #101010; }
.bonus.cash::before { content: ""; position: absolute; left: -8px; bottom: 0; border-right: 8px solid var(--green); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.sale-main { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 56px; }
.sale-price { display: flex; align-items: center; gap: 5px; padding: 4px 11px; color: #fff; background: var(--red); clip-path: polygon(0 0, 100% 0, 89% 100%, 0 100%); }
.sale-price .price-icon { font-size: 11px; transform: rotate(45deg); }
.sale-price strong { font-size: 20px; letter-spacing: -.03em; }
.sale-price .sale-combo { align-self: end; margin-bottom: 9px; color: rgba(255,255,255,.9); font-size: 8px; font-weight: 800; white-space: nowrap; }
.sale-price b { align-self: end; margin-bottom: 8px; color: #fff; font-size: 10px; font-weight: 500; }
.sale-time { display: flex; flex-direction: column; justify-content: center; padding: 4px 10px 4px 5px; color: #171717; line-height: 1.1; }
.sale-time strong { font-size: 15px; }
.sale-time span { margin-top: 3px; font-size: 10px; }
.sale-time span b { font-variant-numeric: tabular-nums; font-size: 12px; letter-spacing: .04em; }
.offer-status { padding: 10px 12px 11px; border-bottom: 8px solid var(--soft); background: #fffaf1; }
.offer-status-head, .stock-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offer-status-head { margin-bottom: 8px; color: #7d5513; font-size: 11px; }
.offer-status-head span { color: #129c89; font-size: 10px; font-weight: 700; }
.stock-line { color: #505358; font-size: 10px; }
.stock-line strong { color: #e54332; font-size: 11px; }
.stock-track { height: 8px; margin: 6px 0 4px; overflow: hidden; border-radius: 6px; background: #e4e5e7; }
.stock-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff9c54, #f34b42); transition: width .25s ease; }
.stock-note { color: #999ba0; font-size: 9px; }
.verified-order-notice { margin: 8px 12px 0; padding: 8px 10px; border: 1px solid #cfeee7; border-radius: 4px; color: #187e70; background: #f0fffb; font-size: 10px; }
.demo-order-notice { position: fixed; right: 12px; bottom: 74px; left: 12px; z-index: 80; display: flex; align-items: center; gap: 7px; max-width: 420px; margin: 0 auto; padding: 9px 10px; border: 1px solid #f1c36a; border-radius: 7px; color: #734d07; background: #fff8df; box-shadow: 0 7px 24px rgba(38,27,0,.16); font-size: 10px; line-height: 1.25; }
.demo-order-notice[hidden] { display: none; }
.demo-badge { flex: 0 1 auto; max-width: 56%; padding: 3px 5px; border-radius: 4px; color: #fff; background: #b97900; font-size: 8px; font-weight: 800; letter-spacing: .04em; line-height: 1.1; text-align: center; }

.product-info { padding: 10px 12px 9px; border-bottom: 8px solid var(--soft); }
.hot-tag { display: inline-block; margin-bottom: 7px; padding: 3px 8px; border-radius: 9px; color: #fff; background: var(--pink); font-size: 10px; font-style: italic; font-weight: 800; }
.product-info h1 { margin: 0 0 9px; font-size: 17px; line-height: 1.24; letter-spacing: -.01em; }
.rating-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #878a90; font-size: 11px; }
.rating-line .rating-star { color: #ffc400; font-size: 15px; }
.rating-line strong { color: #252525; font-size: 13px; }
.rating-line a { color: #287b9b; }
.rating-line .sep { color: #c9c9ca; }
.rating-line b { color: #252525; }
.shipping-good { margin-left: 3px; color: #1ab8ae; font-weight: 700; }
.best-seller { display: flex; align-items: center; gap: 4px; min-height: 29px; margin-top: 9px; padding: 0 8px; color: #8a6a27; background: #fff8ec; font-size: 10px; }
.best-seller .trophy { color: #ad7d21; font-size: 16px; }
.best-seller strong { font-size: 10px; }
.best-seller .chevron { margin-left: auto; color: #ad7d21; font-size: 20px; }

.info-card { padding: 14px 12px; border-bottom: 8px solid var(--soft); }
.info-label { margin-bottom: 10px; color: #55595e; font-size: 12px; font-weight: 700; }
.shipping-box { position: relative; display: grid; grid-template-columns: 70px 1fr 18px; align-items: center; gap: 7px; }
.shipping-box .info-label { margin: 0; }
.shipping-content { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11px; }
.shipping-content strong { padding: 2px 5px; border-radius: 3px; color: #0c9a89; background: #e1f8f2; font-size: 11px; }
.shipping-content small { flex-basis: 100%; color: var(--muted); font-size: 10px; }
.shipping-content code { padding: 1px 4px; border-radius: 3px; color: #d22555; background: #fff1f5; font-size: 9px; font-weight: 800; }
.chevron { color: #a3a5a8; font-size: 20px; line-height: 1; }
.package-box { padding-bottom: 16px; }
.package-options { display: grid; grid-template-columns: 1fr 1.25fr; gap: 7px; }
.package-option { position: relative; display: grid; gap: 2px; min-height: 55px; padding: 8px 9px; border: 1px solid #dddfe1; border-radius: 4px; color: #36383b; background: #fff; text-align: left; cursor: pointer; }
.package-option strong { font-size: 11px; }
.package-option span { color: var(--pink); font-size: 13px; font-weight: 800; }
.package-option small { color: #777a80; font-size: 9px; }
.package-option em { position: absolute; top: 5px; right: 5px; padding: 2px 4px; border-radius: 3px; color: #fff; background: var(--pink); font-size: 8px; font-style: normal; }
.package-option.selected { border-color: var(--pink); background: #fff8fa; }
.variant-box { padding-bottom: 16px; }
.color-options { display: flex; gap: 7px; flex-wrap: wrap; }
.color-option { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid #dddfe1; border-radius: 3px; color: #383a3d; background: #fff; font-size: 11px; cursor: pointer; }
.color-option.selected { border-color: var(--pink); color: var(--pink); background: #fff8fa; }
.color-dot { width: 12px; height: 12px; display: inline-block; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.17); }
.color-dot.black { background: #202124; }
.color-dot.gray { background: #a9adb3; }
.color-dot.green { background: #395e48; }
.color-dot.blue { background: #254d71; }
.color-dot.cream { background: #e5d8c0; }

.reviews-section { padding-top: 14px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-title-row h2 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.section-title-row a { flex: 0 0 auto; color: #7d7f83; font-size: 11px; }
.section-title-row a span { margin-left: 2px; font-size: 16px; }
.review-note { margin: -6px 0 10px; padding: 7px 8px; border-left: 3px solid #f0bd3e; color: #80631b; background: #fff9e8; font-size: 9px; line-height: 1.35; }
.review-selected { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; padding: 7px 8px; border: 1px solid #ece6dc; border-radius: 5px; background: #fffdfa; }
.review-selected img { width: 41px; height: 41px; object-fit: contain; border-radius: 4px; background: #f1ece4; }
.review-selected div { display: grid; gap: 2px; }
.review-selected small { color: #8b8d91; font-size: 9px; }
.review-selected strong { color: #303236; font-size: 11px; }
.review-score { display: flex; align-items: baseline; gap: 7px; margin-bottom: 12px; }
.review-score strong { color: #ffc400; font-size: 18px; letter-spacing: 1px; }
.review-score > span { color: #888b8f; font-size: 10px; }
.review-list { display: grid; gap: 14px; }
.review { display: grid; grid-template-columns: 31px 1fr; gap: 8px; }
.review-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #9b7d70; font-size: 9px; font-weight: 800; }
.review-body { min-width: 0; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.review strong { font-size: 11px; }
.review-sample { flex: 0 0 auto; color: #9a7a2b; font-size: 9px; }
.review-product { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: #73767b; font-size: 9px; }
.review-product img { width: 35px; height: 35px; object-fit: contain; border: 1px solid #eee8df; border-radius: 3px; background: #f5f0e9; }
.review p { margin: 4px 0 3px; color: #35373a; font-size: 11px; line-height: 1.45; }
.review small { color: #999ba0; font-size: 9px; }

.shop-section { padding-top: 15px; }
.shop-top { display: flex; align-items: center; gap: 9px; }
.shop-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #131e2c; font-size: 19px; font-weight: 800; }
.shop-name { min-width: 0; flex: 1; }
.shop-name h2 { margin: 0 0 1px; font-size: 13px; }
.shop-name span { color: var(--muted); font-size: 10px; }
.follow-btn { padding: 6px 11px; border: 1px solid var(--pink); border-radius: 3px; color: var(--pink); background: #fff; font-size: 10px; cursor: pointer; }
.shop-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shop-stats span { display: grid; place-items: center; gap: 2px; padding: 9px 3px; border-right: 1px solid var(--line); text-align: center; }
.shop-stats span:last-child { border: 0; }
.shop-stats b { font-size: 12px; }
.shop-stats small { color: var(--muted); font-size: 9px; }
.shop-policy { display: flex; gap: 12px; padding-top: 12px; overflow-x: auto; color: #696d72; font-size: 9px; white-space: nowrap; }

.description-section { padding-top: 15px; }
.description-copy { color: #3f4245; font-size: 11px; line-height: 1.65; }
.description-copy p { margin: 0 0 5px; }
.description-copy p:first-child { margin-bottom: 8px; color: #222; }
.description-colors { display: flex; gap: 9px; margin-top: 16px; }
.description-colors span { flex: 1; min-height: 48px; display: grid; place-items: end center; padding-bottom: 5px; border-radius: 4px; color: #fff; background: linear-gradient(#254d71, #111); font-size: 9px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.description-colors span:nth-child(2) { background: linear-gradient(#575b60, #111); }
.description-colors span:nth-child(3) { background: linear-gradient(#a54848, #2b1717); }
.commitment { color: #3e4144; background: #fffcf3; }
.commitment h2 { margin: 0 0 9px; font-size: 13px; }
.commitment p { margin: 4px 0; font-size: 11px; }
.recommend-section { padding-bottom: 90px; }
.recommend-card { display: flex; gap: 10px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; }
.recommend-card img { width: 60px; height: 52px; object-fit: cover; border-radius: 3px; }
.recommend-card div { display: grid; align-content: center; gap: 4px; }
.recommend-card strong { font-size: 11px; }
.recommend-card span { color: var(--pink); font-size: 13px; font-weight: 800; }

.bottom-bar { position: fixed; left: 50%; bottom: 0; z-index: 35; width: min(520px, 100%); min-height: 62px; display: grid; grid-template-columns: 54px 54px 1fr 1fr; gap: 6px; align-items: stretch; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid #dedee0; background: rgba(255,255,255,.98); box-shadow: 0 -4px 16px rgba(0,0,0,.08); transform: translateX(-50%); }
.bottom-nav { display: grid; place-items: center; align-content: center; gap: 1px; color: #333; }
.bottom-icon { font-size: 20px; line-height: 20px; }
.bottom-nav small { font-size: 8px; }
.cart-button, .buy-button { border: 0; border-radius: 3px; font-size: 12px; font-weight: 800; line-height: 1.1; cursor: pointer; }
.cart-button { color: var(--pink); border: 1px solid var(--pink); background: #fff8fa; }
.buy-button { color: #fff; background: var(--pink); }
.cart-button:active, .buy-button:active { transform: scale(.98); }

.checkout-overlay[hidden] { display: none; }
.checkout-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: end; justify-content: center; }
.checkout-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.53); }
.checkout-drawer { position: relative; width: min(520px, 100%); max-height: min(88vh, 720px); overflow-y: auto; padding: 9px 13px calc(16px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; background: #fff; animation: slide-up .22s ease-out; }
@keyframes slide-up { from { transform: translateY(30px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.drawer-handle { width: 38px; height: 4px; margin: 0 auto 9px; border-radius: 3px; background: #ddd; }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.drawer-heading h2 { margin: 0; font-size: 15px; }
.drawer-heading button { width: 28px; height: 28px; border: 0; background: none; color: #777; font-size: 25px; line-height: 1; cursor: pointer; }
.selected-summary { display: flex; gap: 10px; padding: 12px 0; }
.selected-summary img { width: 104px; height: 104px; object-fit: contain; border-radius: 6px; background: #f4efe8; }
.selected-summary div { display: grid; align-content: center; gap: 2px; }
.selected-summary strong { font-size: 12px; }
.selected-summary span { color: var(--muted); font-size: 10px; }
.selected-summary b { color: var(--pink); font-size: 15px; }
.checkout-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 10px; margin-bottom: 9px; }
.checkout-row label, #checkout-form > label { margin: 0 0 5px; color: #55595e; font-size: 11px; font-weight: 700; }
.checkout-row select, #checkout-form input, #checkout-form textarea { width: 100%; padding: 9px 10px; border: 1px solid #d7d8da; border-radius: 4px; outline: none; color: #2f3133; background: #fff; font-size: 12px; }
#checkout-form input:focus, #checkout-form textarea:focus, .checkout-row select:focus { border-color: var(--pink); box-shadow: 0 0 0 2px rgba(242,47,102,.1); }
#checkout-form > label { display: block; margin-top: 10px; }
#checkout-form em { color: var(--pink); font-style: normal; }
.submit-order { width: 100%; margin-top: 15px; padding: 12px; border: 0; border-radius: 4px; color: #fff; background: var(--pink); font-size: 13px; font-weight: 800; cursor: pointer; }
.submit-order:disabled { opacity: .65; }
.checkout-note { min-height: 17px; margin: 7px 0 0; color: #83868a; text-align: center; font-size: 10px; }

@media (min-width: 650px) {
  .page-shell { margin-top: 16px; margin-bottom: 16px; border-radius: 6px; overflow: hidden; }
  .bottom-bar { border-radius: 0 0 6px 6px; }
}
