/* ========= NikoStore — CATALOG (clean) ========= */
*{box-sizing:border-box} html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:#111827; background:#f8fafc; line-height:1.5;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid #6c5ce7; outline-offset:2px}

/* Tokens */
:root{
  --accent:#6c5ce7; --accent-600:#5a4ee0;
  --danger:#ef4444;
  --ink:#111827; --muted:#4b5563;
  --line:#e5e7eb; --panel:#fff;
  --shadow:0 6px 24px rgba(0,0,0,.06);
  --radius:16px;
}

/* Container */
.container{max-width:1440px;margin:0 auto;padding:0 20px}

/* Header */
.header{background:#fff;box-shadow:var(--shadow);position:sticky;top:0;z-index:1000;padding:14px 0}
.header__inner{display:flex;align-items:center;justify-content:space-between;gap:16px}
.logo{display:flex;align-items:center;gap:8px;font-weight:900;color:var(--accent);font-size:22px}
.logo__text span{color:#111827}
.nav__list{display:flex;gap:20px;list-style:none;margin:0;padding:0}
.nav__link{color:#4b5563;font-weight:700;position:relative;padding:.5rem 0;text-decoration:none}
.nav__link:hover,.nav__link.active{color:var(--accent)}
.nav__link.active::after{content:"";position:absolute;left:0;bottom:-8px;width:100%;height:3px;background:var(--accent);border-radius:3px 3px 0 0}
.header__actions{display:flex;align-items:center;gap:12px}

/* Кнопки избранного и корзины */
.fav-btn,.cart-btn{
  position:relative;display:flex;align-items:center;justify-content:center;
  width:44px;height:44px;border-radius:50%;
}
.fav-btn {
  background:#fff; border:none; color: var(--danger);
  box-shadow: var(--shadow); transition: transform .15s ease;
}
.fav-btn svg { width:20px; height:20px; fill: currentColor; stroke: none; }
.fav-btn:hover { transform: translateY(-2px); }
.cart-btn {
  background: var(--accent); color:#fff; border:none;
  box-shadow: 0 2px 10px rgba(108,92,231,.3);
}
.cart-btn:hover { transform: translateY(-2px); }
.fav-count,.cart-count{
  position:absolute;top:-6px;right:-6px;background:var(--danger);color:#fff;
  border-radius:999px;min-width:22px;height:22px;padding:0 6px;
  display:none;align-items:center;justify-content:center;font-size:12px;font-weight:800
}

/* Page top */
.page-top{background:#fff;border-bottom:1px solid var(--line)}
.page-top__inner{padding:22px 0}
.page-title{margin:0;font-size:40px;letter-spacing:.2px}

/* Layout */
.catalog-layout{display:grid;grid-template-columns:260px minmax(0,1fr);align-items:start}
.products-area{grid-column:2;display:flex;flex-direction:column;gap:16px;min-width:0}

/* Стили для категорий */
.sidebar{grid-column:1;grid-row:1 / -1;width:260px;min-width:260px}
.cat-list { display: flex; flex-direction: column; gap: 6px; }
.cat-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all 0.2s ease; user-select: none;
}
.cat-item:hover {
  background: #f3f4f6; transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--accent);
}
.cat-item.is-active {
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.cat-icon { font-size: 18px; }
.cat-title { flex: 1; }
.cat-count {
  background: #eef2ff; color: #4338ca;
  font-size: 12px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px;
}

@media (max-width: 900px){
  .catalog-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* Фильтры */
.filters-toolbar{
  --bg: #f7f9fc; --card: #ffffff; --bd: #e6e9ef;
  --txt: #1f2937; --muted: #6b7280; --accent: #6c5ce7;
  margin: 12px 0 16px; padding: 14px;
  background: var(--card); border: 1px solid var(--bd);
  border-radius: 14px; box-shadow: 0 4px 14px rgba(16,24,40,.06);
}
.filters-row{
  display: grid;
  grid-template-columns: minmax(340px, 520px) 220px minmax(280px, 1fr) auto;
  align-items: end; gap: 14px;
}
.filter-cell{display:flex; flex-direction:column; gap:8px;}
.filter-label{font-size:13px; color:var(--muted); user-select:none}

/* Цена */
.price-range{display:flex; gap:10px}
.pill{
  display:flex; align-items:center; gap:8px;
  padding:8px 10px; border:1px solid var(--bd); border-radius:12px;
  background:#fbfbfe;
}
.pill-prefix{font-size:12px; color:var(--muted)}
.pill input{
  width:120px; max-width:160px; border:0; outline:none;
  background:transparent; font-size:14px; color:var(--txt); padding:2px 0;
}
.pill input::-webkit-outer-spin-button,
.pill input::-webkit-inner-spin-button{ -webkit-appearance: none; margin:0; }

/* Select */
.select{
  height:40px; border:1px solid var(--bd); border-radius:12px; padding:0 12px;
  background:#fbfbfe; color:var(--txt); font-size:14px;
}
.select:focus{outline:2px solid rgba(108,92,231,.25); border-color:var(--accent)}

/* Search */
.search-box{
  position:relative; display:flex; align-items:center;
  border:1px solid var(--bd); border-radius:12px; background:#fbfbfe; height:40px;
  padding:0 36px 0 12px;
}
.search-box input{
  flex:1; border:0; outline:none; background:transparent;
  font-size:14px; color:var(--txt);
}
.icon-btn{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  width:28px; height:28px; border-radius:50%; border:0;
  background:#eef1ff; color:#3f51b5; display:grid; place-items:center; cursor:pointer;
}
.icon-btn:hover{filter:brightness(0.98)}

/* Reset */
.btn-reset{
  height:40px; padding:0 14px; border-radius:12px; border:1px solid var(--bd);
  background:#fff; color:#ef4444; font-weight:600; cursor:pointer;
}
.btn-reset:hover{background:#fff5f5; border-color:#ffd8d8}

@media (max-width: 1200px){
  .filters-row{ grid-template-columns: minmax(300px, 1fr) 200px minmax(240px, 1fr) auto; }
}
@media (max-width: 980px){
  .filters-row{ grid-template-columns: 1fr 1fr; }
  .filter-actions{grid-column: 1 / -1; justify-content:flex-end; display:flex}
}

/* Products grid */
.products-grid{
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px
}
@media (max-width: 900px){
  .products-grid{ grid-template-columns:repeat(2,1fr); gap:16px }
}
@media (max-width: 600px){
  .products-grid{ grid-template-columns:1fr; gap:14px }
}

/* Product card */
.product-card{
  position:relative; display:flex; flex-direction:column;
  background:#fff; border:1px solid var(--line);
  border-radius:18px; box-shadow:var(--shadow); overflow:hidden;
  transition:transform .18s, box-shadow .18s;
}
.product-card:hover{transform:translateY(-2px);box-shadow:0 12px 34px rgba(0,0,0,.08)}

/* Изображение товара */
.product-media{
  position:relative; background:#f6f7fb; height:240px;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; border-bottom:1px solid var(--line)
}
.product-media img{max-width:100%;max-height:100%;object-fit:contain;object-position:center}

/* Бейдж скидки */
.badge{
  position:absolute; top:12px; left:12px; z-index:2;
  padding:4px 10px; color:#fff; font-size:12px; font-weight:700;
  border-radius:999px; box-shadow:0 2px 6px rgba(0,0,0,.15)
}
.badge-discount{background:var(--danger)}

/* Контент карточки */
.product-body{ display:flex; flex-direction:column; gap:8px; padding:16px; }
.product-title{
  margin:0; font-size:16px; font-weight:900; line-height:1.35;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden; color:inherit; text-decoration:none;
}
.product-meta{ display:flex; align-items:center; gap:8px; color:#6b7280; font-size:13px; }

/* Цены */
.price-row{ display:flex; align-items:baseline; gap:10px; margin-top:6px; }
.price-old{ color:#9ca3af; text-decoration:line-through; font-weight:600; }
.price-current{ color:var(--ink); font-size:20px; font-weight:900; }
.has-discount .price-current{ color:var(--danger); }

/* Кнопки в карточке */
.card-cta{ display:flex; align-items:center; gap:10px; margin-top:auto; }
.to-cart{
  flex:1 1 auto; height:44px; border-radius:12px; border:none;
  background:var(--accent); color:#fff; font-weight:900; cursor:pointer;
  box-shadow:0 2px 10px rgba(108,92,231,.3);
  transition:transform .12s, background .12s, box-shadow .12s;
}
.to-cart:hover{ background:var(--accent-600); transform:translateY(-1px); }
.fav-icon{
  width:48px; height:48px; border-radius:14px; border:1px solid var(--line);
  background:#fff; display:grid; place-items:center; cursor:pointer;
  transition:background .15s, border-color .15s, transform .15s; color:#111827;
}
.fav-icon:hover{ background:#f8fafc; border-color:#e5e7eb; }
.fav-icon svg{ width:22px; height:22px; stroke:currentColor; stroke-width:2; fill:none; }
.fav-icon.favorited{ color:var(--danger); }
.fav-icon.favorited svg{ fill:currentColor; }

/* Ссылка на весь товар */
.card-link{ position:absolute; inset:0; z-index:1; text-indent:-9999px; }

/* Пагинация */
.pagination{margin:18px 0;display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.page-btn{
  min-width:40px;height:40px;padding:0 12px;border-radius:10px;
  border:1px solid var(--line);background:#fff;cursor:pointer;font-weight:900
}
.page-btn.active{background:var(--accent);color:#fff;border-color:transparent}
.page-btn[disabled]{opacity:.5;cursor:not-allowed}

/* Footer */
.footer{
  background:#fff; border-top:1px solid var(--line);
  margin-top:32px; padding:32px 0 16px; color:#6b7280
}
.footer__grid{ display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:start; }
.footer__logo{font-size:24px;font-weight:900;margin-bottom:10px;color:var(--accent)}
.footer__about{color:#6b7280;margin:8px 0 16px}
.footer__social a{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px;height:36px; margin-right:8px; border-radius:50%;
  background:#f3f4f6; color:#374151; font-size:16px; transition:.15s;
}
.footer__social a:hover{ background:var(--accent); color:#fff; }
.footer__title{font-size:18px;font-weight:900;margin:0 0 12px;color:#111827}
.footer__contacts p{
  margin:0 0 6px; color:#4b5563;
  display:flex; align-items:center; gap:8px;
}
.footer__bottom{
  margin-top:30px; padding-top:20px; border-top:1px solid var(--line);
  display:flex; flex-wrap:wrap; justify-content:space-between;
  align-items:center; font-size:14px; color:#6b7280;
}
.legal-links a{margin-left:16px;color:inherit;text-decoration:none}
.legal-links a:hover{text-decoration:underline}

@media (max-width:900px){
  .footer__grid{ grid-template-columns:1fr; gap:24px; }
  .footer__bottom{ flex-direction:column; gap:12px; text-align:center; }
  .legal-links a{ margin:0 8px; }
}

/* Мобильная шторка */
.sidebar-sheet { position: relative; }
@media (max-width: 900px){
  .sidebar-sheet__backdrop{
    position: fixed; inset: 0; background: rgba(0,0,0,.35);
    opacity: 0; pointer-events: none; transition: .2s; z-index: 998;
  }
  .sidebar-sheet__panel{
    position: fixed; top: 0; left: 0; height: 100vh; width: 80vw; max-width: 320px;
    background: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.2);
    transform: translateX(-100%); transition: transform .25s ease;
    z-index: 999; padding: 16px; display: flex; flex-direction: column;
  }
  .sidebar-sheet__close{
    border:0;background:transparent; font-size:28px; line-height:1;
    margin:-6px -6px 8px auto; cursor:pointer;
  }
  .sidebar-sheet.is-open .sidebar-sheet__backdrop{ opacity: 1; pointer-events: auto; }
  .sidebar-sheet.is-open .sidebar-sheet__panel{ transform: translateX(0); }
  .sidebar-sheet .sidebar{ display: block; width: 100%; min-width: 0; }
}

/* Кнопка Категорії на мобилке */
#open-sidebar{ display:none; }
@media (max-width: 900px){
  #open-sidebar{
    display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 16px; border-radius: 14px; border: none;
    font-weight: 800; color: #fff; background: var(--accent);
    box-shadow: 0 6px 18px rgba(108, 92, 231, 0.4); cursor: pointer;
    transition: all 0.25s ease;
  }
  #open-sidebar::before { content: "☰"; font-size: 18px; line-height: 1; }
  #open-sidebar:hover {
    background: var(--accent-600); transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.5);
  }
  #open-sidebar:active {
    transform: translateY(0); box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
  }
}

/* Анимации */
@keyframes bump{
  0%{transform:scale(1)} 10%{transform:scale(1.06)} 30%{transform:scale(0.98)} 100%{transform:scale(1)}
}
@keyframes heart-pop{
  0%{transform:scale(0.6);opacity:.2}
  60%{transform:scale(1.15);opacity:1}
  100%{transform:scale(1)}
}
.to-cart.success{ background:#10b981; box-shadow:0 2px 12px rgba(16,185,129,.35); }
.to-cart.success::after{ content:"✓"; font-weight:900; margin-left:.35rem; }
.to-cart.success, .to-cart.pop, .fav-icon.pop{ animation:bump .35s ease; }
.cart-btn.bump, .fav-btn.bump{ animation:bump .4s ease; }
/* Убираем внешние отступы у контейнера сайдбара */
.cat-list {
  margin: 0;
  padding: 0;
}

/* Убираем левый отступ у контейнера */
.container {
  padding-left: 12px; /* уменьшаем отступ слева */
  padding-right: 12px;
}

/* Сдвигаем весь контент влево */
.products-area {
  padding-left: 0; /* убираем отступ слева у товаров */
}
/* Просто отодвигаем товары вправо */
@media (min-width: 901px) {
  .products-area {
    padding-left: 40px; /* добавляем отступ слева */
    border-left: 1px solid var(--line); /* опционально: разделительная линия */
  }
}
/* делаем кнопки кликабельными поверх ссылки */
.card-cta{
  position: relative;
  z-index: 3;
}

.to-cart,
.fav-icon{
  position: relative;
  z-index: 3;
}
/* ========= NikoStore — CATALOG (clean) ========= */
*{box-sizing:border-box} html,body{height:100%}
html{scroll-behavior:smooth}

/* ОБНОВЛЕННЫЙ ШРИФТ: меняем Inter на Manrope как в index.html */
body{
  margin:0; 
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif; /* ← обновлено */
  color:#111827; 
  background:#f8fafc; 
  line-height:1.5;
  -webkit-font-smoothing: antialiased; /* ← добавлено для гладкости */
}

/* Сохраняем остальные переменные как есть */
:root{
  --accent:#6c5ce7; --accent-600:#5a4ee0;
  --danger:#ef4444;
  --ink:#111827; --muted:#4b5563;
  --line:#e5e7eb; --panel:#fff;
  --shadow:0 6px 24px rgba(0,0,0,.06);
  --radius:16px;
}

/* ОБНОВЛЕННЫЙ ЗАГОЛОВОК СТРАНИЦЫ */
.page-title{
  margin:0;
  font-size:3rem; /* ← обновлено с 40px */
  font-weight:800; /* ← обновлено для соответствия hero__title */
  letter-spacing:.2px;
  line-height:1.2; /* ← добавлено */
}

/* ОБНОВЛЕННЫЕ ЗАГОЛОВКИ В КАРТОЧКАХ ТОВАРОВ */
.product-title{
  margin:0; 
  font-size:1.05rem; /* ← обновлено с 16px для соответствия index.html */
  font-weight:800; /* ← обновлено с 900 для единообразия */
  line-height:1.35;
  display:-webkit-box; 
  -webkit-box-orient:vertical; 
  -webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden; 
  color:inherit; 
  text-decoration:none;
}

/* ОБНОВЛЕННЫЕ ЦЕНЫ */
.price-current{ 
  color:var(--ink); 
  font-size:1.15rem; /* ← обновлено с 20px */
  font-weight:900; 
}

/* ОБНОВЛЕННЫЕ ФИЛЬТРЫ */
.filter-label{
  font-size:13px; 
  color:var(--muted); 
  user-select:none;
  font-weight:600; /* ← добавлено для соответствия */
}

/* ОБНОВЛЕННЫЕ КАТЕГОРИИ */
.cat-item {
  display: flex; 
  align-items: center; 
  gap: 12px;
  padding: 12px 14px; 
  border-radius: 12px;
  font-size: 15px; 
  font-weight: 700; 
  cursor: pointer;
  transition: all 0.2s ease; 
  user-select: none;
  font-family: 'Manrope', sans-serif; /* ← добавлено */
}

/* ОБНОВЛЕННЫЙ ФУТЕР для полного соответствия */
.footer{
  background:#fff;
  border-top:1px solid var(--line);
  margin-top:32px; 
  padding:32px 0 16px;
  color: var(--text-mid);
  font-family: 'Manrope', sans-serif; /* ← добавлено */
}

.footer__title{
  font-size:16px; /* ← обновлено с 18px для соответствия index.html */
  font-weight:800; /* ← обновлено с 900 */
  margin:0 0 12px;
  color:#111827
}

.footer__about{
  margin:10px 0 14px; 
  color:var(--text-mid);
  font-size:1rem; /* ← добавлено */
  line-height:1.6; /* ← добавлено */
}

/* ОБНОВЛЕННЫЕ НАВИГАЦИОННЫЕ ССЫЛКИ */
.nav__link{
  color:#4b5563;
  font-weight:700;
  position:relative;
  padding:.5rem 0;
  text-decoration:none;
  font-family: 'Manrope', sans-serif; /* ← добавлено */
}

/* ОБНОВЛЕННАЯ КНОПКА В КАРТОЧКЕ */
.to-cart{
  flex:1 1 auto; 
  height:44px; 
  border-radius:12px; 
  border:none;
  background:var(--accent); 
  color:#fff; 
  font-weight:900; 
  cursor:pointer;
  box-shadow:0 2px 10px rgba(108,92,231,.3);
  transition:transform .12s, background .12s, box-shadow .12s;
  font-family: 'Manrope', sans-serif; /* ← добавлено */
}

/* ОБНОВЛЕННАЯ КНОПКА КАТЕГОРИИ */
#open-sidebar{
  display:inline-flex; 
  align-items:center; 
  gap:8px;
  height:44px; 
  padding:0 16px; 
  border-radius:14px; 
  border:none;
  font-weight:800; 
  color:#fff; 
  background:var(--accent);
  box-shadow:0 6px 18px rgba(108,92,231,0.4); 
  cursor:pointer;
  transition:all 0.25s ease;
  font-family: 'Manrope', sans-serif; /* ← добавлено */
}
/* Исправление кнопки "Категорії" - скрываем на ПК */
#open-sidebar { 
  display: none; 
}

@media (max-width: 900px){
  #open-sidebar{
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    height: 44px; 
    padding: 0 16px; 
    border-radius: 14px; 
    border: none;
    font-weight: 800; 
    color: #fff; 
    background: var(--accent);
    box-shadow: 0 6px 18px rgba(108, 92, 231, 0.4); 
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Manrope', sans-serif;
  }
  #open-sidebar::before { 
    content: "☰"; 
    font-size: 18px; 
    line-height: 1; 
  }
  #open-sidebar:hover {
    background: var(--accent-600); 
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.5);
  }
  #open-sidebar:active {
    transform: translateY(0); 
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
  }
}

/* Исправление фильтра цены - более компактный дизайн */
.price-range {
  display: flex; 
  gap: 8px; /* Уменьшаем отступ между полями */
  align-items: center;
}

.pill {
  display: flex; 
  align-items: center; 
  gap: 4px; /* Уменьшаем отступ между текстом и полем ввода */
  padding: 8px 10px; 
  border: 1px solid var(--bd); 
  border-radius: 12px;
  background: #fbfbfe;
  min-width: 100px; /* Минимальная ширина */
}

.pill-prefix {
  font-size: 12px; 
  color: var(--muted);
  white-space: nowrap; /* Предотвращает перенос текста */
}

.pill input {
  width: 80px; /* Фиксированная ширина поля ввода */
  max-width: 100px; /* Максимальная ширина */
  border: 0; 
  outline: none;
  background: transparent; 
  font-size: 14px; 
  color: var(--txt); 
  padding: 2px 0;
}

/* Стили для иконки очистки поиска */
#searchClear {
  position: absolute; 
  right: 6px; 
  top: 50%; 
  transform: translateY(-50%);
  width: 28px; 
  height: 28px; 
  border-radius: 50%; 
  border: 0;
  background: #eef1ff; 
  color: #3f51b5; 
  display: grid; 
  place-items: center; 
  cursor: pointer;
  font-size: 14px;
}

#searchClear:hover {
  filter: brightness(0.98);
}

/* Адаптивность фильтров */
@media (max-width: 980px){
  .filters-row { 
    grid-template-columns: 1fr 1fr; 
  }
  .filter-price {
    grid-column: 1 / -1; /* Фильтр цены занимает всю ширину */
  }
  .filter-actions {
    grid-column: 1 / -1; 
    justify-content: flex-end; 
    display: flex;
  }
  .price-range {
    justify-content: flex-start;
  }
}

@media (max-width: 600px){
  .filters-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .price-range {
    flex-direction: column; /* На мобилке поля ввода в столбик */
    align-items: stretch;
    gap: 8px;
  }
  .pill {
    width: 100%;
    min-width: unset;
  }
  .pill input {
    width: 100%;
    max-width: 100%;
  }
}
/* Стили для категорий */
.cat-list { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
}

.cat-item {
  display: flex; 
  align-items: center; 
  gap: 12px;
  padding: 12px 14px; 
  border-radius: 12px;
  font-size: 15px; 
  font-weight: 700; 
  cursor: pointer;
  transition: all 0.2s ease; 
  user-select: none;
  font-family: 'Manrope', sans-serif;
}

.cat-item:hover {
  background: #f3f4f6; 
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--accent);
}

