/* J4Market public landing pages.
 *
 * Palette matches the in-app share-preview pages (see
 * server/productPreview/productPreview.controller.js) so the web surface and
 * the app read as one product. Lemon #DEF213 is AppColors.primary from
 * waxx_app/lib/utils/app_colors.dart.
 *
 * Mobile-first: nearly all traffic is phones. Desktop rules live in the one
 * media query block at the bottom of each section.
 */

:root {
  color-scheme: dark;

  --bg: #0b0b0c;
  --surface: #15151a;
  --surface-2: #1e1e26;
  --surface-3: #2a2a32;
  --border: #26262e;

  --lemon: #def213;
  --lemon-grad: linear-gradient(135deg, #f7ff17, #b1ff1f);

  --text: #ffffff;
  --text-muted: #c8c8d0;
  --text-dim: #9b9ba8;
  --text-faint: #6b6b75;

  --live: #ff0000;
  --star: #ffc107;

  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1140px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* Visible only to screen readers — used for form labels the design hides. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--lemon);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  background: var(--lemon);
  color: #000;
  font-size: 13px;
  font-weight: 600;
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
}
.topbar a { color: #000; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ----------------------------------------------------------------- header */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo img { height: 30px; width: auto; }
.logo span {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* Header search collapses on phones; the hero search is the primary one. */
.header-search { display: none; flex: 1; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.header-actions .icon-btn {
  display: none;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.header-actions .icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--lemon-grad); color: #000; }
.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary { background: var(--surface-3); color: var(--text); }
.btn-secondary:hover { background: #35353f; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--lemon); color: var(--lemon); }

.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------- search field */

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 6px 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.15s ease;
}
.search:focus-within { border-color: var(--lemon); }
.search svg { flex-shrink: 0; color: var(--text-faint); }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
.search input::placeholder { color: var(--text-faint); }
.search .btn { height: 40px; padding: 0 18px; border-radius: 10px; }

.search-sm { height: 42px; padding-left: 12px; border-radius: 11px; }
.search-sm input { font-size: 14px; }
.search-sm .btn { height: 32px; padding: 0 14px; font-size: 13px; }

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 40px;
  text-align: center;
}
/* Soft lemon glow behind the headline. */
.hero::before {
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  width: 620px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(222, 242, 19, 0.14), transparent 68%);
  pointer-events: none;
}
.hero .wrap { position: relative; }

.hero h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  background: var(--lemon-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.sub {
  margin: 0 auto 24px;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 16px;
}
.hero form { max-width: 620px; margin: 0 auto 20px; }

.store-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.store-badges a { display: block; transition: transform 0.12s ease; }
.store-badges a:hover { transform: translateY(-2px); }
.store-badges svg { height: 48px; width: auto; display: block; }

.trust {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
}
.trust b { color: var(--text); }
.trust .dot { color: var(--text-faint); }

/* --------------------------------------------------------------- sections */

.section { padding: 46px 0; }
.section-alt { background: var(--surface); }

.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 {
  margin: 0 0 8px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(222, 242, 19, 0.12);
  color: var(--lemon);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------- how it works */

.steps {
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 24px 20px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px; left: 20px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lemon);
  color: #000;
  font-size: 14px;
  font-weight: 800;
}
.step .step-icon { font-size: 26px; margin-bottom: 8px; }
.step h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.step p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* -------------------------------------------------------- seller cards */

.seller-grid { display: grid; gap: 14px; }

.seller-card {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.seller-card:hover { border-color: var(--lemon); transform: translateY(-3px); }

.seller-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-3);
}
.seller-thumb img { width: 100%; height: 100%; object-fit: cover; }
.seller-thumb .placeholder {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  font-size: 42px;
  background: linear-gradient(135deg, #1e1e26, #15151a);
}

.live-badge {
  position: absolute;
  top: 10px; left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--live);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.live-badge .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.verified-badge {
  position: absolute;
  top: 10px; right: 10px;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lemon);
  color: #000;
  font-size: 13px;
  font-weight: 800;
}

.seller-body { padding: 14px 16px 16px; }
.seller-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seller-meta {
  color: var(--text-faint);
  font-size: 13px;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seller-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}
.seller-stats .star { color: var(--star); }

.section-cta { text-align: center; margin-top: 26px; }

/* -------------------------------------------------------- campus banner */

.campus {
  position: relative;
  overflow: hidden;
  margin: 0 16px;
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  background: var(--lemon-grad);
  color: #000;
  text-align: center;
}
.campus-inner { max-width: var(--maxw); margin: 0 auto; }
.campus .emoji { font-size: 30px; line-height: 1; }
.campus h3 {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.campus p {
  margin: 0 auto 16px;
  max-width: 560px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.82;
}
.campus .btn {
  background: #000;
  color: var(--lemon);
}
.campus .btn:hover { filter: brightness(1.35); }

/* ------------------------------------------------------------ categories */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 10px;
  min-height: 108px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cat-card:hover { border-color: var(--lemon); transform: translateY(-2px); }
.cat-card .cat-icon { font-size: 27px; line-height: 1; }
.cat-card img.cat-icon {
  width: 42px; height: 42px;
  object-fit: cover;
  border-radius: 10px;
}
.cat-card span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.25;
}

/* -------------------------------------------------------------- app CTA */

.app-cta {
  padding: 40px 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.app-cta h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.app-cta p {
  margin: 0 auto 20px;
  max-width: 480px;
  color: var(--text-dim);
  font-size: 15px;
}
.app-cta .store-badges { margin-bottom: 0; }

/* ------------------------------------------------------- /sellers page */

.benefits { display: grid; gap: 12px; }
.benefit {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.benefit .b-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(222, 242, 19, 0.12);
  font-size: 21px;
}
.benefit h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.benefit p { margin: 0; color: var(--text-dim); font-size: 14px; }

.form-card {
  padding: 24px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.form-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.form-card > p.form-sub {
  margin: 0 0 20px;
  color: var(--text-dim);
  font-size: 14px;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.field input,
.field select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: 0;
  transition: border-color 0.15s ease;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6b75' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field input:focus,
.field select:focus { border-color: var(--lemon); }
.field input::placeholder { color: var(--text-faint); }
.field .hint { margin-top: 5px; font-size: 12px; color: var(--text-faint); }

.field-row { display: grid; gap: 14px; }

/* Honeypot: hidden from humans, tempting to naive bots. Must stay empty.
   Kept out of the layout entirely rather than display:none so that bots
   which skip hidden fields still fill it in. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-success {
  background: rgba(0, 197, 102, 0.1);
  border: 1px solid rgba(0, 197, 102, 0.35);
  color: #7ff0b6;
}
.alert-error {
  background: rgba(229, 57, 53, 0.1);
  border: 1px solid rgba(229, 57, 53, 0.35);
  color: #ff9a97;
}
.alert b { display: block; color: var(--text); margin-bottom: 2px; }

.quote-card {
  padding: 26px 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--lemon);
  border-radius: var(--radius-lg);
}
.quote-card .q-mark {
  font-size: 42px;
  line-height: 1;
  color: var(--lemon);
  margin-bottom: 4px;
}
.quote-card blockquote {
  margin: 0 0 16px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}
.quote-card .q-author { font-size: 14px; font-weight: 700; }
.quote-card .q-role { font-size: 13px; color: var(--text-faint); }
.quote-card .video-wrap {
  margin-top: 18px;
  aspect-ratio: 9 / 16;
  max-width: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.quote-card .video-wrap iframe { width: 100%; height: 100%; border: 0; }

/* -------------------------------------------------------- search results */

.results-head {
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
}
.results-head h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.results-head p { margin: 0; color: var(--text-dim); font-size: 14px; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.tabs a {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
}
.tabs a.active {
  background: var(--lemon);
  border-color: var(--lemon);
  color: #000;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.product-card {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card:hover { border-color: var(--lemon); transform: translateY(-3px); }
.product-card .p-thumb {
  aspect-ratio: 1;
  background: var(--surface-3);
}
.product-card .p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .p-thumb .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 34px;
}
.product-card .p-body { padding: 11px 12px 13px; }
.product-card .p-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .p-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--lemon);
}
.product-card .p-seller {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 56px 20px;
  text-align: center;
}
.empty .e-icon { font-size: 48px; margin-bottom: 14px; }
.empty h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.empty p {
  margin: 0 auto 22px;
  max-width: 420px;
  color: var(--text-dim);
  font-size: 15px;
}

/* --------------------------------------------------- horizontal card rail */

/* Rows with more items than fit: scroll on phones, grid on desktop.
   Scroll-snap makes the swipe feel native rather than laggy. */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 47%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  /* Bleed to the screen edge so cards look like they continue off-screen. */
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.rail > * { scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 5px; }
.rail::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
.rail::-webkit-scrollbar-track { background: transparent; }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-head-row h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-head-row p { margin: 4px 0 0; color: var(--text-dim); font-size: 14px; }
.section-head-row a.more {
  flex-shrink: 0;
  color: var(--lemon);
  font-size: 14px;
  font-weight: 700;
}

/* --------------------------------------------------------------- reels */

.reel-card {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.reel-card img { width: 100%; height: 100%; object-fit: cover; }
.reel-card .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 34px;
  background: linear-gradient(135deg, #1e1e26, #15151a);
}
.reel-card .reel-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 10px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.86));
}
.reel-card .reel-seller {
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reel-card .reel-stats {
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-muted);
}
.reel-card .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  font-size: 15px;
  padding-left: 3px;
}
.reel-type-badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Tabs that filter the reel rail client-side. */
.reel-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.reel-tabs button {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.reel-tabs button[aria-selected="true"] {
  background: var(--lemon);
  border-color: var(--lemon);
  color: #000;
}

/* ------------------------------------------------------ live & upcoming */

.live-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.live-card .live-thumb { aspect-ratio: 4 / 3; background: var(--surface-3); }
.live-card .live-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-card .live-thumb .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 32px;
}
.live-card .live-body { padding: 11px 12px 13px; }
.live-card .live-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-card .live-when { font-size: 12px; color: var(--lemon); font-weight: 700; }
.live-card .live-seller { font-size: 12px; color: var(--text-faint); }

