/* ============================================
   СОВРЕМЕННЫЕ СТИЛИ SOFTBUYER.RU
   ============================================ */

/* CSS переменные для цветовой схемы */
:root {
  /* Основные цвета */
  --primary-color: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  
  /* Нейтральные цвета */
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  
  /* Фоны */
  --bg-white: #FFFFFF;
  --bg-gray-50: #F9FAFB;
  --bg-gray-100: #F3F4F6;
  
  /* Границы */
  --border-color: #E5E7EB;
  --border-light: #F3F4F6;
  
  /* Акценты */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  
  /* Тени */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Радиусы */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Переходы */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Глобальные стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Контейнер */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

/* ============================================
   ШАПКА САЙТА
   ============================================ */

/* Верхняя навигация */
.top-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.top-bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.top-bar a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.top-bar a:hover {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .top-bar ul {
    gap: 1rem;
    font-size: 0.75rem;
  }
}

/* Основной хедер */
header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0;
}

@media (max-width: 1024px) {
  .header-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0;
  }
}

/* Логотип */
.logo {
  display: flex;
  align-items: center;
}

.logo img,
.logo svg {
  height: 50px;
  width: auto;
}

@media (max-width: 768px) {
  .logo img,
  .logo svg {
    height: 40px;
  }
}



/* Обёртка меню */
.menu-wrapper {
  background: white;
  border-bottom: 1px solid #E5E7EB;
  padding: 12px 20px;
  position: relative;
  z-index: 1000;
}
.menu-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Кнопка "Каталог" */
.menu-mega-toggle {
  padding: 8px 16px;
  background: #4f6ef7;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.menu-mega-toggle .hamburger-icon {
  font-size: 18px;
}
.menu-mega-toggle:hover {
  background: #3b5bdb;
}

/* Мега-меню (оверлей) */
.mega-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}
.mega-menu-container {
  width: 90%;
  max-width: 1200px;
  height: 80%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 35px -10px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mega-menu-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.mega-header-left, .mega-header-right {
  flex: 0 0 auto;
}
.mega-header-center {
  flex: 1;
  position: relative;
}
.mega-logo img {
  height: 40px;
  max-width: 150px;
  object-fit: contain;
}
.mega-search-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 40px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s;
}
.mega-search-input:focus {
  border-color: #4f6ef7;
}
.mega-search-spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #E5E7EB;
  border-top-color: #4f6ef7;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
