/* =====================================================================
   Storefront v2: glass cards, big display headline, category tiles,
   promo banner, horizontal "popular" rail, floating bottom nav,
   sticky buy bar on the product page.
   Works with every skin; looks its best with data-skin="ember" (dark).
   Tokens only. Motion: 150-250ms transform/opacity, off for reduced-motion.
   ===================================================================== */

.store {
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--glow), transparent 60%),
    radial-gradient(40rem 24rem at -10% 30%, color-mix(in srgb, var(--glow) 60%, transparent), transparent 65%),
    var(--color-bg);
  background-attachment: fixed;
}

/* ---------- Header: glass bar ---------- */
.store .site-header {
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
}
@supports (backdrop-filter: blur(1px)) {
  .store .site-header,
  .store .bottom-nav,
  .store .buy-bar { backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
}
.store .brand-mark { border-radius: 12px; box-shadow: 0 6px 18px var(--glow); }
.store .wallet-chip { border-radius: var(--radius-full); }
.store .mobile-search { display: none; } /* the home page has its own search pill; other pages use the header search on desktop */
.store:not(.page-home) .mobile-search { display: block; }

/* ---------- Home hero ---------- */
.home-hero { padding-block: var(--sp-6) var(--sp-4); }
.greet { color: var(--color-text-muted); font-weight: 500; margin: 0 0 var(--sp-1); }
.display {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 1.6rem + 3.4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}
.accent-text { color: var(--color-primary); }
.home-hero .hero-lead { max-width: 46ch; margin: 0 0 var(--sp-5); }

.search-pill {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-2);
  max-width: 40rem;
  min-height: 56px;
  padding-inline: var(--sp-4) var(--sp-1);
  border-radius: var(--radius-full);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.search-pill > .icon { color: var(--color-text-muted); flex: none; }
.search-pill input {
  flex: 1; min-width: 0; height: 52px;
  border: 0; background: transparent; color: var(--color-text);
  font: inherit; font-size: var(--fs-md);
}
.search-pill input::placeholder { color: var(--color-text-muted); }
.search-pill input:focus { outline: none; }
.search-pill:focus-within { box-shadow: var(--focus-ring), var(--shadow-md); }
.search-pill-btn {
  width: var(--tap); height: var(--tap); flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-surface-2); color: var(--color-text);
}
.search-pill-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- Category tiles ---------- */
.cat-tiles-wrap { padding-block: var(--sp-2) var(--sp-4); }
.cat-tiles {
  position: relative; /* keeps .sr-only text inside the scroller (no page-wide horizontal scroll) */
  display: flex; gap: var(--sp-3);
  list-style: none; margin: 0; padding: var(--sp-1) var(--sp-1) var(--sp-5);
  overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.cat-tiles::-webkit-scrollbar { display: none; }
.cat-tiles li { scroll-snap-align: start; flex: none; }
.cat-tile {
  width: 84px; min-height: 92px;
  display: grid; justify-items: center; align-content: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-1);
  border-radius: 20px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--color-text); text-decoration: none; text-align: center;
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.25;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast);
}
.cat-tile > span:not(.cat-tile-icon) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tile-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--color-surface-2); color: var(--color-primary); }
.cat-tile:hover { transform: translateY(-2px); border-color: var(--color-primary); }
.cat-tile[aria-current="true"], .cat-tile[aria-current="page"] {
  background: linear-gradient(160deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 70%, var(--color-bg)));
  border-color: transparent; color: var(--color-on-primary);
  box-shadow: 0 6px 14px var(--glow);
}
.cat-tile[aria-current="true"] .cat-tile-icon, .cat-tile[aria-current="page"] .cat-tile-icon { background: color-mix(in srgb, var(--color-on-primary) 14%, transparent); color: var(--color-on-primary); }
.cat-tile:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- Promo banner ---------- */
.section-tight { padding-block: var(--sp-2) var(--sp-4); }
.promo-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: var(--sp-3);
  padding: var(--sp-5);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(20rem 14rem at 85% 60%, var(--glow), transparent 70%),
    linear-gradient(135deg, var(--hero-from), var(--hero-to));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}
.promo-text { display: grid; gap: var(--sp-2); justify-items: start; position: relative; z-index: 1; }
.promo-label { display: inline-flex; align-items: center; gap: var(--sp-1); margin: 0; color: var(--color-primary); font-weight: 600; font-size: var(--fs-sm); }
.promo-label .icon { width: 16px; height: 16px; }
.promo-title { font-family: var(--font-heading); font-size: clamp(1.25rem, 1rem + 1.4vw, 2rem); line-height: 1.2; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.promo-desc { margin: 0; color: var(--color-text-muted); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.promo-price { margin: 0; font-family: var(--font-heading); font-size: var(--fs-xl); font-weight: 600; color: var(--color-primary); display: flex; gap: var(--sp-2); align-items: baseline; }
.promo-text .btn { border-radius: var(--radius-full); padding-inline: var(--sp-5); box-shadow: 0 8px 22px var(--glow); }
.icon-next { width: 18px; height: 18px; transform: rotate(-90deg); } /* chevron icon points down by default */
.promo-media { display: grid; place-items: center; aspect-ratio: 1; }
.promo-media img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 24px rgb(0 0 0 / 0.35)); }
.promo-media .icon { width: 55%; height: 55%; color: var(--color-primary); stroke-width: 1.25; }
.promo-badge {
  position: absolute; top: var(--sp-3); inset-inline-end: var(--sp-3);
  width: 64px; height: 64px; border-radius: var(--radius-full);
  display: grid; place-content: center; text-align: center; line-height: 1;
  background: var(--color-accent); color: var(--color-on-accent);
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-lg);
  box-shadow: 0 8px 20px var(--glow);
}
.promo-badge small { font-size: 0.75rem; font-weight: 600; display: block; margin-bottom: 2px; }

/* ---------- Popular rail ---------- */
.rail {
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 44%);
  gap: var(--sp-3);
  list-style: none; margin: 0; padding: var(--sp-1) 0 var(--sp-3);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0;
  scrollbar-width: thin;
}
.rail > li { scroll-snap-align: start; min-width: 0; }
.mini-card {
  position: relative; height: 100%;
  display: flex; flex-direction: column; gap: var(--sp-1);
  padding: var(--sp-3);
  border-radius: 20px;
  background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}
.mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mini-media {
  position: relative; aspect-ratio: 1; margin-bottom: var(--sp-1);
  display: grid; place-items: center; border-radius: 16px;
  background: radial-gradient(circle at 50% 60%, var(--glow), transparent 70%), var(--color-surface-2);
}
.mini-media img { width: 78%; height: 78%; object-fit: contain; }
.mini-media .icon { width: 40%; height: 40%; color: var(--color-primary); stroke-width: 1.25; }
.mini-badge {
  position: absolute; top: var(--sp-2); inset-inline-start: var(--sp-2);
  padding: 2px var(--sp-2); border-radius: var(--radius-full);
  background: var(--color-danger); color: var(--color-surface);
  font-size: var(--fs-xs); font-weight: 600;
}
.mini-title { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-title a { text-decoration: none; color: inherit; }
.mini-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mini-title a:focus-visible { outline: none; }
.mini-card:has(.mini-title a:focus-visible) { box-shadow: var(--focus-ring); }
.mini-meta { margin: 0; color: var(--color-text-muted); font-size: var(--fs-sm); }
.mini-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.mini-foot .price { color: var(--color-text); }
.add-btn {
  position: relative; z-index: 1;
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  border: 0; border-radius: 14px; cursor: pointer;
  background: var(--color-primary); color: var(--color-on-primary);
  box-shadow: 0 6px 16px var(--glow);
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast);
}
.add-btn:hover { background: var(--color-primary-hover); }
.add-btn:active { transform: scale(0.94); }
.add-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.add-btn[aria-busy="true"] { opacity: 0.7; }
.add-btn.is-added { background: var(--color-success); color: var(--color-surface); }

