/* ============================================
   ШЛЯПНЫЙ РАЙ — Каталог шляп
   Glassmorphism: стекло, мягкие тени, современная палитра
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Палитра — стеклянный интерфейс */
  --bg: #EEF2F7;
  --bg-grad: radial-gradient(1200px 800px at 10% -10%, #DDE7F5 0%, transparent 60%),
             radial-gradient(1000px 700px at 110% 10%, #E4DCEF 0%, transparent 55%),
             linear-gradient(180deg, #EEF2F7 0%, #F4F7FB 100%);
  --surface: rgba(255,255,255,0.72);
  --surface-strong: rgba(255,255,255,0.85);
  --surface-solid: #FFFFFF;
  --glass-border: rgba(255,255,255,0.65);
  --glass-blur: 18px;

  --ink: #0F1B2D;
  --ink-soft: #46566B;
  --muted: #8493A8;
  --line: rgba(15,27,45,0.08);
  --line-soft: rgba(15,27,45,0.05);

  --primary: #2E5BFF;
  --primary-dark: #1B45E6;
  --primary-soft: #E9F0FF;
  --accent: #00B8A9;
  --accent-dark: #009B8E;

  --success: #20A86F;
  --success-bg: rgba(32,168,111,0.12);
  --error: #E5484D;
  --error-bg: rgba(229,72,77,0.12);
  --warning: #F5A623;

  --shadow-xs: 0 1px 3px rgba(15,27,45,0.08);
  --shadow-sm: 0 3px 12px rgba(15,27,45,0.08), 0 1px 3px rgba(15,27,45,0.06);
  --shadow-md: 0 10px 30px rgba(15,27,45,0.10), 0 3px 8px rgba(15,27,45,0.06);
  --shadow-lg: 0 28px 64px rgba(15,27,45,0.16), 0 10px 24px rgba(15,27,45,0.08);
  --shadow-glow: 0 10px 36px rgba(46,91,255,0.22);
  --shadow-card: 0 4px 16px rgba(15,27,45,0.07), 0 1px 4px rgba(15,27,45,0.05);
  --shadow-card-hover: 0 20px 48px rgba(15,27,45,0.14), 0 6px 16px rgba(15,27,45,0.08);

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-pill: 999px;

  --container: 1240px;
  --header-h: 68px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg-grad);
  background-attachment: fixed;
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 920px; }

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-tight { padding: 28px 0 24px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--primary);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--primary); border-radius: 2px; }

.section-title { font-size: clamp(26px, 4vw, 38px); margin-top: 12px; margin-bottom: 10px; }
.section-sub { color: var(--ink-soft); max-width: 560px; font-size: 16px; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 36px; flex-wrap: wrap;
}
.section-head .link-more {
  color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  transition: gap .25s var(--ease);
}
.section-head .link-more:hover { gap: 12px; }

/* Glass surface helper */
.glass {
  background: var(--surface);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease),
              box-shadow .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,184,169,0.22); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: rgba(255,255,255,0.9); color: var(--ink); border: 1px solid var(--glass-border); }
.btn-light:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(238,242,247,0.72);
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: var(--header-h);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 20px; color: var(--ink); flex-shrink: 0;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-glow);
}

/* Desktop nav: shown ≥ 960px */
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; color: var(--ink-soft);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--primary); background: rgba(46,91,255,0.08); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.search-wrap { position: relative; display: flex; align-items: center; }
.search-input {
  width: 220px; height: 40px; padding: 0 14px 0 38px;
  border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.7);
  transition: width .3s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.search-input:focus { outline: none; width: 280px; border-color: var(--primary); background: #fff; box-shadow: var(--shadow-sm); }
.search-input::placeholder { color: var(--muted); }
.search-icon { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }

.tool-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft);
  position: relative; transition: background .2s var(--ease), color .2s var(--ease);
}
.tool-btn:hover { background: rgba(46,91,255,0.08); color: var(--primary); }
.tool-badge {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
  transform: scale(0); transition: transform .25s var(--ease);
  box-shadow: 0 0 0 2px rgba(238,242,247,0.9);
}
.tool-badge.show { transform: scale(1); }