/* --------------------------------------------------------- flash sale */

.flash {
  border: 1px solid rgba(255, 90, 90, 0.4);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at top left, rgba(255, 60, 60, 0.16), transparent 60%),
    var(--surface-2);
  padding: 22px 18px;
}
.flash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.flash-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.flash-head p { margin: 3px 0 0; font-size: 14px; color: var(--text-dim); }

.countdown { display: flex; align-items: center; gap: 6px; }
.countdown .unit {
  min-width: 46px;
  padding: 6px 4px;
  border-radius: 9px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
}
.countdown .num {
  display: block;
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.countdown .lbl {
  display: block;
  font-size: 9px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.countdown .sep { font-size: 17px; font-weight: 800; color: var(--text-faint); }

.discount-badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 7px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.p-thumb { position: relative; }
.p-was {
  font-size: 12px;
  color: var(--text-faint);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 500;
}

/* -------------------------------------------------------- testimonials */

.testi-card {
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.testi-stars { color: var(--star); font-size: 13px; letter-spacing: 1px; }
.testi-quote {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.testi-who { display: flex; align-items: center; gap: 10px; }
.testi-who img,
.testi-who .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.testi-name { font-size: 13px; font-weight: 700; }
.testi-product {
  font-size: 12px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------- poll / quiz */

.poll-card {
  padding: 24px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.poll-card h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.poll-card .poll-meta { margin: 0 0 18px; font-size: 13px; color: var(--text-faint); }

.poll-options { display: flex; flex-direction: column; gap: 10px; }

.poll-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.poll-option:hover { border-color: var(--lemon); }
.poll-option input { accent-color: var(--lemon); width: 17px; height: 17px; flex-shrink: 0; }

/* Result rows: a filled bar behind the label, sized by vote share. */
.poll-result {
  position: relative;
  overflow: hidden;
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 14px;
}
.poll-result .bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(222, 242, 19, 0.16);
  transition: width 0.5s ease;
}
.poll-result.is-correct .bar { background: rgba(0, 197, 102, 0.22); }
.poll-result.is-wrong .bar { background: rgba(229, 57, 53, 0.2); }
.poll-result .row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
}
.poll-result .pct { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 700; }
.poll-result .mark { margin-left: 6px; }

.poll-explain {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(222, 242, 19, 0.08);
  border: 1px solid rgba(222, 242, 19, 0.2);
  font-size: 13px;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ referral */

.referral {
  padding: 30px 22px;
  border-radius: var(--radius-lg);
  background: var(--lemon-grad);
  color: #000;
  text-align: center;
}
.referral h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.referral p { margin: 0 auto 18px; max-width: 520px; font-size: 15px; font-weight: 600; opacity: 0.82; }
.referral-rewards {
  display: grid;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 20px;
}
.referral-reward {
  padding: 13px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.09);
}
.referral-reward b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.62; }
.referral-reward span { font-size: 15px; font-weight: 800; }
.referral .btn { background: #000; color: var(--lemon); }
.referral .btn:hover { filter: brightness(1.35); }
.referral-code {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 16px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* ----------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--border);
  padding: 38px 0 28px;
  margin-top: 20px;
}
.footer-top { display: grid; gap: 26px; margin-bottom: 28px; }
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p {
  margin: 0 0 14px;
  max-width: 300px;
  color: var(--text-dim);
  font-size: 14px;
}
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--lemon); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}
.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover { color: var(--text-muted); }

/* ------------------------------------------------------------- desktop */

@media (min-width: 640px) {
  .hero { padding: 60px 0 52px; }
  .hero h1 { font-size: 46px; }
  .hero p.sub { font-size: 17px; }

  .steps { grid-template-columns: repeat(3, 1fr); }
  .seller-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }

  .form-card { padding: 30px 28px; }
  .section { padding: 60px 0; }
  .section-head h2 { font-size: 30px; }
  .section-head-row h2 { font-size: 26px; }
  .campus { padding: 34px 28px; margin: 0 16px; }
  .campus h3 { font-size: 26px; }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; }

  .rail { grid-auto-columns: 30%; }
  .referral-rewards { grid-template-columns: 1fr 1fr; }
  .flash { padding: 28px 26px; }
}

@media (min-width: 900px) {
  .header-search { display: block; max-width: 440px; margin: 0 16px; }
  .header-actions .icon-btn { display: inline-flex; }
  .hero h1 { font-size: 54px; }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .benefits { grid-template-columns: repeat(3, 1fr); }

  /* Enough room for a full row — drop the horizontal scroll entirely. */
  .rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, 1fr);
    overflow-x: visible;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }
  .rail-4 { grid-template-columns: repeat(4, 1fr); }
  .rail-3 { grid-template-columns: repeat(3, 1fr); }
  .referral-rewards { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
