/* ==========================================
   Wellkit — стили витрины
   На основе дизайна ШКОЛАМАРКТ
   ========================================== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-hover: #f0f0f0;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;
  --border: #e5e5e5;
  --border-light: #eeeeee;
  --accent: #111111;
  --accent-hover: #333333;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== TOP BAR ===== */
.top-bar-bg { background: var(--accent); }
.top-bar {
  color: #fff;
  font-size: 12px;
  padding: 8px 24px;
  font-weight: 500;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
}
.top-bar a { color: #fff; text-decoration: underline; margin-left: 6px; }
.top-bar-phone { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* ===== HEADER ===== */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo { display:flex; align-items:center; gap:10px; font-size:20px; font-weight:800; letter-spacing:-0.5px; white-space:nowrap; color:var(--text-primary); text-decoration:none; }
.logo img { height:56px; width:auto; display:block; }
.logo span { display:none; }

.catalog-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.catalog-btn:hover { background: var(--accent-hover); }
.catalog-btn i { font-size: 14px; }

/* Выпадающий каталог */
.catalog-dropdown-wrapper { position: relative; }
.catalog-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 150;
}
.catalog-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}
.catalog-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.1s;
}
.catalog-dropdown-item:hover { background: var(--bg-secondary); }
.catalog-dropdown-item i { width: 18px; text-align: center; color: var(--text-muted); font-size: 14px; }

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
  background: #fff;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text-primary);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.15s;
}
.search-bar button:hover { color: var(--text-primary); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: background 0.15s;
  position: relative;
  text-decoration: none;
  color: var(--text-secondary);
}
.header-action:hover { background: var(--bg-hover); }
.header-action i { font-size: 18px; color: var(--text-primary); }
.header-action span { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.cart-badge {
  position: absolute;
  top: 2px; right: 6px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HERO ===== */
.hero-section { padding: 20px 0 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}
.hero-main {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-main::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-main::after {
  content: '';
  position: absolute;
  right: 80px; bottom: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}
.hero-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.5;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 12px;
  max-width: 560px;
}
.hero-subtitle {
  font-size: 15px;
  opacity: 0.6;
  margin-bottom: 24px;
  max-width: 400px;
  line-height: 1.5;
}
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--accent);
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
  width: fit-content;
  text-decoration: none;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.hero-dots {
  display: flex; gap: 6px;
  position: absolute;
  bottom: 20px; left: 56px;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer; border: none;
}
.hero-dot.active { background: #fff; width: 24px; border-radius: 4px; }

.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-side-card {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.hero-side-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.hero-side-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.hero-side-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.hero-side-desc { font-size: 12px; color: var(--text-muted); }

/* ===== SECTIONS ===== */
.section { padding: 40px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.section-link:hover { color: var(--text-primary); }

/* Селект сортировки в каталоге */
.form-select { padding: 6px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; outline: none; cursor: pointer; }
.form-select:focus { border-color: var(--accent); }

/* ===== CATEGORIES ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}
.category-circle {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1.5px solid transparent;
}
.category-item:hover .category-circle {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.category-name {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

/* ===== CAROUSEL ===== */
.carousel-wrapper { position: relative; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-60%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.15s;
}
.carousel-btn:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.carousel-btn.prev { left: -16px; }
.carousel-btn.next { right: -16px; }

/* ===== PRODUCT CARD ===== */
.product-card {
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.2s;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.carousel-track .product-card { min-width: 200px; }
.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
  transform: translateY(-2px);
}
.product-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.product-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .product-image img { transform: scale(1.03); }
.product-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.badge { padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-hot { background: var(--accent); color: #fff; }
.badge-new { background: #fff; color: var(--accent); border: 1px solid var(--border); }
.badge-sale { background: var(--accent); color: #fff; }
.product-fav {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-muted);
  transition: all 0.2s;
  opacity: 0; pointer-events: none;
}
.product-card:hover .product-fav,
.product-fav.active { opacity: 1; pointer-events: auto; }
.product-fav:hover { color: var(--text-primary); background: #fff; }
.product-fav.active { color: var(--text-primary); }
.product-info { padding: 12px 14px 14px; }
.product-price-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.product-price { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.product-price-old { font-size: 13px; color: var(--text-muted); text-decoration: line-through; font-weight: 400; }
.product-discount { font-size: 11px; font-weight: 700; background: var(--bg-secondary); padding: 1px 5px; border-radius: 3px; }
.product-name { font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.product-rating { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; }
.product-rating i { font-size: 10px; }
.product-reviews { font-size: 12px; color: var(--text-muted); }
.product-cart-btn {
  width: 100%; padding: 9px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  background: #fff; color: var(--accent);
  font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.product-cart-btn:hover { background: var(--accent); color: #fff; }
.product-cart-btn.added { background: var(--accent); color: #fff; border-color: var(--accent); }
.product-cart-btn i { font-size: 13px; }

/* ===== FLASH SALE ===== */
.flash-sale-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.flash-sale-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.flash-timer {
  display: flex; align-items: center; gap: 4px;
  background: var(--accent); color: #fff;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  letter-spacing: 1px; font-variant-numeric: tabular-nums;
}
.flash-timer span { opacity: 0.5; }
.flash-all-link {
  margin-left: auto;
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
}
.flash-all-link:hover { color: var(--text-primary); }

/* ===== PROMO ===== */
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.promo-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.promo-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.promo-card-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.promo-card-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.3px; }
.promo-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.promo-card-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.promo-card-btn:hover { text-decoration: underline; }
.promo-card-icon { position: absolute; right: 32px; bottom: 24px; font-size: 64px; opacity: 0.06; }

/* ===== CATALOG PAGE ===== */
.catalog-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.catalog-sidebar { }
.catalog-sidebar h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.catalog-sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.catalog-sidebar a {
  display: block; padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
}
.catalog-sidebar a:hover, .catalog-sidebar a.active { background: var(--bg-secondary); color: var(--text-primary); font-weight: 600; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.home-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }

/* ===== PRODUCT PAGE ===== */
.product-page { padding-top: 24px; padding-bottom: 24px; }
.breadcrumbs { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs span { color: var(--text-secondary); }

/* ===== PRODUCT PAGE ===== */
.product-page { padding-top: 24px; padding-bottom: 24px; }
.breadcrumbs { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs span { color: var(--text-secondary); }

/* Грид: фото | инфо | цена(rows1-2) / описание(cols1-2) */
.product-grid {
  display: grid;
  grid-template-columns: 380px 1fr 340px;
  gap: 24px;
}

.pg-left-wrap { grid-column: 1; }
.pg-left  { display: flex; gap: 6px; position: sticky; top: 120px; }
.pg-mid   { grid-column: 2; min-width: 0; }
.pg-right { grid-column: 3; grid-row: 1 / 3; position: sticky; top: 120px; align-self: start; }
.pg-desc  { grid-column: 1 / 3; min-width: 0; }

.pg-thumbs { display: flex; flex-direction: column; gap: 6px; width: 44px; flex-shrink: 0; max-height: 440px; overflow-y: auto; scrollbar-width: none; }
.pg-thumbs::-webkit-scrollbar { display: none; }
.pg-thumb { width: 44px; height: 59px; border-radius: 4px; overflow: hidden; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-thumb.active { border-color: var(--accent); }
.pg-photo { flex: 1; min-width: 0; position: relative; background: var(--bg-secondary); border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; }
.pg-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pg-badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 6px; z-index: 2; }

.pg-title { font-size: 22px; font-weight: 800; line-height: 1.35; margin: 0 0 8px; word-break: break-word; }
.pg-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.pg-meta b { color: var(--text-primary); }

.pg-vars { margin-bottom: 16px; }
.pg-vars-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.pg-vars-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-var { display: block; width: 80px; height: 107px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; position: relative; text-decoration: none; }
.pg-var:hover { border-color: #ccc; }
.pg-var.active { border-color: var(--accent); }
.pg-var img { width: 100%; height: 100%; object-fit: cover; }
.pg-var-price { position: absolute; bottom: 3px; left: 3px; right: 3px; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; font-weight: 700; text-align: center; padding: 2px 4px; border-radius: 3px; }

.pg-specs { border-top: 1px solid var(--border); padding-top: 12px; overflow: hidden; }
.pgs-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--border-light); }
.pgs-row span:first-child { color: var(--text-muted); flex-shrink: 0; padding-right: 8px; }
.pgs-row span:last-child { font-weight: 600; word-break: break-word; text-align: right; }

.pg-desc { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.pg-desc h2 { font-size: 18px; font-weight: 800; margin: 0 0 12px; }
.pg-desc-content { font-size: 14px; color: var(--text-secondary); line-height: 1.8; word-wrap: break-word; }
.pg-desc-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }

/* Цена */
.pg-right { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px 20px; }
.pg-price { font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 12px; }
.pg-price-old { font-size: 14px; color: var(--text-muted); text-decoration: line-through; font-weight: 500; margin-left: 6px; }
.pg-price-badge { font-size: 13px; font-weight: 700; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 4px; margin-left: 8px; }
.pg-stock { margin-bottom: 16px; }
.pg-qty { display: flex; border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 12px; width: fit-content; }
.pg-qty .qty-btn { width: 40px; height: 40px; border: none; border-radius: 0; font-size: 18px; }
.pg-qty .qty-btn:hover { background: var(--bg-secondary); border-color: transparent; }
.pg-qty .qty-input {
  width: 44px; text-align: center; border: none;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  font-size: 15px; font-weight: 600; font-family: inherit;
  -moz-appearance: textfield; outline: none;
}
.pg-qty .qty-input::-webkit-outer-spin-button,
.pg-qty .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-btn { width: 100%; padding: 14px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pg-btn:hover { opacity: 0.9; }

.stock-ok { color: #2e7d32; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 5px; }
.stock-no { color: #999; font-size: 14px; display: flex; align-items: center; gap: 5px; }

.product-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ===== CART DRAWER ===== */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0; visibility: hidden;
  transition: all 0.3s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; right: 0;
  width: 400px; max-width: 90vw; height: 100vh;
  background: #fff; z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-header h3 { font-size: 16px; font-weight: 700; }
.cart-close {
  width: 32px; height: 32px;
  border-radius: 50%; border: none;
  background: var(--bg-secondary); cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.cart-close:hover { background: var(--bg-hover); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; gap: 12px; color: var(--text-muted);
}
.cart-empty i { font-size: 48px; opacity: 0.3; }
.cart-empty p { font-size: 14px; }
.cart-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-item-img {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0;
  background: var(--bg-secondary);
}
.cart-item-img img { width:100%; height:100%; object-fit:cover; }
.cart-item-info { flex:1; min-width:0; }
.cart-item-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-price { font-size: 14px; font-weight: 700; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 6px; border: 1.5px solid var(--border);
  background: #fff; cursor: pointer;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 600; transition: all 0.15s;
}
.qty-btn:hover { border-color: var(--accent); }
.qty-value { font-size: 13px; font-weight: 600; min-width: 16px; text-align: center; }
.cart-item-remove {
  margin-left: auto; background: none; border: none;
  cursor: pointer; color: var(--text-muted); font-size: 14px; padding: 4px;
  transition: color 0.15s;
}
.cart-item-remove:hover { color: var(--text-primary); }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.cart-total-label { font-size: 14px; color: var(--text-secondary); }
.cart-total-value { font-size: 20px; font-weight: 800; }
.cart-checkout-btn {
  width: 100%; padding: 14px;
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
  transition: background 0.15s;
  text-decoration: none; display: block; text-align: center;
}
.cart-checkout-btn:hover { background: var(--accent-hover); }

/* ===== CHECKOUT PAGE ===== */
.checkout-page { padding-top: 32px; padding-bottom: 32px; }
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; }
.checkout-form h2 { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.checkout-block { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.checkout-block h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.delivery-option, .payment-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.15s; margin-bottom: 8px;
}
.delivery-option:hover, .payment-option:hover, .delivery-option.selected, .payment-option.selected {
  border-color: var(--accent); background: var(--bg-secondary);
}
.delivery-option input, .payment-option input { margin-top: 2px; }
.delivery-option .name { font-weight: 600; font-size: 14px; }
.delivery-option .desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.checkout-summary {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  position: sticky; top: 100px; height: fit-content;
}
.checkout-summary h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.checkout-summary-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.checkout-summary-item img {
  width: 48px; height: 48px; object-fit: cover;
  border-radius: var(--radius-sm); background: var(--bg-secondary);
}
.checkout-summary-item .info { flex: 1; min-width: 0; }
.checkout-summary-item .info .name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.checkout-summary-item .info .qty { font-size: 12px; color: var(--text-muted); }
.checkout-summary-item .info .price { font-size: 13px; font-weight: 700; }
.checkout-summary-total { display: flex; justify-content: space-between; padding-top: 16px; font-size: 18px; font-weight: 800; }

/* ===== SUCCESS PAGE ===== */
.success-page { padding-top: 60px; padding-bottom: 60px; text-align: center; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-page h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.success-page p { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--accent); color: #fff;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
  display: flex; align-items: center; gap: 8px;
}
@keyframes toastIn { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform: translateY(-10px); } }

/* ===== FOOTER ===== */
.footer { background: var(--accent); color: #fff; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 48px 24px 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px; margin-bottom: 40px;
}
.footer-brand { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.footer-desc { font-size: 13px; line-height: 1.6; opacity: 0.5; max-width: 280px; }
.footer-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; opacity: 0.5; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #fff; text-decoration: none; font-size: 13px; opacity: 0.7; transition: opacity 0.15s; }
.footer-links a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; opacity: 0.4;
}

/* ===== UTILITY: замена инлайн-стилей ===== */
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.mx-6 { margin-left: 6px; margin-right: 6px; }
.ml-6 { margin-left: 6px; }
.py-10 { padding-top: 10px; padding-bottom: 10px; }
.w-200 { width: 200px; }
.px-24 { padding-left: 24px; padding-right: 24px; }
.py-8 { padding-top: 8px; padding-bottom: 8px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 10px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.justify-center { justify-content: center; }
.cursor-pointer { cursor: pointer; }
.no-underline { text-decoration: none; }
.hidden { display: none !important; }

/* Страницы */
.page-section { padding-top: 32px; padding-bottom: 32px; }
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 24px; }
.icon-48 { font-size: 48px; opacity: 0.3; margin-bottom: 12px; display: block; }

/* Корзина */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; }
.product-link { font-weight: 600; text-decoration: none; color: var(--text-primary); }
.btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn-primary:hover { background: var(--accent-hover); }

/* Админка */
.admin-hr { border: none; border-top: 1px solid #eee; margin: 16px 0; }
.bg-danger { background: #c00 !important; }
.admin-warning { border-color: #e90 !important; background: #fff8e8 !important; }
.admin-msg-error { border-color: #e00 !important; color: #c00; }

/* Корзина: элементы строки */
.cart-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-light); align-items: center; }
.cart-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-secondary); }
.cart-qty-box { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 6px; overflow: hidden; }
.cart-qty-btn { padding: 6px 10px; border: none; background: var(--bg-secondary); cursor: pointer; font-weight: 600; font-family: inherit; }
.cart-qty-val { padding: 6px 14px; font-weight: 600; font-size: 13px; }
.cart-item-price { font-weight: 800; font-size: 16px; white-space: nowrap; }
.cart-summary { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 24px; height: fit-content; position: sticky; top: 100px; }
.cart-summary-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.cart-empty-page { display: flex; flex-direction: column; align-items: center; padding: 60px 0; }

/* Чек-аут */
.checkout-error { background: #fff; border: 1.5px solid #e00; border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.checkout-error-item { color: #c00; font-size: 14px; }
.checkout-submit { width: 100%; padding: 16px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer; }
.checkout-submit:hover { background: var(--accent-hover); }

/* ===== ADMIN ===== */
/* Сброс/обёртка */
.admin-body { font-family:Manrope,sans-serif; background:#f7f7f7; color:#111; line-height:1.5; display:flex; min-height:100vh; }
.admin-main   { flex:1; margin-left:240px; display:flex; flex-direction:column; min-height:100vh; }
.admin-topbar { background:#fff; border-bottom:1px solid #e5e5e5; padding:0 32px; height:60px; display:flex; align-items:center; gap:16px; position:sticky; top:0; z-index:40; }
.admin-topbar-title { font-size:18px; font-weight:700; flex:1; }
.admin-content { padding:24px 32px; flex:1; }

/* Логин */
.admin-login-body { display:flex; align-items:center; justify-content:center; min-height:100vh; }
.admin-login-box  { background:#fff; padding:40px; border-radius:12px; border:1.5px solid #e5e5e5; width:380px; max-width:90vw; }
.admin-login-box h1 { font-size:20px; font-weight:800; margin-bottom:8px; }
.login-desc  { font-size:13px; color:#999; margin-bottom:20px; }
.login-input { width:100%; padding:12px 14px; border:1.5px solid #e5e5e5; border-radius:8px; font-size:14px; font-family:inherit; margin-bottom:12px; outline:none; }
.login-input:focus { border-color:#111; }
.login-btn   { width:100%; padding:12px; background:#111; color:#fff; border:none; border-radius:8px; font-size:14px; font-weight:700; font-family:inherit; cursor:pointer; }
.login-error { color:#c00; font-size:13px; margin-bottom:12px; }

/* Сайдбар */
.admin-sidebar        { width:240px; background:#111; color:#fff; position:fixed; top:0; left:0; bottom:0; display:flex; flex-direction:column; z-index:50; }
.admin-sidebar-logo   { padding:20px 24px; font-size:16px; font-weight:800; border-bottom:1px solid rgba(255,255,255,.08); display:flex; align-items:center; gap:12px; }
.admin-sidebar-logo img { height:44px; width:auto; display:block; }
.admin-sidebar-logo span { color:#fff; font-weight:700; font-size:16px; }
.admin-sidebar-nav    { flex:1; padding:12px 0; overflow-y:auto; scrollbar-width:none; -ms-overflow-style:none; }
.admin-sidebar-nav::-webkit-scrollbar { width:0; height:0; display:none; }
.admin-nav-section    { padding:8px 24px 6px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color:rgba(255,255,255,.3); margin-top:8px; }
.admin-nav-item       { display:flex; align-items:center; gap:12px; padding:10px 24px; font-size:13px; font-weight:500; color:rgba(255,255,255,.6); cursor:pointer; transition:all .15s; border:none; background:none; width:100%; text-align:left; font-family:inherit; text-decoration:none; }
.admin-nav-item:hover { color:#fff; background:rgba(255,255,255,.05); }
.admin-nav-item.active { color:#fff; background:rgba(255,255,255,.1); font-weight:700; }
.admin-nav-item i     { min-width:18px; text-align:center; font-size:15px; }
.admin-nav-badge      { margin-left:auto; background:#fff; color:#111; font-size:10px; font-weight:700; padding:2px 7px; border-radius:10px; }
.admin-nav-logout     { color:rgba(255,255,255,.4) !important; }
.admin-nav-logout:hover { color:#fff !important; }
.admin-sidebar-footer { padding:16px 24px; border-top:1px solid rgba(255,255,255,.08); }

/* Метрики */
.admin-metrics-grid   { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.admin-metric-card    { background:#fff; border:1.5px solid #eee; border-radius:12px; padding:20px 24px; }
.admin-metric-header  { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.admin-metric-label   { font-size:12px; font-weight:600; color:#999; text-transform:uppercase; letter-spacing:.5px; }
.admin-metric-icon    { width:36px; height:36px; background:#f7f7f7; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:15px; color:#111; }
.admin-metric-value   { font-size:28px; font-weight:800; letter-spacing:-1px; margin-bottom:4px; }
.admin-metric-sub     { font-size:12px; color:#999; }

/* Таблицы */
.admin-table-section  { background:#fff; border:1.5px solid #eee; border-radius:12px; overflow:hidden; }
.admin-table-header   { padding:16px 24px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #eee; }
.admin-table-title    { font-size:15px; font-weight:700; }
.admin-table          { width:100%; border-collapse:collapse; }
.admin-table thead th { text-align:left; padding:10px 24px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:#999; border-bottom:1px solid #eee; background:#f7f7f7; }
.admin-table tbody td { padding:14px 24px; font-size:13px; border-bottom:1px solid #eee; vertical-align:middle; }
.admin-table tbody tr:hover { background:#f7f7f7; }
.admin-table tbody tr:last-child td { border-bottom:none; }
.admin-table-empty    { text-align:center; color:#999; padding:40px; }

/* Бейджи */
.admin-badge          { padding:4px 10px; border-radius:20px; font-size:11px; font-weight:700; display:inline-block; }
.admin-badge-active   { background:#111; color:#fff; }
.admin-badge-muted    { background:#f0f0f0; color:#111; border:1px solid #e5e5e5; }

/* Кнопки */
.admin-btn            { display:inline-flex; align-items:center; gap:8px; padding:10px 20px; font-size:13px; font-weight:700; font-family:inherit; cursor:pointer; border-radius:8px; text-decoration:none; transition:background .15s,border-color .15s; }
.admin-btn-primary    { background:#111; color:#fff; border:none; }
.admin-btn-primary:hover { background:#333; }
.admin-btn-secondary  { background:#fff; color:#111; border:1.5px solid #e5e5e5; }
.admin-btn-secondary:hover { border-color:#111; }

/* Синхронизация */
.admin-sync-section   { max-width:500px; }
.admin-sync-title     { font-size:18px; font-weight:800; margin-bottom:16px; }
.admin-sync-desc      { font-size:13px; color:#999; margin-bottom:20px; }
.admin-sync-btn       { margin-bottom:8px; width:100%; justify-content:center; }
.admin-sync-status    { margin-top:16px; font-size:14px; }

/* Настройки */
.admin-settings-section { max-width:500px; }
.admin-settings-title   { font-size:18px; font-weight:800; margin-bottom:16px; }
.admin-settings-form    { background:#fff; border:1.5px solid #e5e5e5; border-radius:12px; padding:20px; }
.admin-save-btn         { margin-top:16px; width:100%; justify-content:center; }
.admin-setting-row      { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid #eee; cursor:pointer; }
.admin-setting-label    { font-size:14px; font-weight:500; }
.admin-setting-check    { width:18px; height:18px; accent-color:#111; }
.admin-msg              { background:#fff; border:1.5px solid #e5e5e5; border-radius:8px; padding:12px 16px; margin-bottom:16px; font-weight:600; }

/* Инструменты */
.admin-toolbar { display:flex; gap:12px; margin-bottom:16px; }
.truncate      { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.truncate-sm   { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.text-nowrap   { white-space:nowrap; }

/* Setup wizard (после админки — переопределяет admin-settings-form) */
.setup-wrapper { max-width: 700px; margin: 0 auto; }
.setup-title { font-size: 24px; }
.setup-center { text-align: center; padding: 40px; }
.setup-center-32 { text-align: center; padding: 32px; }
.setup-icon { font-size: 48px; margin-bottom: 16px; display: block; opacity: 0.2; }
.setup-icon-md { font-size: 32px; margin-bottom: 12px; display: block; opacity: 0.3; }
.setup-icon-lg { font-size: 64px; color: #111; margin-bottom: 16px; display: block; }
.setup-label { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.setup-hint { font-size: 13px; color: #999; margin-bottom: 20px; }
.setup-hint-sm { font-size: 13px; color: #999; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.setup-card { cursor: pointer; }
.setup-card.selected { border-color: #111; }
.setup-card-icon { font-size: 28px; margin-bottom: 8px; display: block; opacity: 0.3; }
.setup-card-title { font-weight: 700; margin-bottom: 4px; }
.setup-card-hint { font-size: 11px; color: #999; }
.setup-result-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.setup-result-text { font-size: 14px; color: #999; margin-bottom: 4px; }
.setup-row { flex-wrap: wrap; padding: 6px 0; }
.setup-input { width: 100px; padding: 6px 8px; border: 1px solid #e5e5e5; border-radius: 4px; font-size: 12px; font-family: inherit; }
.setup-input-flex { flex: 1; padding: 6px 8px; border: 1px solid #e5e5e5; border-radius: 4px; font-size: 12px; font-family: inherit; }
.setup-input-wide { width: 120px; padding: 6px 8px; border: 1px solid #e5e5e5; border-radius: 4px; font-size: 12px; font-family: inherit; }
.setup-remove { color: #999; margin-left: 6px; }

/* Дерево Ozon в setup */
.tree-group { background: #fff; border: 1.5px solid #e5e5e5; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.tree-parent-row { border-bottom: none !important; padding: 8px 0 !important; }
.tree-child-row { border-bottom: none !important; padding: 4px 0 4px 32px !important; }
.tree-child-row input[type="text"] { color: #555; }
.tree-products { padding: 0 0 8px 32px; display: none; }
.tree-products.open { display: block; }
.tree-toggle { cursor: pointer; color: #999; font-size: 11px; text-decoration: underline; user-select: none; }

/* Список товаров в setup */
.setup-product-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 8px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid #f5f5f5; color: #333; line-height: 1.4;
}
.setup-product-item:hover { background: #fafafa; }
.setup-product-item input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; accent-color: #111; }
.setup-product-item .cat-tag { font-size: 10px; color: #fff; background: #111; padding: 1px 6px; border-radius: 3px; margin-left: 6px; white-space: nowrap; }
.setup-product-item.keyword-match { background: #f5f5f5; }
.setup-product-list { max-height: 350px; overflow-y: auto; border: 1.5px solid #e5e5e5; border-radius: 8px; }
.setup-cat-card { border: 1.5px solid #e5e5e5; border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; background: #fff; }

/* Отзывчивость */
@media(max-width:768px){
  .admin-sidebar{transform:translateX(-100%)}
  .admin-sidebar.open{transform:translateX(0)}
  .admin-main{margin-left:0}
  .admin-metrics-grid{grid-template-columns:1fr}
  .admin-content{padding:16px}
}

/* Оверлей загрузки данных (скрыт по умолчанию, показывается классом .active) */
.load-overlay { position:fixed; inset:0; background:rgba(255,255,255,.82); backdrop-filter:blur(2px); display:none; align-items:center; justify-content:center; z-index:9999; }
.load-overlay.active { display:flex; }
.load-box { display:flex; flex-direction:column; align-items:center; gap:16px; padding:32px 44px; background:#fff; border:1.5px solid #eee; border-radius:16px; box-shadow:0 12px 48px rgba(0,0,0,.14); }
.load-spinner { width:44px; height:44px; border:4px solid #eee; border-top-color:#111; border-radius:50%; animation:wkspin .8s linear infinite; }
@keyframes wkspin { to { transform:rotate(360deg); } }
.load-text { text-align:center; font-size:14px; font-weight:600; color:#111; line-height:1.5; }
.load-sub { font-size:12px; color:#999; font-weight:400; }

/* 404 */
.not-found { text-align: center; padding: 80px 0; }
.not-found h1 { font-size: 48px; font-weight: 800; opacity: 0.2; }
.not-found p { color: var(--text-muted); }
.not-found a { display: inline-block; margin-top: 16px; padding: 10px 24px; background: var(--accent); color: #fff; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; }

/* Поиск */
.search-empty { text-align: center; padding: 60px 0; color: var(--text-muted); }
.search-empty i { font-size: 48px; opacity: 0.3; margin-bottom: 12px; display: block; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--text-secondary); border: 1.5px solid var(--border); }
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .home-grid { grid-template-columns: repeat(4, 1fr); }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .checkout-layout { grid-template-columns: 1fr; }
  /* Продукт: уже */
  .product-grid { grid-template-columns: 300px 1fr 260px; gap: 16px; }
  .pg-left { top: 100px; }
  .pg-right { top: 100px; }
  .pg-title { font-size: 20px; }
  .pg-price { font-size: 26px; }
}
@media (max-width: 768px) {
  ...
  .product-grid { grid-template-columns: 1fr; }
  .pg-left { position: static; flex-direction: column; }
  .pg-thumbs { flex-direction: row; width: auto; overflow-y: hidden; overflow-x: auto; max-height: none; }
  .pg-thumb { width: 44px; height: 59px; flex-shrink: 0; }
  .pg-right { grid-row: auto; position: static; }
  .pg-desc { grid-column: 1; }
  .pg-title { font-size: 18px; }
  .pg-price { font-size: 24px; }
}
@media (max-width: 480px) {
  ...
  .pg-photo { aspect-ratio: 4/3; }
  .pg-price { font-size: 22px; }
}
@media (max-width: 768px) {
  ...
  .product-layout { flex-direction: column; }
  .pl-left { width: 100%; position: static; flex-direction: column; }
  .pl-thumbs { flex-direction: row; width: auto; overflow-y: hidden; overflow-x: auto; max-height: none; }
  .pl-thumb { width: 44px; height: 59px; flex-shrink: 0; }
  .pl-info { width: 100%; flex: none; }
  .pl-buy { width: 100%; position: static; flex-shrink: 1; }
  .pl-title { font-size: 18px; }
  .plb-price { font-size: 24px; }
}
@media (max-width: 480px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .pl-photo { aspect-ratio: 4 / 3; }
  .plb-price { font-size: 22px; }
}
@media (max-width: 768px) {
  ...
  /* Продукт: 1 колонка */
  .product-grid { flex-direction: column; }
  .pg-media { width: 100%; }
  .pg-info { width: 100%; flex: none; }
  .pg-buy { width: 100%; flex-shrink: 1; position: static; }
  .pg-bottom { width: 100%; }
  .pg-title { font-size: 18px; }
  .pgb-price { font-size: 24px; }
}
@media (max-width: 480px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .pg-photo { aspect-ratio: 4 / 3; }
  .pgb-price { font-size: 22px; }
}

/* Скрытые элементы grid'а (JS-обрезка до N рядов) */
.product-card.grid-hidden { display: none !important; }

/* Сердечко всегда видно на тач-устройствах и мобильных */
@media (hover: none) {
  .product-fav { opacity: 1; pointer-events: auto; }
}

/* ===== OZON FINANCE CARDS ===== */
.ozon-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ozon-card { background: #fff; border: 1.5px solid #eee; border-radius: 12px; padding: 16px 20px; }
.ozon-card-accent { border-color: #111; background: #fafafa; }
.ozon-card-label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #999; font-weight: 600; margin-bottom: 4px; }
.ozon-card-value { font-size: 24px; font-weight: 800; }
.ozon-card-green { color: #2e7d32; }
.ozon-card-red   { color: #c62828; }
.ozon-card-detail { font-size: 11px; color: #999; margin-top: 4px; }

/* ===== TOGGLE ROWS (расходы + дни по товару) ===== */
.ozon-toggle-row { cursor: pointer; user-select: none; }
.ozon-toggle-row:hover { background: #f9f9f9; }
.ozon-chevron { display: inline-block; transition: transform .2s; font-size: 10px; color: #999; }
.ozon-toggle-row.open .ozon-chevron { transform: rotate(90deg); }
.ozon-toggle-detail { display: none; }
.ozon-toggle-detail.open { display: table-row; }
.ozon-toggle-detail.open > td { padding: 0 12px 12px; }
.ozon-order-block { margin-bottom: 8px; }
.admin-table-sm { font-size: 13px; }
.admin-table-sm th, .admin-table-sm td { padding: 4px 10px; }
.admin-table-xs { font-size: 12px; }
.admin-table-xs th, .admin-table-xs td { padding: 3px 8px; }
.ml-8  { margin-left: 8px; }
.ml-16 { margin-left: 16px; }

/* ===== SORTABLE TABLE ===== */
.ozon-sort-th { cursor: pointer; user-select: none; white-space: nowrap; position: relative; padding-right: 20px; }
.ozon-sort-th:hover { color: #111; }
.ozon-sort-th::after { content: ''; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 10px; opacity: 0.3; }
.ozon-sort-asc::after  { content: '▲'; opacity: 1; }
.ozon-sort-desc::after { content: '▼'; opacity: 1; }
.ozon-sort-num { text-align: right; }

/* Админка: ошибка */
.admin-msg-err { border-color: #f44336; color: #c62828; }

/* Админка: поле ввода числа */
.admin-setting-input-num { padding: 8px 10px; border: 1.5px solid #e5e5e5; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; }
.admin-setting-input-num:focus { border-color: #111; }

/* Утилиты */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-center { display: flex; align-items: center; }
.flex-wrap   { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.text-sm { font-size: 13px; }
.text-muted { color: #999; }
.fw-400 { font-weight: 400; }
