/* Design goal: calm, sharp and easy to read on phones.
   - Windows: "Segoe UI" for Latin text (system-ui maps to Microsoft YaHei UI on
     Chinese Windows, whose Latin letters look soft).
   - Only three weights: 400 body, 600 headings/labels, 700 prices/buttons.
   - Brand navy from the TOPGOODS logo. */
:root {
  --brand: #002860;
  --text: #111a2b;
  --text-2: #33404f;
  --muted: #56606f;
  --line: #e1e5eb;
  --bg: #ffffff;
  --soft: #f5f7fa;
  --tile: #eef1f5;
  --gold: #a8761a;
  --gold-soft: #fdf4e3;
  --wa: #0f7a3f;
  --wa-dark: #0b6232;
  --sale: #b42318;
  --low: #9a4a00;
  --low-bg: #fff1e0;
  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --header-h: 120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 60px); }
body { margin: 0; font-family: var(--font); font-size: 16px; font-weight: 400; line-height: 1.55; color: var(--text); background: var(--bg); }
img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; flex: none; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h2 { font-size: 20px; font-weight: 600; color: var(--text); }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 12px; }
@media (min-width: 760px) { .wrap { padding: 0 24px; } }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #2f6fd0; outline-offset: 2px; border-radius: 8px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; }
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; }
.logo img { height: 24px; width: auto; }
.logo-slogan { font-size: 10px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 36px; min-width: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); background: #fff;
}
.pill-btn svg { width: 18px; height: 18px; }
.help-btn { color: var(--brand); border-color: #c7d3e6; background: #f2f6fc; }
/* Phones: keep logo + Help + WhatsApp on one line. */
@media (max-width: 420px) {
  .help-btn { padding: 0 9px; }
  .header-actions { gap: 6px; }
  .header-row { column-gap: 8px; }
  .logo img { height: 22px; }
}
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; }
.icon-btn-wa { background: var(--wa); color: #fff; }
.icon-btn svg { width: 20px; height: 20px; }

/* Phones: search drops to its own row under the logo. */
.search {
  order: 3; flex: 1 1 100%;
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 12px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 999px;
}
.search:focus-within { border-color: var(--brand); background: #fff; }
.search > svg { width: 18px; height: 18px; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--text); }
.search input::placeholder { color: #6b7482; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--line); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.search-clear svg { width: 14px; height: 14px; }
.search-go {
  flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-size: 14px; font-weight: 600;
}
.search { padding-right: 4px; }
/* Wider screens: one row — logo | search | buttons. */
@media (min-width: 760px) {
  .header-row { max-width: 1320px; margin: 0 auto; flex-wrap: nowrap; gap: 24px; padding: 10px 24px; }
  .logo img { height: 28px; }
  .logo-slogan { font-size: 11px; }
  .search { order: 0; flex: 0 1 520px; margin: 0 auto; }
  .header-actions { margin-left: 0; }
}

/* ---------- Hero ----------
   Same look as the current topgoodsbw.com: full-width deep-blue gradient,
   soft blue and gold glows, and a large thin ring that slowly "breathes". */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(45, 130, 226, .25), transparent 34%),
    radial-gradient(circle at 72% 115%, rgba(242, 182, 56, .12), transparent 30%),
    linear-gradient(135deg, #03142f 0%, #07376f 62%, #082a59 100%);
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 90px rgba(53, 143, 240, .12), inset 0 0 70px rgba(255, 255, 255, .04);
  animation: hero-breathe 10s ease-in-out infinite alternate;
}
.hero::after { width: 530px; height: 530px; left: 55%; top: -42px; }
.hero::before { width: 300px; height: 300px; left: 72%; top: 60%; opacity: .6; animation-duration: 13s; animation-direction: alternate-reverse; }
@keyframes hero-breathe {
  from { opacity: .72; transform: translate(0, 0) scale(.96); }
  to   { opacity: 1;   transform: translate(-14px, 12px) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }
/* Kept short so products appear early. Phones: title + buttons only.
   Wider screens: text on the left, buttons on the right, in one band. */
.hero-inner { padding-top: 14px; padding-bottom: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .8px; color: #f2b638; }
.eyebrow svg { width: 13px; height: 13px; }
.hero h1 { margin-top: 2px; font-size: clamp(19px, 5.4vw, 30px); font-weight: 700; line-height: 1.2; color: #fff; }
.hero-sub { display: none; margin-top: 2px; font-size: 14px; color: #dce6f5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hero-cta .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
@media (min-width: 760px) {
  .hero-inner {
    display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center;
    padding-top: 18px; padding-bottom: 18px;
  }
  .hero-inner > :not(.hero-cta) { grid-column: 1; }
  .hero-cta { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .hero-cta .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
  .hero-sub { display: block; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-light { background: #fff; color: var(--brand); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn-block { width: 100%; min-height: 48px; font-size: 16px; }
.btn:disabled, .btn.is-disabled { background: #c9ced6; color: #33404f; cursor: not-allowed; pointer-events: none; }

/* One slim strip instead of three boxes. */
.perks {
  list-style: none; margin: 8px 0 0; padding: 7px 10px;
  display: flex; flex-wrap: wrap; justify-content: space-around; gap: 4px 10px;
  background: var(--soft); border-radius: var(--r-sm);
}
.perks li { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.perks svg { width: 15px; height: 15px; color: var(--gold); }
@media (max-width: 420px) { .perks { padding: 7px 6px; } .perks li { font-size: 11px; gap: 3px; } .perks svg { width: 13px; height: 13px; } }
@media (min-width: 760px) { .perks { justify-content: center; gap: 40px; } .perks li { font-size: 14px; } }

/* ---------- Shop ---------- */
.shop { margin-top: 24px; }
.shop-bar { position: sticky; top: var(--header-h); z-index: 30; background: #fff; padding: 8px 0; }
.shop-bar-row { display: flex; align-items: center; gap: 10px; }
.chips { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
}
.chip[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .n { margin-left: 5px; font-weight: 400; color: var(--muted); }
.chip[aria-selected="true"] .n { color: #c9d6ee; }
.sort select {
  height: 36px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23111a2b' stroke-width='2.2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 13px;
}

.shop-head { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 0 12px; }
.count { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card-img { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; cursor: pointer; background: var(--tile); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.badge-sale { background: var(--sale); color: #fff; }
.badge-low { background: var(--low-bg); color: var(--low); border: 1px solid #f3c58a; }
.card-img.sold img, .card-img.sold .ph { filter: grayscale(1); opacity: .45; }
.sold-tag {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--text); color: #fff; font-size: 14px; font-weight: 600; padding: 5px 14px; border-radius: 999px;
}
.card-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; flex: 1; }
.card-meta { font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.card-name { font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 6px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.price b { font-size: 18px; font-weight: 700; color: var(--brand); }
.price s { color: var(--muted); font-size: 13px; }
.price-lg b { font-size: 24px; }
.price-lg s { font-size: 15px; }
.order-btn {
  width: 100%; height: 40px; gap: 6px; border-radius: 999px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--wa); color: #fff;
}
.order-btn svg { width: 17px; height: 17px; }
.order-btn:disabled { background: var(--tile); color: var(--muted); cursor: not-allowed; }

.ph { width: 100%; height: 100%; display: grid; place-items: center; background: var(--tile); }
.ph span { font-size: 40px; font-weight: 600; color: #b3bdcc; }

.sk { background: linear-gradient(90deg, #e9ecf1 0%, #f3f5f8 50%, #e9ecf1 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
.sk-img { aspect-ratio: 1 / 1; border-radius: var(--r); }
.sk-line { height: 12px; margin-top: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

.empty { text-align: center; padding: 40px 0; color: var(--text-2); }
.empty .btn { margin-top: 14px; }

/* ---------- How to order ---------- */
.how { margin-top: 36px; }
.how-steps { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
@media (min-width: 760px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
.how-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.how-steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 600; font-size: 14px; }
.how-steps b { display: block; font-size: 15px; font-weight: 600; }
.how-steps p { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.how-steps-sm { margin: 14px 0 0; }
.how-steps-sm li { padding: 10px 12px; align-items: center; }

/* ---------- Brands (compact tiles) ---------- */
.brands { margin-top: 36px; }
.section-head p { margin-top: 2px; font-size: 14px; }
/* Small fixed-size tiles in a row (wrap on narrow screens), never stretched. */
.brand-row { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.brand-card {
  width: 84px; height: 46px; display: grid; place-items: center; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; font-weight: 600; text-align: center;
}
.brand-card img { max-height: 22px; max-width: 100%; width: auto; object-fit: contain; }

/* ---------- Shopping notice / Refund policy (one compact box) ---------- */
.info { margin: 28px auto 28px; }
/* Phones: two slim rows. Wider screens: side by side. */
.info-box { display: grid; border: 1px solid var(--line); border-radius: var(--r-sm); }
.info-row + .info-row { border-top: 1px solid var(--line); }
@media (min-width: 760px) {
  .info-box { grid-template-columns: 1fr 1fr; align-items: start; }
  .info-row + .info-row { border-top: 0; border-left: 1px solid var(--line); }
}
.info-row summary, .acc summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; cursor: pointer; font-weight: 600; font-size: 13px; line-height: 1.4;
}
.info-row summary::-webkit-details-marker, .acc summary::-webkit-details-marker { display: none; }
.info-row summary svg, .acc summary svg { width: 16px; height: 16px; transition: transform .2s; color: var(--muted); }
.info-row[open] summary svg, .acc[open] summary svg { transform: rotate(180deg); }
.info-row p, .acc p { padding: 0 10px 8px; color: var(--text-2); font-size: 13px; line-height: 1.5; white-space: pre-line; }
/* Same rows inside the order-confirm sheet. */
.acc { border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 8px; }
/* Shopping Help: six sections, always one column (home, product page, order sheet, help button). */
.help-block { display: grid; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .help-block { grid-template-columns: 1fr; }
  .help-block .info-row + .info-row { border-left: 0; border-top: 1px solid var(--line); }
}
.help-block-sm { border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 8px; }
.help-text { padding: 0 10px 10px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.help-text p { margin: 0 0 4px; }
.help-text ul, .help-text ol { margin: 0 0 4px; padding-left: 18px; }
.help-text li + li { margin-top: 3px; }
.help-pay { margin-top: 8px; padding: 8px 10px; background: var(--bg, #f4f6fa); border-radius: 8px; }
.help-pay .help-pay-line { display: block; margin: 0; padding: 2px 0; font-weight: 600; color: var(--text); white-space: normal; }

/* ---------- Footer ---------- */
.footer { background: var(--brand); color: #dfe7f3; padding: 26px 0 calc(20px + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; gap: 18px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }
/* Logo with the slogan centred underneath and narrower than the logo. */
.footer-brand { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.footer-logo { height: 24px; width: auto; }
.footer-slogan { color: #ffd27a; font-size: 10px; font-weight: 600; white-space: nowrap; }
.footer-loc { margin-top: 8px; font-size: 13px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 15px; }
.footer-links svg { width: 18px; height: 18px; color: #6ee7a0; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 13px; color: #b9c6dd; }
.admin-link { color: #b9c6dd; }

/* ---------- Product cards: links to the product page ---------- */
a.card-img { text-decoration: none; }
.card-name a { color: inherit; text-decoration: none; }
.card-opts { font-size: 12px; color: var(--muted); }
.order-btn-outline { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); text-decoration: none; }

/* ---------- Product page (/p/<id>-<name>) ----------
   Phones: photos on top, order bar fixed to the bottom.
   Desktop: thumbnails + main photo on the left, details on the right. */
.pdp { padding: 10px 0 28px; }
.crumbs { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 600; text-decoration: none; }
.crumbs svg { width: 16px; height: 16px; }
.pdp-grid { display: grid; gap: 14px; }
.pdp-media { display: flex; gap: 10px; min-width: 0; }
.pdp-thumbs { display: none; }
.pdp-main { flex: 1; min-width: 0; margin: 0 -12px; }
.pdp-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--tile); }
.pdp-track::-webkit-scrollbar { display: none; }
.pdp-track > div { flex: 0 0 100%; aspect-ratio: 1 / 1; scroll-snap-align: start; }
.pdp-track img { width: 100%; height: 100%; object-fit: cover; }
.pdp-main { position: relative; }
.pdp-track { cursor: grab; user-select: none; }
.pdp-track img { -webkit-user-drag: none; }
/* "2 / 5" on the big photo, every screen size */
.pdp-count { position: absolute; right: 22px; top: 12px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
/* Arrows: computers / mouse only (phones swipe) */
.pdp-arrow { display: none; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, .15); cursor: pointer; align-items: center; justify-content: center; }
.pdp-arrow svg { width: 22px; height: 22px; }
.pdp-arrow.prev { left: 22px; }
.pdp-arrow.next { right: 22px; }
.pdp-arrow:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .pdp-arrow:not([hidden]) { display: flex; } }
.pdp-info { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pdp-meta { font-size: 13px; color: var(--muted); }
.pdp-name { font-size: clamp(20px, 5.5vw, 28px); font-weight: 700; line-height: 1.25; margin-top: -6px; }
.each { font-size: 13px; color: var(--muted); }

.opt-group { display: grid; gap: 6px; }
.opt-label { font-size: 14px; color: var(--text-2); }
.opt-label b { color: var(--text); font-weight: 600; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip {
  min-height: 42px; min-width: 56px; padding: 5px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
.opt-chip[aria-pressed="true"] { border-color: var(--brand); background: #eef3fb; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.opt-chip:disabled { background: var(--soft); border-style: dashed; color: #8b95a3; cursor: not-allowed; }
.opt-chip:disabled .opt-name { text-decoration: line-through; }
.opt-chip small { font-size: 10px; font-weight: 700; color: var(--sale); }
/* Colour tiles with the variant's photo */
.opt-tiles { gap: 10px; }
.opt-tile { width: 76px; min-width: 0; padding: 4px 4px 6px; gap: 4px; border-radius: 12px; }
.tile-img { position: relative; display: block; width: 66px; height: 66px; border-radius: 8px; overflow: hidden; background: var(--tile); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile-img i { display: grid; place-items: center; height: 100%; font-style: normal; font-size: 22px; font-weight: 700; color: #9aa6b8; }
.tile-img em { position: absolute; inset: auto 0 0 0; padding: 2px 0; background: rgba(17, 26, 43, .78); color: #fff; font-size: 9px; font-style: normal; font-weight: 700; text-align: center; }
.opt-tile .opt-name { max-width: 100%; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-tile:disabled { border-style: dashed; }
.opt-tile:disabled img { filter: grayscale(1); opacity: .5; }

.qty-row { display: flex; align-items: center; gap: 12px; }
.qty { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 42px; height: 42px; border: 0; background: #fff; font: inherit; font-size: 20px; color: var(--text); cursor: pointer; }
.qty input { width: 52px; height: 42px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: inherit; font-size: 16px; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.pdp-actions { display: flex; align-items: center; gap: 8px; }
.pdp-actions .btn-wa { flex: 1; min-height: 48px; }
.pdp-share { flex: none; min-height: 48px; background: #fff; color: var(--brand); border: 1.5px solid var(--line); }
.pdp-bar-price { display: none; }
.pdp-desc h2 { font-size: 16px; margin-bottom: 4px; }
.pdp-desc p { color: var(--text-2); font-size: 15px; white-space: pre-line; }

@media (max-width: 859px) {
  .pdp-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: #fff; border-top: 1px solid var(--line);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
  }
  .pdp-bar-price { display: flex; flex-direction: column; flex: none; line-height: 1.15; }
  .pdp-bar-price b { font-size: 18px; color: var(--brand); }
  .pdp-bar-price s { font-size: 12px; color: var(--muted); }
  .pdp-share { width: 48px; padding: 0; }
  .pdp-share span { display: none; }
  body.on-pdp .footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (min-width: 860px) {
  .pdp { padding-top: 16px; }
  .pdp-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .pdp-media { position: sticky; top: calc(var(--header-h) + 14px); }
  .pdp-main { margin: 0; }
  .pdp-count { right: 10px; top: 10px; }
  .pdp-arrow.prev { left: 10px; }
  .pdp-arrow.next { right: 10px; }
  .pdp-track { border-radius: var(--r); }
  .pdp-thumbs { display: flex; flex-direction: column; gap: 8px; flex: none; width: 72px; max-height: 600px; overflow-y: auto; }
  .pdp-thumbs button { flex: none; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--tile); cursor: pointer; }
  .pdp-thumbs button[aria-current="true"] { border-color: var(--brand); }
  .pdp-thumbs img, .pdp-thumbs .ph { width: 100%; height: 100%; object-fit: cover; }
  .pdp-thumbs .ph span { font-size: 22px; }
  .pdp .dots { display: none; }
  .pdp-name { font-size: 28px; }
}

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 120; background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; }

/* ---------- Sheets ---------- */
.sheet {
  width: 100%; max-width: 520px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 20px 20px 0 0; background: #fff; color: var(--text); overflow: auto; overscroll-behavior: contain;
}
.sheet[open] { display: flex; flex-direction: column; animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 760px) { .sheet { margin: auto; border-radius: 20px; } }
.sheet::backdrop { background: rgba(8, 16, 32, .55); }
.sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  display: grid; place-items: center; background: #fff; color: var(--text);
}
.sheet-pad { padding: 22px 20px 8px; }
.sheet h3 { font-size: 19px; font-weight: 600; padding-right: 44px; }
.sheet-actions { position: sticky; bottom: 0; margin-top: auto; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: none; background: var(--tile); }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { flex: 0 0 100%; aspect-ratio: 1 / 1; scroll-snap-align: start; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.dots { display: flex; justify-content: center; gap: 6px; padding-top: 10px; }
.dots:empty { display: none; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #b3bdcc; }
.dots i.on { background: var(--brand); width: 18px; border-radius: 4px; }
.detail-body { padding: 14px 20px 8px; display: grid; gap: 6px; }
.detail-body h3 { padding-right: 0; font-size: 20px; line-height: 1.3; }
.stock-pill { justify-self: start; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--low-bg); color: var(--low); }
.stock-pill.out { background: var(--tile); color: var(--text-2); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 6px 0 0; padding: 12px 14px; background: var(--soft); border-radius: var(--r-sm); font-size: 14px; }
.specs:empty { display: none; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.detail-desc { margin-top: 6px; color: var(--text-2); font-size: 15px; white-space: pre-line; }

.confirm-item { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px; background: var(--soft); border-radius: var(--r); }
.confirm-thumb { flex: none; width: 64px; height: 64px; border-radius: var(--r-sm); overflow: hidden; background: var(--tile); }
.confirm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.confirm-thumb .ph span { font-size: 24px; }
.confirm-name { font-weight: 600; line-height: 1.35; }
.confirm-sku { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.check { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; padding: 12px 14px; border-radius: var(--r-sm); border: 2px solid var(--line); font-weight: 600; cursor: pointer; }
.check:has(input:checked) { border-color: var(--wa); background: #ecf8f1; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--wa); flex: none; }

/* Company profile texts from 设置 */
[hidden] { display: none !important; }
.logo img, .footer-logo { max-width: 200px; object-fit: contain; object-position: left center; }
.footer-addr { margin-top: 4px; font-size: 13px; white-space: pre-line; }
.footer-note { margin-top: 8px; font-size: 12px; opacity: .85; white-space: pre-line; }
/* Home: "Shopping Help" button under Our Brands (opens the Help window) */
.help-cta { display: flex; justify-content: center; margin: 28px auto 32px; }
.help-cta .btn svg { width: 18px; height: 18px; }