/*
  Sovaa Product Slider styles
  Важно: стили максимально изолированы (только .sovaa-*)
*/

/* Обертка */
.sovaa-slider-main-wrap {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 50px; /* Место под стрелки */
  box-sizing: border-box;
}

/* Минимальный набор стилей Swiper (чтобы не зависеть от swiper.css) */
.sovaa-swiper {
  width: 100%;
  overflow: hidden;
  padding-bottom: 50px;
  box-sizing: border-box;
}
.sovaa-swiper .swiper-wrapper {
  display: flex;
}
.sovaa-swiper .swiper-slide {
  flex-shrink: 0;
  height: auto;
}

/* Карточка */
.sovaa-card {
  background: #161616;
  border: 1px solid #333;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: 0.3s;
  position: relative;
  box-sizing: border-box;
}
.sovaa-card:hover {
  transform: translateY(-5px);
  border-color: #555;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* Картинка */
.sovaa-img-wrap {
  position: relative;
  padding-top: 100%; /* Квадрат */
  overflow: hidden;
  background: #000;
}
.sovaa-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.sovaa-card:hover .sovaa-img-wrap img {
  transform: scale(1.05);
}

/* Бейдж */
.sovaa-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #0056b3;
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  z-index: 5;
}

/* Инфо */
.sovaa-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: left;
}
.sovaa-title {
  color: #2e7dfd;
  font-size: 14px;
  text-decoration: none;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 40px;
}
.sovaa-title:hover {
  color: #7fb0ff;
}

.sovaa-price {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 15px;
}
.sovaa-price del {
  color: #666;
  font-size: 13px;
  font-weight: normal;
  margin-left: 5px;
}
.sovaa-price ins {
  text-decoration: none;
}

/* Кнопки */
.sovaa-btns {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sovaa-cart-btn {
  width: 100%;
  background: #fff;
  border: 1px solid #fff;
  color: #000;
  padding: 10px 0;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sovaa-cart-btn:hover {
  background: transparent;
  color: #fff;
}

/* Top action row (Quick View + Wishlist) */
.sovaa-top-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Wishlist (WCBoost)
   Мы выводим официальный shortcode внутри .sovaa-wishlist-wrap.
   У разных версий WCBoost разная разметка (a/button), поэтому стилизуем универсально. */
.sovaa-wishlist-wrap {
  width: 40px;
  min-width: 40px;
  height: 40px;
  display: flex;
}

/* Quick View */
.sovaa-quickview-wrap{
    width: 40px;
    height: 40px;
    display: block;
}
.sovaa-quickview-wrap .quick_view_button{
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.25);
    background: transparent;
    color: #fff;
    text-decoration: none;
}
.sovaa-quickview-wrap .quick_view_button:hover{
    border-color: rgba(255,255,255,0.6);
}
.sovaa-quickview-wrap .svg-icon svg{
    width: 18px;
    height: 18px;
    fill: currentColor;
}


.sovaa-wishlist-wrap > * {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: 1px solid #444 !important;
  color: #fff !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  transition: 0.3s;
  text-decoration: none !important;
}
.sovaa-wishlist-wrap > *:hover {
  border-color: #fff !important;
}
.sovaa-wishlist-wrap svg,
.sovaa-wishlist-wrap .sovaa-wish-icon {
  width: 18px;
  height: 18px;
}

/* Стрелки */
.sovaa-nav-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s;
  user-select: none;
}
.sovaa-nav-btn:hover {
  background: #fff;
  color: #000;
}
.sovaa-nav-btn svg {
  width: 24px;
  height: 24px;
}

.sovaa-prev {
  left: 0px;
}
.sovaa-next {
  right: 0px;
}

/* Пагинация */
.sovaa-pagination .swiper-pagination-bullet {
  background: #666;
  opacity: 0.5;
  width: 8px;
  height: 8px;
  margin: 0 5px !important;
}
.sovaa-pagination .swiper-pagination-bullet-active {
  background: #fff;
  opacity: 1;
  transform: scale(1.2);
}

/* Адаптив */
@media (max-width: 768px) {
  .sovaa-slider-main-wrap {
    padding: 0;
  }
  .sovaa-nav-btn {
    display: none;
  }
  .sovaa-info {
    padding: 10px;
  }
  .sovaa-title {
    font-size: 13px;
    height: 36px;
  }
  .sovaa-cart-btn {
    font-size: 10px;
    padding: 8px 0;
  }
  .sovaa-wishlist-wrap {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
  .sovaa-quickview-wrap{
    width: 34px;
    height: 34px;
  }
}


/* === Grid (Tiles) layout === */
.sovaa-layout-grid { padding: 0; }

.sovaa-layout-grid .sovaa-nav-btn,
.sovaa-layout-grid .sovaa-pagination { display: none !important; }

/*
  Важно для совместимости с WBW Product Filter:
  оставляем стандартный контейнер WooCommerce `ul.products`, но делаем его grid.
*/
.sovaa-layout-grid ul.products.sovaa-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--sovaa-cols-desktop, 4), minmax(0, 1fr));
  gap: 20px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Safety: после AJAX-фильтрации некоторые темы/фильтры могут сбрасывать классы/ширины */
.sovaa-layout-grid .sovaa-product-container,
.sovaa-layout-grid ul.products.sovaa-grid {
  width: 100% !important;
  max-width: 100% !important;
}

.sovaa-layout-grid ul.products.sovaa-grid > li.product {
  width: auto !important;
  min-width: 0;
}

.sovaa-title,
.sovaa-price,
.sovaa-old-price,
.sovaa-sale-price {
  word-break: normal;
  overflow-wrap: anywhere;
}



/*
  ВАЖНО: многие темы добавляют clearfix через ul.products:before/:after
  (например display: table; clear: both).
  В CSS Grid эти псевдо-элементы становятся grid-item и «съедают» первую ячейку,
  из-за чего визуально пропадает первый товар.
*/
.sovaa-layout-grid ul.products.sovaa-grid::before,
.sovaa-layout-grid ul.products.sovaa-grid::after {
  content: '' !important;
  display: none !important;
}

.sovaa-layout-grid ul.products.sovaa-grid > li.product.sovaa-product-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  float: none !important;
  clear: none !important;
}

@media (max-width: 1023px) {
  .sovaa-layout-grid ul.products.sovaa-grid {
    grid-template-columns: repeat(var(--sovaa-cols-tablet, 2), minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .sovaa-layout-grid ul.products.sovaa-grid {
    grid-template-columns: repeat(var(--sovaa-cols-mobile, 1), minmax(0, 1fr));
  }
}

/* Pagination for Archive mode */
.sovaa-archive-pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.sovaa-archive-pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sovaa-archive-pagination li {
  margin: 0;
  padding: 0;
}

.sovaa-archive-pagination a,
.sovaa-archive-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #333;
  color: #fff;
  text-decoration: none;
  background: #161616;
  transition: 0.2s;
}

.sovaa-archive-pagination a:hover {
  border-color: #fff;
}

.sovaa-archive-pagination .current {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.sovaa-slider-main-wrap.sovaa-layout-grid{padding:0;max-width:1400px;margin:0 auto;box-sizing:border-box;}