.cat-item.is-active {
  background: rgba(108, 92, 231, 0.1);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.cat-icon { 
  font-size: 18px; 
  width: 24px; /* Фиксированная ширина для выравнивания */
  text-align: center;
}

.cat-title { 
  flex: 1; 
}

/* НОВЫЙ СТИЛЬ ДЛЯ СЧЕТЧИКА ТОВАРОВ */
.cat-count {
  background: #eef2ff; 
  color: #4338ca;
  font-size: 12px; 
  font-weight: 800;
  padding: 2px 8px; 
  border-radius: 999px;
  min-width: 24px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Счетчик в активной категории */
.cat-item.is-active .cat-count {
  background: var(--accent);
  color: white;
}

/* Счетчик при наведении */
.cat-item:hover .cat-count {
  background: #e0e7ff;
  transform: scale(1.05);
}

/* Ссылка категории */
.cat-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
/* ===== УЛУЧШЕННАЯ ВИДИМОСТЬ ФИЛЬТРОВ ===== */
.filters-toolbar{
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  border: 2px solid rgba(108,92,231,.15);
  box-shadow: 0 10px 30px rgba(108,92,231,.08);
}

/* Заголовки фильтров */
.filter-label{
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  letter-spacing: .2px;
}

/* Цена */
.pill{
  border: 2px solid #e5e7eb;
  background: #ffffff;
  transition: all .2s ease;
}

.pill:focus-within{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,92,231,.15);
}

.pill-prefix{
  font-weight: 600;
  color: #6b7280;
}

/* Select */
.select{
  border: 2px solid #e5e7eb;
  background: #ffffff;
  font-weight: 600;
  transition: all .2s ease;
}

.select:hover{
  border-color: var(--accent);
}

.select:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,92,231,.15);
}

