/*
 Theme Name:   Intobr Child
 Theme URI:    http://intobr.kg/intobr-child/
 Description:  Дочерняя тема для Zakra
 Author:       Nurbek Bazarbaev
 Author URI:   intobr.kg
 Template:     zakra
 Version:      1.0.0
 Text Domain:  intobr-child
*/

@import url("../zakra/style.css");

.mc4wp-form-fields p{margin:0}.mc4wp-form input{width:auto;display:inline-block}.mc4wp-form input[type=submit]{margin-left:-4px}

/* Общее выравнивание карточек товаров */
ul.products li.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 460px; /* увеличь если карточки выше */
    position: relative;
    box-sizing: border-box;
}

/* Контейнер с контентом (название, цена и т.д.) */
ul.products li.product .woocommerce-loop-product__link {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Добавляем фиксированное расстояние до кнопок */
ul.products li.product .button {
    margin-top: auto;
}

/* Выравниваем сами кнопки по центру */
ul.products li.product .add_to_cart_button,
ul.products li.product .compare.button {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

/* Убираем лишние отступы темы Zakra */
ul.products li.product .price {
    margin-bottom: 10px;
}

ul.products li.product h2.woocommerce-loop-product__title {
    min-height: 3em; /* фиксированная высота заголовка */
    line-height: 1.5em;
    overflow: hidden;
}
/* Стили для кнопки "Подробнее" */
ul.products li.product .button.product_type_simple {
	display: block;
	width: 100%;
	text-align: center;
	margin-top: auto;
	box-sizing: border-box;
}
/*Решаем проблему обрезки картинки в каталоге*/
.woocommerce ul.products li.product a img {
    object-fit: contain !important;
    width: 100% !important;
    height: auto !important;
}
ul.products li.product a.woocommerce-LoopProduct-link img {
    height: auto !important;
    max-height: unset !important;
    width: 100% !important;
    object-fit: contain !important;
    display: block;
}

ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto !important;
    max-height: unset !important;
}
ul.products li.product img {
    max-height: 250px; /* регулируй под нужный размер */
    width: auto;
    margin: 0 auto;
}



/* Стили для слайдера брендов в каталоге*/ 

/* Слайдер брендов */
.brands-swiper {
    margin: 30px 0;
    padding-bottom: 40px;
}

.swiper-slide.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

.brand-item img {
    max-width: 100px;
    max-height: 80px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}
/* Убираем выделение при клике */
.brands-swiper,
.brands-swiper * {
    user-select: none;
}

/* Слой слайдов выше, чем фон, но ниже стрелок */
.brands-swiper .swiper-slide.brand-item {
    position: relative;
    z-index: 1;
}


/* Лейблы товара */
.custom-product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.custom-product-label {
    background-color: #ff4d4d;
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
}

.label-hit {
    background-color: #ffa500;
}

.label-new {
    background-color: #28a745;
}

.label-sale {
    background-color: #007bff;
}

.woocommerce ul.products li.product,
.woocommerce div.product {
    position: relative;
}


/* === Сетка партнёров: 6 колонок, overlay с названием === */

.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 30px;
  padding: 0;
}

.partner-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.partner-item img {
  max-width: 100%;
  max-height: 100%;
  transition: 0.4s ease;
  object-fit: contain;
  display: block;
}

.partner-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  padding: 10px;
}

.partner-item:hover .partner-overlay {
  opacity: 1;
}

.partner-item:hover img {
  transform: scale(1.05);
  filter: brightness(50%);
}

/* Адаптивность */
@media (max-width: 1200px) {
  .partners-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/*Отключение в постах мета данные*/
.zak-entry-meta {
  display: none !important;
}


/*категория записей */
.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

@media (max-width: 768px) {
  .grid-wrapper {
    grid-template-columns: 1fr;
  }
}

/*категория записей */
.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ровно 3 колонки */
  gap: 30px;
  padding: 20px 0;
}

@media (max-width: 1024px) {
  .grid-wrapper {
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на средних экранах */
  }
}

@media (max-width: 600px) {
  .grid-wrapper {
    grid-template-columns: 1fr; /* 1 колонка на мобильных */
  }
}

.grid-wrapper article {
  background: #fff;
  padding: 15px;
  border: 1px solid #eee;
  transition: transform 0.3s ease;
  text-align: center;
}

.grid-wrapper article:hover {
  transform: scale(1.02);
}

.grid-wrapper .thumb img {
  max-width: 100%;
  height: auto;
}

.entry-excerpt {
  margin-top: 10px;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
  min-height: 3.5em; /* фиксированная высота для ровных карточек */
  overflow: hidden;
  text-overflow: ellipsis;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  color: #0073aa;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.read-more:hover {
  color: #005177;
}

.header-contacts {
  text-align: center;
}

/*Elementor Основные услуги*/
.service-card {
  text-align: center;
  padding: 30px 15px;
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-card img {
  max-width: 60px;
  margin-bottom: 15px;
}

.service-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 14px;
  color: #666;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 4px;
  background: #ffe100;
}
/* Увеличение карточки */
.service-card {
  transition: transform 0.3s ease;
}
.service-card:hover {
  transform: scale(1.03);
}

/* Цвет SVG иконки по умолчанию */
.service-card .elementor-icon svg {
  transition: fill 0.3s ease, filter 0.3s ease;
  fill: #555; /* или любой базовый цвет */
  filter: grayscale(100%) brightness(0.7);
}

/* Цвет SVG при наведении */
.service-card:hover .elementor-icon svg {
  fill: #f4b400; /* например, желтый */
  filter: none;
}

/*Action to call popups*/
.call-popup-btn {
  background-color: #0073aa;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
}

.call-popup-btn:hover {
  background-color: #005e8a;
}


/* Уменьшаем заголовки записей в архивах */
.archive .entry-title {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

.archive .entry-title {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Количество строк */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}