/* ---------- Grid cards: glass + glow ---------- */
.store .card {
  border-radius: 20px;
  background: var(--glass); border-color: var(--glass-border);
}
.store .card-media { background: radial-gradient(circle at 50% 60%, var(--glow), transparent 70%), var(--color-surface-2); border-radius: 16px; margin: var(--sp-2) var(--sp-2) 0; }
.store .card .btn-primary { border-radius: 14px; }

/* ---------- Panels, chips ---------- */
.store .panel { border-radius: 20px; background: var(--glass); border-color: var(--glass-border); }
.store .chip { border-radius: var(--radius-full); }
.trust-row { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.trust-row li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-border); }

/* ---------- Floating bottom nav (mobile) ---------- */
.store .bottom-nav {
  left: var(--sp-3); right: var(--sp-3);
  bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--shadow-md);
  padding: var(--sp-1);
}
.store .bottom-nav a { border-radius: 16px; transition: background-color var(--dur-fast), color var(--dur-fast); }
.store .bottom-nav a[aria-current="page"] { background: var(--color-primary-soft); color: var(--color-primary); }

/* ---------- Product page ---------- */
.store .product-media {
  position: relative; border-radius: var(--radius-xl); border: 1px solid var(--glass-border);
  background: radial-gradient(circle at 50% 55%, var(--glow), transparent 65%), var(--color-surface-2);
}
.media-back {
  position: absolute; top: var(--sp-3); inset-inline-start: var(--sp-3); z-index: 1;
  width: var(--tap); height: var(--tap); display: grid; place-items: center;
  border-radius: var(--radius-full); background: var(--glass); border: 1px solid var(--glass-border); color: var(--color-text);
}
.media-back .icon { width: 22px; height: 22px; opacity: 1; color: inherit; stroke-width: 2; }
.media-back:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pill-badge {
  display: inline-block; width: fit-content; padding: 4px var(--sp-3); border-radius: var(--radius-full);
  background: var(--color-primary); color: var(--color-on-primary); font-size: var(--fs-xs); font-weight: 700;
}
.title-price { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.title-price .page-title { margin: 0; }
.price-accent { color: var(--color-primary); font-size: var(--fs-2xl); white-space: nowrap; }
.store .product-info { display: grid; gap: var(--sp-3); align-content: start; }

.buy-bar { display: flex; align-items: center; gap: var(--sp-3); }
.stepper-pill {
  flex: none; padding: 2px; border-radius: var(--radius-full);
  background: var(--color-surface-2); border: 1px solid var(--glass-border);
}
.stepper-pill .icon-btn { border-radius: var(--radius-full); }
.stepper-pill .input { border: 0; background: transparent; width: 2.75rem; padding: 0; font-weight: 600; }
.buy-main { flex: 1; justify-content: space-between; border-radius: var(--radius-full); min-height: 52px; box-shadow: 0 10px 24px var(--glow); }
.buy-main .icon { flex: none; }
.buy-main > span:first-of-type { margin-inline-end: auto; }
.buy-total { font-family: var(--font-heading); font-weight: 700; white-space: nowrap; }
.buy-main > span:first-of-type { white-space: nowrap; }
@media (max-width: 420px) {
  .buy-bar { gap: var(--sp-2); }
  .buy-main > .icon { display: none; } /* room for the label + total on small phones */
  .stepper-pill .input { width: 2rem; }
}
.buy-now { margin-top: var(--sp-2); }

/* Mobile: the buy bar sticks to the bottom and takes the place of the nav */
@media (max-width: 899px) {
  .page-product .bottom-nav { display: none; }
  .page-product .buy-bar {
    position: fixed; left: var(--sp-3); right: var(--sp-3); z-index: 40;
    bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
    padding: var(--sp-2); border-radius: 24px;
    background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-md);
  }
  .page-product .site-footer { padding-bottom: calc(var(--sp-8) + 96px); }
  .page-product .product-layout { gap: 0; }
  .page-product .product-info { margin-top: calc(-1 * var(--sp-8)); position: relative; z-index: 1; }
}

/* ---------- Wider screens ---------- */
@media (min-width: 640px) {
  .rail { grid-auto-columns: minmax(190px, 30%); }
  .trust-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .promo-card { padding: var(--sp-8); }
  .promo-badge { width: 76px; height: 76px; font-size: var(--fs-xl); top: var(--sp-5); inset-inline-end: var(--sp-5); }
}
@media (min-width: 900px) {
  .store .mobile-search { display: none !important; }
  .rail { grid-auto-columns: minmax(200px, 23%); }
  .home-hero { padding-block: var(--sp-10) var(--sp-6); }
  .cat-tile { width: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-tile, .mini-card, .add-btn, .store .bottom-nav a { transition: none; }
  .cat-tile:hover, .mini-card:hover { transform: none; }
}

/* =====================================================================
   Detail pass: lit product cards, profile avatar menu, no footer.
   Card light model: a soft key light from the top-right (sheen + top
   highlight edge), a warm glow behind the product, a contact shadow
   under it, and a long soft drop shadow under the card.
   ===================================================================== */
.store {
  --card-hi: rgb(255 255 255 / 0.85);       /* top edge highlight */
  --card-sh: rgb(15 23 42 / 0.16);          /* drop shadow */
  --card-contact: rgb(15 23 42 / 0.28);     /* shadow right under the product */
}
[data-mode="dark"] .store {
  --card-hi: rgb(255 255 255 / 0.08);
  --card-sh: rgb(0 0 0 / 0.7);
  --card-contact: rgb(0 0 0 / 0.75);
}

/* No footer any more: keep content clear of the floating nav */
.store main { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .store main { padding-bottom: var(--sp-12); } }

/* ---------- Product card ---------- */
.store .pcard {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; height: 100%;
  padding: var(--sp-2);
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--color-text) 9%, transparent);
  background:
    linear-gradient(165deg,
      color-mix(in srgb, var(--color-surface-2) 70%, var(--color-surface)) 0%,
      var(--color-surface) 45%,
      color-mix(in srgb, var(--color-surface) 88%, var(--color-bg)) 100%);
  box-shadow:
    inset 0 1px 0 var(--card-hi),
    0 1px 2px var(--card-sh),
    0 18px 36px -18px var(--card-sh);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
/* Key-light sheen from the top right */
.store .pcard::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--color-primary) 12%, transparent), transparent 55%);
}
.store .pcard:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--color-primary) 40%, transparent);
  box-shadow: inset 0 1px 0 var(--card-hi), 0 2px 4px var(--card-sh), 0 26px 44px -18px var(--card-sh), 0 0 0 1px color-mix(in srgb, var(--color-primary) 15%, transparent), 0 18px 40px -20px var(--glow);
}
.store .pcard:has(.pcard-title a:focus-visible) { box-shadow: var(--focus-ring); }
.store .pcard.is-out { opacity: 0.72; }

.pcard-media {
  position: relative; overflow: hidden;
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 16px;
  background:
    radial-gradient(60% 55% at 50% 42%, color-mix(in srgb, var(--color-primary) 32%, transparent), transparent 72%),
    linear-gradient(180deg, var(--color-surface-2), color-mix(in srgb, var(--color-surface-2) 55%, var(--color-surface)));
  box-shadow: inset 0 1px 0 var(--card-hi), inset 0 -18px 30px -24px var(--card-sh);
}
.pcard-media img {
  position: relative; z-index: 1;
  width: 74%; height: 74%; object-fit: contain;
  filter: drop-shadow(0 14px 14px var(--card-contact));
  transition: transform var(--dur-base) var(--ease-out);
}
.pcard-media > .icon { position: relative; z-index: 1; width: 42%; height: 42%; stroke-width: 1.25; color: var(--color-primary); filter: drop-shadow(0 10px 14px var(--glow)); }
.store .pcard:hover .pcard-media img, .mini-card:hover .pcard-media img { transform: translateY(-3px) scale(1.04); }
/* Contact shadow: a blurred ellipse under the product */
.pcard-floor {
  position: absolute; left: 22%; right: 22%; bottom: 9%; height: 12%; z-index: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--card-contact), transparent);
  filter: blur(4px);
}
.pcard-badge {
  position: absolute; z-index: 2; top: var(--sp-2); inset-inline-start: var(--sp-2);
  padding: 3px var(--sp-2); border-radius: var(--radius-full);
  background: var(--color-primary); color: var(--color-on-primary);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.3;
  box-shadow: 0 4px 10px var(--glow);
}
.pcard-badge.badge-hot { background: var(--color-hot); color: var(--color-on-hot); box-shadow: 0 4px 10px color-mix(in srgb, var(--color-hot) 45%, transparent); }
.pcard-off {
  position: absolute; z-index: 2; top: var(--sp-2); inset-inline-end: var(--sp-2);
  padding: 3px var(--sp-2); border-radius: var(--radius-full);
  background: var(--color-accent); color: var(--color-on-accent);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.3;
}