/* Mobile menu toggle: hidden on desktop, shown < 960px */
.menu-toggle { display: none; }

/* ===== Mobile nav drawer ===== */
.mobile-nav {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: min(320px, 86vw); z-index: 200;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  padding: calc(var(--header-h) + 16px) 24px 24px;
  transform: translateX(-100%);
  transition: transform .35s var(--ease);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  padding: 14px 16px; font-size: 17px; font-weight: 500; color: var(--ink);
  border-radius: var(--radius-sm); transition: background .2s var(--ease);
}
.mobile-nav a:hover, .mobile-nav a.active { background: rgba(46,91,255,0.08); color: var(--primary); }
.mobile-nav-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-soft);
  background: rgba(15,27,45,0.05);
}
.mobile-nav-close:hover { background: rgba(15,27,45,0.1); color: var(--ink); }

.nav-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(15,27,45,0.4);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.nav-backdrop.show { opacity: 1; pointer-events: auto; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: clamp(520px, 80vh, 720px);
  display: flex; align-items: center; overflow: hidden;
}
.hero-bg {
  position: absolute; top: -12%; left: 0; width: 100%; height: 128%;
  background-size: cover; background-position: center;
  filter: blur(2px) brightness(0.78) saturate(1.04);
  transform: translateY(var(--hero-parallax, 0)) scale(1.14);
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(15,27,45,0.82) 0%, rgba(15,27,45,0.56) 50%, rgba(15,27,45,0.3) 100%),
    linear-gradient(180deg, rgba(15,27,45,0.12) 0%, rgba(15,27,45,0) 30%, rgba(15,27,45,0.35) 100%);
}
.hero-content { position: relative; max-width: 640px; color: #fff; padding: 48px 0; z-index: 2; }
.hero-eyebrow {
  color: #fff; letter-spacing: .12em; text-transform: uppercase;
  font-size: 12px; font-weight: 600; margin-bottom: 18px; display: inline-block;
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
}
.hero h1 {
  color: #fff; font-size: clamp(36px, 6vw, 60px); line-height: 1.05;
  margin-bottom: 20px; font-weight: 700; letter-spacing: -0.03em;
}
.hero p { font-size: 18px; color: rgba(255,255,255,0.92); max-width: 500px; margin-bottom: 30px; font-weight: 300; }
.hero .btn-primary { background: var(--primary); }
.hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Categories ===== */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3; display: block; box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat-card:hover img { transform: scale(1.08); }
.cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,27,45,0) 40%, rgba(15,27,45,0.78) 100%);
  display: flex; align-items: flex-end; padding: 24px;
}
.cat-label { color: #fff; font-size: 22px; font-weight: 600; }
.cat-count {
  position: absolute; top: 16px; left: 16px;
  background: rgba(255,255,255,0.9); color: var(--ink);
  padding: 5px 12px; border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* ===== Product cards ===== */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.products-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface-strong);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); border: 1px solid var(--glass-border);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  display: flex; flex-direction: column; position: relative;
}
.card:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: var(--shadow-card-hover); border-color: rgba(255,255,255,0.9);
}
.card-media { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--line-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }

.card-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.badge {
  padding: 5px 11px; border-radius: var(--radius-xs); font-size: 11px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.badge-hit { background: var(--primary); }
.badge-new { background: var(--accent); }
.badge-sale { background: var(--error); }

.card-fav {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.92); display: grid; place-items: center;
  color: var(--ink-soft); z-index: 2;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card-fav:hover { background: #fff; color: var(--error); transform: scale(1.08); }
.card-fav.active { background: #fff; color: var(--error); }
.card-fav.active svg { fill: currentColor; }

.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-brand { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.card-title a:hover { color: var(--primary); }
.card-rating { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.stars { color: #F5A623; display: inline-flex; gap: 1px; }
.card-price { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.price-current { font-size: 19px; font-weight: 700; color: var(--ink); }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card-actions .btn { flex: 1; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--ink-soft); flex-shrink: 0;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  background: rgba(255,255,255,0.6);
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-soft); }
.icon-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Breadcrumbs ===== */
.crumbs {
  display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted);
  padding: 20px 0 0; flex-wrap: wrap;
}
.crumbs a:hover { color: var(--primary); }
.crumbs span.sep { color: var(--line); }
.crumbs .current { color: var(--ink); font-weight: 600; }

/* ===== Catalog layout ===== */
.catalog-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 32px;
  align-items: start; padding: 24px 0 80px;
}

/* Filters — desktop sticky panel */
.filters {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--surface-strong);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}
.filters-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.filters-head h3 { font-size: 17px; }
.filter-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.filter-group:last-of-type { border-bottom: none; }
.filter-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink); margin-bottom: 10px;
}

