/* ==========================================================================
   ebooknowledge storefront — mobile-first
   Theme variables are overwritten at runtime from Admin → Appearance.
   ========================================================================== */
:root {
  --primary: #111111; --on-primary: #fff; --accent: #0e7a43;
  --bg: #f7f7f5; --surface: #fff; --text: #111111; --muted: #6b6b66;
  --line: #e8e8e4; --line-2: #f1f1ee; --star: #e0a400; --danger: #dc2626; --warn-bg: #fff7ed; --warn: #9a3412;
  --radius: 14px; --r-sm: calc(var(--radius) * .6);
  --font: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-up: 0 -6px 24px rgba(15, 23, 42, .08);
  --tint: color-mix(in srgb, var(--primary) 9%, var(--surface));
  --tint-2: color-mix(in srgb, var(--primary) 16%, var(--surface));
  --hdr-h: 58px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@view-transition { navigation: auto; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.pt { padding-top: 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.h-lg { font-size: 26px; font-weight: 800; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- skeleton ---------- */
.sk { background: linear-gradient(90deg, #eceef3 25%, #f6f7fa 37%, #eceef3 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
.sk-line { height: 12px; border-radius: 6px; margin: 6px 0; }
.sk-card .pcard-body { gap: 4px; }
.sk-card { pointer-events: none; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- header ---------- */
.announce { background: var(--primary); color: var(--on-primary); text-align: center; font-size: 13px; font-weight: 600; padding: 8px 16px; }
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.hdr-in { height: var(--hdr-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--text); }
.logo-img { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-act { display: flex; align-items: center; gap: 4px; }
.hbtn { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 42px; min-width: 42px; padding: 0 10px; border-radius: 12px;
  justify-content: center; font-weight: 600; font-size: 14px; color: var(--text); transition: background .15s; }
.hbtn svg { font-size: 22px; }
.hbtn:hover { background: var(--line-2); }
.hbtn-l { display: none; }
.cbadge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary);
  color: var(--on-primary); font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.hdr-secure { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent); }
@media (min-width: 720px) { .hbtn-l { display: inline; } .cbadge { position: static; border: 0; } }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; letter-spacing: .005em; transition: transform .08s, background .15s, box-shadow .15s, opacity .15s; white-space: nowrap; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--tint); }
.btn-ghost { background: var(--line-2); color: var(--text); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--primary); font-weight: 600; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.input, .field input, .field textarea, .field select { width: 100%; height: 48px; padding: 0 14px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--surface);
  font: inherit; font-size: 16px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--tint-2); }
.field.err input { border-color: var(--danger); }
.err-msg { color: var(--danger); font-size: 13px; margin-top: 6px; font-weight: 500; }
.hint-fix { font-size: 13px; margin-top: 6px; color: var(--warn); }
.hint-fix button { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 700; text-decoration: underline; }

/* ---------- hero ---------- */
.hero { margin: 16px 0 6px; border-radius: calc(var(--radius) + 4px); padding: 22px 18px; position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, var(--tint-2), var(--surface) 60%); border: 1px solid var(--line); }
.hero.has-img { display: grid; gap: 16px; grid-template-columns: 1fr; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--primary); background: var(--surface);
  border: 1px solid var(--tint-2); padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.hero h1 { font-size: 23px; font-weight: 800; letter-spacing: -.025em; }
.hero p { margin-top: 8px; color: var(--muted); font-size: 14.5px; max-width: 560px; }
.hero .btn { margin-top: 16px; height: 44px; }
.hero-img img { border-radius: 12px; max-height: 220px; margin: 0 auto; }
@media (min-width: 720px) { .hero { padding: 36px 32px; } .hero h1 { font-size: 32px; } .hero.has-img { grid-template-columns: 1.4fr 1fr; align-items: center; } }

/* ---------- sections & product cards ---------- */
.sec { margin-top: 26px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 18px; font-weight: 800; }
.sec-h a { font-size: 13.5px; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.view-all { margin-top: 12px; }
.plist { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .plist { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .plist { grid-template-columns: 1fr 1fr 1fr; } }
.pcard { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 150px;
  transition: box-shadow .2s, transform .2s var(--ease), border-color .2s; }
.pcard:hover { box-shadow: var(--shadow); border-color: transparent; }
.pcard:active { transform: scale(.99); }
.pcard-img { flex: 0 0 96px; aspect-ratio: 1 / 1.414; border-radius: 8px; overflow: hidden; background: var(--line-2); box-shadow: 0 2px 8px rgba(15, 23, 42, .12); align-self: flex-start; }
.pcard-img img, .vcard-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { width: 100%; height: 100%; background: linear-gradient(135deg, var(--tint), var(--line-2)); }
.pcard-body { display: flex; flex-direction: column; min-width: 0; flex: 1; padding: 2px 0; }
.pcard-t { font-size: 15px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-s { font-size: 13px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-r { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.pcard .price-row { margin-top: auto; padding-top: 8px; }
.pbadge { align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--primary); background: var(--tint); padding: 2px 8px; border-radius: 6px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .03em; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.price { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.mrp { color: var(--muted); font-size: 13.5px; }
.off { color: var(--accent); font-size: 13.5px; font-weight: 700; }
.price-row.sm .price { font-size: 15px; }
.price-row.sm .mrp { font-size: 12.5px; }
/* grid layout option (e.g. a kids category) */
.layout-grid .plist { grid-template-columns: 1fr 1fr; }
.layout-grid .pcard { flex-direction: column; gap: 10px; }
.layout-grid .pcard-img { flex: none; width: 100%; align-self: stretch; }
@media (min-width: 720px) { .layout-grid .plist { grid-template-columns: repeat(4, 1fr); } }

.stars { position: relative; display: inline-block; font-size: 15px; letter-spacing: 1px; line-height: 1; white-space: nowrap; }
.stars.sm { font-size: 12px; }
.stars.lg { font-size: 20px; }
.stars-bg { color: #d7dae1; }
.stars-fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--star); }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.vcard { flex: 0 0 140px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.vcard-img { aspect-ratio: 1 / 1.414; border-radius: 8px; overflow: hidden; background: var(--line-2); }
.vcard-t { font-size: 13.5px; font-weight: 600; margin: 8px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
@media (min-width: 720px) { .vcard { flex-basis: 170px; } }

/* ---------- product page ---------- */
.pd { padding-top: 12px; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.g-main { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow); cursor: zoom-in; touch-action: pan-y; border: 0; padding: 0; display: block; }
.g-main img { width: auto; height: auto; max-width: 100%; max-height: min(54vh, 620px); user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.g-count { position: absolute; right: 10px; bottom: 10px; background: rgba(15, 23, 42, .66); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; justify-content: center; }
.g-thumbs::-webkit-scrollbar { display: none; }
.g-th { flex: 0 0 54px; aspect-ratio: 1 / 1.414; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--line-2); opacity: .7; transition: .15s; }
.g-th img { width: 100%; height: 100%; object-fit: cover; }
.g-th.on { border-color: var(--primary); opacity: 1; }
.pd-info { margin-top: 18px; }
.caps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cap { height: 38px; padding: 0 18px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; transition: .15s; }
.cap.on { border-color: var(--primary); background: var(--tint); color: var(--primary); }
.pd-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.pd-rating { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.pd-rating b { color: var(--text); }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; }
.pd-price .price { font-size: 28px; }
.pd-price .mrp { font-size: 16px; }
.pd-price .off-pill { font-size: 13px; font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); padding: 3px 9px; border-radius: 7px; }
.pd-tax { font-size: 12px; color: var(--muted); margin-top: 2px; }
.prose { font-size: 15px; line-height: 1.65; color: color-mix(in srgb, var(--text) 85%, var(--muted)); margin-top: 14px; overflow-wrap: anywhere; }
.prose p + p, .prose ul, .prose ol { margin-top: 10px; }
.prose h2, .prose h3 { margin: 18px 0 8px; font-size: 17px; color: var(--text); }
.prose a { color: var(--primary); text-decoration: underline; }
.prose img { border-radius: 10px; margin: 10px 0; }
.feat { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.feat li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.fi { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; margin-top: 1px; }
.fi svg { stroke-width: 3; }
.fi-tick { background: #dcfce7; color: #16a34a; }
.fi-cross { background: #fee2e2; color: #dc2626; }
.fi-dot { background: #dbeafe; color: #2563eb; font-size: 20px; }
.fi-star { background: #fef3c7; color: #d97706; }
.fi-arrow { background: var(--tint); color: var(--primary); }
.fi-bolt { background: #fef3c7; color: #d97706; }
.bought { margin: 20px auto 0; text-align: center; font-size: 14px; font-weight: 700; color: #c2410c; }
.trust { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.trust span { display: inline-flex; align-items: center; gap: 5px; }
.trust svg { font-size: 14px; }
.trust .sep { color: #c7cbd4; }
.pd-actions { display: none; gap: 10px; margin-top: 18px; }
.pd-actions .btn { flex: 1; }
@media (min-width: 900px) {
  .pd-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .gallery { display: grid; grid-template-columns: minmax(0, max-content) 66px; justify-content: center; gap: 12px; align-items: start; position: sticky; top: calc(var(--hdr-h) + 16px); }
  .g-main img { max-height: min(72vh, 640px); }
  .g-thumbs { flex-direction: column; max-height: min(66vh, 620px); overflow-y: auto; overflow-x: hidden; justify-content: flex-start; }
  .g-th { flex: 0 0 auto; width: 58px; }
  .pd-info { margin-top: 0; }
  .pd-title { font-size: 28px; }
}

.block { margin-top: 28px; }
.block-h { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* upsell */
.ups-box { position: relative; overflow: hidden; transition: max-height .45s var(--ease); }
.ups-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.ups-row:last-child { border-bottom: 0; }
.ups-row img, .ups-row .noimg { width: 46px; aspect-ratio: 1 / 1.414; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.ups-row .t { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ups-row .p { text-align: right; white-space: nowrap; }
.ups-row .p b { display: block; font-size: 15px; }
.ups-row .p s { font-size: 12px; color: var(--muted); }
.ups-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(to bottom, transparent, var(--surface) 85%); pointer-events: none; transition: opacity .3s; }
.ups-box.open .ups-fade { opacity: 0; }
.ups-toggle { width: 100%; height: 44px; border: 0; border-top: 1px solid var(--line-2); background: var(--surface); color: var(--primary); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 0 0 var(--radius) var(--radius); }
.ups-toggle svg { transition: transform .3s; transform: rotate(90deg); }
.ups-toggle.open svg { transform: rotate(-90deg); }

/* previews */
.pv-list { display: grid; gap: 8px; }
.pv-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.pv-row > svg { font-size: 26px; flex: none; }
.pv-row .n { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* reviews (Amazon-like, restrained) */
.rv-sum { padding: 16px; }
.rv-avg { display: flex; align-items: center; gap: 10px; }
.rv-avg .big { font-size: 15px; font-weight: 700; }
.rv-count { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.rv-bars { display: grid; gap: 8px; margin-top: 14px; }
.rv-bar { display: grid; grid-template-columns: 48px 1fr 40px; align-items: center; gap: 10px; font-size: 13.5px; }
.rv-bar .lbl { color: var(--primary); font-weight: 600; white-space: nowrap; }
.rv-bar .tr { height: 18px; border-radius: 4px; background: #f0f2f5; border: 1px solid #e3e6ea; overflow: hidden; }
.rv-bar .fl { height: 100%; background: var(--star); border-radius: 3px 0 0 3px; }
.rv-bar .pc { text-align: right; color: var(--muted); }
@media (min-width: 900px) { .rv-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; } .rv-wrap .rv-sum { position: sticky; top: calc(var(--hdr-h) + 16px); } }
.rv-list { display: grid; gap: 0; }
.rv { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rv:last-child { border-bottom: 0; }
.rv-who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.rv-name { font-size: 14px; font-weight: 600; }
.rv-ver { font-size: 12px; font-weight: 700; color: #c45500; }
.rv-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.rv-time { font-size: 12px; font-weight: 600; color: var(--primary); background: var(--tint); padding: 2px 8px; border-radius: 6px; }
.rv-title { font-weight: 700; font-size: 14.5px; margin-top: 8px; }
.rv-body { font-size: 14.5px; line-height: 1.6; margin-top: 6px; color: color-mix(in srgb, var(--text) 88%, var(--muted)); white-space: pre-line; }
.rv-form { padding: 16px; margin-top: 18px; position: relative; }
.rv-form h3 { font-size: 15px; margin-bottom: 10px; }
.rv-form .rv-stars-in { font-size: 24px; color: #d7dae1; letter-spacing: 3px; }
.rv-form textarea { width: 100%; min-height: 84px; margin-top: 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--line-2); padding: 10px 12px; font: inherit; resize: none; }
.rv-form .btn { margin-top: 10px; }
.rv-lock { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--line-2); padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; }

/* sticky buy bar */
.has-bar { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-up);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); transform: translateY(0); transition: transform .3s var(--ease); }
.buybar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bb-price { min-width: 0; line-height: 1.15; }
.bb-price b { display: block; font-size: 19px; font-weight: 800; }
.bb-price s { font-size: 12.5px; color: var(--muted); }
.bb-price .off { font-size: 12px; margin-left: 4px; }
.bb-act { display: flex; gap: 8px; flex: none; }
.bb-act .btn { height: 46px; padding: 0 16px; font-size: 14.5px; }
@media (max-width: 370px) { .bb-act .btn { padding: 0 11px; font-size: 13.5px; } .bb-price b { font-size: 17px; } }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: #0b0d12; display: flex; flex-direction: column; opacity: 0; transition: opacity .2s; touch-action: none; }
.lb.show { opacity: 1; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; color: #fff; padding-top: calc(10px + env(safe-area-inset-top)); }
.lb-top .n { font-size: 14px; font-weight: 600; opacity: .85; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; font-size: 22px; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .25s var(--ease); }
.lb.zoom .lb-stage { overflow: auto; display: block; touch-action: pan-x pan-y; }
.lb.zoom .lb-stage img { max-width: none; max-height: none; width: 200%; transform: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); justify-content: center; scrollbar-width: none; }
.lb-thumbs .g-th { flex-basis: 44px; }
@media (max-width: 719px) { .lb-nav { display: none; } }

/* ---------- cart / checkout ---------- */
.page-h { font-size: 22px; font-weight: 800; margin: 18px 0 14px; letter-spacing: -.02em; }
.line { display: flex; gap: 12px; padding: 12px; align-items: center; }
.line + .line { border-top: 1px solid var(--line-2); }
.line img, .line .noimg { width: 54px; aspect-ratio: 1 / 1.414; object-fit: cover; border-radius: 6px; flex: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.line .info { flex: 1; min-width: 0; }
.line .t { font-weight: 600; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line .v { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.line .pr { text-align: right; white-space: nowrap; }
.line .pr b { display: block; font-size: 15px; }
.line .pr s { font-size: 12.5px; color: var(--muted); }
.line .rm { background: none; border: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 4px 0; margin-top: 4px; display: inline-flex; gap: 4px; align-items: center; }
.sum { padding: 14px 16px; display: grid; gap: 8px; font-size: 14.5px; }
.sum .r { display: flex; justify-content: space-between; gap: 12px; }
.sum .r.green { color: var(--accent); font-weight: 600; }
.sum .r.total { font-size: 17px; font-weight: 800; padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 4px; }
.save-banner { display: flex; align-items: center; gap: 8px; justify-content: center; background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent); font-weight: 700; font-size: 14px; padding: 10px 12px; border-radius: 12px; margin-top: 12px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.co-grid { display: grid; gap: 14px; padding-bottom: 20px; }
@media (min-width: 900px) { .co-grid { grid-template-columns: 1.2fr 1fr; align-items: start; gap: 24px; } .co-side { position: sticky; top: calc(var(--hdr-h) + 16px); } }
.co-card { padding: 16px; }
.co-card h2 { font-size: 15px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.step { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: 12px; }
.note { display: flex; gap: 8px; font-size: 13px; color: var(--muted); background: var(--line-2); border-radius: 10px; padding: 10px 12px; line-height: 1.45; }
.note svg { flex: none; font-size: 16px; margin-top: 1px; color: var(--primary); }
.coupon-tg { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 700; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.coupon-row { display: flex; gap: 8px; margin-top: 10px; }
.coupon-row .input { text-transform: uppercase; height: 44px; }
.coupon-row .btn { height: 44px; }
.coupon-ok { color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 8px; }
.paybar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-up); z-index: 45; }
.paybar .wrap-in { max-width: 560px; margin: 0 auto; }
.paybar .pay-meta { margin-top: 6px; }
.paybar .methods { display: none; }

.pay-meta { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.pay-meta svg { color: var(--accent); }
.methods { text-align: center; font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }

/* ---------- thank you / orders ---------- */
.ty { max-width: 440px; margin: 40px auto; text-align: center; padding: 28px 20px; }
.ty-check { width: 84px; height: 84px; margin: 0 auto 16px; }
.ty-check circle { stroke: var(--accent); stroke-width: 3; fill: color-mix(in srgb, var(--accent) 10%, transparent); stroke-dasharray: 230; stroke-dashoffset: 230; animation: draw .6s ease forwards; }
.ty-check path { stroke: var(--accent); stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .4s .5s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ty h1 { font-size: 22px; font-weight: 800; }
.ty p { color: var(--muted); margin-top: 6px; }
.ty .ono { margin-top: 14px; font-size: 13px; background: var(--line-2); border-radius: 8px; display: inline-block; padding: 4px 10px; font-weight: 600; }
.ty .btn { margin-top: 20px; }
.ty .redir { font-size: 13px; color: var(--muted); margin-top: 12px; }
.disc { display: flex; gap: 10px; background: var(--warn-bg); color: var(--warn); border: 1px solid #fed7aa; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5; margin: 16px 0; }
.disc svg { flex: none; font-size: 18px; margin-top: 1px; }
.ord { margin-bottom: 14px; overflow: hidden; }
.ord-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.ord-h .no { font-weight: 800; font-size: 14.5px; }
.ord-h .dt { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.chip.ok { background: #dcfce7; color: #15803d; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: #fee2e2; color: #b91c1c; }
.chip.pend { background: #e0e7ff; color: #3730a3; }
.dl-row { padding: 14px 16px; display: grid; gap: 10px; }
.dl-row + .dl-row { border-top: 1px solid var(--line-2); }
.dl-top { display: flex; gap: 12px; align-items: center; }
.dl-top img, .dl-top .noimg { width: 46px; aspect-ratio: 1 / 1.414; border-radius: 6px; object-fit: cover; flex: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.dl-top .t { font-weight: 700; font-size: 14.5px; }
.dl-top .v { font-size: 12.5px; color: var(--muted); }
.dl-btns { display: flex; gap: 8px; }
.dl-btns .btn { flex: 1; height: 44px; }
.ord-f { padding: 12px 16px; background: var(--line-2); font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.ord-f button { background: none; border: 0; color: var(--primary); font-weight: 700; font-size: 12.5px; padding: 0; }
.recover { padding: 16px; margin-top: 22px; }
.recover h2 { font-size: 15px; font-weight: 800; }
.recover p { font-size: 13.5px; color: var(--muted); margin: 4px 0 12px; }
.recover form { display: flex; gap: 8px; }
.recover .input { height: 46px; }
.recover .btn { height: 46px; }

/* ---------- partner ---------- */
.pt-hero { text-align: center; padding: 30px 8px 8px; }
.pt-hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.pt-hero p { color: var(--muted); margin-top: 6px; }
.pt-actions { display: flex; gap: 10px; justify-content: center; margin: 18px 0 6px; flex-wrap: wrap; }
.pt-rules { padding: 18px; margin-top: 18px; }
.pt-form { padding: 18px; margin-top: 18px; scroll-margin-top: calc(var(--hdr-h) + 12px); }
.pt-form h2 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.seg label { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 11px; border: 1.5px solid var(--line); font-weight: 600; cursor: pointer; font-size: 14px; }
.seg input { position: absolute; opacity: 0; }
.seg input:checked + span { color: var(--primary); }
.seg label:has(input:checked) { border-color: var(--primary); background: var(--tint); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat { padding: 14px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 4px; letter-spacing: -.01em; }
.stat.hl { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.stat.hl .k { color: color-mix(in srgb, var(--on-primary) 80%, transparent); }
.tabs { display: flex; gap: 6px; background: var(--line-2); padding: 4px; border-radius: 12px; margin: 18px 0 12px; overflow-x: auto; }
.tabs button { flex: 1; border: 0; background: none; height: 38px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); white-space: nowrap; padding: 0 12px; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.list-rows .lr { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 14px; }
.list-rows .lr + .lr { border-top: 1px solid var(--line-2); }
.list-rows .lr small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.list-rows .lr .amt { text-align: right; white-space: nowrap; font-weight: 700; }
.list-rows .lr .amt small { font-weight: 500; }
.linkgen { padding: 16px; display: grid; gap: 10px; }
.linkout { display: flex; gap: 8px; align-items: center; background: var(--line-2); border-radius: 10px; padding: 6px 6px 6px 12px; }
.linkout code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* ---------- footer ---------- */
#ftr { margin-top: 48px; background: var(--surface); border-top: 1px solid var(--line); }
.ftr { display: grid; gap: 24px; padding-top: 28px; padding-bottom: 20px; grid-template-columns: 1fr; font-size: 14px; }
@media (min-width: 720px) { .ftr { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.ftr-logo { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.ftr-brand p { color: var(--muted); margin-top: 6px; font-size: 13.5px; max-width: 340px; }
.ftr-col { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.ftr-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.ftr-col a { color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.ftr-col a:hover { color: var(--primary); }
.ftr-col .addr { color: var(--muted); font-size: 13px; }
.ftr-partner { margin-top: 2px; }
.socs { display: flex; gap: 8px; margin-top: 14px; }
.soc { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--line-2); font-size: 18px; }
.soc:hover { background: var(--tint); color: var(--primary); }
.ftr-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 14px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); font-size: 12.5px; color: var(--muted); }
.ftr-secure { display: inline-flex; gap: 5px; align-items: center; }
.ftr-min { text-align: center; padding: 16px; font-size: 12.5px; color: var(--muted); }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 60px 16px; color: var(--muted); display: grid; gap: 14px; justify-items: center; }
.empty .ic { font-size: 42px; color: #c7cbd4; }
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 120; opacity: 0; pointer-events: none; transition: .25s var(--ease); width: max-content; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-in { background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); display: flex; gap: 12px; align-items: center; }
.toast-in a { color: #a5b4fc; font-weight: 700; }
.toast-in.err { background: #991b1b; }
.fade-in { animation: fin .35s var(--ease) both; }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } } /* opacity only: a transform here would break position:fixed bars inside */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }


/* ==========================================================================
   Modern refresh — quieter surfaces, cover-first cards, clearer actions
   ========================================================================== */
body { letter-spacing: -0.005em; }
h1, h2, h3 { letter-spacing: -0.025em; }
.hdr { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.logo { font-weight: 700; font-size: 17px; }
.hbtn { border-radius: 12px; }
.hbtn svg { font-size: 21px; stroke-width: 1.8; }
.cbadge { background: var(--text); }

/* buttons: flat, confident, no glow */
.btn { border-radius: 12px; font-weight: 600; letter-spacing: 0; transition: transform .12s var(--ease), background .2s, color .2s, border-color .2s; }
.btn-primary { box-shadow: none; }
.btn-primary:hover:not(:disabled) { filter: none; background: color-mix(in srgb, var(--primary) 86%, #fff); }
.btn-outline { border-color: var(--text); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--line-2); }

/* hero: typographic, no gradient box */
.hero { background: none; border: 0; border-radius: 0; padding: 26px 0 6px; margin: 0; }
.hero.has-img { gap: 20px; }
.hero-eyebrow { background: none; border: 0; padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-eyebrow svg { display: none; }
.hero h1 { font-size: 30px; line-height: 1.08; letter-spacing: -0.035em; max-width: 14ch; }
.hero p { font-size: 15px; margin-top: 12px; color: color-mix(in srgb, var(--text) 70%, var(--bg)); }
.hero .btn { height: 46px; margin-top: 18px; }
.hero-img img { border-radius: 14px; }
@media (min-width: 720px) { .hero { padding: 48px 0 12px; } .hero h1 { font-size: 46px; max-width: 16ch; } }

/* section heads */
.sec { margin-top: 32px; }
.sec-h { margin-bottom: 14px; }
.sec-h h2 { font-size: 19px; font-weight: 700; }
.sec-h a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.view-all { margin-top: 18px; height: 46px; }

/* landing page: 2-column cover grid */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
@media (min-width: 720px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; } }
@media (min-width: 1000px) { .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gcard { display: flex; flex-direction: column; min-width: 0; }
.gcard-img { position: relative; aspect-ratio: 1 / 1.414; border-radius: 10px; overflow: hidden; background: var(--line-2);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 22px -12px rgba(0,0,0,.28); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.gcard-img img { width: 100%; height: 100%; object-fit: cover; }
.gcard:hover .gcard-img { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 18px 30px -14px rgba(0,0,0,.32); }
.gcard:active .gcard-img { transform: scale(.98); }
.gbadge { position: absolute; top: 8px; left: 8px; background: var(--surface); color: var(--text); font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.gcard-t { margin-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcard-r { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.gcard-r svg { color: var(--star); font-size: 12px; }
.gcard .price-row { margin-top: 6px; gap: 2px 6px; }
.gcard .price { font-size: 16px; }
.gcard .mrp, .gcard .off { font-size: 12.5px; }

/* category page: one column of wide cards */
.plist { grid-template-columns: 1fr; gap: 12px; max-width: 760px; }
@media (min-width: 640px) { .plist { grid-template-columns: 1fr; } }
@media (min-width: 1000px) { .plist { grid-template-columns: 1fr; } }
.pcard { border-radius: 16px; border-color: #ececE8; padding: 12px; gap: 14px; min-height: 0; transition: border-color .2s, transform .2s var(--ease); }
.pcard:hover { box-shadow: none; border-color: #d6d6d0; }
.pcard-img { flex-basis: 92px; border-radius: 8px; box-shadow: 0 6px 14px -8px rgba(0,0,0,.35); }
.pcard-t { font-size: 15px; font-weight: 600; line-height: 1.3; }
.pbadge { background: none; color: var(--muted); padding: 0; font-size: 10.5px; letter-spacing: .05em; }
.price { font-weight: 700; }
.off { font-weight: 600; }
/* admin "Grid" layout for a category (e.g. Kids) still wins */
.layout-grid .plist { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
@media (min-width: 720px) { .layout-grid .plist { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* product page */
.g-main { border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 24px 40px -20px rgba(0,0,0,.4); }
.g-th { border-radius: 7px; opacity: .55; }
.g-th.on { border-color: var(--text); opacity: 1; }
.pd-info { margin-top: 22px; }
.caps { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; gap: 2px; padding: 4px; background: #ededE9; border-radius: 999px; margin-bottom: 16px; }
.cap { height: 34px; padding: 0 18px; border: 0; background: transparent; color: color-mix(in srgb, var(--text) 70%, var(--bg)); font-weight: 500; transition: background .2s, color .2s, box-shadow .2s; }
.cap.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.pd-title { font-size: 24px; line-height: 1.18; font-weight: 700; letter-spacing: -0.03em; }
.pd-price .price { font-size: 30px; letter-spacing: -0.02em; }
.pd-price .off-pill { font-weight: 700; border-radius: 6px; }
.prose { color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
.feat { gap: 11px; }
.fi { flex-basis: 20px; height: 20px; font-size: 12px; }
.bought-wrap { display: flex; justify-content: center; margin-top: 24px; }
.bought { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 14px; border-radius: 999px; background: #fff3e6; border: 1px solid #f8ddbf; color: #9a4a00; font-size: 13.5px; font-weight: 600; text-align: center; }
.trust { margin-top: 12px; }
.trust .sep { color: #b5b5af; }
.pd-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.pd-actions .btn { height: 50px; font-size: 15px; }
.block { margin-top: 34px; }
.block-h { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.card { border-color: #ececE8; border-radius: 16px; }
.ups-toggle { color: var(--text); font-weight: 600; }
.pv-row { border-color: #ececE8; border-radius: 14px; }
.pv-row .btn-outline { border: 0; background: var(--line-2); }
.vcard { border-color: #ececE8; border-radius: 14px; }
.rv-bar .lbl { color: var(--text); font-weight: 500; }
.rv-bar .tr { height: 8px; border: 0; border-radius: 99px; background: #efefeb; }
.rv-bar .fl { background: var(--text); border-radius: 99px; }
.rv-ver { color: var(--accent); font-weight: 600; }
.rv-time { color: var(--muted); background: #ededE9; border-radius: 99px; }
.rv-lock { background: var(--line-2); }
.buybar { background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -8px 24px -12px rgba(0,0,0,.15); }

/* checkout / cart details */
.step { background: var(--text); }
.save-banner { border-radius: 12px; }
.toast-in { background: #111; border-radius: 12px; }
.toast-in a { color: #fff; text-decoration: underline; }
.page-h { font-size: 24px; letter-spacing: -0.03em; }

/* ==========================================================================
   v1.1 tweaks — product meta line, bought line, reviews, category tabs
   ========================================================================== */
/* BEST VALUE 4.7★ (1,284) */
.pd-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.pd-meta .pbadge { margin: 0; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pd-rate { display: inline-flex; align-items: center; gap: 3px; font-size: 13.5px; color: var(--muted); }
.pd-rate b { color: var(--text); font-weight: 700; }
.pd-star { color: var(--star); display: inline-flex; font-size: 14px; }
.pd-meta .pbadge + .pd-rate::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #b5b5af; margin-right: 7px; }

/* "17 bought in last 24hrs" — under the title, left aligned, bullet instead of capsule */
.bought-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; font-weight: 600; color: #9a4a00; }
.bdot { width: 7px; height: 7px; border-radius: 50%; background: #e8590c; flex: none; box-shadow: 0 0 0 3px #fde7d4; }

/* reviews: stars in the top-right corner, small time tag under the name */
.rv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rv-who { min-width: 0; }
.rv-id { min-width: 0; }
.rv-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; }
.rv-time { font-size: 10.5px; font-weight: 600; padding: 1px 7px; line-height: 1.6; }
.rv-ver { font-size: 11px; }
.rv-stars { flex: none; padding-top: 2px; }
.rv-title { margin-top: 10px; }
.rv-bar { grid-template-columns: 48px 1fr; }

/* category tabs: All · Bundle · Individual … */
.ctabs { position: sticky; top: var(--hdr-h); z-index: 20; display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; margin: 18px -16px 0; padding: 0 16px;
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ctabs::-webkit-scrollbar { display: none; }
.ctab { position: relative; flex: none; height: 46px; padding: 0; border: 0; background: none; font-size: 14.5px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .2s; }
.ctab span { font-size: 12px; font-weight: 500; color: #9a9a94; margin-left: 2px; }
.ctab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--text); transform: scaleX(0); transition: transform .25s var(--ease); }
.ctab.on { color: var(--text); font-weight: 600; }
.ctab.on::after { transform: scaleX(1); }
.sec-tabs { margin-top: 16px; }
.plist .pcard[hidden] { display: none !important; }

/* cart: red remove; cart & checkout: keep totals clear of the fixed pay bar */
.line .rm { color: var(--danger); }
body.page-checkout.has-bar, body.page-cart.has-bar { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.paybar .pay-meta { margin-top: 5px; font-size: 11.5px; }


/* Pay / Checkout button: sticky at the bottom on every screen size */
.paybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; margin: 0;
  background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.paybar .wrap-in { max-width: 520px; }

/* ==========================================================================
   v1.2 — finger-following lightbox + in-site PDF viewer
   ========================================================================== */
.lb-stage { position: relative; overflow: hidden; touch-action: none; display: block; }
.lb-track { position: absolute; inset: 0; display: flex; transform: translate3d(-100%, 0, 0); will-change: transform; }
.lb-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-slide img, .lb-stage .lb-slide img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; transform: none; }
.lb.zoom .lb-stage { overflow: hidden; display: block; touch-action: none; }
.lb.zoom .lb-slide img { max-width: 100%; max-height: 100%; width: auto; }
.lb.zoom .lb-slide:nth-child(2) { display: block; overflow: auto; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.lb.zoom .lb-slide:nth-child(2) img { max-width: none; max-height: none; width: 200%; }
.lb-nav { z-index: 3; }
.lb-thumbs .g-th { transition: opacity .2s, border-color .2s; }

.pdfv { position: fixed; inset: 0; z-index: 110; background: #1c1c1f; display: flex; flex-direction: column; opacity: 0; transition: opacity .2s; }
.pdfv.show { opacity: 1; }
.pdfv-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); background: #111113; color: #fff; }
.pdfv-t { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.pdfv-ic { font-size: 20px; display: flex; }
.pdfv-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfv-n { font-size: 12.5px; color: #b4b4ba; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pdfv-z { display: flex; gap: 4px; }
.pdfv-b { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font-size: 20px; display: grid; place-items: center; }
.pdfv-b:active { background: rgba(255,255,255,.2); }
.pdfv-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pdfv-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); min-width: min-content; }
.pdfv.zoomed .pdfv-pages { align-items: flex-start; }
.pdfv-page { position: relative; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.35); max-width: none; flex: none; }
.pdfv-page canvas, .pdfv-page img { display: block; width: 100%; height: auto; }
.pdfv-page img { max-width: min(860px, calc(100vw - 24px)); }
.pdfv-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b4b4ba; font-size: 13px; background: linear-gradient(90deg, #f1f1f1 25%, #fafafa 37%, #f1f1f1 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
.pdfv-load { color: #d4d4d8; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 16px; text-align: center; font-size: 14px; }
.pdfv-load .spin { width: 26px; height: 26px; border: 3px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.lb-thumbs .g-th.on { border-color: #fff; opacity: 1; }

/* v1.3: no footer on cart & checkout — keeps the buyer focused on paying */
body.page-cart #ftr, body.page-checkout #ftr { display: none; }

/* v1.4 — reviews: "Name · 2 days ago"; working review form with popup; sharp PDF pages */
.rv-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.rv-dot { color: #a3a39d; font-weight: 700; }
.rv-date { font-size: 13px; font-weight: 400; color: var(--muted); }
.rv-sub { margin-top: 2px; }
.rv-form h3 { margin-bottom: 8px; }
.rv-rate { display: flex; gap: 2px; margin-bottom: 4px; }
.rv-rate-b { width: 40px; height: 40px; border: 0; background: none; padding: 0; font-size: 28px; line-height: 1; color: #d7d7d1; transition: color .12s, transform .12s; }
.rv-rate-b.on { color: var(--star); }
.rv-rate-b:active { transform: scale(.88); }
.rv-form textarea { background: var(--surface); color: var(--text); font-size: 15px; min-height: 96px; resize: vertical; }
.rv-form textarea:focus { outline: none; border-color: var(--text); }
.rv-form .btn { margin-top: 12px; }
.rv-pop { position: fixed; inset: 0; z-index: 130; background: rgba(15, 15, 18, .45); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; }
.rv-pop.show { opacity: 1; }
.rv-pop-card { width: 100%; max-width: 340px; background: var(--surface); border-radius: 18px; padding: 24px 20px 18px; text-align: center; transform: translateY(8px) scale(.98); transition: transform .22s var(--ease); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.rv-pop.show .rv-pop-card { transform: none; }
.rv-pop-ic { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-size: 22px; }
.rv-pop-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.rv-pop-card p { margin: 6px 0 16px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.pdfv-page canvas { image-rendering: auto; max-width: none; }
.exit-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exit-acts .btn { height: 46px; }

/* v1.5 — several files per purchased item */
.dl-files { display: grid; gap: 8px; }
.dl-count { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dl-file { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; padding: 10px; background: var(--line-2); border-radius: 12px; }
.dl-fic { font-size: 20px; display: flex; }
.dl-fn { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.dl-file .dl-btns { grid-column: 1 / -1; }
.dl-file .btn { height: 40px; font-size: 14px; }


/* v1.6 — badge under the cover (never over it); category = same 2-column grid as landing; thumbnails start under the image's left edge */
.gbadge { position: static; display: block; align-self: flex-start; margin: 10px 0 -6px; padding: 0; background: none; border-radius: 0;
  color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; }
.gcard .gbadge + .gcard-t { margin-top: 8px; }
.pgrid .gcard[hidden] { display: none !important; }
@media (max-width: 899px) {
  /* one column as wide as the main image; the thumbnail strip takes that width (not its own) and scrolls inside it */
  .gallery { display: grid; grid-template-columns: minmax(0, max-content); justify-content: center; gap: 10px; }
  .g-main { margin: 0; }
  .g-thumbs { width: 0; min-width: 100%; justify-content: flex-start; padding: 2px 0; scroll-padding-inline: 0; }
}