/* ════════════════════════════════════════════════════════════════
   QCOLD — Liquid Glass UI
   ════════════════════════════════════════════════════════════════ */
:root {
  --bg: #050505;
  --bg2: #0e0e0e;
  --text: #f4f4f5;
  --muted: #9b9b9f;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.14);
  --accent: #ffffff;
  --accent2: #c9c9cf;
  --on-accent: #0a0a0a;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; }

/* ─── Фон: аврора ─────────────────────────────────────────────── */
.aurora {
  position: fixed; inset: 0; z-index: -2;
  background: radial-gradient(120% 120% at 50% 0%, #161616 0%, var(--bg) 55%);
}
.blob {
  position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.22; z-index: -1;
  animation: float 18s ease-in-out infinite;
}
.b1 { width: 480px; height: 480px; background: #ffffff; top: -120px; left: -80px; }
.b2 { width: 420px; height: 420px; background: #8a8a8a; top: 30%; right: -120px; animation-delay: -6s; }
.b3 { width: 380px; height: 380px; background: #5a5a5a; bottom: -120px; left: 30%; animation-delay: -11s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}

/* ─── Стеклянная панель ────────────────────────────────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ─── Dynamic Island ───────────────────────────────────────────── */
.island {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 100; width: min(720px, calc(100% - 24px));
}
.island-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 18px;
  background: rgba(12, 14, 26, 0.55);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.5s var(--spring);
}
.island.scrolled .island-inner {
  width: 88%; margin: 0 auto;
  background: rgba(12, 14, 26, 0.78);
  padding: 8px 10px 8px 16px;
  transform: scale(0.97);
}
.island:hover .island-inner { box-shadow: 0 16px 50px rgba(106, 92, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14); }

.island-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.03em; }
.logo-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #9a9a9a);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.6);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.7; } }

.island-links { display: flex; gap: 4px; }
.nav-link {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all 0.3s var(--spring);
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--glass-strong); }

.island-cart {
  position: relative; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--glass-strong); color: var(--text); cursor: pointer;
  transition: all 0.3s var(--spring);
}
.island-cart:hover { transform: scale(1.08); background: #fff; color: #0a0a0a; border-color: transparent; }
.cart-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #0a0a0a;
  background: #fff; border-radius: 999px; box-shadow: 0 0 0 2px var(--bg);
  transform: scale(0); transition: transform 0.3s var(--spring);
}
.cart-badge.show { transform: scale(1); }

/* ─── Кнопки ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all 0.3s var(--spring); font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #ffffff, #d6d6d6); color: var(--on-accent);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(255, 255, 255, 0.22); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost { background: var(--glass); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--glass-strong); transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--glass); color: var(--text); cursor: pointer; font-size: 16px;
  display: grid; place-items: center; transition: all 0.25s var(--spring);
}
.icon-btn:hover { background: var(--glass-strong); transform: rotate(90deg); }

/* ─── Layout ───────────────────────────────────────────────────── */
main { max-width: 1180px; margin: 0 auto; padding: 0 20px 80px; }
.section { padding-top: 90px; }

/* ─── HERO ─────────────────────────────────────────────────────── */
.hero { padding-top: 130px; }
.hero-glass { border-radius: var(--radius-lg); padding: 56px 48px; text-align: center; }
.pill {
  display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--glass-strong); border: 1px solid var(--border); color: var(--muted); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 7vw, 72px); font-weight: 800; }