.check-list { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); cursor: pointer; user-select: none; }
.check input {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px;
  border: 1.5px solid var(--line); border-radius: 5px; display: grid; place-items: center;
  transition: border-color .2s var(--ease), background .2s var(--ease); flex-shrink: 0;
}
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.check:hover { color: var(--ink); }

.range-wrap { padding-top: 4px; }
.range-values { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; font-weight: 600; }
.range-track { position: relative; height: 4px; background: var(--line); border-radius: 2px; margin: 12px 0; }
.range-fill { position: absolute; height: 100%; background: var(--primary); border-radius: 2px; }
.range-input {
  position: absolute; top: -8px; left: 0; right: 0; width: 100%; height: 20px;
  -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 2px solid var(--primary); box-shadow: var(--shadow-sm);
  pointer-events: auto; cursor: pointer; transition: transform .15s var(--ease);
}
.range-input::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range-input::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 2px solid var(--primary); pointer-events: auto; cursor: pointer;
}
.range-input.min { z-index: 2; }
.range-input.max { z-index: 3; }

.color-list { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line); cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease); position: relative;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { box-shadow: 0 0 0 2px var(--primary); transform: scale(1.08); }
.color-swatch.active::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,0.8); }

.catalog-main { min-width: 0; }
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.catalog-count { font-size: 15px; color: var(--ink-soft); }
.catalog-count strong { color: var(--ink); }
.sort-wrap { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.sort-select {
  height: 40px; padding: 0 36px 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.8);
  appearance: none; -webkit-appearance: none; font-size: 14px; color: var(--ink); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238493A8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.sort-select:focus { outline: none; border-color: var(--primary); }

.filters-toggle { display: none; }

.empty-state { text-align: center; padding: 72px 24px; color: var(--muted); }
.empty-state svg { color: var(--line); margin: 0 auto 16px; }
.empty-state h3 { font-size: 22px; color: var(--ink); margin-bottom: 8px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 44px; }
.page-btn {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--radius-xs);
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  display: grid; place-items: center; border: 1px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.page-btn:hover { background: rgba(46,91,255,0.08); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; }
.page-btn.disabled { color: var(--line); pointer-events: none; }

/* ===== Product page ===== */
.product-layout {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px;
  padding: 24px 0 40px;
}
.gallery { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
.gallery-main {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5;
  background: var(--line-soft); box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s var(--ease); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.thumb {
  aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent; background: var(--line-soft);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { transform: translateY(-2px); }
.thumb.active { border-color: var(--primary); }

.product-info { padding-top: 4px; }
.product-brand {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--primary); margin-bottom: 10px;
}
.product-title { font-size: clamp(26px, 4vw, 38px); margin-bottom: 16px; font-weight: 700; }
.product-meta { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.product-rating { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.product-reviews-link { color: var(--primary); font-size: 14px; font-weight: 600; }
.product-reviews-link:hover { text-decoration: underline; }

.product-price-block {
  display: flex; align-items: baseline; gap: 14px;
  padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.product-price { font-size: 30px; font-weight: 700; color: var(--ink); }
.product-price-old { font-size: 18px; color: var(--muted); text-decoration: line-through; }
.product-discount { background: var(--error-bg); color: var(--error); padding: 4px 10px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; }

.product-actions { display: flex; gap: 12px; margin-bottom: 28px; }
.product-actions .btn-lg { flex: 1; }
.product-actions .icon-btn { width: 56px; height: 56px; }

.product-desc { margin-bottom: 28px; }
.product-desc h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; color: var(--ink-soft); }
.product-desc p { color: var(--ink-soft); line-height: 1.7; }

.specs { border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; background: var(--surface-strong); }
.specs h3 {
  padding: 16px 20px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); background: rgba(46,91,255,0.05); border-bottom: 1px solid var(--line);
}
.spec-row { display: grid; grid-template-columns: 200px 1fr; padding: 14px 20px; font-size: 15px; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: none; }
.spec-key { color: var(--muted); }
.spec-val { color: var(--ink); font-weight: 600; }

/* ===== Info / about / delivery ===== */
.info-hero { padding: 64px 0; text-align: center; }
.info-hero h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 14px; font-weight: 700; }
.info-hero p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; font-size: 17px; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value-card {
  padding: 30px 26px; border-radius: var(--radius);
  background: var(--surface-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon {
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(0,184,169,0.15));
  display: grid; place-items: center; color: var(--primary); margin-bottom: 16px;
}
.value-card h3 { font-size: 19px; margin-bottom: 8px; }
.value-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.story-img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-md); }
.story-img img { width: 100%; height: 100%; object-fit: cover; }
.story-text h2 { font-size: clamp(24px, 4vw, 34px); margin-bottom: 16px; font-weight: 700; }
.story-text p { color: var(--ink-soft); line-height: 1.8; margin-bottom: 14px; }

/* Delivery steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step-card {
  position: relative; padding: 30px 22px 24px;
  background: var(--surface-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 700; display: grid; place-items: center; margin: 0 auto 14px;
  box-shadow: var(--shadow-glow);
}
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { color: var(--ink-soft); font-size: 14px; }

/* FAQ */
.faq-item { border: 1px solid var(--glass-border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--surface-strong); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; font-weight: 600; cursor: pointer; transition: background .2s var(--ease);
}
.faq-q:hover { background: rgba(46,91,255,0.05); }
.faq-q .chev { transition: transform .3s var(--ease); color: var(--muted); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); color: var(--ink-soft); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a-inner { padding: 0 22px 20px; line-height: 1.7; }

/* Contacts */
.contacts-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 36px; align-items: start; }
.contact-info-card {
  background: var(--surface-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); padding: 30px; border: 1px solid var(--glass-border);
}
.contact-row { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: none; }
.contact-row .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), rgba(0,184,169,0.15));
  display: grid; place-items: center; color: var(--primary); flex-shrink: 0;
}
.contact-row h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
.contact-row p { font-size: 17px; color: var(--ink); font-weight: 600; }
.contact-row a:hover { color: var(--primary); }