.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3) var(--sp-2) var(--sp-1); flex: 1; }
.pcard-title { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard-title a { color: inherit; text-decoration: none; }
.pcard-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.pcard-title a:focus-visible { outline: none; }
.pcard-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2); font-size: var(--fs-sm); }
.pcard-meta .stock-in { color: var(--color-success); }
.pcard-rating { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--color-text); }
.icon-star { width: 15px; height: 15px; fill: var(--color-accent); stroke: var(--color-accent); }
.pcard-foot { margin-top: auto; padding-top: var(--sp-1); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-2); }
.pcard-price { display: grid; line-height: 1.2; }
.pcard-price .price { font-size: var(--fs-lg); color: var(--color-text); }
.pcard-foot form, .mini-foot form { position: relative; z-index: 2; } /* above the whole-card link */
.add-btn { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 8px 18px var(--glow); }

/* Popular rail cards share the light model */
.mini-card {
  border-radius: 22px; border: 1px solid color-mix(in srgb, var(--color-text) 9%, transparent);
  background: linear-gradient(165deg, color-mix(in srgb, var(--color-surface-2) 70%, var(--color-surface)) 0%, var(--color-surface) 50%);
  box-shadow: inset 0 1px 0 var(--card-hi), 0 1px 2px var(--card-sh), 0 18px 36px -18px var(--card-sh);
}
.mini-media.pcard-media { margin-bottom: var(--sp-2); }

/* ---------- Profile avatar + menu ---------- */
.profile-menu { position: relative; }
.profile-menu > summary { list-style: none; cursor: pointer; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.avatar-btn {
  width: var(--tap); height: var(--tap); border-radius: var(--radius-full);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px color-mix(in srgb, var(--color-primary) 70%, transparent), 0 6px 16px var(--glow);
  transition: transform var(--dur-fast) var(--ease-out);
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initial {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 60%, var(--color-bg)));
  color: var(--color-on-primary); font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-lg);
}
.avatar-btn:hover { transform: scale(1.04); }
.avatar-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.profile-pop {
  position: absolute; z-index: 70; top: calc(100% + 12px); inset-inline-end: 0;
  width: min(300px, calc(100vw - 2 * var(--sp-4)));
  padding: var(--sp-2);
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid color-mix(in srgb, var(--color-text) 10%, transparent);
  box-shadow: inset 0 1px 0 var(--card-hi), 0 24px 48px -12px var(--card-sh);
  transform-origin: top right;
  animation: pop-in 180ms var(--ease-out);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } to { opacity: 1; transform: none; } }
.profile-head { display: grid; gap: 2px; padding: var(--sp-3); min-width: 0; }
.profile-head .truncate { display: block; }
.profile-balance {
  margin-top: var(--sp-2); display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); padding: 0 var(--sp-3);
  border-radius: 14px; background: var(--color-primary-soft); color: var(--color-on-primary-soft); text-decoration: none; font-weight: 600;
}
.profile-topup { margin-inline-start: auto; font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; }
.profile-links { list-style: none; margin: 0; padding: var(--sp-1) 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); display: grid; }
.profile-links a, .profile-logout {
  display: flex; align-items: center; gap: var(--sp-3); min-height: var(--tap); padding: var(--sp-2) var(--sp-3);
  border-radius: 12px; color: var(--color-text); text-decoration: none; font: inherit; font-weight: 500;
}
.profile-links a:hover, .profile-logout:hover { background: var(--color-surface-2); }
.profile-links a:focus-visible, .profile-logout:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.profile-links .icon, .profile-logout .icon { color: var(--color-text-muted); flex: none; }
.profile-rent {
  margin: var(--sp-1) 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
}
.profile-links .profile-rent .icon { color: var(--color-primary); }
.profile-rent span { display: grid; }
.profile-rent small { font-size: var(--fs-xs); color: var(--color-text-muted); font-weight: 400; }
.profile-logout { width: 100%; border: 0; background: transparent; cursor: pointer; margin-top: var(--sp-1); }
@media (max-width: 480px) { .store .wallet-chip { display: none; } } /* balance lives in the profile menu on phones */

@media (prefers-reduced-motion: reduce) {
  .store .pcard, .pcard-media img, .avatar-btn { transition: none; }
  .store .pcard:hover, .store .pcard:hover .pcard-media img, .mini-card:hover .pcard-media img { transform: none; }
  .profile-pop { animation: none; }
}

/* ---------- Rent a shop (/rent): approved design "แพ็กเกจเช่าเปิดร้าน" ---------- */
.rent-page { display: grid; gap: var(--sp-10); padding-bottom: var(--sp-8); }
.rent-hero { display: grid; gap: var(--sp-3); max-width: 46rem; padding-top: var(--sp-6); }
.rent-hero .display { margin: 0; font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); }
.rent-hero .hero-lead { margin: 0; font-size: var(--fs-lg); }
.rent-form { display: grid; gap: var(--sp-10); }
.rent-section { display: grid; gap: var(--sp-5); }
.rent-h2 { margin: 0; font-family: var(--font-heading); font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); font-weight: 600; }
.rent-fine { margin: 0; font-size: var(--fs-sm); }
.rent-done { display: flex; gap: var(--sp-4); align-items: flex-start; border-color: color-mix(in srgb, var(--color-success) 40%, transparent); }
.rent-done .panel-title { margin: 0 0 var(--sp-1); }
.plan-switch { margin-bottom: var(--sp-2); }

/* Duration cards */
.dur-grid { border: 0; margin: 0; padding: var(--sp-3) 0 0; min-width: 0; display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.dur-grid[hidden] { display: none; }
.dur-card {
  position: relative; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-height: 280px; padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-radius: var(--radius-xl);
  border: 2px solid color-mix(in srgb, var(--color-text) 10%, transparent);
  background: linear-gradient(165deg, color-mix(in srgb, var(--color-surface-2) 70%, var(--color-surface)), var(--color-surface) 55%);
  box-shadow: inset 0 1px 0 var(--card-hi), 0 18px 36px -18px var(--card-sh);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-fast), box-shadow var(--dur-base);
}
.dur-card:hover { transform: translateY(-3px); }
.dur-card:has(input:checked) {
  border-color: var(--color-primary);
  background:
    radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--color-primary) 22%, transparent), transparent 55%),
    linear-gradient(165deg, color-mix(in srgb, var(--color-primary-soft) 55%, var(--color-surface)), var(--color-surface) 60%);
  box-shadow: inset 0 1px 0 var(--card-hi), 0 24px 48px -20px var(--glow);
}
.dur-card:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.dur-badge {
  position: absolute; top: -14px; inset-inline-start: var(--sp-5);
  padding: 4px 14px; border-radius: var(--radius-full);
  background: var(--color-primary); color: var(--color-on-primary); font-size: var(--fs-sm); font-weight: 700;
  box-shadow: 0 8px 18px var(--glow);
}
.dur-top { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.dur-name { font-size: var(--fs-lg); font-weight: 600; }
.dur-dot { width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--color-border-strong); transition: border-width var(--dur-fast); }
.dur-card:has(input:checked) .dur-dot { border: 7px solid var(--color-primary); background: var(--color-on-primary); }
.dur-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.dur-amount { font-family: var(--font-heading); font-size: clamp(2.5rem, 2rem + 1.4vw, 3.25rem); font-weight: 700; line-height: 1; }
.dur-save { display: inline-block; padding: 3px 10px; border-radius: var(--radius-full); font-size: var(--fs-sm); font-weight: 700; background: var(--color-surface-2); color: var(--color-text-muted); }
.dur-save.is-save { background: var(--color-success-soft); color: var(--color-success); }
.dur-note { margin-top: auto; width: 100%; padding-top: var(--sp-3); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--fs-sm); }