/* Поиск */
.search-box{
  border: 2px solid #e5e7eb;
  background: #ffffff;
  transition: all .2s ease;
}

.search-box:focus-within{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,92,231,.15);
}

/* Кнопка очистки поиска */
.icon-btn{
  background: rgba(108,92,231,.12);
  color: var(--accent);
}

.icon-btn:hover{
  background: rgba(108,92,231,.2);
}

/* Спокойная кнопка "Скинути фільтри" */
.btn-reset{
  height:40px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  color:#6b7280;
  font-weight:600;
  cursor:pointer;
  transition: all .2s ease;
}

.btn-reset:hover{
  background:#f3f4f6;
  color:#374151;
  border-color:#d1d5db;
}

/* Немного воздуха */
.filters-row{
  gap: 18px;
}
/* Убираем нативный крестик у input[type=search] */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
/* ===== БЛОК КАТЕГОРИЙ В СТИЛЕ ФИЛЬТРОВ ===== */
.sidebar{
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  border: 2px solid rgba(108,92,231,.12);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(108,92,231,.08);
  padding: 14px;
}

/* список */
.cat-list{
  gap: 6px;
}

/* пункт категории */
.cat-item{
  border-radius: 14px;
  padding: 12px 14px;
  background: transparent;
  transition: all .2s ease;
}

