/* Цвета и шрифты взяты из сайта gurgteam.asia (src/index.css) */
:root {
  --background: hsl(0 0% 5%);
  --foreground: hsl(0 0% 98%);
  --card: hsl(0 0% 8%);
  --primary: hsl(0 85% 50%);
  --secondary: hsl(45 90% 55%);
  --muted: hsl(0 0% 15%);
  --muted-foreground: hsl(0 0% 65%);
  --border: hsl(0 0% 20%);
  --radius: 0.25rem;
  --gradient-red: linear-gradient(135deg, hsl(0 85% 50%) 0%, hsl(0 70% 35%) 100%);
  --gradient-gold: linear-gradient(135deg, hsl(45 90% 55%) 0%, hsl(35 80% 45%) 100%);
  --shadow-glow-red: 0 0 30px hsl(0 85% 50% / 0.4);
  --shadow-card: 0 10px 40px hsl(0 0% 0% / 0.5);
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-display: 'Black Ops One', cursive;
  --whatsapp: #25d366;
}

* { box-sizing: border-box; margin: 0; padding: 0; border-color: var(--border); }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; max-width: 100%; }
body { background: var(--background); color: var(--foreground); font-family: var(--font-body); -webkit-font-smoothing: antialiased; line-height: 1.5; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 24px; }

.gradient-text-red { background: var(--gradient-red); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gradient-text-gold { background: var(--gradient-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Header */
.header { position: sticky; top: 0; z-index: 20; background: hsl(0 0% 5% / 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.05em; white-space: nowrap; }
.nav { display: flex; gap: 24px; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; color: var(--muted-foreground); }
.nav a:hover { color: var(--primary); }
.btn-social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--muted); border: 1px solid var(--border); transition: all .3s; }
.btn-social:hover { background: var(--primary); box-shadow: var(--shadow-glow-red); }
.btn-social svg { width: 22px; height: 22px; fill: currentColor; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 120px 0 96px; text-align: center; isolation: isolate; }
/* Фото команды в форме GURG, как фон на gurgteam.asia */
.hero::before { content: ''; position: absolute; inset: -4%; z-index: -2; background: url(images/hero-bg.webp) center 30% / cover no-repeat; animation: heroZoom 20s linear infinite alternate; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, hsl(0 0% 5% / .35), transparent 70%),
    linear-gradient(to bottom, hsl(0 0% 5% / .82) 0%, hsl(0 0% 5% / .62) 45%, hsl(0 0% 5%) 100%); }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.06); } }
