:root {
  color-scheme: light;
  --brand: #5b21ff; --brand-deep: #2b0e8f; --hot: #ff2e63; --sun: #ffc21a; --sun-deep: #ff9f0a;
  --ink: #120f2a; --ink-2: #4a4766; --muted: #7c7a95; --line: #e9e6f5; --bg: #f5f3fc; --panel: #fff;
  --green: #00915a; --green-soft: #e3f7ee; --star: #ffa41c;
  --radius: 16px; --shadow: 0 1px 2px rgba(25, 15, 80, .06), 0 4px 14px rgba(25, 15, 80, .06);
  --shadow-lg: 0 18px 40px -12px rgba(60, 20, 160, .28);
  --display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* ---------- ticker ---------- */
.ticker { background: var(--ink); color: #fff; overflow: hidden; height: 34px; font-size: 13px; position: relative; }
.ticker-track { display: flex; gap: 40px; width: max-content; height: 34px; align-items: center;
  animation: tick 70s linear infinite; padding-left: 20px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { text-decoration: none; white-space: nowrap; opacity: .92; }
.ticker a:hover { opacity: 1; text-decoration: underline; }
.ticker b { color: var(--sun); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--hot)); box-shadow: 0 6px 16px -6px var(--hot); }
.logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.logo-text { font: 700 19px/1 var(--display); letter-spacing: -.02em; }
.logo-text b { font-weight: 800; margin-left: 3px; background: linear-gradient(90deg, var(--brand), var(--hot));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: 1; max-width: 620px; margin: 0 auto; position: relative; display: block; }
.search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.search input { width: 100%; height: 46px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg);
  padding: 0 18px 0 46px; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; }
.search input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(91,33,255,.12); }
.live-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--green);
  background: var(--green-soft); padding: 7px 13px; border-radius: 999px; flex: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(0,145,90,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(0,145,90,0); } 100% { box-shadow: 0 0 0 0 rgba(0,145,90,0); } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #3a14c4 0%, var(--brand-deep) 45%, #170a52 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
