:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --ink: #0d1b2a;
  --ink-2: #44566c;
  --ink-3: #7a8ba0;
  --line: #e2eaf3;
  --ice: #e8f2fc;
  --accent: #1673d9;
  --accent-2: #0b3a66;
  --cyan: #2bb6e6;
  --sale: #e4405f;
  --gold: #f2b01e;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(13, 27, 42, .04), 0 8px 24px -12px rgba(13, 50, 90, .18);
  --shadow-lg: 0 2px 6px rgba(13, 27, 42, .05), 0 22px 44px -18px rgba(13, 50, 90, .32);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(43, 182, 230, .35), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(22, 115, 217, .45), transparent 60%),
    linear-gradient(160deg, #0a2e52 0%, #0b3a66 45%, #135a9a 100%);
  padding: 72px 0 140px;
}
.snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero__glow {
  position: absolute; z-index: -1; width: 560px; height: 560px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
}
.hero__inner { position: relative; }
.hero__art { position: absolute; right: 0; top: 230px; width: 400px; height: 380px; pointer-events: none; }
.hero__art[hidden] { display: none; }
.fan {
  position: absolute; top: 0; left: 50%; width: 190px; margin: 0 0 0 -95px; border-radius: 18px; overflow: hidden;
  border: 5px solid rgba(255, 255, 255, .95); background: #fff; box-shadow: 0 30px 50px -20px rgba(0, 10, 30, .65);
}
.fan img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.fan figcaption {
  position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 750;
  background: rgba(11, 58, 102, .9); color: #fff;
}
.fan--0 { transform: translate(-112px, 26px) rotate(-9deg); }
.fan--1 { transform: translateY(-6px); z-index: 2; }
.fan--2 { transform: translate(112px, 26px) rotate(9deg); }
@media (max-width: 1239px) { .hero__art { display: none; } }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px; font-weight: 500; letter-spacing: .02em; backdrop-filter: blur(6px);
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #7fe0ff; box-shadow: 0 0 0 4px rgba(127, 224, 255, .22); }
.hero h1 {
  margin: 22px 0 16px; font-size: clamp(36px, 6.2vw, 72px); line-height: 1.02; font-weight: 800; letter-spacing: -.03em;
}
.hero h1 span {
  background: linear-gradient(90deg, #bfe9ff, #7fd3ff 50%, #ffffff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { max-width: 620px; margin: 0; font-size: clamp(16px, 1.6vw, 19px); color: rgba(235, 245, 255, .82); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 40px 0 34px; max-width: 780px; }
.stat {
  padding: 18px 20px; border-radius: 16px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(8px);
}
.stat b { display: block; font-size: clamp(22px, 2.6vw, 32px); font-weight: 750; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.stat b small { font-size: .55em; font-weight: 600; opacity: .75; margin-left: 4px; }
.stat span { display: block; margin-top: 4px; font-size: 13.5px; color: rgba(225, 240, 255, .72); }

.hero__cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  background: #fff; color: var(--accent-2); font-weight: 650; text-decoration: none;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); transition: transform .2s, box-shadow .2s;
}
.hero__cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .5); }
.hero__drift { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; }

/* ---------- SECTIONS ---------- */
.section { padding: 28px 0 24px; }
.section__head { margin-bottom: 22px; }
.section__head h2 { margin: 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.15; }
.section__head p { margin: 6px 0 0; color: var(--ink-2); }