/* What you get */
.feat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.feat {
  display: flex; gap: var(--sp-4); padding: var(--sp-5); border-radius: 20px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--color-surface-2) 70%, var(--color-surface)), var(--color-surface) 55%);
  border: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
  box-shadow: inset 0 1px 0 var(--card-hi), 0 18px 36px -18px var(--card-sh);
}
.feat > span:last-child { display: grid; gap: 4px; min-width: 0; }
.feat strong { font-size: var(--fs-md); }
.feat .muted { font-size: var(--fs-sm); }
.feat-faq { flex-direction: column; gap: var(--sp-2); }
.feat-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--color-primary-soft); color: var(--color-primary); }
.not-included { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4) var(--sp-5); border-radius: 16px; border: 1px dashed var(--color-border-strong); color: var(--color-text-muted); font-size: var(--fs-sm); }
.not-included strong { color: var(--color-text); white-space: nowrap; }

/* Checkout */
.rent-checkout {
  display: grid; gap: var(--sp-6); align-items: start;
  padding: var(--sp-6); border-radius: 28px;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
  box-shadow: 0 30px 60px -30px var(--card-sh);
}
@media (min-width: 900px) { .rent-checkout { grid-template-columns: minmax(0, 1fr) minmax(300px, 24rem); padding: var(--sp-8); } }
.rent-steps { margin: 0; color: var(--color-text-muted); }
.rent-steps strong { color: var(--color-text); }
.rent-summary {
  display: grid; gap: var(--sp-3); padding: var(--sp-5); border-radius: 20px;
  background: var(--color-surface); border: 1px solid var(--color-border);
}
@media (min-width: 900px) { .rent-summary { position: sticky; top: 96px; } }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.sum-total { border-top: 1px solid var(--color-border); padding-top: var(--sp-3); }
.sum-total strong { font-family: var(--font-heading); font-size: var(--fs-2xl); color: var(--color-primary); }
.rent-pay-btn { min-height: 52px; border-radius: var(--radius-full); box-shadow: 0 10px 24px -10px var(--glow); }

