/* Базовые стили магазина */

:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --success-color: #16a34a;
  --warning-color: #d97706;
  --text-color: #1e293b;
  --border-color: #e2e8f0;
  --bg-color: #f8fafc;
  --white: #fff;
}

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

body {
  font-family: 'Montserrat', 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}
/* Menu */

/* Сброс и базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* Бургер */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.burger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
}

.burger-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #222;
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

.menu-toggle.active .burger-icon span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle.active .burger-icon span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.menu-toggle.active .burger-icon span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Навигация - десктоп */
.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.menu-item {
  position: relative;
  list-style: none;
}

.menu-item a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  position: relative;
}

/* Стрелка */
.dropdown-icon {
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.menu-item-has-children:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* Подчеркивание */
.menu-item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #007bff;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s ease;
}

.menu-item.active > a::after,
.menu-item > a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Подменю - десктоп */
.sub-menu {
  position: absolute;
  top: 100%;
  left: -50%;
  background-color: #fff;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
  list-style: none;
}

.menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu-item {
  list-style: none;
}

.sub-menu-item a {
  padding: 10px 20px;
  display: block;
  white-space: nowrap;
  color: #333;
  font-weight: 400;
}

.sub-menu-item a:hover {
  background-color: #f5f5f5;
  color: #007bff;
}

.sub-menu-item.active a {
  color: #007bff;
  font-weight: 500;
}

.sub-menu-item a::after {
  display: none;
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    background-color: #fff;
    padding: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 320px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0;
    margin: 0;
    display: block; /* Убеждаемся, что это блочный элемент */
  }

  .menu-item {
    width: 100%;
    border-bottom: 1px solid #eee;
    margin: 0;
    display: block; /* Каждый пункт как блок */
  }

  .menu-item:last-child {
    border-bottom: none;
  }

  .menu-item a {
    width: 100%;
    padding: 15px 20px !important;
    font-size: 1.1rem;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
  }

  /* ПОДМЕНЮ - ИСПРАВЛЕНО: ТОЛЬКО ОДИН СТОЛБЕЦ */
  .sub-menu {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 100% !important;
    background-color: #f9f9f9 !important;
    border-radius: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    width: 100%;
    display: block !important; /* БЛОЧНЫЙ ЭЛЕМЕНТ */
    column-count: 1 !important; /* ЗАПРЕЩАЕМ РАЗБИВКУ НА КОЛОНКИ */
    column-gap: normal !important;
    columns: 1 !important;
  }

  /* Открытое подменю */
  .menu-item-has-children.active-mobile .sub-menu {
    max-height: 500px;
    padding: 0 !important;
  }

  /* Элементы подменю - ТОЛЬКО ВЕРТИКАЛЬНО, ОДИН СТОЛБЕЦ */
  .sub-menu-item {
    display: block !important; /* КАЖДЫЙ ЭЛЕМЕНТ С НОВОЙ СТРОКИ */
    width: 100%;
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
    float: none !important; /* Убираем возможные float */
    clear: both !important; /* Запрещаем обтекание */
    break-inside: avoid !important; /* Запрещаем разрыв при колонках */
    page-break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
  }

  .sub-menu-item:last-child {
    border-bottom: none;
  }

  .sub-menu-item a {
    padding: 12px 20px 12px 40px !important;
    font-size: 1rem;
    white-space: normal;
    word-break: break-word;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
    background-color: #f9f9f9;
  }

  .sub-menu-item a:hover {
    background-color: #f0f0f0;
  }

  .sub-menu-item.active a {
    color: #007bff;
    background-color: #f0f0f0;
  }

  .dropdown-icon {
    transition: transform 0.3s ease;
  }

  .menu-item-has-children.active-mobile .dropdown-icon {
    transform: rotate(180deg);
  }
}

/* Топ-меню (шапка) */
.top-header {
  background: #fff;
  box-shadow: 0 5px 20px rgb(141 200 255 / 15%);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.header-logo img {
  height: 48px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  max-width: 130px;
}

.logo-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--secondary-color);
  line-height: 1.2;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--primary-color);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-contact {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.header-address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--secondary-color);
}