/* hover */
.cat-item:hover{
  background: #f3f4f6;
  transform: translateX(2px);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* активная категория */
.cat-item.is-active{
  background: rgba(108,92,231,.1);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* иконка */
.cat-icon{
  font-size: 18px;
  opacity: .9;
}

/* текст */
.cat-title{
  font-weight: 700;
}

/* счётчик */
.cat-count{
  background: #eef2ff;
  color: #4338ca;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  transition: all .2s ease;
}

/* счётчик активной */
.cat-item.is-active .cat-count{
  background: var(--accent);
  color: #fff;
}

/* hover на счётчик */
.cat-item:hover .cat-count{
  background: #e0e7ff;
}
.mobile-filters-btn{
  display:none;
  height:44px;
  padding:0 16px;
  border-radius:14px;
  border:none;
  font-weight:800;
  color:#fff;
  background:var(--accent);
  box-shadow:0 6px 18px rgba(108,92,231,.35);
  cursor:pointer;
  margin-bottom:12px;
}

@media (max-width:900px){
  .mobile-filters-btn{ display:inline-flex; align-items:center; gap:8px; }
  .filters-toolbar{ display:none; } /* скрываем фильтры */
}
.filters-sheet{
  position:fixed;
  inset:0;
  z-index:2000;
  pointer-events:none;
}

.filters-sheet__backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.35);
  opacity:0;
  transition:.2s;
}