.b1 { width: 460px; height: 460px; background: var(--hot); right: -120px; top: -160px; }
.b2 { width: 380px; height: 380px; background: #7b4dff; left: 30%; bottom: -220px; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.eyebrow { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); }
.hero h1 { font: 800 clamp(30px, 3.9vw, 50px)/1.1 var(--display); letter-spacing: -.03em; margin: 18px 0 14px; }
.hl { background: linear-gradient(90deg, var(--sun), #ff7a59 55%, var(--hot)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 17px; color: rgba(255,255,255,.82); max-width: 520px; margin: 0 0 26px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.stat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 18px; min-width: 120px; }
.stat b { display: block; font: 700 24px/1.1 var(--display); }
.stat span { font-size: 12px; color: rgba(255,255,255,.72); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px;
  font: 600 15px/1 var(--display); text-decoration: none; border: 0; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-sun { background: linear-gradient(180deg, var(--sun), var(--sun-deep)); color: #2a1600; box-shadow: 0 10px 24px -10px var(--sun-deep); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-brand { background: linear-gradient(135deg, var(--brand), #8b3dff); color: #fff; box-shadow: 0 10px 24px -12px var(--brand); }

/* deal of the day */
.dotd { background: #fff; color: var(--ink); border-radius: 24px; padding: 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45);
  position: relative; transform: rotate(1deg); transition: transform .25s; }
.dotd:hover { transform: rotate(0) translateY(-3px); }
.dotd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.dotd-tag { font: 700 13px/1 var(--display); padding: 8px 12px; border-radius: 999px; color: #fff;
  background: linear-gradient(90deg, var(--hot), #ff6a3d); }
.dotd-timer { font-size: 12px; color: var(--muted); }
.dotd-timer b { font: 700 15px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; background: var(--bg);
  padding: 5px 8px; border-radius: 8px; margin-left: 4px; }
.dotd-body { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; min-height: 220px; }
.dotd-img { position: relative; aspect-ratio: 1; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: block; overflow: hidden; }
.dotd-img img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; transition: transform .3s; }
.dotd:hover .dotd-img img { transform: scale(1.05); }
.dotd-img .ribbon { font-size: 15px; padding: 7px 11px; }
.dotd-title { font: 600 16px/1.35 var(--display); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0 8px; }
.dotd-title:hover { color: var(--brand); }
.dotd .price strong { font-size: 30px; }
.dotd .grab { margin-top: 12px; height: 46px; font-size: 15px; width: 100%; }

/* ---------- section titles ---------- */
.sec-title { font: 700 24px/1.2 var(--display); letter-spacing: -.02em; margin: 0; }
.sec-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- categories ---------- */
.cats { padding-top: 40px; }
.cat-track { display: flex; gap: 14px; overflow-x: auto; padding: 18px 2px 8px; scrollbar-width: none; }
.cat-track::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 104px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: none; border: 0; padding: 0; color: var(--ink); }
.cat-ico { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 34px;
  background: var(--c, #ece6ff); border: 2px solid transparent; transition: transform .18s, box-shadow .18s, border-color .18s; }
.cat:hover .cat-ico { transform: translateY(-4px) rotate(-3deg); box-shadow: 0 12px 22px -12px rgba(60,20,160,.45); }
.cat.on .cat-ico { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(91,33,255,.15); }
.cat-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.cat-count { font-size: 11px; color: var(--muted); margin-top: -6px; }

/* ---------- rails ---------- */
.rail { padding-top: 40px; }
.rail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.rail-nav { display: flex; gap: 8px; }
.arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1;
  color: var(--ink); box-shadow: var(--shadow); transition: background .15s, color .15s; }
.arrow:hover { background: var(--ink); color: #fff; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 224px; gap: 16px; overflow-x: auto; padding: 18px 2px 14px;
  scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track .card { scroll-snap-align: start; }
#loot .rail-track { background: linear-gradient(90deg, #fff0f4, #fff7e6); border-radius: 22px; padding: 18px; margin-top: 16px; }

/* ---------- cards (all identical size) ---------- */
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; position: relative; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.media img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; transition: transform .35s; }
.card:hover .media img { transform: scale(1.06); }
.ribbon { position: absolute; z-index: 1; top: 10px; left: 10px; font: 800 13px/1 var(--display); color: #fff; padding: 6px 9px; border-radius: 9px;
  background: linear-gradient(135deg, var(--hot), #ff5a36); box-shadow: 0 6px 14px -6px var(--hot); }
.hot { position: absolute; z-index: 1; top: 10px; right: 10px; font: 700 11px/1 var(--display); padding: 6px 8px; border-radius: 9px;
  background: #1c1240; color: #ffd24d; }
.badge { position: absolute; z-index: 1; left: 10px; bottom: 10px; max-width: calc(100% - 20px); font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 7px; background: var(--brand); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 4px 10px -4px rgba(91,33,255,.6); }
.badge:empty { display: none; }
.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--line); }
.cat-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; height: 16px; line-height: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title { font-size: 14px; line-height: 20px; height: 40px; text-decoration: none; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.title:hover { color: var(--brand); }
.rating { height: 18px; line-height: 18px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.stars { font-size: 13px; letter-spacing: 1px; background: linear-gradient(90deg, var(--star) calc(var(--r, 0) / 5 * 100%), #dcd9e8 0);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.price { height: 30px; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.price strong { font: 700 21px/30px var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price s { color: var(--muted); font-size: 13px; }
.save { height: 22px; align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-soft);
  padding: 2px 8px; border-radius: 6px; line-height: 18px; white-space: nowrap; }
.save:empty { visibility: hidden; }
.actions { display: flex; gap: 8px; margin-top: 6px; }
.grab { flex: 1; height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px;
  font: 600 14px/1 var(--display); text-decoration: none; color: #2a1600; background: linear-gradient(180deg, var(--sun), var(--sun-deep));
  box-shadow: 0 6px 14px -8px var(--sun-deep); transition: filter .15s, transform .15s; }
.grab span { transition: transform .15s; }
.grab:hover { filter: brightness(1.04); }
.grab:hover span { transform: translateX(3px); }
.share { width: 40px; height: 40px; flex: none; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center;
  transition: background .15s, border-color .15s; }
.share svg { width: 19px; height: 19px; fill: #25d366; }
.share:hover { background: #eafaf0; border-color: #25d366; }

/* ---------- all deals ---------- */
.all { padding-top: 48px; }
.all-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.sort { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.sort select { font: 600 14px var(--display); color: var(--ink); height: 42px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 600; transition: all .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.more { text-align: center; margin: 32px 0 8px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; background: #fff; border-radius: var(--radius); border: 1px dashed var(--line); }
.empty b { display: block; font: 700 20px var(--display); margin-bottom: 6px; }

/* skeletons */
.skeleton-block, .sk { background: linear-gradient(90deg, #eeebf8 25%, #f8f7fd 50%, #eeebf8 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; }
.sk { height: 420px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- footer ---------- */
.foot { margin-top: 64px; background: var(--ink); color: rgba(255,255,255,.75); font-size: 13px; }
.foot-in { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.foot .logo-text { color: #fff; }
.fine p { margin: 0 0 8px; }
.fine b { color: #fff; }
.to-top { position: fixed; right: 20px; bottom: 20px; width: 48px; height: 48px; border-radius: 50%; border: 0; z-index: 30; color: #fff; font-size: 20px;
  background: linear-gradient(135deg, var(--brand), var(--hot)); box-shadow: var(--shadow-lg); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 14px; z-index: 40; box-shadow: var(--shadow-lg); }

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

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; padding-bottom: 44px; }
  .dotd { transform: none; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .nav-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search input { height: 42px; }
  .live-pill { margin-left: auto; }
  html { scroll-padding-top: 128px; }
  .lead { font-size: 15px; }
  .stat { min-width: 0; flex: 1; padding: 10px 12px; }
  .stat b { font-size: 19px; }
  .btn { height: 44px; padding: 0 18px; font-size: 14px; }
  .dotd-body { grid-template-columns: 120px 1fr; gap: 12px; min-height: 0; }
  .dotd .price strong { font-size: 22px; }
  .dotd-title { font-size: 14px; -webkit-line-clamp: 2; }
  .sec-title { font-size: 20px; }
  .rail-nav { display: none; }
  .rail-track { grid-auto-columns: 168px; gap: 10px; }
  #loot .rail-track { padding: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filters { flex-direction: column; gap: 8px; margin: 14px -14px 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding: 0 14px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; height: 34px; padding: 0 13px; }
  .badge { font-size: 10px; padding: 3px 6px; }
  .body { padding: 10px; }
  .title { font-size: 13px; line-height: 18px; height: 36px; }
  .price strong { font-size: 17px; }
  .price s { font-size: 11.5px; }
  .grab { font-size: 13px; height: 38px; }
  .share { width: 38px; height: 38px; }
  .hot { display: none; }
  .cat { width: 84px; }
  .cat-ico { width: 64px; height: 64px; font-size: 28px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
