/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */

/* ========== Отступы между товарами ========== */
.products .product-miniature {
  margin-bottom: 45px;
}

@media (max-width: 767px) {
  .products .product-miniature {
    margin-bottom: 50px;
  }
}

/* ========== Кастомное поле количества ========== */
.atc_div {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.atc_qty {
  width: 60px !important;
  height: 38px !important;
  padding: 5px 10px !important;
  font-size: 14px !important;
  text-align: center !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
}

/* Мобильная версия поля количества */
@media (max-width: 767px) {
  .atc_qty {
    width: 50px !important;
    height: 34px !important;
    font-size: 13px !important;
  }
}

/* ========== Кнопка "Добавить в корзину" ========== */
.add_to_cart {
  background-color: #1a73e8 !important;
  border-color: #1a73e8 !important;
  color: #fff !important;
  padding: 8px 16px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.add_to_cart:hover {
  background-color: #0d5cbd !important;
  border-color: #0d5cbd !important;
  color: #fff !important;
}

.add_to_cart .material-icons {
  margin-right: 5px !important;
  font-size: 18px !important;
}

/* ========== Центрирование блока корзины ========== */
.product-price-and-shipping {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========== Мобильная версия ========== */
@media (max-width: 767px) {
  .atc_div {
    flex-direction: row;
    justify-content: flex-start;
  }
  
  .add_to_cart {
    height: 34px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
  
  .add_to_cart .material-icons {
    margin-right: 3px !important;
    font-size: 16px !important;
  }
}

/* ========== Баннеры -  ========== */
.banner {
  display: block !important;
  text-align: center !important;
  margin: 20px auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

.banner img {
  display: block !important;
  margin: 0 auto !important;
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
}

.banner img.img-fluid {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Мобильная версия баннеров */
@media (max-width: 767px) {
  .banner {
    margin: 15px auto !important;
    width: 100% !important;
  }
  
  .banner img,
  .banner img.img-fluid {
    width: 100% !important;
    height: auto !important;
    max-height: 300px !important;
  }
}

/* ========== Страница брендов -  ========== */
/* Обёртка страницы брендов */
#main > ul {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 30px !important;
  padding: 0 !important;
  list-style: none !important;
  margin: 30px auto !important;
  max-width: 1200px !important;
}

/* Карточка бренда */
.brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  max-width: 250px !important;
  width: 100% !important;
  padding: 20px !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.brand:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
  transform: translateY(-2px) !important;
}

/* Изображение бренда -  */
.brand-img {
  width: 100% !important;
  height: 150px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 15px !important;
  overflow: hidden !important;
}

.brand-img img {
  max-width: 100% !important;
  max-height: 100% !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Информация о бренде -  */
.brand-infos {
  margin-bottom: 15px !important;
  width: 100% !important;
  text-align: center !important;
}

.brand-infos p {
  margin: 8px 0 !important;
  font-size: 14px !important;
  color: #333 !important;
  line-height: 1.5 !important;
}

.brand-infos p:first-child a {
  font-weight: bold !important;
  color: #1a73e8 !important;
  text-decoration: none !important;
  font-size: 16px !important;
}

.brand-infos p:first-child a:hover {
  text-decoration: underline !important;
}

/* Продукты бренда */
.brand-products {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid #e0e0e0 !important;
}

.brand-products a {
  display: block !important;
  padding: 8px 12px !important;
  background: #f5f5f5 !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  color: #333 !important;
  font-size: 13px !important;
  transition: background 0.3s ease !important;
  text-align: center !important;
}

.brand-products a:hover {
  background: #e0e0e0 !important;
  color: #1a73e8 !important;
}

/* Мобильная версия брендов */
@media (max-width: 767px) {
  #main > ul {
    gap: 15px !important;
    margin: 15px auto !important;
  }
  
  .brand {
    max-width: 100% !important;
    padding: 15px !important;
  }
  
  .brand-img {
    height: 120px !important;
  }
}

/* Планшеты */
@media (min-width: 768px) and (max-width: 1023px) {
  .brand {
    max-width: 200px !important;
  }
  
  .brand-img {
    height: 130px !important;
  }
}
/* Отступы между товарами в категориях - только вертикальные */
#products .products.row .product-miniature {
    margin-bottom: 80px; /* Отступ снизу между товарами */
}

/* Убираем лишние отступы для корректной сетки 3 колонки */
#products .products.row .product-miniature {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 767px) {
    #products .products.row .product-miniature {
        margin-bottom: 45px;
        padding-right: 2px;
        padding-left: 2px;
    }
}