.socials { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.8); display: grid; place-items: center;
  color: var(--ink-soft); border: 1px solid var(--glass-border);
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.social-btn:hover { transform: translateY(-3px); color: var(--primary); }

.form-card {
  background: var(--surface-strong); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); padding: 32px; border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.form-input, .form-textarea {
  width: 100%; padding: 13px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: rgba(255,255,255,0.7);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.form-textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 12px; }

.map-stub {
  margin-top: 22px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--glass-border); aspect-ratio: 16/7;
  background: linear-gradient(135deg, rgba(46,91,255,0.08), rgba(0,184,169,0.08));
  display: grid; place-items: center; color: var(--ink-soft); position: relative;
}
.map-pin { text-align: center; }
.map-pin .pin {
  width: 48px; height: 48px; border-radius: 50% 50% 50% 0;
  background: var(--primary); transform: rotate(-45deg);
  margin: 0 auto 10px; box-shadow: var(--shadow-md); display: grid; place-items: center;
}
.map-pin .pin svg { transform: rotate(45deg); color: #fff; }

/* ===== Cart / Favorites lists ===== */
.list-page { padding: 24px 0 80px; }
.list-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 26px; flex-wrap: wrap;
}
.list-head h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; }
.list-head .count { color: var(--muted); font-weight: 400; font-size: 18px; margin-left: 10px; }
.list-actions { display: flex; gap: 10px; }

.list-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.list-grid .card .remove-row { display: flex; gap: 8px; padding: 0 16px 16px; margin-top: auto; }
.list-grid .card .remove-row .btn-sm { flex: 1; }

