* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0b1020;
  --card: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.12);
  --accent: #7CFFB2;
  --accent2: #4fd1ff;
  --text: #eaf2ff;
  --muted: rgba(234,242,255,.6);
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #1b2a4a 0%, var(--bg) 55%, #070a15 100%);
  color: var(--text);
  min-height: 100vh;
}

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7,10,21,.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.logo { font-size: 20px; font-weight: 700; white-space: nowrap; }
.logo b { color: var(--accent); }
.search { flex: 1; }
.search input {
  width: 100%; padding: 11px 18px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.07); color: var(--text);
  font-size: 15px; outline: none; transition: .2s;
}
.search input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(79,209,255,.18); }
.cart-btn {
  padding: 10px 18px; border-radius: 999px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700; white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #06221a; transition: transform .15s;
}
.cart-btn:hover { transform: translateY(-2px); }
.badge {
  background: #06221a; color: var(--accent);
  border-radius: 999px; padding: 1px 8px; font-size: 13px; margin-left: 4px;
}

/* ---------- герой ---------- */
.hero {
  margin: 26px 0; padding: 34px;
  border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(124,255,178,.12), rgba(79,209,255,.10));
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  overflow: hidden; position: relative;
}
.hero h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.1; }
.hero h1 span { color: var(--accent); text-shadow: 0 0 24px rgba(124,255,178,.5); }
.hero p { color: var(--muted); margin: 12px 0 18px; }
.hero-cta {
  padding: 12px 26px; border-radius: 999px; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: #06221a;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  transition: transform .15s;
}
.hero-cta:hover { transform: translateY(-2px) scale(1.03); }
.hero-art { font-size: 90px; margin-left: auto; position: relative; }
.float { position: absolute; font-size: 34px; animation: float 3s ease-in-out infinite; }
.f1 { top: -18px; left: -30px; }
.f2 { bottom: -10px; left: 10px; animation-delay: .6s; }
.f3 { top: 10px; right: -26px; animation-delay: 1.2s; }
@keyframes float { 50% { transform: translateY(-12px) rotate(8deg); } }

/* ---------- панель фильтров ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.cats { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip {
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  transition: .15s;
}
.chip:hover { border-color: var(--accent2); }
.chip.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06221a; font-weight: 700; border-color: transparent; }
.sorts select {
  padding: 9px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #131a30; color: var(--text); font-size: 14px;
}
.found { color: var(--muted); font-size: 13px; margin: 10px 2px; }
.empty { text-align: center; padding: 50px 0; font-size: 18px; color: var(--muted); }

/* ---------- каталог ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  padding-bottom: 40px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 14px; display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  animation: pop .3s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,255,178,.5);
  box-shadow: 0 16px 36px rgba(0,0,0,.45);
}
.thumb {
  height: 130px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 62px; margin-bottom: 12px; position: relative;
}
.old {
  position: absolute; top: 8px; right: 8px;
  background: #ff4d5e; color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.p-cat { font-size: 12px; color: var(--accent2); text-transform: uppercase; letter-spacing: .5px; }
.p-title { font-size: 16px; font-weight: 700; margin: 5px 0 6px; min-height: 40px; }
.p-rate { font-size: 13px; color: #ffd166; margin-bottom: 8px; }
.p-seller { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.p-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-size: 19px; font-weight: 800; }
.price s { font-size: 12px; color: var(--muted); font-weight: 400; display: block; }
.add {
  padding: 9px 14px; border: none; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 14px; color: #06221a;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  transition: transform .12s;
}
.add:hover { transform: scale(1.06); }
.add:active { transform: scale(.95); }
.add.in { background: #ffd166; }

/* ---------- корзина ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 92%);
  background: #101733; border-left: 1px solid var(--line); z-index: 31;
  transform: translateX(105%); transition: transform .28s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.icon-btn { background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.ci { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); animation: pop .2s ease both; }
.ci-emoji { font-size: 34px; width: 52px; text-align: center; background: rgba(255,255,255,.06); border-radius: 12px; padding: 6px; }
.ci-info { flex: 1; }
.ci-info b { font-size: 14px; display: block; }
.ci-info span { font-size: 13px; color: var(--accent); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.08); color: var(--text); cursor: pointer; font-weight: 700;
}
.qty button:hover { background: rgba(124,255,178,.25); }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.drawer-foot { padding: 16px 18px; border-top: 1px solid var(--line); }
.total { font-size: 17px; margin-bottom: 12px; }
.total b { color: var(--accent); font-size: 21px; }
.checkout {
  width: 100%; padding: 14px; border: none; border-radius: 14px; cursor: pointer;
  font-size: 16px; font-weight: 800; color: #06221a;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  transition: transform .15s;
}
.checkout:hover { transform: translateY(-2px); }

/* ---------- тост ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #06221a; font-weight: 700; padding: 12px 24px; border-radius: 999px;
  z-index: 40; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: up .25s ease;
}
@keyframes up { from { opacity: 0; transform: translate(-50%, 16px); } }

.footer { border-top: 1px solid var(--line); padding: 20px 0; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .hero-art { display: none; }
}
