/* =============== ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СЛАЙДЕРОВ =============== */

/* Базовые стили для секций */
.bestsellers,
.new-products {
  margin: 40px 0;
}

@media (max-width: 767px) {
  .bestsellers,
  .new-products {
    margin: 30px 0;
  }
}

/* Контейнер для заголовка и фильтров */
.bestsellers .container,
.new-products .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 767px) {
  .bestsellers .container,
  .new-products .container {
    padding: 0 15px;
  }
}

.bestsellers__inner,
.new-products__inner {
  padding: 0 10px;
  margin-bottom: 24px;
}

/* Заголовки */
.bestsellers__header,
.new-products__header {
  margin-bottom: 20px;
  text-align: center;
}

.bestsellers__title,
.new-products__title {
  font-size: 28px;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
}

@media (max-width: 767px) {
  .bestsellers__title,
  .new-products__title {
    font-size: 24px;
  }
}

/* Фильтры */
.bestsellers__filters,
.new-products__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
  justify-content: center;
}

@media (max-width: 767px) {
  .bestsellers__filters,
  .new-products__filters {
    gap: 12px;
  }
}

.bestsellers__filter-link,
.new-products__filter-link {
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  padding: 6px 0;
  white-space: nowrap;
}

.bestsellers__filter-link:hover,
.bestsellers__filter-link.active,
.new-products__filter-link:hover,
.new-products__filter-link.active {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 767px) {
  .bestsellers__filter-link,
  .new-products__filter-link {
    font-size: 14px;
  }
}

/* Слайдер на всю ширину */
.bestsellers__fullwidth,
.new-products__fullwidth {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.bestsellers__carousel,
.new-products__carousel {
  position: relative;
  padding: 10px 0 50px;
  width: 100%;
}

@media (max-width: 767px) {
  .bestsellers__carousel,
  .new-products__carousel {
    padding: 10px 0 45px;
    margin: 0 -10px !important;
    width: calc(100% + 20px) !important;
  }
}

/* Навигация */
.bestsellers__carousel-nav,
.new-products__carousel-nav {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.bestsellers__carousel-btn,
.new-products__carousel-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bestsellers__carousel-btn:hover,
.new-products__carousel-btn:hover {
  background: var(--primary);
  color: white;
}

@media (max-width: 767px) {
  .bestsellers__carousel-btn,
  .new-products__carousel-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* Слайдеры */
#bestsellers-swiper,
#new-products-swiper {
  width: 100%;
  overflow: hidden;
  padding: 0 10px;
}

#bestsellers-swiper .swiper-wrapper,
#new-products-swiper .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

/* Слайды - ОБЩИЕ ДЛЯ ВСЕХ */
#bestsellers-swiper .swiper-slide,
#new-products-swiper .swiper-slide {
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* ======= 2 КАРТОЧКИ НА МОБИЛЬНЫХ ДЛЯ ВСЕХ ======= */
@media (max-width: 767px) {
  #bestsellers-swiper .swiper-slide,
  #new-products-swiper .swiper-slide {
    width: 50% !important;
    flex: 0 0 50% !important;
    padding: 0 5px !important;
  }
  
  #bestsellers-swiper,
  #new-products-swiper {
    padding: 0 15px !important;
  }
  
  /* Карточки товаров */
  #bestsellers-swiper .product-card,
  #new-products-swiper .product-card {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    transform: none !important;
  }
  
  /* Фиксируем изображения */
  #bestsellers-swiper .product-image-container img,
  #new-products-swiper .product-image-container img {
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
    width: 100% !important;
    object-fit: contain !important;
  }
  
  /* Текст */
  #bestsellers-swiper .product-title,
  #new-products-swiper .product-title {
    font-size: 12px !important;
    line-height: 1.3 !important;
    margin: 5px 0 !important;
    height: 32px !important;
    max-height: 32px !important;
  }
  
  #bestsellers-swiper .product-price,
  #new-products-swiper .product-price {
    font-size: 14px !important;
    margin: 5px 0 !important;
  }
}

/* ======= ПЛАНШЕТЫ ======= */
@media (min-width: 768px) and (max-width: 1023px) {
  #bestsellers-swiper,
  #new-products-swiper {
    padding: 0 20px;
  }
  
  #bestsellers-swiper .swiper-slide,
  #new-products-swiper .swiper-slide {
    width: 33.333% !important;
    flex: 0 0 33.333% !important;
    padding: 0 5px !important;
  }
}