/* ---------- PODIUM ---------- */
.podium { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.pod--1 { grid-row: span 2; }
.pod {
  position: relative; display: flex; flex-direction: row; background: var(--surface); border-radius: 22px;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; transition: transform .25s;
}
.pod:hover { transform: translateY(-4px); }
.pod--1 { border-color: rgba(242, 176, 30, .55); box-shadow: 0 0 0 3px rgba(242, 176, 30, .12), var(--shadow-lg); }
.pod .media { aspect-ratio: auto; flex: 0 0 40%; }
.pod--1 .media { flex-basis: 46%; }
.pod__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.pod__name { margin: 0; font-size: 18px; font-weight: 650; line-height: 1.3; }
.pod--1 .pod__name { font-size: 22px; }
.pod--1 .price b { font-size: 30px; }
.pod .price { margin-top: auto; }
.pod--1 .pod__body { justify-content: center; }
.pod--1 .price { margin-top: 10px; }
.pod--1 .pod__body { gap: 14px; padding: 26px 28px 28px; }
.desc--lead { -webkit-line-clamp: 5; font-size: 14px; line-height: 1.55; }
.save {
  align-self: flex-start; margin-top: -6px; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 650;
  color: #0f7a4a; background: #e3f6ec;
}
.pod .disc { top: auto; bottom: 14px; right: auto; left: 14px; }
.medal {
  position: absolute; z-index: 2; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; color: #3b2a00;
  background: linear-gradient(135deg, #ffe38a, #f2b01e); box-shadow: 0 6px 16px -6px rgba(160, 110, 0, .6);
}
.medal i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.medal--2 { background: linear-gradient(135deg, #f1f5f9, #b8c4d2); color: #1f2b38; box-shadow: 0 6px 16px -6px rgba(60, 80, 100, .5); }
.medal--3 { background: linear-gradient(135deg, #ffd2b0, #d4844a); color: #3d1d05; box-shadow: 0 6px 16px -6px rgba(140, 70, 20, .5); }

/* ---------- TOOLBAR ---------- */
.toolbar {
  position: sticky; top: 0; z-index: 20; margin: 0 -12px 22px; padding: 12px;
  background: rgba(244, 248, 252, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-radius: 0 0 18px 18px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); font-weight: 550; font-size: 14.5px; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.chip:hover:not(:disabled) { border-color: #b9d3ee; color: var(--ink); }
.chip .l-short { display: none; }
.chip em { font-style: normal; font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--ice); color: var(--accent); }
.chip[aria-selected="true"] { background: var(--accent-2); border-color: var(--accent-2); color: #fff; box-shadow: 0 6px 16px -8px rgba(11, 58, 102, .7); }
.chip[aria-selected="true"] em { background: rgba(255, 255, 255, .18); color: #fff; }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.toolbar__row { display: flex; gap: 12px; flex-wrap: wrap; }
.search {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 46px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(22, 115, 217, .12); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; height: 100%; }
.sort {
  flex: 0 1 300px; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; height: 46px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-3);
}
.sort span { white-space: nowrap; }
.sort select {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-weight: 550; cursor: pointer;
  appearance: none; -webkit-appearance: none; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2344566c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; background-size: 18px;
}
.toolbar__meta { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); min-height: 20px; }

/* ---------- GRID / CARD ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
  animation: rise .35s ease both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfe0f2; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.media { position: relative; aspect-ratio: 3 / 4; background: linear-gradient(160deg, #eef5fc, #dde9f6); overflow: hidden; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform .5s; background: #fff; }
.media img.bg { object-fit: cover; filter: blur(24px) saturate(1.25); transform: scale(1.2); opacity: .6; background: transparent; }
.pod .media img.main, .pod .media img.alt { object-fit: contain; background: transparent; }
.media img.alt { opacity: 0; }
.card:hover .media img.alt, .pod:hover .media img.alt { opacity: 1; }
.card:hover .media img.main:last-of-type { transform: scale(1.03); }
.ph {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; color: #6b8bb0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .9) 0 2px, transparent 3px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .7) 0 1.5px, transparent 2.5px) 0 0 / 34px 34px,
    linear-gradient(160deg, #eaf3fc, #d3e3f4);
}
.ph svg { width: 46%; max-width: 170px; height: auto; filter: drop-shadow(0 10px 14px rgba(20, 70, 130, .18)); }
.ph span { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }

.rank {
  position: absolute; z-index: 2; top: 12px; left: 12px; min-width: 38px; height: 30px; padding: 0 10px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-weight: 750; font-size: 14px; color: #fff; background: rgba(11, 58, 102, .92);
  box-shadow: 0 4px 12px -4px rgba(11, 58, 102, .6);
}
.rank small { font-size: 10px; opacity: .7; margin-right: 1px; }
.disc {
  position: absolute; z-index: 2; top: 12px; right: 12px; padding: 5px 9px; border-radius: 9px; font-size: 13px; font-weight: 750;
  color: #fff; background: var(--sale); box-shadow: 0 4px 12px -4px rgba(228, 64, 95, .6);
}
.type {
  position: absolute; z-index: 2; bottom: 10px; left: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .92); color: var(--accent-2); border: 1px solid rgba(11, 58, 102, .1);
}
.card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.brand { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.brand--none { color: var(--ink-3); font-weight: 600; text-transform: none; letter-spacing: 0; }
.name {
  margin: -4px 0 0; font-size: 15.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.35em * 2);
}
.rating { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.stars { --v: 0; position: relative; display: inline-block; font-size: 15px; letter-spacing: 2px; line-height: 1; color: #d6dfe9; }
.stars::before { content: "★★★★★"; }
.stars::after {
  content: "★★★★★"; position: absolute; inset: 0; width: calc(var(--v) / 5 * 100%); overflow: hidden; color: var(--gold); white-space: nowrap;
}
.rating b { color: var(--ink); font-weight: 700; }
.rating .muted { color: var(--ink-3); }
.specs { list-style: none; margin: 2px 0 0; padding: 10px 12px; border-radius: 12px; background: #f6f9fd; display: grid; gap: 6px; font-size: 13px; }
.specs li { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.specs li .ks { display: none; }
.specs li span { color: var(--ink-3); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.specs li b { font-weight: 600; text-align: right; flex: 0 1 auto; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 8px; background: var(--ice); color: var(--accent-2); font-size: 12.5px; font-weight: 600; }
.desc { margin: 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.price { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.price b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.price b small { font-size: 13px; font-weight: 650; color: var(--ink-2); margin-left: 3px; }
.price s { color: var(--ink-3); font-size: 14px; }
.seller { font-size: 12.5px; color: var(--ink-3); margin-top: -6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px;
  font-weight: 650; font-size: 14.5px; text-decoration: none; cursor: pointer; border: 0; transition: background .15s, transform .15s, box-shadow .15s;
}
.btn--wb { color: #fff; background: linear-gradient(135deg, #8b2bd8, #cb11ab); box-shadow: 0 8px 18px -10px rgba(160, 30, 190, .8); }
.btn--wb:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(160, 30, 190, .9); }
.btn--ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- STATES ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty__icon { font-size: 44px; color: #9cc3ea; }
.loading { text-align: center; padding: 40px; color: var(--ink-3); }
.loading[hidden] { display: none; }

/* ---------- FOOTER ---------- */
.footer { margin-top: 56px; background: #0b2440; color: rgba(225, 238, 252, .8); }
.footer__inner { padding: 36px 0 40px; display: grid; gap: 6px; position: relative; }
.footer__brand { color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.footer p { margin: 0; font-size: 14.5px; }
.footer__note { font-size: 13px !important; color: rgba(200, 220, 240, .55); }
.footer__up { position: absolute; right: 0; top: 36px; font-size: 14px; color: #9fd2ff; text-decoration: none; }

:focus-visible { outline: 3px solid rgba(22, 115, 217, .5); outline-offset: 2px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .podium { grid-template-columns: 1fr; }
  .pod--1 { grid-row: auto; }
  .pod .media, .pod--1 .media { flex-basis: 38%; min-height: 300px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .hero { padding: 44px 0 104px; }
  .hero h1 { margin-top: 18px; }
  .stats { gap: 10px; margin: 28px 0 26px; }
  .stat { padding: 14px; border-radius: 14px; }
  .stat span { font-size: 12.5px; }
  .hero__drift { height: 56px; }
  .podium { gap: 14px; }
  .pod { flex-direction: column; border-radius: 18px; }
  .pod .media, .pod--1 .media { flex: none; aspect-ratio: 4 / 3; min-height: 0; }
  .pod__body { padding: 16px; }
  .pod__name, .pod--1 .pod__name { font-size: 17px; }
  .pod--1 .price b { font-size: 26px; }
  .pod--1 .pod__body { padding: 16px; gap: 10px; }
  .desc--lead { -webkit-line-clamp: 3; display: -webkit-box; font-size: 13px; }
  .chip .l-full { display: none; }
  .chip .l-short { display: inline; }
  .toolbar { position: static; margin: 0 0 14px; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: 8px 14px; font-size: 14px; }
  .toolbar__row { gap: 8px; }
  .search, .sort { flex: 1 1 100%; height: 44px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 14px; }
  .card__body { padding: 12px 12px 14px; gap: 8px; }
  .name { font-size: 14px; }
  .rank { top: 8px; left: 8px; height: 26px; min-width: 32px; font-size: 13px; border-radius: 8px; padding: 0 8px; }
  .disc { top: 8px; right: 8px; font-size: 12px; padding: 4px 7px; }
  .type { display: none; }
  .specs { padding: 7px 8px; gap: 3px; font-size: 11.5px; border-radius: 9px; }
  .specs li { gap: 6px; }
  .specs li:nth-child(n+4) { display: none; }
  .specs li .k { display: none; }
  .specs li .ks { display: block; }
  .specs li b { max-width: 72%; }
  .pod .specs li .k { display: block; }
  .pod .specs li .ks { display: none; }
  .pod .specs { padding: 10px 12px; gap: 6px; font-size: 13px; }
  .pod .specs li:nth-child(4) { display: flex; }
  .tags .tag:nth-child(n+3) { display: none; }
  .desc { display: none; }
  .price b { font-size: 19px; }
  .price s { font-size: 12.5px; }
  .seller { display: none; }
  .rating { font-size: 12.5px; gap: 6px; flex-wrap: wrap; }
  .stars { font-size: 13px; letter-spacing: 1px; }
  .btn { height: 40px; font-size: 13.5px; padding: 0 10px; }
  .footer__up { position: static; margin-top: 10px; }
}
@media (max-width: 360px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { animation: none; }
  * { transition: none !important; }
}