.store fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.store fieldset.field > legend { padding: 0; margin-bottom: var(--sp-2); }
.choice-list { display: grid; gap: var(--sp-2); }
.choice { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3); min-height: var(--tap); border: 1px solid var(--color-border); border-radius: 16px; cursor: pointer; background: var(--color-surface); transition: border-color var(--dur-fast), background-color var(--dur-fast); }
.choice:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); }
.choice:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.choice input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--color-primary); flex: none; }
.choice-body { display: grid; gap: 2px; }
.choice-body .muted { font-size: var(--fs-sm); }
.slug-input { display: flex; align-items: stretch; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.slug-input:focus-within { box-shadow: var(--focus-ring); }
.slug-input .input { border: 0; border-radius: 0; flex: 1; min-width: 0; box-shadow: none; }
.slug-input .input:focus { outline: none; box-shadow: none; }
.slug-suffix { display: flex; align-items: center; padding: 0 var(--sp-3); background: var(--color-surface-2); color: var(--color-text-muted); font-family: ui-monospace, monospace; font-size: var(--fs-sm); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .choice, .dur-card, .dur-dot { transition: none; } .dur-card:hover { transform: none; } }

/* ---------- Mobile product card: balanced proportions (shorter, wider feel) ---------- */
@media (max-width: 639px) {
  .store .grid { gap: var(--sp-3); }
  .store .pcard { padding: 6px; border-radius: 18px; }
  .store .pcard .pcard-media { aspect-ratio: 5 / 4; border-radius: 13px; }
  .store .pcard .pcard-media img { width: 62%; height: 78%; }
  .store .pcard-body { gap: 4px; padding: var(--sp-2) 6px 2px; }
  .store .pcard-title { font-size: 1rem; line-height: 1.3; min-height: 2.6em; }
  .store .pcard-meta { font-size: var(--fs-xs); line-height: 1.4; }
  .store .pcard-foot { padding-top: 2px; align-items: center; }
  .store .pcard-price .price { font-size: var(--fs-md); }
  .store .pcard .add-btn { border-radius: 12px; } /* stays 44 x 44 for touch */
  .store .pcard-badge, .store .pcard-off { top: 6px; padding: 2px 8px; }
  .store .pcard-badge { inset-inline-start: 6px; }
  .store .pcard-off { inset-inline-end: 6px; }
}

/* ---------- Desktop: compact search at the top right, hero search hidden ---------- */
@media (min-width: 900px) {
  .store .header-search { flex: 0 1 17rem; max-width: 17rem; margin-inline-start: auto; }
  .store .header-search + .header-actions { margin-inline-start: 0; }
  .store .header-search .search-field input {
    min-height: 44px; border-radius: var(--radius-full);
    background: var(--color-surface-2); border-color: color-mix(in srgb, var(--color-text) 10%, transparent);
    font-size: var(--fs-sm);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  }
  .store .header-search .search-field input:focus { outline: none; border-color: var(--color-primary); box-shadow: var(--focus-ring); }
  .store .home-hero .search-pill { display: none; }
  .store .home-hero .hero-lead { margin-bottom: var(--sp-2); }
}
@media (prefers-reduced-motion: reduce) { .store .header-search .search-field input { transition: none; } }

/* ---------- No visible scrollbars on the storefront (rows still swipe) ---------- */
.store .chips, .store .cat-tiles, .store .rail { scrollbar-width: none; }
.store .chips::-webkit-scrollbar, .store .rail::-webkit-scrollbar { display: none; }

/* ---------- Category navigation: big groups, then sub-categories of the open group ---------- */
.cat-nav { display: grid; gap: var(--sp-3); margin-block: var(--sp-2) var(--sp-8); }
.store .chips-wrap { padding-bottom: 0; }
.store .chips-wrap.is-few { flex-wrap: wrap; overflow: visible; }
.store .chips-wrap .chip { gap: var(--sp-2); }
.store .chips-wrap .chip .icon { width: 18px; height: 18px; color: var(--color-primary); }
.store .chips-wrap .chip[aria-current="true"] .icon { color: inherit; }
.store .chip .chip-count {
  min-width: 1.6em; padding: 0 6px; border-radius: var(--radius-full); text-align: center;
  background: var(--color-surface-2); color: var(--color-text-muted); font-weight: 600; opacity: 1;
}
.store .chip[aria-current="true"] .chip-count { background: color-mix(in srgb, var(--color-on-primary) 18%, transparent); color: inherit; }
.subchips {
  list-style: none; margin: 0; padding: var(--sp-3);
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  border-radius: 18px; background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  border: 1px solid var(--color-border);
  animation: sub-in var(--dur-base) var(--ease-out);
}
@keyframes sub-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.subchip {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); padding: 0 var(--sp-3);
  border-radius: 12px; text-decoration: none; font-weight: 500; font-size: var(--fs-sm); color: var(--color-text-muted);
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.subchip:hover { background: var(--color-surface-2); color: var(--color-text); }
.subchip[aria-current="true"] { background: var(--color-primary-soft); color: var(--color-on-primary-soft); font-weight: 600; }
.subchip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.subchip .chip-count { font-size: var(--fs-xs); opacity: 0.8; }
.catalog-grid { margin-top: 0; }

/* Home category tiles: with groups there are only a few, so they wrap instead of scrolling */
.store .cat-tiles.is-few { flex-wrap: wrap; overflow: visible; }

/* ---------- "ยอดนิยม": endless right-to-left row ---------- */
.section-tools { display: flex; align-items: center; gap: var(--sp-2); }
.marquee-toggle .icon-play { display: none; }
.marquee-toggle[aria-pressed="true"] .icon-play { display: block; }
.marquee-toggle[aria-pressed="true"] .icon-pause { display: none; }
.marquee {
  position: relative; overflow: hidden;
  padding-block: var(--sp-2) var(--sp-6); margin-block: calc(-1 * var(--sp-2)) calc(-1 * var(--sp-6));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.marquee-track {
  list-style: none; margin: 0; padding: 0;
  display: flex; width: max-content;
  animation: marquee-move var(--marquee-time, 40s) linear infinite;
}
.marquee-track > li { flex: none; width: clamp(168px, 42vw, 216px); margin-inline-end: var(--sp-4); }
.marquee-track > li > .mini-card { height: 100%; }
/* Pause while the visitor reads, points or tabs into it, or pressed the pause button */
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee[data-paused] .marquee-track { animation-play-state: paused; }
@keyframes marquee-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Reduced motion: no movement, a normal swipe row instead (copies hidden) */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
  .marquee::-webkit-scrollbar { display: none; }
  .marquee-track { animation: none; }
  .marquee-track > li[aria-hidden="true"] { display: none; }
  .marquee-toggle { display: none; }
  .subchips { animation: none; }
}
@media (max-width: 639px) {
  /* Groups as a tidy 2-column block on phones instead of a tall stack */
  .store .chips-wrap.is-few { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store .chips-wrap.is-few .chip { width: 100%; padding-inline: var(--sp-3); white-space: normal; line-height: 1.25; }
  .store .chips-wrap.is-few .chip .chip-count { margin-inline-start: auto; }
}
/* Home group tiles (few): full names, wider tiles; phones get a 2-column list of icon + name */
.store .cat-tiles.is-few .cat-tile { width: auto; min-width: 104px; max-width: 15rem; padding-inline: var(--sp-4); }
@media (max-width: 639px) {
  .store .cat-tiles.is-few { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .store .cat-tiles.is-few .cat-tile {
    width: 100%; max-width: none; min-height: 56px; height: auto;
    display: flex; align-items: center; justify-content: flex-start; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); text-align: start;
  }
  .store .cat-tiles.is-few .cat-tile > span:not(.cat-tile-icon) { white-space: normal; line-height: 1.25; font-size: var(--fs-sm); }
  .store .cat-tiles.is-few .cat-tile-icon { width: 36px; height: 36px; flex: none; }
}

/* ---------- Scroll arrows for category rows: small pair under the row, right side (never over the tiles) ---------- */
.scroller { position: relative; }
.scroll-nav { display: flex; justify-content: flex-end; gap: var(--sp-1); margin-top: calc(-1 * var(--sp-3)); }
.scroll-nav[hidden] { display: none; }
.cat-nav .scroll-nav { margin-top: var(--sp-1); }
/* 44px touch target, 32px visible circle */
.scroll-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; color: var(--color-text); border-radius: 50%; }
.scroll-dot {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  background: var(--color-surface); border: 1px solid color-mix(in srgb, var(--color-text) 14%, transparent);
  transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.scroll-dot .icon { width: 16px; height: 16px; }
.scroll-dot .icon-prev { transform: rotate(90deg); }
.scroll-btn:hover:not([aria-disabled="true"]) .scroll-dot { background: var(--color-primary); color: var(--color-on-primary); border-color: transparent; }
.scroll-btn:active:not([aria-disabled="true"]) .scroll-dot { transform: scale(0.9); }
.scroll-btn:focus-visible { outline: none; }
.scroll-btn:focus-visible .scroll-dot { box-shadow: var(--focus-ring); }
.scroll-btn[aria-disabled="true"] { cursor: default; }
.scroll-btn[aria-disabled="true"] .scroll-dot { opacity: 0.35; }
/* Soft fade on the side that has more to see */
.scroller.can-next [data-scroll-area] { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.scroller.can-prev [data-scroll-area] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%); mask-image: linear-gradient(90deg, transparent, #000 12%); }
.scroller.can-prev.can-next [data-scroll-area] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
@media (prefers-reduced-motion: reduce) { .scroll-dot { transition: none; } .scroll-btn:active .scroll-dot { transform: none; } }

/* Shop logo in the header (replaces the bolt mark when set in หลังร้าน → หน้าร้าน) */
.brand-logo { width: 40px; height: 40px; flex: none; border-radius: 12px; object-fit: contain; }

/* Category page: tile row (same look as home) with item counts */
.cat-nav .cat-tiles-wrap { padding-block: 0; }
.cat-nav .scroll-nav { margin-top: calc(-1 * var(--sp-3)); }
.cat-tile-count { font-size: var(--fs-xs); font-weight: 500; color: var(--color-text-muted); }
.cat-tile[aria-current] .cat-tile-count { color: inherit; opacity: 0.85; }
.cat-nav { margin-block: var(--sp-1) var(--sp-6); }
.store .page-head .page-title { margin: 0; }
/* The nav is a grid: without this its column grows to the full width of the tile row and the page scrolls sideways */
.cat-nav { grid-template-columns: minmax(0, 1fr); }
.cat-nav > * { min-width: 0; }
/* Shell-only pieces (the "ยกแผง" skins show them, see shell.css) */
.pcard-top, .cart-lb { display: none; }
.pcard-meta .pcard-sold::before { content: "· "; }
.pcard-meta .pcard-sold:first-child::before { content: none; }

/* ---------- Home hero + promo slider (top right on desktop, under the headline on phones) ---------- */
.hero-grid { display: grid; gap: var(--sp-5); align-items: center; }
.hero-text { min-width: 0; }
@media (min-width: 900px) {
  .home-hero.has-promo .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--sp-8); }
}
.promo-slider {
  position: relative; isolation: isolate; min-width: 0;
  border-radius: var(--radius-xl); overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-surface-2);
  border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--glass-border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 10%, transparent), 0 26px 50px -22px var(--glow), 0 18px 40px -20px var(--card-sh, rgb(0 0 0 / 0.4));
}
.promo-track { position: absolute; inset: 0; }
.promo-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: scale(1.02); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out), visibility 0s linear 500ms; }
.promo-slide.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
.promo-slide a, .promo-slide img { display: block; width: 100%; height: 100%; }
.promo-slide img { object-fit: cover; }
.promo-slide a:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--color-primary); }
/* Controls on a soft shade at the bottom so they read on any picture */
.promo-ui {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-3) var(--sp-2);
  background: linear-gradient(to top, rgb(0 0 0 / 0.55), transparent);
  pointer-events: none;
}
.promo-ui > * { pointer-events: auto; }
.promo-dots { display: flex; gap: 2px; }
.promo-dot { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.promo-dot i { position: relative; display: block; width: 10px; height: 10px; border-radius: var(--radius-full); overflow: hidden; background: rgb(255 255 255 / 0.55); transition: width var(--dur-base) var(--ease-out); }
.promo-dot.is-on i { width: 34px; background: rgb(255 255 255 / 0.35); }
/* Progress fill on the active dot = time until the next slide */
.promo-dot.is-on i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: promo-fill var(--promo-time, 5s) linear forwards; }
.promo-slider.is-paused .promo-dot.is-on i::after, .promo-slider:hover .promo-dot.is-on i::after, .promo-slider:focus-within .promo-dot.is-on i::after { animation-play-state: paused; }
@keyframes promo-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.promo-dot:focus-visible { outline: none; }
.promo-dot:focus-visible i { box-shadow: 0 0 0 3px #fff; }
.promo-btns { display: flex; gap: 2px; }
.promo-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; color: #fff; }
.promo-btn .icon { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgb(0 0 0 / 0.45); box-sizing: border-box; transition: background-color var(--dur-fast); }
.promo-btn:hover .icon { background: rgb(0 0 0 / 0.7); }
.promo-btn:focus-visible { outline: none; }
.promo-btn:focus-visible .icon { box-shadow: 0 0 0 3px #fff; }
.promo-btn .icon-prev { transform: rotate(90deg); }
.promo-btn .icon-next { transform: rotate(-90deg); }
.promo-btn .icon-play { display: none; }
.promo-btn[aria-pressed="true"] .icon-play { display: block; }
.promo-btn[aria-pressed="true"] .icon-pause { display: none; }
@media (prefers-reduced-motion: reduce) {
  .promo-slide, .promo-slide.is-on { transition: opacity 1ms; transform: none; }
  .promo-dot.is-on i::after { animation: none; transform: scaleX(1); }
  .promo-dot i { transition: none; }
}

/* My coupons */
.coupon-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.coupon-card { display: flex; border-radius: 20px; overflow: hidden; background: var(--color-surface); border: 1px solid var(--color-border); }
.coupon-val { position: relative; flex: none; width: 110px; display: grid; place-items: center; font-family: var(--font-heading); font-size: 2rem; font-weight: 800;
  background-color: var(--color-primary); background-image: var(--btn-grad, none); color: var(--color-on-primary); border-inline-end: 2px dashed var(--color-surface); }
.coupon-val small { font-size: 1rem; }
.coupon-body { display: grid; gap: 4px; padding: var(--sp-4); min-width: 0; }
.coupon-body code { font-weight: 700; letter-spacing: .06em; }
.coupon-body form { margin-top: var(--sp-2); }
/* Cart: one-tap personal coupons */
.my-coupons { display: grid; gap: var(--sp-2); }
.my-coupons > p { margin: 0; font-weight: 600; font-size: var(--fs-sm); }
.my-coupons ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.my-coupons li { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: 14px; border: 1px dashed var(--color-primary); }
.my-coupons li span { min-width: 0; font-size: var(--fs-sm); }
/* Top-up bonus tiers shown to the customer */
.bonus-tiers { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.bonus-tiers li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-full); background: var(--color-success-soft); color: var(--color-success); font-size: var(--fs-sm); }

/* ---------- Lucky wheel (/wheel): promo banner, two-tone wheel, odds, live winners ---------- */
.store {
  --wheel-a: var(--color-primary);
  --wheel-b: #f5b740;            /* gold segments: dark text on it is 9:1 */
  --on-wheel-b: #3b2a00;
  --wheel-rim: color-mix(in srgb, var(--color-primary) 70%, #0b0b12);
}
.wheel-wrap { display: grid; gap: var(--sp-5); padding-bottom: var(--sp-10); overflow-x: clip; }
.wheel-promo {
  display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-radius: 22px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--wheel-b) 22%, var(--color-surface)), color-mix(in srgb, var(--wheel-b) 55%, var(--color-surface)));
  border: 1px solid color-mix(in srgb, var(--wheel-b) 50%, transparent); color: var(--color-text);
}
.wheel-promo > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.wheel-promo strong { font-size: var(--fs-lg); }
.wheel-promo span:not(.wheel-promo-ico) { font-size: var(--fs-sm); color: var(--color-text-muted); }
.wheel-promo-ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--color-surface); color: var(--on-wheel-b); box-shadow: 0 6px 16px color-mix(in srgb, var(--wheel-b) 35%, transparent); }
[data-mode="dark"] .wheel-promo-ico { color: var(--wheel-b); }
.wheel-promo .btn { flex: none; border-radius: 14px; }
@media (max-width: 640px) { .wheel-promo { flex-wrap: wrap; } .wheel-promo .btn { width: 100%; } }