.header-address svg {
  color: var(--primary-color);
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

.header-phone:hover {
  opacity: 0.8;
}

.header-phone svg {
  color: var(--primary-color);
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: #fff;
}

.header-search input {
  border: none;
  outline: none;
  font-size: 0.9375rem;
  width: 250px;
  color: var(--text-color);
}

.header-search input::placeholder {
  color: var(--secondary-color);
}

.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  transition: color 0.2s;
}

.header-search button:hover {
  color: var(--primary-color);
}

/* Поиск-тултип (кнопка) */
.search-tooltip {
  position: relative;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  transition: color 0.2s;
}

.search-toggle:hover {
  color: var(--primary-color);
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  transition: color 0.2s;
  position: relative;
}

.header-icon:hover {
  color: var(--primary-color);
}

.header-icon .cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc3545;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Старые стили навигации */
header nav {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

header nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header nav a:hover {
  color: var(--primary-color);
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc3545;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Контейнер */
main {
  max-width: 100vw;
  margin: 0 auto;
  padding: 2rem;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  main {
    padding: 1rem;
  }
}

/* Каталог */
.catalog-page {
  max-width: 1400px;
  margin: 0 auto;
}

.catalog-seo-text {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.catalog-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-input,
.filter-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
}

.search-input {
  flex: 1;
  min-width: 250px;
}

/* Сетка товаров */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Карточка товара */
.product-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
  padding: 12px;
}

@media (max-width: 768px) {
  .product-card {
    padding: 8px;
  }
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-image {
  aspect-ratio: 1;
  background: var(--bg-color);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--secondary-color);
}

.product-info {
  padding: 1rem;
}

.product-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.product-article,
.product-factory,
.product-collection,
.product-country {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.product-factory a,
.product-collection a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.product-factory a:hover,
.product-collection a:hover {
  text-decoration: underline;
}

.product-country {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-country .country-flag {
  width: 20px;
  height: auto;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.product-availability {
  font-size: 0.875rem;
  font-weight: 500;
}

.product-availability.in-stock {
  color: var(--success-color);
}

.product-availability.out-of-stock {
  color: var(--warning-color);
}

/* Страница товара */
.product-single {
  max-width: 1000px;
  margin: 0 auto;
}

.product-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.product-article {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

.product-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .top-header {
    background: #fff;
    padding: 0.5rem;
  }

  .header-container {
    gap: 0.5rem;
  }

  .header-left,
  .header-right,
  .header-icons {
    gap: 0.5rem;
  }

  .logo-text {
    display: none;
  }

  .header-phone {
    font-size: 0.9rem;
  }

  .product-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .product-single {
    padding: 0 1rem;
  }
}

/* Галерея */
.product-gallery {
  position: relative;
  top: 0;
  padding: 5px;
}

@media (min-width: 769px) {
  .product-gallery {
    position: sticky;
    top: 100px;
  }
}

.main-image {
  margin-bottom: 1rem;
}

.main-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.thumbnail-list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.thumbnail {
  width: 80px;
  height: 80px;
  min-width: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumbnail:hover {
  border-color: var(--primary-color);
}

/* Ограничение по ширине для мобильных */
@media (max-width: 768px) {
  .product-single,
  .product-content,
  .product-gallery,
  .product-details {
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-image img {
    max-width: 100%;
    height: auto;
  }

  .specs-table {
    display: block;
    overflow-x: auto;
  }
}

/* Детали товара */
.product-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

@media (max-width: 768px) {
  .product-details {
    gap: 1rem;
  }
}

.product-price-block {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
}

.price-label {
  display: block;
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.price-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.product-availability {
  font-size: 1rem;
  font-weight: 500;
}

.product-description h2,
.product-factory h2,
.product-collection h2,
.product-specs h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  word-break: break-word;
}

.product-description a,
.product-factory a,
.product-collection a {
  color: var(--primary-color);
  word-break: break-word;
}

@media (max-width: 768px) {
  .product-description h2,
  .product-factory h2,
  .product-collection h2,
  .product-specs h2 {
    font-size: 1.125rem;
  }
  
  .product-description,
  .product-factory,
  .product-collection {
    overflow-wrap: break-word;
  }
}

/* Характеристики */
.specs-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  word-break: break-word;
}

.specs-table th {
  font-weight: 500;
  color: var(--secondary-color);
  width: 40%;
}

@media (max-width: 768px) {
  .specs-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .specs-table th,
  .specs-table td {
    padding: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
  }
}

/* Кнопки */
.product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  flex: 1;
}

.btn-secondary {
  background: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

/* Навигация */
.product-navigation {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.back-link {
  color: var(--primary-color);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  background: var(--text-color);
  color: #fff;
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}
.logo-footer{
width: 220px;
}
/* Адаптив */
@media (max-width: 640px) {
  header nav {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
  
  .product-actions {
    flex-direction: column;
  }
}

/* Страницы фабрик и коллекций */
.factories-grid,
.collections-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.factory-card,
.collection-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}
.factory-card{
  padding: .5rem;
  text-align: center;
}
.factory-card h3,
.collection-card h3 {
  margin-bottom: 0.5rem;
}

.factory-card a,
.collection-card a {
  color: var(--primary-color);
  text-decoration: none;
}

.factory-country,
.collection-country,
.collection-price-group,
.collection-products-count {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin: 0.25rem 0;
}

.factory-website {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  text-decoration: none;
}

.factory-navigation,
.collection-navigation {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 1rem;
}

.all-products {
  margin-top: 3rem;
}

/* Страница фабрики */
.factory-info-card {
  background: var(--bg-color);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
}
.factory-description  {
    padding: 1rem;
    background: #fff;
    border-radius: 18px;
}
.factory-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.factory-logo img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
}

.factory-title-block h2 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
}

.factory-country {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-color);
}

.country-flag {
  width: 24px;
  height: 16px;
  object-fit: cover;
}

.factory-website-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.factory-website-btn:hover {
  opacity: 0.9;
}

.factory-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--secondary-color);
}

/* Карточка коллекции */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
  margin: 2rem 0;
}