.filters-sheet__panel{
  position:absolute;
  left:0; right:0; bottom:0;
  background:#fff;
  border-radius:20px 20px 0 0;
  padding:16px;
  transform:translateY(100%);
  transition:.25s ease;
  max-height:90vh;
  overflow:auto;
}

.filters-sheet.is-open{
  pointer-events:auto;
}

.filters-sheet.is-open .filters-sheet__backdrop{
  opacity:1;
}

.filters-sheet.is-open .filters-sheet__panel{
  transform:translateY(0);
}

.filters-sheet__close{
  border:0;
  background:transparent;
  font-size:28px;
  cursor:pointer;
  margin-left:auto;
  display:block;
}

.filters-apply{
  width:100%;
  height:48px;
  margin-top:14px;
  border-radius:14px;
  border:none;
  background:var(--accent);
  color:#fff;
  font-weight:900;
}
.filters-sheet__panel #filters {
  display: block;
  padding: 12px 0;
}

@media (max-width: 768px) {
  #filters {
    display: none;
  }

  .filters-sheet.is-open {
    display: block;
  }
}
@media (max-width: 768px){
  .nav { display: none; }

  .header__inner{
    gap: 10px;
  }

  .logo{
    font-size: 18px;
  }

  .fav-btn,
  .cart-btn{
    width:40px;
    height:40px;
  }
}
@media (max-width: 768px){
  .page-title{
    font-size: 26px;
    line-height: 1.25;
  }

  .page-top__inner{
    padding: 14px 0;
  }
}
.mobile-actions{
  display:none;
  gap:10px;
}