.mega-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6B7280;
  padding: 4px 8px;
}
.mega-close-btn:hover {
  color: #1F2937;
}
.mega-menu-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}
.mega-left-column {
  width: 30%;
  background: #F9FAFB;
  border-right: 1px solid #E5E7EB;
  overflow-y: auto;
  padding: 12px 0;
}
.mega-category-item, .search-group-title, .search-sub-item {
  position: relative;
}
.mega-category-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}
.mega-category-item:hover {
  background: #E5E7EB;
}
.mega-category-item.active {
  background: #4f6ef7;
  color: white;
}
/* Стили для результатов поиска (группировка) */
.search-group {
  margin-bottom: 16px;
}
.search-group-title {
  font-weight: bold;
  padding: 8px 20px;
  background: #EEF2FF;
  color: #1F2937;
  font-size: 14px;
}
.search-sub-item {
  padding: 8px 20px 8px 40px;
  cursor: pointer;
  font-size: 14px;
}
.search-sub-item:hover {
  background: #E5E7EB;
}
.search-highlight {
  background: #FDE047;
  font-weight: bold;
}
/* Стрелка перехода в раздел */
.mega-category-item .category-link,
.search-sub-item .category-link {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  color: #6B7280;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.8);
}
.mega-category-item .category-link:hover,
.search-sub-item .category-link:hover {
  background: white;
  color: #4f6ef7;
}
.mega-category-item.active .category-link {
  color: white;
}
/* Правая колонка – общие стили */
.mega-right-column {
  width: 70%;
  overflow-y: auto;
  padding: 20px;
}
/* Стили для подразделов (когда поиск пуст) */
.mega-subcategories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.mega-subcategory-item {
  display: inline-block;
  padding: 8px 16px;
  background: #F3F4F6;
  border-radius: 20px;
  text-decoration: none;
  color: #1F2937;
  font-size: 14px;
  transition: background 0.2s;
}
.mega-subcategory-item:hover {
  background: #4f6ef7;
  color: white;
}
/* Стили карточек товаров (для поиска) */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.product-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.product-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 4px;
}
.product-info {
  flex: 1;
}
.product-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.product-price {
  font-size: 14px;
  color: #4f6ef7;
  font-weight: 500;
}
.empty-message {
  text-align: center;
  color: #6B7280;
  padding: 40px;
}
.section-title {
  font-weight: bold;
  margin: 16px 0 8px;
  font-size: 18px;
  border-left: 4px solid #4f6ef7;
  padding-left: 12px;
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
  .menu-wrapper {
    padding: 8px 16px;
  }
  .mega-menu-container {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .mega-menu-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .mega-header-left {
    order: 1;
  }
  .mega-header-center {
    order: 3;
    flex: 0 0 100%;
  }
  .mega-header-right {
    order: 2;
  }
  .mega-menu-content {
    flex-direction: column;
  }
  .mega-left-column {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #E5E7EB;
    max-height: 40%;
  }
  .mega-right-column {
    width: 100%;
    max-height: 60%;
  }
}

.program-page { max-width:1200px; margin:0 auto; font-family:Arial, sans-serif; }
.program-main { display:flex; gap:20px; margin-bottom:30px; flex-wrap:wrap; }
.program-image { width:200px; height:auto; border-radius:4px; flex-shrink:0; }
.program-info { flex:1; }
.program-desc.short { display:-webkit-box; -webkit-line-clamp:6; -webkit-box-orient:vertical; overflow:hidden; }
button.toggle-desc { margin-top:10px; padding:6px 12px; cursor:pointer; }
.program-versions .versions-list { display:flex; flex-wrap:wrap; gap:15px; }
.version-card { border:1px solid #ddd; padding:10px; border-radius:6px; flex:1 1 300px; background:#f9f9f9; }
.version-card .btn-download { display:inline-block; margin-top:5px; padding:6px 12px; background:#28a745; color:#fff; text-decoration:none; border-radius:4px; }
.prices { margin-top:10px; display:flex; flex-wrap:wrap; gap:10px; }
.price-card { border:1px solid #ccc; padding:8px; border-radius:4px; flex:1 1 150px; background:#fff; text-align:center; }
.btn-buy { display:inline-block; margin-top:5px; padding:6px 10px; background:#007bff; color:#fff; text-decoration:none; border-radius:4px; }

.also-programs { margin-top:40px; }
.slider-wrapper { width:100%; overflow:hidden; } /* Swiper обёртка */
.swiper-slide { height:auto; } /* Убираем фиксированную высоту, оставляем авто */
.slider-item img { width:100%; height:120px; object-fit:contain; border-radius:4px; }
.slider-item .slider-name { margin-top:5px; font-size:14px; text-align:center; }
/* Добавить в конец стилей */
.also-programs {
  overflow-x: hidden;
  width: 100%;
}
.slider-wrapper {
  width: 100%;
  overflow: hidden;
}
.swiper {
  overflow: hidden;
}
.program-page {
  overflow-x: hidden;
}
@media (max-width:500px) {
  .also-programs {
    display:none !important;
  }
}

/* Поиск */
.search-area {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  position:relative;
}

.search-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-gray-50);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.search-field-wrapper:focus-within {
  border-color: var(--primary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-field {
  width: 100%;
  padding: 0.875rem 1rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
  color: var(--text-primary);
}

.search-field::placeholder {
  color: var(--text-muted);
}

.search-button {
  padding: 0.875rem 1.5rem;
  background: var(--primary-color);
  border: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

@media (max-width: 768px) {
  .search-field {
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
  }
  
  .search-button {
    padding: 0.75rem 1rem;
  }
}

/* Контакты в хедере */
.contact-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.contact-info i {
  color: var(--primary-color);
}

@media (max-width: 1024px) {
  .contact-info {
    justify-content: center;
  }
}

/* ============================================
   НАВИГАЦИОННОЕ МЕНЮ
   ============================================ */

.main-nav {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-container::-webkit-scrollbar {
  display: none;
}

.nav-menu {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  list-style: none;
  white-space: nowrap;
}

.nav-item a {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-item a:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 0.25rem;
  }
  
  .nav-item a {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* ============================================
   СЛАЙДЕР
   ============================================ */

.hero-slider {
  margin-bottom: 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  min-height: 400px;
}

.slide-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.slide-content .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 1rem 0;
}

.slide-content p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 1024px) {
  .slide {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
    text-align: center;
  }
  
  .slide-content h2 {
    font-size: 2rem;
  }
  
  .slide-content .price {
    font-size: 1.75rem;
  }
  
  .hero-slider {
    padding: 2rem 0;
    margin-bottom: 2rem;
  }
}

/* ============================================
   СЕКЦИИ КОНТЕНТА
   ============================================ */

.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Сетка продуктов */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ajax-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 35px -10px rgba(0,0,0,0.2);
  z-index: 10000;
  max-height: 80vh;
  overflow-y: auto;
  margin-top: 8px;
  padding: 16px;
}
.search-wrapper {
  position: relative;
}
/* Стили для секций (овалы) */
.search-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 16px;
}
.search-section-link {
  display: inline-block;
  padding: 6px 16px;
  background: #F3F4F6;
  border-radius: 30px;
  text-decoration: none;
  color: #1F2937;
  font-size: 14px;
  transition: all 0.2s;
}
.search-section-link:hover {
  background: #4f6ef7;
  color: white;
}
/* Стили для товаров */
.search-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search-product-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}
.search-product-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.search-product-image {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
}
.search-product-info {
  flex: 1;
}
.search-product-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}
.search-product-price {
  font-size: 13px;
  color: #4f6ef7;
}
.search-more-btn {
  display: block;
  text-align: center;
  margin-top: 16px;
  padding: 10px;
  background: #F9FAFB;
  border-radius: 8px;
  text-decoration: none;
  color: #4f6ef7;
  font-weight: 500;
  transition: background 0.2s;
}
.search-more-btn:hover {
  background: #E5E7EB;
}
.ajax-search-loading {
  text-align: center;
  padding: 20px;
  color: #6B7280;
}
@media (max-width: 768px) {
  .ajax-search-results {
    position: fixed;
    top: 60px;
    left: 10px;
    right: 10px;
    max-height: 70vh;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  .search-wrapper {display: none !important;}
  .top-bar ul li:nth-child(3),
  .top-bar ul li:nth-child(4) {
    display: none;
  }
}

/* Карточка продукта */
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--bg-gray-50);
  padding: 16px;         /* отступы вокруг маленького логотипа */
  box-sizing: border-box;
}

.product-content {
  padding: 1.25rem;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.btn-buy {
  padding: 0.625rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9375rem;
}

.btn-buy:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* ============================================
   БРЕНДЫ
   ============================================ */

.brands-section {
  background: var(--bg-white);
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  align-items: center;
}

.brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  filter: grayscale(100%);
  opacity: 0.6;
}

.brand-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.brand-item img {
  max-width: 120px;
  height: auto;
}

@media (max-width: 768px) {
  .brands-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
  }
  
  .brand-item img {
    max-width: 80px;
  }
}

/* ============================================
   ФУТЕР
   ============================================ */

footer {
  background: var(--text-primary);
  color: #D1D5DB;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.625rem;
}

.footer-section a {
  color: #D1D5DB;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo img,
.footer-logo svg {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.payment-methods {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.payment-methods img {
  height: 30px;
  width: auto;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   УТИЛИТЫ
   ============================================ */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Адаптивные утилиты */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .show-mobile {
    display: none !important;
  }
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}
/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ШАБЛОНА
   ============================================ */

/* Верхняя навигация (топ-бар) */
.top-bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-bar a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.top-bar a:hover {
  color: var(--primary-color);
}

/* Контейнер хедера */
.header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0;
}

@media (max-width: 1024px) {
  .header-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0;
  }
}

/* Логотип */
.logo img, .logo svg {
  height: 50px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo img, .logo svg {
    height: 40px;
  }
}

/* Поиск */
.search-wrapper {
  position: relative;
  display: flex;
  background: var(--bg-gray-50);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.search-wrapper:focus-within {
  border-color: var(--primary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-field {
  flex: 1;
  padding: 0.875rem 1rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
  color: var(--text-primary);
}

.search-field::placeholder {
  color: var(--text-muted);
}

.search-button {
  padding: 0.875rem 1.5rem;
  background: var(--primary-color);
  border: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* Контактная информация в хедере */
.contact-info-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.contact-info-header i {
  color: var(--primary-color);
}

/* Меню (карусель) */
/*
.main-menu {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

.menu-carousel {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0;
}
*/

.main-menu {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

/* Убираем лишнюю прокрутку, меню само адаптируется через JS */
.menu-carousel {
  overflow: visible;
  padding: 0;
}

.menu-carousel::-webkit-scrollbar {
  height: 4px;
}

.menu-carousel::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 4px;
}

.menu-carousel::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

/* Hero-слайдер (главный баннер) */
.hero-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bg-white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--bg-white);
  margin-bottom: 2rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
}

.hero-button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Секции */
.section {
  padding: 3rem 0;
}

.section-bg {
  background: var(--bg-white);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Сетка новостей */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Бренды */
.brands-carousel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: center;
}

.brand-item {
  flex: 0 0 auto;
  transition: var(--transition);
  filter: grayscale(100%);
  opacity: 0.6;
}

.brand-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.brand-item img {
  max-width: 120px;
  height: auto;
}

/* Хлебные крошки и заголовок секции */
.section-header {
  margin-bottom: 2rem;
}
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}
.breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Сетка категорий */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.category-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}
.category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.category-card h3 a {
  text-decoration: none;
  color: var(--text-primary);
}
.category-card h3 a:hover {
  color: var(--primary-color);
}
.subcategories-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.subcategories-list li {
  margin-bottom: 0.5rem;
}
.subcategories-list a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: var(--transition);
}
.subcategories-list a:hover {
  color: var(--primary-color);
}

/* Карточка товара (если уже есть — дополняем) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}
.product-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--bg-gray-50);
  padding: 1rem;
}
.product-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.product-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}
.btn-buy {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-buy:hover {
  background: var(--primary-hover);
}
.text-center {
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.page-link:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
}
.page-link.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

@media (max-width: 768px) {
  .brand-item img {
    max-width: 80px;
  }
  .brands-carousel {
    gap: 1rem;
  }
}

/* Футер */
footer {
  background: var(--text-primary);
  color: #D1D5DB;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-widget h3 {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
}

.footer-widget li {
  margin-bottom: 0.625rem;
}

.footer-widget a {
  color: #D1D5DB;
  text-decoration: none;
  transition: var(--transition);
}

.footer-widget a:hover {
  color: white;
}

.footer-widget p {
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: var(--transition);
  color: white;
  text-decoration: none;
}

.social-icons a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  font-size: 0.875rem;
  opacity: 0.7;
}

.copyright a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.payment-methods {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.payment-methods img {
  height: 30px;
  width: auto;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .search-area {
    max-width: 100%;
  }
  .header-content {
    display:flex;
  }
  .program-main {
    display: inline-block;
  }

  .hero-title {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
}