.hero p { color: hsl(0 0% 85%); text-shadow: 0 2px 12px #000; }
.hero h1 { text-shadow: 0 4px 30px hsl(0 0% 0% / .6); }
.hero .steps span { background: hsl(0 0% 5% / .7); border: 1px solid var(--border); padding: 8px 14px; backdrop-filter: blur(4px); }

/* Фон всей страницы: красное свечение и тонкие диагональные полосы */
body { background-color: var(--background);
  background-image:
    radial-gradient(ellipse 60% 40% at 0% 40%, hsl(0 85% 50% / .10), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 75%, hsl(0 85% 50% / .08), transparent 70%),
    repeating-linear-gradient(135deg, hsl(0 0% 100% / .018) 0 2px, transparent 2px 14px);
  background-attachment: fixed; }
main.container { position: relative; }
.filters { position: relative; }
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 9vw, 96px); line-height: 1; margin-bottom: 16px; }
.hero p { color: var(--muted-foreground); font-size: clamp(16px, 2.2vw, 20px); max-width: 640px; margin: 0 auto; }
.hero .steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; }
.hero .steps span b { color: var(--primary); margin-right: 6px; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0 40px; }
.chip { padding: 10px 20px; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; background: transparent; color: var(--muted-foreground); border: 2px solid hsl(0 0% 65% / 0.3); cursor: pointer; transition: all .3s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.stock-toggle { display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 14px; cursor: pointer; padding: 10px 4px; }
.stock-toggle input { accent-color: hsl(0 85% 50%); width: 18px; height: 18px; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; padding-bottom: 96px; }
.card { background: var(--card); border: 1px solid var(--border); display: flex; flex-direction: column; transition: all .4s; overflow: hidden; }
.card:hover { border-color: hsl(0 85% 50% / 0.6); box-shadow: var(--shadow-card); transform: translateY(-4px); }
.card-img { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.06); }
.badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; font-family: var(--font-heading); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.badge.in { background: var(--secondary); color: hsl(0 0% 5%); }
.badge.out { background: hsl(0 0% 10% / 0.85); color: var(--muted-foreground); border: 1px solid var(--border); }
.card.is-out .card-img img { filter: grayscale(1); opacity: .55; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { color: var(--primary); font-family: var(--font-heading); font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em; }
.card-title { font-size: 20px; line-height: 1.2; }
.card-desc { color: var(--muted-foreground); font-size: 14px; flex: 1; }
.card-price { font-family: var(--font-heading); font-size: 26px; font-weight: 700; margin-top: 4px; }

.btn-order { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 16px; margin-top: 8px; font-family: var(--font-heading); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 15px; color: #fff; background: var(--gradient-red); border: 0; cursor: pointer; transition: all .3s; }
.btn-order:hover { box-shadow: var(--shadow-glow-red); }
.btn-order svg { width: 20px; height: 20px; fill: currentColor; }
.btn-order.ghost { background: transparent; border: 2px solid var(--border); color: var(--muted-foreground); }
.btn-order.ghost:hover { border-color: var(--primary); color: var(--foreground); box-shadow: none; }

.empty { text-align: center; color: var(--muted-foreground); padding: 64px 0 120px; }

/* Footer */
.footer { padding: 40px 0; background: var(--card); border-top: 1px solid var(--border); }
.footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer .brand { font-family: var(--font-heading); font-size: 18px; text-transform: uppercase; letter-spacing: 0.1em; }
.footer .links { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted-foreground); font-size: 14px; }
.footer .links a:hover { color: var(--primary); }
.footer small { color: var(--muted-foreground); }

/* Floating WhatsApp (как MobileButton на gurgteam.asia) */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: var(--whatsapp); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px hsl(0 0% 0% / .5); }
.fab svg { width: 30px; height: 30px; fill: #fff; }

.card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
body.locked { overflow: hidden; }

/* Подробная карточка товара */
.modal { position: fixed; inset: 0; z-index: 50; background: hsl(0 0% 0% / .75); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: 100%; max-width: 860px; max-height: 90vh; overflow-y: auto; background: var(--card); border: 1px solid var(--border); }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; }
.modal-img { position: relative; background: #fff; aspect-ratio: 1; }
.modal-img img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.modal-info { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.modal-title { font-size: 28px; line-height: 1.15; }
.modal-desc { color: var(--foreground); opacity: .85; }
.modal-note { color: var(--muted-foreground); font-size: 14px; margin-top: auto; }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: hsl(0 0% 0% / .6); color: #fff; font-size: 18px; cursor: pointer; }

@media (max-width: 640px) {
  .container { padding: 0 12px; }
  /* Ссылки на сайты команды второй строкой под логотипом */
  .header .container { flex-wrap: wrap; height: auto; min-height: 56px; row-gap: 0; padding-top: calc(8px + env(safe-area-inset-top)); }
  .header .logo, .header .btn-social { margin: 0; }
  .nav { order: 3; width: calc(100% + 24px); margin: 8px -12px 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); gap: 0; font-size: 13px; }
  .nav a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; color: var(--foreground); }
  .nav a + a { border-left: 1px solid var(--border); }
  .nav a::after { content: '↗'; color: var(--primary); font-size: 12px; }
  .logo { font-size: 22px; }
  .hero { padding: 56px 0 40px; }
  .hero::before { background-position: center 25%; }
  .hero .steps span { padding: 6px 12px; }
  body { background-attachment: scroll; }
  .hero h1 { font-size: 48px; margin-bottom: 10px; }
  .hero p { font-size: 15px; }
  .hero .steps { flex-direction: column; align-items: center; gap: 6px; margin-top: 18px; font-size: 13px; }

  /* Категории в одну строку с прокруткой пальцем */
  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 8px -12px 16px; padding: 4px 12px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: 10px 16px; font-size: 13px; min-height: 44px; scroll-snap-align: start; }
  .stock-toggle { flex: 0 0 auto; white-space: nowrap; padding: 0 12px; min-height: 44px; border: 2px solid hsl(0 0% 65% / .3); }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-bottom: 110px; }
  .card:hover { transform: none; }
  .card-img img { padding: 8px; }
  .badge { top: 6px; left: 6px; padding: 3px 7px; font-size: 10px; }
  .card-body { padding: 10px; gap: 4px; }
  .card-cat { font-size: 10px; }
  .card-title { font-size: 14px; letter-spacing: .01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .card-desc { display: none; }
  .card-price { font-size: 19px; }
  .btn-order { min-height: 44px; padding: 10px 6px; font-size: 13px; gap: 6px; }
  .btn-order svg { width: 18px; height: 18px; }
  .btn-order .long { display: none; }
  .btn-order.ghost { font-size: 11px; letter-spacing: .04em; }

  /* На телефоне карточка товара выезжает снизу */
  .modal { align-items: flex-end; padding: 0; }
  .modal-box { max-height: 92vh; border-radius: 14px 14px 0 0; animation: slide .25s ease-out; }
  @keyframes slide { from { transform: translateY(40px); } to { transform: none; } }
  .modal-body { grid-template-columns: 1fr; }
  .modal-img { aspect-ratio: 4 / 3; }
  .modal-info { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal-title { font-size: 22px; }
  .modal-info .btn-order { position: sticky; bottom: 0; min-height: 52px; font-size: 15px; }
  .modal-info .btn-order .long { display: inline; }

  .footer { padding: 28px 0 calc(90px + env(safe-area-inset-bottom)); }
  .footer .container { flex-direction: column; align-items: flex-start; }
  .fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
}