.wheel-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .wheel-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; } }
.wheel-card {
  display: grid; gap: var(--sp-4); justify-items: center; padding: var(--sp-6) var(--sp-5);
  border-radius: 24px; background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border: 1px solid var(--color-border); box-shadow: 0 18px 40px -24px var(--card-sh, rgb(0 0 0 / 0.4));
}
.wheel-card-h { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: var(--fs-lg); justify-self: start; }
.wheel-card-h .icon { color: var(--color-primary); }

/* Wheel */
.wheel-stage { position: relative; width: min(100%, 440px); aspect-ratio: 1; }
.wheel-aura { position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--wheel-a) 45%, transparent), transparent 65%); filter: blur(18px); transition: opacity 300ms; }
.wheel-stage.is-spinning .wheel-aura { animation: wheel-aura-pulse 600ms ease-in-out infinite alternate; }
.wheel-stage.is-win .wheel-aura { animation: wheel-aura-win 1.4s ease-out 1; background: radial-gradient(circle, color-mix(in srgb, var(--wheel-b) 70%, transparent), transparent 65%); }
@keyframes wheel-aura-pulse { from { opacity: .55; transform: scale(.97); } to { opacity: 1; transform: scale(1.03); } }
@keyframes wheel-aura-win { 0% { transform: scale(1); opacity: .6; } 35% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); opacity: .7; } }
.wheel-svg { position: relative; width: 100%; height: 100%; display: block; filter: drop-shadow(0 16px 26px rgb(0 0 0 / 0.35)); }
.wheel-rim { fill: var(--wheel-rim); }
.wheel-rim-in { fill: none; stroke: color-mix(in srgb, var(--wheel-b) 70%, transparent); stroke-width: 2; }
.wheel-led { fill: #fff6c2; animation: wheel-led 1.1s steps(2, jump-none) infinite; }
.wheel-led:nth-child(odd) { fill: var(--wheel-b); animation-delay: .55s; }
.wheel-stage.is-spinning .wheel-led { animation-duration: .22s; }
@keyframes wheel-led { 50% { opacity: .25; } }
.wheel-rot { transform-origin: 200px 200px; transform-box: view-box; transition: transform 5600ms cubic-bezier(.08, .72, .06, 1); }
.wheel-seg { stroke: color-mix(in srgb, #fff 55%, transparent); stroke-width: 1.5; }
.wheel-seg.seg-a { fill: url(#wg-a); }
.wheel-seg.seg-b { fill: url(#wg-b); }
.wheel-seg.seg-none { fill: color-mix(in srgb, var(--color-text) 75%, var(--color-surface)); }
.wg-a1 { stop-color: color-mix(in srgb, var(--wheel-a) 72%, #fff); }
.wg-a2 { stop-color: var(--wheel-a); }
.wg-b1 { stop-color: color-mix(in srgb, var(--wheel-b) 60%, #fff); }
.wg-b2 { stop-color: var(--wheel-b); }
.wl-big { font-family: var(--font-heading); font-weight: 800; font-size: 30px; paint-order: stroke; stroke: rgb(0 0 0 / .18); stroke-width: 2px; }
.wl-small { font-family: var(--font-heading); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.wl-ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wheel-label.seg-a { fill: var(--color-on-primary); color: var(--color-on-primary); }
.wheel-label.seg-b { fill: var(--on-wheel-b); color: var(--on-wheel-b); }
.wheel-label.seg-none { fill: var(--color-surface); color: var(--color-surface); }
.wheel-pointer { position: absolute; left: 50%; top: -3%; width: 11%; z-index: 3; transform: translateX(-50%); transform-origin: 50% 30%; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .4)); }
.wheel-pointer path { fill: var(--wheel-b); stroke: #fff; stroke-width: 2.5; }
.wheel-pointer circle { fill: #fff; }
.wheel-stage.is-spinning .wheel-pointer { animation: wheel-tick 140ms ease-out infinite; }
@keyframes wheel-tick { 0% { transform: translateX(-50%) rotate(0); } 40% { transform: translateX(-50%) rotate(-14deg); } 100% { transform: translateX(-50%) rotate(0); } }
.wheel-hub {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-content: center; gap: 0; border-radius: 50%; border: 5px solid var(--wheel-b); cursor: pointer;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--wheel-a) 60%, #fff), var(--wheel-a) 70%);
  color: var(--color-on-primary); box-shadow: 0 0 0 6px color-mix(in srgb, var(--wheel-b) 30%, transparent), 0 10px 24px rgb(0 0 0 / .35);
  transition: transform var(--dur-fast) var(--ease-out);
}
.wheel-hub b { font-family: var(--font-heading); font-size: clamp(1.1rem, 4.5vw, 1.6rem); line-height: 1; }
.wheel-hub small { font-size: var(--fs-xs); font-weight: 700; text-align: center; opacity: .9; }
button.wheel-hub:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.05); }
button.wheel-hub:active:not(:disabled) { transform: translate(-50%, -50%) scale(.95); }
button.wheel-hub:focus-visible { outline: none; box-shadow: var(--focus-ring), 0 10px 24px rgb(0 0 0 / .35); }
button.wheel-hub:disabled { cursor: not-allowed; filter: grayscale(.4); }
.wheel-stage.is-spinning .wheel-hub { animation: wheel-hub 500ms ease-in-out infinite alternate; }
@keyframes wheel-hub { to { transform: translate(-50%, -50%) scale(1.06); } }
.wheel-confetti { position: absolute; left: -20%; top: -20%; width: 140%; height: 140%; pointer-events: none; z-index: 4; }
.wheel-go { width: min(100%, 440px); min-height: 56px; font-size: var(--fs-lg); border-radius: 18px; background-image: var(--btn-grad, none); }
.wheel-note { margin: 0; text-align: center; color: var(--color-text-muted); font-size: var(--fs-sm); }
.wheel-note strong { color: var(--color-text); }

/* Odds */
.rates-card { justify-items: stretch; }
.rates { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.rate { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px var(--sp-3); align-items: center; }
.rate-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; grid-row: span 2; }
.rate.seg-a .rate-ico { background: color-mix(in srgb, var(--wheel-a) 18%, transparent); color: var(--wheel-a); }
.rate.seg-b .rate-ico { background: color-mix(in srgb, var(--wheel-b) 22%, transparent); color: var(--on-wheel-b); }
[data-mode="dark"] .rate.seg-b .rate-ico { color: var(--wheel-b); }
.rate.seg-none .rate-ico { background: var(--color-surface-2); color: var(--color-text-muted); }
.rate-txt { display: grid; min-width: 0; }
.rate-txt span { font-size: var(--fs-xs); color: var(--color-text-muted); }
.rate-pct { font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-lg); }
.rate-bar { grid-column: 2 / -1; height: 8px; border-radius: var(--radius-full); background: var(--color-surface-2); overflow: hidden; }
.rate-bar i { display: block; height: 100%; border-radius: inherit; transform-origin: left; animation: rate-grow 900ms var(--ease-out) both; }
.rate.seg-a .rate-bar i { background: linear-gradient(90deg, var(--wheel-a), color-mix(in srgb, var(--wheel-a) 60%, #fff)); }
.rate.seg-b .rate-bar i { background: linear-gradient(90deg, var(--wheel-b), color-mix(in srgb, var(--wheel-b) 60%, #fff)); }
.rate.seg-none .rate-bar i { background: var(--color-text-muted); }
@keyframes rate-grow { from { transform: scaleX(0); } }
.rates-foot { margin: 0; font-size: var(--fs-xs); color: var(--color-text-muted); }

/* Live winners */
.feed-card { justify-items: stretch; }
.feed-head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.feed-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full); background: var(--color-success-soft); color: var(--color-success); font-size: var(--fs-xs); font-weight: 700; }
.feed-live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .3; } }
.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-top: 1px solid var(--color-border); }
.feed-row:first-child { border-top: 0; }
.feed-row.is-new { animation: feed-in 500ms var(--ease-out); }
@keyframes feed-in { from { opacity: 0; transform: translateY(-8px); background: color-mix(in srgb, var(--wheel-b) 18%, transparent); } }
.feed-av { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, color-mix(in srgb, var(--wheel-a) 60%, #d946ef), var(--wheel-a)); color: var(--color-on-primary); }
.feed-av img { width: 100%; height: 100%; object-fit: cover; }
.feed-txt { display: grid; min-width: 0; flex: 1; }
.feed-txt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-txt > span { font-size: var(--fs-sm); color: var(--color-text-muted); }
.feed-prize { font-style: normal; font-weight: 700; padding: 1px 10px; border-radius: var(--radius-full); background: color-mix(in srgb, var(--wheel-b) 22%, transparent); color: var(--on-wheel-b); }
[data-mode="dark"] .feed-prize { color: var(--wheel-b); }
.feed-prize.is-none { background: var(--color-surface-2); color: var(--color-text-muted); }
.feed-time { font-size: var(--fs-xs); color: var(--color-text-muted); white-space: nowrap; }
.feed-empty { padding: var(--sp-4) 0; }

/* Win popup */
.win-dialog { border: 0; padding: 0; background: none; border-radius: 28px; overflow: hidden; max-width: min(420px, calc(100vw - 32px)); width: 100%; color: var(--color-text); }
.win-dialog::backdrop { background: rgb(8 8 16 / .65); backdrop-filter: blur(4px); }
.win-card { position: relative; display: grid; gap: var(--sp-3); justify-items: center; text-align: center; padding: var(--sp-8) var(--sp-6) var(--sp-5);
  border-radius: 28px; background: var(--color-surface); border: 1px solid var(--color-border); overflow: hidden;
  box-shadow: 0 30px 80px rgb(0 0 0 / .45); animation: win-pop 520ms cubic-bezier(.2, 1.4, .4, 1); }
.win-dialog.is-win .win-card { border-color: color-mix(in srgb, var(--wheel-b) 60%, transparent); }
.win-burst { position: absolute; inset: -40% -40% auto; height: 120%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--wheel-b) 22%, transparent) 0 10deg, transparent 10deg 20deg); animation: win-spin 14s linear infinite; z-index: 0; mask-image: radial-gradient(circle, #000 20%, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 60%); }
.win-dialog:not(.is-win) .win-burst { display: none; }
.win-card > :not(.win-burst) { position: relative; z-index: 1; }
.win-kicker { margin: 0; font-weight: 700; color: var(--color-text-muted); }
.win-title { margin: 0; font-family: var(--font-heading); font-size: clamp(2rem, 8vw, 2.75rem); line-height: 1.1;
  background: linear-gradient(90deg, var(--wheel-a), color-mix(in srgb, var(--wheel-b) 80%, var(--wheel-a))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.win-dialog:not(.is-win) .win-title { background: none; color: var(--color-text); }
.win-desc { margin: 0; }
.win-code { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; justify-content: center; }
.win-code code { padding: 8px 16px; border-radius: 12px; border: 2px dashed var(--wheel-b); font-size: var(--fs-lg); font-weight: 800; letter-spacing: .08em; }
.win-card form, .win-card > .btn { width: 100%; }
@keyframes win-pop { from { opacity: 0; transform: scale(.7) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes win-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .wheel-led, .wheel-stage.is-spinning .wheel-aura, .wheel-stage.is-win .wheel-aura, .wheel-stage.is-spinning .wheel-pointer,
  .wheel-stage.is-spinning .wheel-hub, .rate-bar i, .feed-row.is-new, .feed-live i, .win-card, .win-burst { animation: none; }
}
.wheel-mine { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); }

/* ---------- Product page v2 ---------- */
.pd2 { display: grid; gap: var(--sp-6); }
.pd2-hero { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 900px) { .pd2-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--sp-6); } }
.pd2-media { display: grid; gap: var(--sp-3); }
.pd2-well {
  position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 1; display: grid; place-items: center;
  border-radius: var(--radius-xl); border: 1px solid var(--color-border);
  background: radial-gradient(70% 60% at 50% 45%, var(--glow), transparent 70%), linear-gradient(160deg, var(--art-a, var(--color-surface-2)), var(--art-b, var(--color-surface)));
}
.pd2-well::before { content: ""; position: absolute; z-index: -1; width: 55%; aspect-ratio: 1; right: -12%; top: -14%; border-radius: 50%; background: color-mix(in srgb, var(--color-surface) 18%, transparent); }
.pd2-well img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 24px 30px var(--card-sh, rgb(0 0 0 / .35))); }
.pd2-ph { width: 30%; height: 30%; color: var(--color-primary); stroke-width: 1.3; }
.pd2-back { position: absolute; top: var(--sp-3); inset-inline-start: var(--sp-3); z-index: 2; width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--color-surface) 85%, transparent); color: var(--color-text); box-shadow: var(--shadow-sm); }
.pd2-back:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pd2-badges { position: absolute; top: var(--sp-3); inset-inline-end: var(--sp-3); z-index: 2; display: flex; gap: var(--sp-2); }
.pd2-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: var(--radius-full); font-size: var(--fs-sm); font-weight: 700; background: var(--color-primary); color: var(--color-on-primary); }
.pd2-badge.is-hot { background: linear-gradient(135deg, #ffe07a, #f0b400); color: #3b2a00; }
.pd2-badge.is-off { background: var(--color-hot); color: var(--color-on-hot); }
.pd2-trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.pd2-trust li { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 8px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--color-border); font-size: var(--fs-sm); font-weight: 600; text-align: center; }
.pd2-trust .icon { width: 18px; height: 18px; color: var(--color-primary); flex: none; }

.pd2-buy { display: grid; gap: var(--sp-4); padding: var(--sp-6); border-radius: var(--radius-xl); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: 0 20px 44px -26px var(--card-sh, rgb(0 0 0 / .4)); }
@media (min-width: 900px) { .pd2-buy { position: sticky; top: 96px; } }
.pd2-cat { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--radius-full); background: var(--color-primary-soft); color: var(--color-on-primary-soft); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.pd2-title { margin: 0; font-family: var(--font-heading); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); line-height: 1.2; }
.pd2-meta { margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); color: var(--color-text-muted); font-size: var(--fs-sm); }
.pd2-stars { display: inline-flex; align-items: center; gap: 4px; }
.pd2-stars strong { color: var(--color-text); }
.pd2-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px var(--sp-3); padding: var(--sp-4); border-radius: 18px; background: linear-gradient(120deg, var(--color-primary-soft), transparent); }
.pd2-now { font-family: var(--font-heading); font-weight: 800; font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); line-height: 1; color: var(--color-primary); }
.pd2-was { color: var(--color-text-muted); text-decoration: line-through; }
.pd2-save { padding: 3px 10px; border-radius: var(--radius-full); background: var(--color-success-soft); color: var(--color-success); font-size: var(--fs-sm); font-weight: 700; }
.pd2-short { margin: 0; color: var(--color-text-muted); }
.pd2-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.pd2-tiles li { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); border-radius: 16px; border: 1px solid var(--color-border); min-width: 0; }
.pd2-tiles li > span:last-child { display: grid; min-width: 0; }
.pd2-tiles small { color: var(--color-text-muted); font-size: var(--fs-xs); }
.pd2-ti { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--color-primary-soft); color: var(--color-primary); }
.pd2-stock { display: grid; gap: 6px; }
.pd2-stock-row { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: 600; }
.pd2-stock-row > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.pd2-stock.is-in .pd2-stock-row { color: var(--color-success); }
.pd2-stock.is-low .pd2-stock-row { color: var(--color-warning); }
.pd2-stock.is-out .pd2-stock-row { color: var(--color-danger); }
.pd2-hurry { padding: 2px 10px; border-radius: var(--radius-full); background: var(--color-warning-soft); font-size: var(--fs-xs); font-weight: 700; animation: pd2-pulse 1.6s ease-in-out infinite; }
@keyframes pd2-pulse { 50% { opacity: .55; } }
.pd2-meter { height: 8px; border-radius: var(--radius-full); background: var(--color-surface-2); overflow: hidden; }
.pd2-meter i { display: block; height: 100%; border-radius: inherit; background: currentColor; transform-origin: left; animation: rate-grow 900ms var(--ease-out) both; }
.pd2-stock.is-in .pd2-meter i { background: var(--color-success); }
.pd2-stock.is-low .pd2-meter i { background: var(--color-warning); }
.pd2-stock.is-out .pd2-meter i { background: var(--color-danger); }
.pd2-form { display: grid; gap: var(--sp-2); }
.pd2-form .buy-main { min-height: 52px; border-radius: 16px; background-image: var(--btn-grad, none); }
.pd2-qty { margin: 0; text-align: center; }