/* ======= НОУТБУКИ ======= */
@media (min-width: 1024px) and (max-width: 1199px) {
  #bestsellers-swiper,
  #new-products-swiper {
    padding: 0 30px;
  }
  
  #bestsellers-swiper .swiper-slide,
  #new-products-swiper .swiper-slide {
    width: 25% !important;
    flex: 0 0 25% !important;
    padding: 0 7.5px !important;
  }
}

/* ======= ДЕСКТОПЫ ======= */
@media (min-width: 1200px) {
  #bestsellers-swiper,
  #new-products-swiper {
    padding: 0 40px;
  }
  
  #bestsellers-swiper .swiper-slide,
  #new-products-swiper .swiper-slide {
    width: 20% !important;
    flex: 0 0 20% !important;
    padding: 0 8px !important;
  }
}

/* Сообщения об отсутствии товаров */
.bestsellers__empty,
.new-products__empty {
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  padding: 30px 10px;
}

/* Футер с ссылкой (только для новинок) */
.new-products__footer {
  text-align: center;
  margin-top: 20px;
}

.new-products__all-link {
  color: #000;
  text-decoration: underline;
  font-weight: 500;
}

/* Внутренний контейнер для текста */
.crocodila-main {
    width: 95%;
    margin: 0 auto;
}