.grad-text {
  background: linear-gradient(120deg, #ffffff, #8f8f8f, #ffffff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto; animation: shine 5s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.hero-sub { max-width: 560px; margin: 22px auto 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 28px; color: #fff; }
.hero-stats span { color: var(--muted); font-size: 13px; }

/* ─── Заголовки секций ─────────────────────────────────────────── */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--glass); border: 1px solid var(--border); color: var(--muted); transition: all 0.3s var(--spring);
}
.chip:hover { color: var(--text); }
.chip.active { background: #fff; color: #0a0a0a; border-color: transparent; }

/* ─── Сетка товаров ────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card {
  border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative;
  background: var(--glass); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--spring), border-color 0.4s;
  opacity: 0; transform: translateY(24px);
}
.card.in { opacity: 1; transform: translateY(0); }
.card:hover { transform: translateY(-8px); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.35); border-color: transparent; }
.card-media { height: 180px; position: relative; display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .ph-glyph { font-size: 60px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5)); opacity: 0.9; }
.card:hover .card-media img { transform: scale(1.06); transition: transform 0.6s var(--spring); }
.card-tag {
  position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(5, 6, 12, 0.6); backdrop-filter: blur(10px); border: 1px solid var(--border);
}
.out-badge {
  position: absolute; top: 12px; right: 12px; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.9); color: #0a0a0a;
}
.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-size: 19px; margin-bottom: 8px; }
.card-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.spec { font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 8px; background: var(--glass-strong); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 22px; font-weight: 800; }
.price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.add-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; font-size: 22px; font-weight: 400;
  background: #fff; color: #0a0a0a; display: grid; place-items: center;
  transition: all 0.3s var(--spring); box-shadow: 0 8px 20px rgba(255, 255, 255, 0.18);
}
.add-btn:hover { transform: scale(1.12) rotate(90deg); }
.add-btn:disabled { background: var(--glass-strong); box-shadow: none; cursor: not-allowed; }

/* ─── О нас ─────────────────────────────────────────────────────── */
.about-glass, .contact-glass { border-radius: var(--radius-lg); padding: 44px; }
.about-glass h2 { margin-bottom: 28px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.feature .f-ic { font-size: 34px; display: block; margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ─── Контакты ─────────────────────────────────────────────────── */
.contact-glass { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-glass p { color: var(--muted); margin: 12px 0 20px; }
.contacts-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.contacts-list li { font-size: 16px; }
.contacts-list a:hover { color: var(--accent2); }
.lead-form { display: flex; flex-direction: column; gap: 12px; }
.lead-form h3 { margin-bottom: 4px; }

input, textarea {
  width: 100%; padding: 13px 16px; border-radius: 14px; font-family: inherit; font-size: 15px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: var(--text); transition: border-color 0.25s;
}
input::placeholder, textarea::placeholder { color: #6b769a; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15); }
textarea { resize: vertical; min-height: 84px; }

/* ─── Footer ───────────────────────────────────────────────────── */
.footer { margin-top: 90px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; flex-wrap: wrap; gap: 12px; }
.admin-link { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); transition: all 0.3s; }
.admin-link:hover { color: var(--text); background: var(--glass-strong); }

/* ─── Модалка товара ───────────────────────────────────────────── */
.modal-overlay, .drawer-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(3, 4, 10, 0.6); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease;
}
.modal-overlay.show, .drawer-overlay.show { opacity: 1; pointer-events: auto; }

.product-modal {
  position: fixed; z-index: 201; top: 50%; left: 50%; width: min(880px, calc(100% - 32px)); max-height: 88vh; overflow: auto;
  transform: translate(-50%, -46%) scale(0.96); opacity: 0; pointer-events: none;
  border-radius: var(--radius-lg); display: grid; grid-template-columns: 1fr 1fr;
  transition: transform 0.45s var(--spring), opacity 0.35s ease;
}
.product-modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.pm-media { min-height: 320px; display: grid; place-items: center; border-radius: var(--radius-lg) 0 0 var(--radius-lg); overflow: hidden; }
.pm-media img { width: 100%; height: 100%; object-fit: cover; }
.pm-media .ph-glyph { font-size: 90px; }
.pm-body { padding: 38px 36px; display: flex; flex-direction: column; }
.pm-cat { font-size: 12px; font-weight: 700; color: var(--accent2); text-transform: uppercase; letter-spacing: 0.06em; }
.pm-body h2 { font-size: 30px; margin: 8px 0 14px; }
.pm-body > p { color: var(--muted); margin-bottom: 20px; }
.pm-specs { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: auto; }
.pm-specs li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.pm-specs li::before { content: '◆'; color: var(--accent); font-size: 11px; }
.pm-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }
.pm-price { font-size: 28px; font-weight: 800; }

/* ─── Корзина (drawer) ─────────────────────────────────────────── */
.drawer {
  position: fixed; z-index: 201; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  display: flex; flex-direction: column; border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  transform: translateX(105%); transition: transform 0.45s var(--spring);
}
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 16px; border-bottom: 1px solid var(--border); }
.drawer-items { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 40px; }
.cart-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--border); }
.cart-thumb { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-size: 24px; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-info b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-info span { color: var(--muted); font-size: 13px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); background: var(--glass); color: var(--text); cursor: pointer; font-size: 15px; }
.qty button:hover { background: var(--glass-strong); }
.cart-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; transition: color 0.2s; }
.cart-del:hover { color: #fff; }
.drawer-foot { padding: 18px 24px 24px; border-top: 1px solid var(--border); }
.drawer-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 16px; }
.drawer-total b { font-size: 22px; }
.order-form { display: flex; flex-direction: column; gap: 10px; }

/* ─── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 220%); z-index: 300;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: rgba(16, 16, 16, 0.92); backdrop-filter: blur(20px); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform 0.5s var(--spring), opacity 0.4s ease; max-width: 90%;
  opacity: 0; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast.error { border-color: rgba(255, 255, 255, 0.55); }
.toast.success { border-color: rgba(255, 255, 255, 0.4); }

/* ─── Reveal-анимация ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s var(--spring); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ─── Адаптив ──────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .island-links { display: none; }
  .island { width: calc(100% - 20px); top: 12px; }
  .hero { padding-top: 110px; }
  .hero-glass { padding: 40px 24px; }
  .about-glass, .contact-glass { padding: 30px 22px; }
  .contact-glass { grid-template-columns: 1fr; }
  .product-modal { grid-template-columns: 1fr; }
  .pm-media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; min-height: 220px; }
  .hero-stats { gap: 26px; }
}