.pd2-tabs { border-radius: var(--radius-xl); background: var(--color-surface); border: 1px solid var(--color-border); overflow: hidden; }
.pd2-tablist { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--color-border); overflow-x: auto; scrollbar-width: none; }
.pd2-tablist button { flex: none; min-height: 44px; padding: 0 var(--sp-4); border: 0; border-radius: 12px; background: none; color: var(--color-text-muted); font: inherit; font-weight: 600; cursor: pointer; }
.pd2-tablist button[aria-selected="true"] { background: var(--color-primary); background-image: var(--btn-grad, none); color: var(--color-on-primary); }
.pd2-tablist button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pd2-panel { padding: var(--sp-5) var(--sp-6); }
.pd2-panel:focus-visible { outline: none; box-shadow: inset var(--focus-ring); }
.pd2-panel p { margin: 0; }
.pd2-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.pd2-steps li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.pd2-steps li > span { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--color-primary); color: var(--color-on-primary); font-weight: 800; }
.pd2-steps div { display: grid; }
.pd2-steps small { color: var(--color-text-muted); }

@media (max-width: 899px) {
  .pd2-page .breadcrumb { display: none; }
  .pd2-buy { margin-top: calc(-1 * var(--sp-10)); position: relative; z-index: 1; padding: var(--sp-5); border-radius: 26px 26px var(--radius-xl) var(--radius-xl); }
  .pd2-trust { display: none; } /* the tiles in the buy card say the same on phones */
  .pd2-panel { padding: var(--sp-4); }
}
@media (prefers-reduced-motion: reduce) { .pd2-hurry, .pd2-meter i { animation: none; } }