@media (max-width: 900px){
  .mobile-actions{
    display:flex;
    margin-bottom:12px;
  }

  #open-sidebar,
  .mobile-filters-btn{
    flex:1;
    justify-content:center;
  }
}
@media (max-width: 600px){
  .products-grid{
    grid-template-columns: repeat(2, 1fr);
    gap:12px;
  }

  .product-media{
    height:160px;
  }

  .product-body{
    padding:12px;
  }

  .product-title{
    font-size:14px;
    line-height:1.3;
  }

  .price-current{
    font-size:16px;
  }
}
@media (max-width: 600px){
  .to-cart{
    height:40px;
    font-size:14px;
  }

  .fav-icon{
    width:40px;
    height:40px;
    border-radius:12px;
  }
}
@media (max-width: 600px){
  .container{
    padding-left:10px;
    padding-right:10px;
  }

  .products-area{
    gap:12px;
  }
}
.filters-sheet__panel {
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 30px rgba(0,0,0,0.18);
  padding: 16px 16px 24px;
}
.filters-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f1f2f6;
  font-size: 20px;
  cursor: pointer;
}
.filters-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.filters-apply button,
.filters-apply {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
}
.filters-toolbar .filter-cell {
  margin-bottom: 14px;
}
.filters-sheet {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.filters-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.filters-sheet__panel {
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.filters-sheet.is-open .filters-sheet__panel {
  transform: translateY(0);
}
.filters-apply {
  position: sticky;
  bottom: 0;
  padding: 16px;
  background: #fff;
}

.filters-apply-btn {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  background: #6c5ce7;
  color: #fff;
}
.filters-apply-btn:active {
  transform: scale(0.98);
}

.filters-apply {
  box-shadow: 0 -8px 20px rgba(0,0,0,0.08);
}
.categories-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.categories-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.categories-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85vh;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 16px;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.categories-sheet.is-open .categories-sheet__panel {
  transform: translateY(0);
}

.categories-sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f1f2f6;
  font-size: 20px;
}

.categories-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f8fc;
}

.cat-link.is-active {
  background: #6c5ce7;
  color: #fff;
}

.cat-count {
  margin-left: auto;
  background: #eaeafd;
  color: #6c5ce7;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 13px;
}
.sidebar-sheet {
  display: none !important;
}/* ===== Mobile: categories full width ===== */
@media (max-width: 768px) {

  /* панель уже на всю ширину — просто фиксируем */
  .categories-sheet__panel {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* контейнер с категориями — на всю ширину */
  .categories-sheet .categories-content,
  .categories-sheet .cat-sidebar,
  .categories-sheet .cat-list {
    width: 100%;
    max-width: 100%;
  }

  /* сами элементы категорий */
  .categories-sheet .cat-link {
    width: 100%;
  }

}
/* ===== Skeleton loader ===== */
.skeleton-card {
  height: 280px;
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    #ececec 25%,
    #f5f5f5 37%,
    #ececec 63%
  );
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}