.collection-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.collection-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.collection-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.collection-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-color);
}

.collection-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
}

.collection-card-content {
  padding: 1.5rem;
}

.collection-card-content h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
}

.collection-short-desc {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.collection-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.collection-country,
.collection-price {
  color: var(--secondary-color);
}

.collection-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #1961ff8a;
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.collection-products-count {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-top: 1rem;
}

/* Страница коллекции */
.collection-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .factory-header{
flex-direction: column;
  }
  .collection-header {
    grid-template-columns: 1fr;
  }
}

.collection-hero-image {
  border-radius: 8px;
  overflow: hidden;
}

.collection-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.collection-badge-large {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  width: fit-content;
}

.btn-pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #dc3545;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  margin-top: 1rem;
  width: fit-content;
  transition: opacity 0.2s;
}

.btn-pdf-download:hover {
  opacity: 0.9;
}

.collection-controls {
  margin-bottom: 1.5rem;
}

/* Бэйджи товаров */
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 10;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.badge-icon {
  font-size: 1rem;
}

/* Суперхит - ярко-зелёный с короной */
.badge-superhit {
  background: linear-gradient(135deg, #4fff5773 0%, #00fb64a6 100%);
  color: #fff;
}

/* Хит - зелёный с огнём */
.badge-hit {
  background: linear-gradient(135deg, #6bff7191 0%, #3ddf44a6 100%);
  color: #fff;
}

/* Новинка - синий с искрой */
.badge-novinka {
  background: linear-gradient(135deg, #1e88e5ab 0%, #42a4f595 100%);
  color: #fff;
}

/* Акция - красный с % */
.badge-akciya {
  background: linear-gradient(135deg, #e538359c 0%, #ef535080 100%);
  color: #fff;
}

/* Распродажа - ярко-красный с биркой */
.badge-rasprodazha {
  background: linear-gradient(135deg, #c62828 0%, #d32f2f 100%);
  color: #fff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.product-badge-large {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
  margin-left: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.product-badge-large.badge-новинка,
.product-badge-large.badge-novinka {
  background: #1e88e5;
  color: #fff;
}

.product-badge-large.badge-хит,
.product-badge-large.badge-hit {
  background: #28a745;
  color: #fff;
}

.product-badge-large.badge-акция,
.product-badge-large.badge-akciya {
  background: #ffc107;
  color: #000;
}

/* Кнопка Поделиться */
.product-share {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s;
}

.product-card:hover .product-share {
  opacity: 1;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.share-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

.share-btn.telegram { color: #0088cc; }
.share-btn.whatsapp { color: #25d366; }
.share-btn.viber { color: #7360f2; }
.share-btn.copy { color: var(--secondary-color); }

.product-share-block {
  margin: 1.5rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
}

.share-label {
  display: block;
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.share-buttons .share-btn,
.share-buttons .product-wishlist-btn,
.share-buttons .share-btn-general {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* Сопутствующие товары */
.related-products {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-products h2 {
  margin-bottom: 1.5rem;
}

/* Категории на главной */
.categories-section {
  margin: 3rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.category-icon img{
  padding: 0.5rem;
  max-width: 200px;
}
.category-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Карточка фабрики на главной */
.factory-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.factory-card-content {
  padding: 1rem;
}

.factory-country-flag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin: 0.75rem 0;
}

.factory-stats-mini {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* Блок корзины в карточке товара */
.product-cart-block {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.qty-btn {
  width: 32px;
  height: 36px;
  border: none;
  background: var(--bg-color);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--primary-color);
  color: #fff;
}

.qty-input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  font-size: 1rem;
}

.qty-input:focus {
  outline: 2px solid var(--primary-color);
}

.add-to-cart-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.add-to-cart-btn:hover {
  background: #1d4ed8;
}

.add-to-cart-btn svg {
  width: 18px;
  height: 18px;
}

/* Единица измерения */
.product-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .product-price-block {
    gap: 0.5rem;
  }
  
  .price-value {
    font-size: 1.5rem;
  }
}

.product-unit {
  font-size: 0.875rem;
  color: var(--secondary-color);
}

/* Страница товара - секция корзины */
.product-cart-section {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0;
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: 8px;
}

@media (max-width: 768px) {
  .product-cart-section {
    flex-direction: column;
    padding: 1rem;
  }
}

.quantity-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quantity-selector label {
  font-size: 0.875rem;
  font-weight: 500;
}

.add-to-cart-large {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 14px 24px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.add-to-cart-large:hover {
  background: #1d4ed8;
}

.price-with-unit {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

/* Страницы выборок */
.selection-page {
  max-width: 1400px;
  margin: 0 auto;
}

.selection-seo-text {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

/* Выборки на главной */
.selections-section {
  margin: 3rem 0;
}

.selections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.selection-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
  color: #fff;
  padding: .7rem;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.selection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.selection-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

/* Корзина */
.cart-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.cart-empty-icon {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.cart-empty h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.cart-empty p {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  margin-bottom: 2rem;
}

.cart-table-section {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table thead th {
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--secondary-color);
}

.cart-row td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-product-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-color);
}

.cart-product-img svg {
  width: 100%;
  height: 100%;
}

.cart-product-text h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cart-product-sku {
  font-size: 0.75rem;
  color: var(--secondary-color);
}

.cart-price-cell,
.cart-sum-cell {
  font-weight: 600;
  font-size: 1rem;
}

.price-unit {
  font-size: 0.875rem;
  color: var(--secondary-color);
}

.cart-quantity {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.qty-btn {
  width: 32px;
  height: 36px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.qty-input {
  width: 50px;
  height: 36px;
  border: 1px solid var(--border-color);
  text-align: center;
  font-size: 1rem;
  border-radius: 4px;
}

.btn-remove {
  color: var(--secondary-color);
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

.btn-clear-cart {
  padding: 0.75rem 1.5rem;
  background: var(--bg-color);
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-cart:hover {
  background: #fee2e2;
  color: #dc2626;
}

.cart-mobile-section {
  display: none;
}

/* Summary sidebar */
.cart-summary {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.cart-summary h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.summary-row strong {
  font-weight: 600;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  margin-top: 1rem;
  border-top: 2px solid var(--border-color);
  font-size: 1.1rem;
}

.summary-total strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.btn-add-coupon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.btn-checkout {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background 0.2s;
}

.btn-checkout:hover {
  background: #1d4ed8;
}

/* Delivery section */
.cart-delivery-section,
.cart-order-form {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-top: 2rem;
}

.cart-delivery-section h3,
.cart-order-form h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.delivery-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.delivery-option:hover {
  border-color: var(--primary-color);
  background: #eff6ff;
}

.delivery-option input[type="radio"] {
  width: 18px;
  height: 18px;
}

.delivery-name {
  flex: 1;
  font-weight: 500;
}

.delivery-price {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

.delivery-address {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.delivery-address h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Order form */
.form-fields {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
}

.form-field input,
.form-field textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--primary-color);
  border-color: transparent;
}

.checkbox-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.checkbox-agree input {
  width: 18px;
  height: 18px;
  margin-top: 0.25rem;
}

.checkbox-agree a {
  color: var(--primary-color);
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.payment-options h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.order-form-status {
  min-height: 1.5rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.order-form-status.is-loading {
  color: #2563eb;
}

.order-form-status.is-success {
  color: #15803d;
}

.order-form-status.is-error {
  color: #b91c1c;
}

.btn-submit-order {
  width: 100%;
  padding: 1rem;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit-order:hover {
  background: #15803d;
}

/* Mobile */
@media (max-width: 768px) {
/*   main {
  padding: 0.2rem;
} */
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-table-section {
    display: none;
  }

  .cart-mobile-section {
    display: block;
  }

  .cart-summary {
    position: static;
  }

  .cart-mobile-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .cart-mobile-top {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
  }

  .cart-mobile-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
    flex-shrink: 0;
  }

  .cart-mobile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .cart-mobile-img svg {
    width: 100%;
    height: 100%;
  }

  .cart-mobile-text {
    flex: 1;
  }

  .cart-mobile-text h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
  }

  .btn-remove-mobile {
    position: absolute;
    top: 0;
    right: 0;
    padding: 8px;
    color: var(--secondary-color);
    background: none;
    border: none;
    cursor: pointer;
  }

  .btn-remove-mobile:hover {
    color: #dc2626;
  }

  .cart-mobile-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .cart-mobile-price,
  .cart-mobile-qty {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .cart-mobile-price span,
  .cart-mobile-qty span {
    font-size: 12px;
    color: var(--secondary-color);
  }

  .cart-mobile-price strong,
  .cart-mobile-sum strong {
    font-size: 16px;
    font-weight: 700;
  }

  .cart-mobile-sum {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
  }
}

/* ============================================
   Home Header Slider & Categories Grid
   ============================================ */

/* Главный контейнер шапки */
.home-header-section {
  max-width: 100vw;
  margin: 0 auto;
  padding: 20px;
}

/* Слайдер */
.home-header-slider {
  margin-bottom: 24px;
}

.slider-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  height: 620px;
}

.slider-main {
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slider-slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.slide-content {
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 2;
}

.slide-title {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.2);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.slider-arrow:hover {
  background: rgba(255,255,255,0.2);
  border-color: #fff;
}

.slider-arrow-prev {
  left: 20px;
}

.slider-arrow-next {
  right: 20px;
}

.slider-thumbnails {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.thumbnail {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail.active,
.thumbnail:hover {
  border-color: #fff;
}

/* Боковые баннеры */
.side-banners {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.side-banner {
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
}

.side-banner:hover {
  transform: translateY(-4px);
}

.banner-discount {
  background: linear-gradient(135deg, #22c55e 0%, #3b82f6 100%);
}

.banner-profit {
  background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
}

.banner-content {
  padding: 24px;
  text-align: center;
  color: #fff;
  width: 100%;
}

.banner-profit .banner-content {
  color: #1e293b;
}

.banner-percent {
  font-size: 56px;
  font-weight: 800;
  display: block;
  line-height: 1;
}

.banner-label {
  font-size: 16px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.9;
}

.banner-profit-text {
  font-size: 28px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.banner-price {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 18px;
}

.banner-icons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 16px 0;
  opacity: 0.8;
}

.banner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}

.banner-link .arrow {
  transition: transform 0.3s ease;
}

.banner-link:hover .arrow {
  transform: translateX(4px);
}

/* Сетка категорий */
.home-categories-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

/* Блок подборок */
.selections-block {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.selections-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px 0;
}

.selections-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-tag {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.selection-tag:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* Плитки категорий */
.categories-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1.5fr);
  gap: 16px;
}

.category-tile {
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  transition: transform 0.3s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.tile-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

/* .tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
} */

.tile-count {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.tile-title {
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Размеры плиток */
.tile-large {
  grid-column: span 2;
  grid-row: span 1;
}

.tile-wide {
  grid-column: span 2;
  grid-row: span 1;
}

/* Адаптивность */
@media (max-width: 1200px) {
  .header-container {
    gap: 1rem;
  }

  .header-nav {
    gap: 1rem;
  }

  .header-nav a {
    font-size: 0.875rem;
  }

  .header-search input {
    width: 180px;
  }

  .slider-container {
    grid-template-columns: 1fr 280px;
    height: 450px;
  }

  .slide-title {
    font-size: 40px;
  }

  .home-categories-grid {
    grid-template-columns: 280px 1fr;
  }

  .categories-tiles {
    grid-template-rows: repeat(2, 180px);
  }
}

@media (max-width: 1024px) {
  .header-left {
    gap: 1rem;
  }

  .header-right {
    gap: 1rem;
  }

  .header-address {
    display: none;
  }

  /* Скрываем старую поисковую строку, оставляем тултип */
  .header-search:not(.search-popup .header-search) {
    display: none;
  }

  .slider-container {
    grid-template-columns: 1fr;
    grid-template-rows: 400px 160px;
    height: auto;
  }

  .side-banners {
    flex-direction: row;
  }

  .home-categories-grid {
    grid-template-columns: 1fr;
  }

  .selections-block {
    order: 2;
  }

  .categories-tiles {
    order: 1;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 220px);
  }
}

@media (max-width: 768px) {
  .home-header-section {
    padding: 12px;
  }
  
  .slider-container {
    grid-template-rows: 300px 120px;
  }
  
  .slide-title {
    font-size: 28px;
    top: 20px;
    left: 20px;
  }
  
  .slider-arrow {
    width: 40px;
    height: 40px;
  }
  
  .side-banners {
    flex-direction: column;
  }
  
  .banner-percent {
    font-size: 40px;
  }
  
  .categories-tiles {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 180px);
  }
  
  .tile-large,
  .tile-wide {
    grid-column: span 1;
  }
  
  .selections-block {
    padding: 20px 16px;
  }
  
  .selections-title {
    font-size: 20px;
  }
  
  .selection-tag {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .slider-container {
    grid-template-rows: 250px 100px;
  }
  
  .slide-title {
    font-size: 24px;
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }

  .categories-tiles {
    grid-template-rows: repeat(4, 150px);
  }

  .tile-title {
    font-size: 16px;
    bottom: 12px;
    left: 12px;
  }
}

/* ============================================
   Search Sidebar (выезжающий справа)
   ============================================ */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-sidebar {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  max-width: 100%;
  height: 100vh;
  background: #fff;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-sidebar.active {
  right: 0;
}

.search-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}

.search-sidebar-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.search-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  font-size: 1.5rem;
  transition: color 0.2s;
}

.search-close:hover {
  color: var(--text-color);
}

.search-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.search-sidebar-footer {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
}

/* Элементы поиска */
.search-group {
  margin-bottom: 1.5rem;
}

.search-group:last-child {
  margin-bottom: 1rem;
}

.search-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.search-group h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-search-input:focus {
  border-color: var(--primary-color);
}

.price-inputs {
  display: flex;
  gap: 0.75rem;
}

.price-input {
  flex: 1;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.price-input:focus {
  border-color: var(--primary-color);
}

/* Чекбоксы */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.search-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.375rem 0;
}

.search-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.search-checkbox span {
  font-size: 0.875rem;
  color: var(--text-color);
}

/* Цветовые свотчи */
.color-swatches-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.color-swatch-filter {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 0;
}

.color-swatch-filter:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-swatch-filter.active {
  box-shadow: 0 0 0 3px var(--primary-color), 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

/* Кнопка "Показать еще" */
.show-more-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.show-more-btn:hover {
  color: var(--secondary-color);
}

/* Select в sidebar */
.filter-select-sidebar {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.filter-select-sidebar:focus {
  border-color: var(--primary-color);
}

/* Кнопки в footer */
.btn-apply-search,
.btn-reset-search {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-apply-search {
  background: var(--primary-color);
  color: #fff;
}

.btn-apply-search:hover {
  background: #1d4ed8;
}

.btn-reset-search {
  background: #e2e8f0;
  color: var(--text-color);
}

.btn-reset-search:hover {
  background: #cbd5e1;
}

.search-count,
.filter-count {
  font-weight: 700;
  margin-left: 0.25rem;
}

/* Кнопка "Фильтр" на страницах */
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-toggle-btn:hover {
  background: #1d4ed8;
}

.filter-toggle-btn svg {
  width: 20px;
  height: 20px;
}

/* Адаптив для search-sidebar */
@media (max-width: 768px) {
  .search-sidebar {
    width: 100%;
    right: -100%;
  }

  .search-sidebar-header {
    padding: 1rem;
  }

  .search-sidebar-content {
    padding: 1rem;
  }

  .search-sidebar-footer {
    padding: 1rem;
    flex-direction: column;
  }

  .btn-apply-search,
  .btn-reset-search {
    width: 100%;
  }

  .checkbox-list {
    max-height: 150px;
  }

  .color-swatches-filter {
    gap: 0.375rem;
  }

  .color-swatch-filter {
    width: 32px;
    height: 32px;
  }
}

/* Кнопка фильтр на мобильном */
@media (max-width: 480px) {
  .filter-toggle-btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .filter-toggle-btn span {
    display: none;
  }

  .filter-toggle-btn svg {
    width: 24px;
    height: 24px;
  }
}

/* ============================================
   Collection List Page
   ============================================ */
.collection-list-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.collection-list-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.collection-list-seo {
  margin-bottom: 2rem;
  color: var(--secondary-color);
  line-height: 1.7;
}

.collection-list-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.collection-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.collection-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f1f5f9;
}

.collection-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.collection-card:hover .collection-card-image img {
  transform: scale(1.05);
}

.collection-card-content {
  padding: 1.25rem;
}

.collection-card-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.collection-factory-name,
.collection-country {
  font-size: 0.875rem;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.collection-products-count {
  font-size: 0.8125rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-top: 0.75rem;
}

/* Адаптив для collection list */
@media (max-width: 768px) {
  .collection-list-page {
    padding: 1rem;
  }

  .collection-list-page h1 {
    font-size: 1.5rem;
  }

  .collections-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }

  .collection-card-image {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .collections-grid {
    grid-template-columns: 1fr;
  }
}
.site-footer {
  background: var(--primary-color);
  padding: 50px 20px 30px;
  margin-top: 60px;
}

.footer-container {
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: .75fr .75fr .75fr 1fr .75fr 1fr;
  gap: 20px;
  background: #fff;
  padding: 1rem;
  border-radius: 18px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  text-align:start;
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}

.footer-subtitle {
  font-size: .9375rem;
  color: #64748b;
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: .9375rem;
  transition: color .3s ease;
}

.footer-link:hover {
  color: #1e6fd9;
}

.footer-phone {
  display: block;
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color .3s ease;
}

.footer-phone:hover {
  color: #1e6fd9;
}

.footer-address {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: .9375rem;
  font-style: normal;
  margin-bottom: 20px;
}

.footer-address svg {
  flex-shrink: 0;
}

.payment-title {
  font-size: .875rem;
  color: #64748b;
  margin-bottom: 12px;
}

.payment-icons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.payment-icon {
  height: 24px;
  width: auto;
}

.payment-icon-text {
  font-size: .8125rem;
  color: #64748b;
  padding: 4px 8px;
  background: #e8eaed;
  border-radius: 4px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e8eaed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all .3s ease;
}

.social-link:hover {
  background: #1e6fd9;
  color: #fff;
  transform: translateY(-3px);
}

.footer-copyright {
  margin-top: auto;
  font-size: .8125rem;
  color: #94a3b8;
}

.footer-subscribe {
  background: linear-gradient(135deg, #1e6fd9 0%, #0d5aba 100%);
  padding: 20px;
  border-radius: 20px;
  color: #fff;
}

.subscribe-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.subscribe-title svg {
  flex-shrink: 0;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.subscribe-input-wrapper {
  display: flex;
  gap: 12px;
}

.subscribe-input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: background .3s ease;
}

.subscribe-input::placeholder {
  color: rgba(255, 255, 255, .7);
}

.subscribe-input:focus {
  background: rgba(255, 255, 255, .25);
}

.subscribe-btn {
  width: 56px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
}

.subscribe-btn:hover {
  background: rgba(255, 255, 255, .35);
  transform: scale(1.05);
}

.subscribe-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .8125rem;
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
}

.subscribe-consent input[type=checkbox] {
  margin-top: 3px;
  flex-shrink: 0;
}

.subscribe-consent a {
  color: rgba(255, 255, 255, .9);
  text-decoration: underline;
}

.subscribe-consent a:hover {
  text-decoration: none;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding: 40px 15px 20px;
    margin-top: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-subscribe {
    padding: 30px 20px;
  }

  .subscribe-title {
    font-size: 1.25rem;
  }

  .subscribe-input-wrapper {
    flex-direction: column;
  }

  .subscribe-btn {
    width: 100%;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .footer-title {
    font-size: 1.125rem;
  }

  .footer-phone {
    font-size: 1rem;
  }

  .social-link {
    width: 36px;
    height: 36px;
  }

  .subscribe-consent {
    font-size: .75rem;
  }
}

/* ========================================
   Вишлист (Избранное)
   ======================================== */

/* Кнопки действий в карточке товара */
.product-actions {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-color);
  justify-content: flex-end;
}

.wishlist-btn-small,
.share-btn-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.wishlist-btn-small:hover,
.share-btn-small:hover {
  border-color: var(--primary-color);
  background: var(--bg-color);
}

.wishlist-btn-small svg,
.share-btn-small svg {
  width: 20px;
  height: 20px;
  transition: all 0.2s ease;
  color: var(--secondary-color);
}

.wishlist-btn-small:hover svg,
.share-btn-small:hover svg {
  color: var(--primary-color);
}

.wishlist-btn-small.added {
  background: #fef2f2;
  border-color: #e11d48;
}

.wishlist-btn-small.added svg {
  fill: #e11d48;
  color: #e11d48;
}

.wishlist-btn-small.added:hover svg {
  color: #be123c;
}

/* Кнопки вишлиста и поделиться на странице товара */
.product-wishlist-btn,
.share-btn-general {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.product-wishlist-btn:hover,
.share-btn-general:hover {
  border-color: var(--primary-color);
  background: var(--bg-color);
}

.product-wishlist-btn svg,
.share-btn-general svg {
  width: 20px;
  height: 20px;
  transition: all 0.2s ease;
  color: var(--secondary-color);
}

.product-wishlist-btn:hover svg,
.share-btn-general:hover svg {
  color: var(--primary-color);
}

.product-wishlist-btn.added {
  background: #fef2f2;
  border-color: #e11d48;
}

.product-wishlist-btn.added svg {
  fill: #e11d48;
  color: #e11d48;
}

.product-wishlist-btn.added:hover svg {
  color: #be123c;
}

/* Кнопки внутри share-buttons на странице товара */
.share-buttons .product-wishlist-btn,
.share-buttons .share-btn-general {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.share-buttons .product-wishlist-btn svg,
.share-buttons .share-btn-general svg {
  width: 22px;
  height: 22px;
}

/* Активная кнопка на странице вишлиста */
.wishlist-btn-active {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: #fef2f2;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  padding: 0;
}

.wishlist-btn-active:hover {
  background: #fee2e2;
  transform: scale(1.1);
}

.wishlist-btn-active svg {
  width: 22px;
  height: 22px;
  fill: #e11d48;
  color: #e11d48;
}

/* Страница вишлиста */
.wishlist-page {
  min-height: 60vh;
  padding: 40px 0;
}

.wishlist-page .page-title {
  font-size: 2rem;
  margin-bottom: 30px;
  text-align: center;
}

.wishlist-empty {
  text-align: center;
  padding: 60px 20px;
}

.wishlist-empty-icon {
  color: #cbd5e1;
  margin-bottom: 20px;
}

.wishlist-empty h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 10px;
}

.wishlist-empty p {
  color: var(--secondary-color);
  margin-bottom: 25px;
}

.wishlist-empty .btn-primary {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 12px 30px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.wishlist-empty .btn-primary:hover {
  background: #1d4ed8;
}

.wishlist-layout {
  display: block;
}

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .wishlist-page {
    padding: 30px 0;
  }

  .wishlist-page .page-title {
    font-size: 1.5rem;
  }

  .wishlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .wishlist-btn-small,
  .share-btn-small,
  .wishlist-btn-active {
    width: 36px;
    height: 36px;
  }

  .wishlist-btn-small svg,
  .share-btn-small svg,
  .wishlist-btn-active svg {
    width: 20px;
    height: 20px;
  }

  .product-actions {
    padding: 8px;
  }
}

/* Счётчик вишлиста в шапке */
.wishlist-count {
  display: none;
  position: absolute;
  top: -5px;
  right: -5px;
  background: #e11d48;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