/* ---------- Footer: one centred line (© year shop · links) ---------- */
.store main { padding-bottom: var(--sp-6); }
.store .site-footer {
  margin-top: 0; padding-block: var(--sp-5) calc(var(--sp-5) + 96px + env(safe-area-inset-bottom, 0px)); /* room for the floating dock on phones */
  background: none; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--fs-sm);
}
.footer-in { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sp-1) var(--sp-4); text-align: center; }
.footer-copy { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--sp-2); }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--sp-2); color: var(--color-primary); font-weight: 600; text-decoration: none; border-radius: 10px; }
.footer-links a:hover { text-decoration: underline; }
.footer-links a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (min-width: 900px) { .store .site-footer { padding-bottom: var(--sp-5); } }
.store.shell-ui .site-footer { border-top-color: color-mix(in srgb, var(--color-text) 10%, transparent); }
/* Rent: my shops with one-click back-office login */
.my-shop { flex-direction: column; gap: var(--sp-3); }
.my-shop-head { display: flex; gap: var(--sp-4); }
.my-shop-head > span:last-child { display: grid; gap: 2px; min-width: 0; }
.my-shop-head a { overflow-wrap: anywhere; }
.my-shop-hint { margin: 0; font-size: var(--fs-xs); }
.my-shop-pw summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-size: var(--fs-sm); font-weight: 600; color: var(--color-primary); }
.my-shop-pw form { margin-top: var(--sp-2); }
/* Rent: delete a shop */
.my-shop-del { border-top: 1px solid var(--color-border); padding-top: var(--sp-2); }
.my-shop-del summary { cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); font-weight: 600; color: var(--color-danger); }
.my-shop-del summary:focus-visible { outline: 2px solid var(--color-danger); outline-offset: 2px; border-radius: var(--radius-sm); }
.my-shop-del-body { display: grid; gap: var(--sp-3); margin-top: var(--sp-2); }
.my-shop-del-warn { display: flex; gap: var(--sp-2); margin: 0; padding: var(--sp-3); border-radius: var(--radius-md); font-size: var(--fs-sm); line-height: 1.6;
  color: var(--color-text); background: var(--color-danger-soft); border: 1px solid color-mix(in srgb, var(--color-danger) 40%, transparent); }
.my-shop-del-warn > .icon { flex: none; color: var(--color-danger); margin-top: 3px; }
.btn-danger-solid { color: #fff; background: var(--color-danger); border: 1px solid var(--color-danger); }
[data-mode="dark"] .btn-danger-solid { color: #1a0505; }
.btn-danger-solid:hover:not(:disabled) { filter: brightness(1.08); }
.btn-danger-solid:disabled { opacity: 0.45; cursor: not-allowed; }