/* Заголовки - ЧЕРНЫЙ ЦВЕТ */
.crocodila-container h1,
.crocodila-container h2,
.crocodila-container h3 {
    color: #000000; /* ЧЕРНЫЙ */
    font-weight: 700;
    margin-top: 1.5rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.crocodila-container h1 {
    font-size: 28px;
    margin-bottom: 1.2rem;
    color: #000000; /* ЧЕРНЫЙ */
}

.crocodila-container h2 {
    font-size: 24px;
    margin-bottom: 1rem;
    color: #000000; /* ЧЕРНЫЙ */
}

/* Абзацы */
.crocodila-container p {
    margin-bottom: 1rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    color: #000000; /* ЧЕРНЫЙ */
}

/* Списки */
.crocodila-container ul,
.crocodila-container ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.crocodila-container li {
    margin-bottom: .6rem;
    color: #000000; /* ЧЕРНЫЙ */
}

/* Декоративные блоки */
.crocodila-block {
    background: #f8f9fa;
    border-left: 6px solid #6c757d; /* СЕРЫЙ ЦВЕТ */
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Акценты */
.crocodila-highlight {
    color: #000000; /* ЧЕРНЫЙ */
    font-weight: 600;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

/* СТИЛИ ДЛЯ КНОПКИ "СВЕРНУТЬ/РАЗВЕРНУТЬ" */

/* Контейнер с ограниченной высотой - УВЕЛИЧЕН ДО РАЗМЕРА КОНТЕЙНЕРА */
.content-preview {
    position: relative;
    overflow: hidden;
    transition: height 0.4s ease;
    will-change: height;
    margin: 30px auto; /* УВЕЛИЧЕН ОТСТУП */
    width: 95%; /* ТАКОЙ ЖЕ ШИРИНЫ КАК И КОНТЕЙНЕР */
}

/* Состояние свернутое */
.content-preview.collapsed {
    height: 180px; /* УВЕЛИЧЕНА ВЫСОТА */
}

/* Градиентное затемнение внизу - РАСТЯНУТО НА ВЕСЬ КОНТЕЙНЕР */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px; /* УВЕЛИЧЕНА ВЫСОТА */
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 0 0 15px 15px; /* ЗАКРУГЛЕНИЕ СНИЗУ */
}

.fade-overlay.hidden {
    opacity: 0;
}

/* Кнопка развернуть/свернуть - ПРОЗРАЧНАЯ С ЧЕРНЫМ ТЕКСТОМ */
.crocodila-seo-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px; /* УВЕЛИЧЕНЫ ОТСТУПЫ */
    background: transparent; /* ПРОЗРАЧНЫЙ ФОН */
    color: #000000; /* ЧЕРНЫЙ ТЕКСТ */
    border: 2px solid #000000; /* ЧЕРНАЯ РАМКА */
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 25px auto; /* УВЕЛИЧЕН ОТСТУП */
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
    width: fit-content;
}

.crocodila-seo-expand-btn:hover {
    background: rgba(0, 0, 0, 0.05); /* СЛАБАЯ ТЕМНАЯ ПОДСВЕТКА ПРИ НАВЕДЕНИИ */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.crocodila-seo-expand-btn.expanded {
    background: rgba(0, 0, 0, 0.1); /* НЕМНОГО ТЕМНЕЕ ПРИ АКТИВНОМ СОСТОЯНИИ */
    border-color: #000000; /* ЧЕРНАЯ РАМКА */
}

.crocodila-seo-expand-btn.expanded:hover {
    background: rgba(0, 0, 0, 0.15);
}

.crocodila-seo-expand-btn__text {
    font-weight: 600;
}

.crocodila-seo-expand-btn__icon {
    display: inline-block;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
    font-weight: bold;
    color: #000000; /* ЧЕРНЫЙ ЦВЕТ ИКОНКИ */
}

.crocodila-seo-expand-btn.expanded .crocodila-seo-expand-btn__icon {
    transform: rotate(270deg);
}

/* Адаптивность для кнопки и контейнера */
@media (max-width: 768px) {
    .content-preview.collapsed {
        height: 200px; /* УВЕЛИЧЕНА ВЫСОТА НА МОБИЛЬНЫХ */
    }
    
    .crocodila-seo-expand-btn {
        padding: 10px 25px;
        font-size: 15px;
        margin: 20px auto;
    }
    
    .fade-overlay {
        height: 120px; /* УВЕЛИЧЕНА ВЫСОТА НА МОБИЛЬНЫХ */
    }
    
    .crocodila-container {
        padding: 2rem;
        width: 100%;
    }
    
    .crocodila-main,
    .crocodila-container p,
    .crocodila-container ul,
    .crocodila-container ol,
    .crocodila-block,
    .crocodila-highlight {
        width: 100%;
    }
    
    .crocodila-container h1 {
        font-size: 24px;
    }
    
    .crocodila-container h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .content-preview.collapsed {
        height: 220px; /* УВЕЛИЧЕНА ВЫСОТА НА МАЛЕНЬКИХ ЭКРАНАХ */
    }
    
    .fade-overlay {
        height: 140px; /* УВЕЛИЧЕНА ВЫСОТА НА МАЛЕНЬКИХ ЭКРАНАХ */
    }
    
    .crocodila-container {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .crocodila-container h1 {
        font-size: 22px;
    }
    
    .crocodila-container h2 {
        font-size: 18px;
    }
    
    .crocodila-seo-expand-btn {
        padding: 9px 22px;
        font-size: 14px;
    }
}

/* Вариант 1: Простая серая рамка */
@media (max-width: 992px) {
    .stats {
        padding: 30px 0;
        margin: 30px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 600px;
    }
    
    .stat-item {
        padding: 18px 12px;
        border: 2px solid transparent;
        background: linear-gradient(white, white) padding-box,
                    linear-gradient(45deg, #2c5282, #4299e1) border-box; 
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-text {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .stats {
        padding: 25px 0;
        margin: 25px 0;
    }
    
    .stats-grid {
        gap: 12px;
        padding: 0 15px;
    }
    
    .stat-item {
        padding: 15px 10px;
        border-radius: 10px;
        border: 2px solid transparent;
        background: linear-gradient(white, white) padding-box,
                    linear-gradient(45deg, #2c5282, #4299e1) border-box;  
    }
    
    .stat-number {
        font-size: 28px;
        margin-bottom: 5px;
    }
    
    .stat-text {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .stats {
        padding: 20px 0;
        margin: 20px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
    
    .stat-item {
        padding: 12px 8px;
        border-radius: 8px;
        border: 2px solid transparent;
        background: linear-gradient(white, white) padding-box,
                    linear-gradient(45deg, #2c5282, #4299e1) border-box;   
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-text {
        font-size: 13px;
        font-weight: 400;
    }
}

@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    
    .stat-item {
        padding: 15px 10px;
        border: 2px solid transparent;
        background: linear-gradient(white, white) padding-box,
                    linear-gradient(45deg, #2c5282, #4299e1) border-box;   
    }
    
    .stat-number {
        font-size: 26px;
    }
    
    .stat-text {
        font-size: 14px;
    }
}