/* Toast */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px;
  font-size: 15px; font-weight: 500; max-width: 360px;
  transform: translateY(20px); opacity: 0;
  transition: transform .35s var(--ease), opacity .35s var(--ease); pointer-events: auto;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.success .toast-ico { background: rgba(255,255,255,0.2); }
.toast-ico { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.15); display: grid; place-items: center; flex-shrink: 0; }

/* ===== Footer ===== */
.site-footer {
  background: rgba(15,27,45,0.96); color: rgba(255,255,255,0.72);
  padding: 60px 0 28px; margin-top: 80px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; padding: 6px 0; font-size: 14px; color: rgba(255,255,255,0.72); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; flex-wrap: wrap; gap: 10px;
}

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .6s var(--ease) both; }
/* === SCROLL REVEAL ANIMATION ===
   To disable: remove both rules below, or override with:
   .reveal { opacity: 1 !important; transform: none !important; } */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.page-fade { animation: pageIn .4s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Body scroll lock helper (used by drawers) */
body.no-scroll { overflow: hidden; }
body.no-scroll-fixed { position: fixed; top: 0; left: 0; width: 100%; }

/* Filters drawer header — hidden on desktop, shown only as drawer on mobile */
.filters-drawer-head { display: none; }

/* ===== RESPONSIVE — single clean breakpoint set ===== */

/* Tablet: ≤ 1100px */
@media (max-width: 1100px) {
  .products-grid, .list-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ≤ 960px: switch to mobile nav, filters become drawer */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .search-input { width: 160px; }
  .search-input:focus { width: 200px; }

  .product-layout { grid-template-columns: 1fr; gap: 28px; }
  .gallery { position: static; }

  .catalog-layout { grid-template-columns: 1fr; }

  /* Filters: full drawer with scroll lock + close button */
  .filters {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(360px, 92vw); z-index: 220;
    border-radius: 0; max-height: none;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-top: 0;
    box-shadow: var(--shadow-lg);
  }
  .filters.open { transform: translateX(0); }
  .filters-toggle { display: inline-flex; }
  .filters-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 22px; position: sticky; top: 0; z-index: 2;
    background: var(--surface-strong);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); margin: -22px -22px 16px;
  }
  .filters-drawer-head h3 { font-size: 17px; }
  .filters-close {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; color: var(--ink-soft);
    background: rgba(15,27,45,0.05);
  }
  .filters-close:hover { background: rgba(15,27,45,0.1); color: var(--ink); }
  .filters-backdrop {
    position: fixed; inset: 0; z-index: 210;
    background: rgba(15,27,45,0.45);
    opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
  }
  .filters-backdrop.show { opacity: 1; pointer-events: auto; }

  .contacts-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Mobile: ≤ 640px */
@media (max-width: 640px) {
  .search-wrap { display: none; }
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .products-grid, .list-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-grid { grid-template-columns: 1fr; }
  .values-grid, .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  /* Search collapses to icon on mobile; expands on tap */
  .search-input { display: none; }
  .search-wrap.expanded .search-input {
    display: block; position: fixed; top: var(--header-h); left: 0; right: 0;
    width: auto; margin: 12px 16px; height: 44px; border-radius: var(--radius);
    background: #fff; border-color: var(--primary); box-shadow: var(--shadow-md); padding: 0 16px 0 40px;
  }
  .search-wrap.expanded .search-icon { z-index: 1; }

  .card-body { padding: 12px 12px 14px; }
  .card-title { font-size: 14px; }
  .price-current { font-size: 17px; }
  .card-actions { flex-direction: column; gap: 6px; }
  .card-actions .btn { width: 100%; }
  .icon-btn { width: 100%; height: 38px; }

  .spec-row { grid-template-columns: 1fr; gap: 4px; }
  .spec-key { font-size: 13px; }
  .form-row { grid-template-columns: 1fr; }
  .toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
  .product-actions { flex-direction: column; }
  .product-actions .icon-btn { width: 100%; height: 48px; }
  .hero { min-height: 540px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
}

/* Very small: ≤ 380px */
@media (max-width: 380px) {
  .products-grid, .list-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
