.home {
  box-sizing: border-box;
}
.home__categories {
  position: relative;
}
.home__subheaders__wrapper {
  position: relative;
  display: flex;
  display: -webkit-flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin-bottom: 16px;
}
.home__subheaders__wrapper_btn {
  position: relative;
  padding: 5px;
  color: black;
  display: flex;
  display: -webkit-flex;
  align-items: center;
  column-gap: 15px;
}
.home__subheaders__wrapper_btn svg {
  display: block;
  width: 7px;
  height: 12px;
}
.home__subheaders__wrapper_btn svg path {
  stroke: var(--color-main);
}
.home__subheaders {
  font-size: 26px;
  margin: 0;
}
.home__subheaders__wrapper::before,
.home__subheaders__wrapper::after { display: none; }
/* На мобілі (≤576px) ховаємо кнопку «Переглянути всі» в модулях — свайпабельної
   каруселі достатньо, кнопка лише з'їдає місце в заголовку. Планшет/десктоп — лишається. */
@media (max-width: 576px) {
  .home__subheaders__wrapper_btn { display: none !important; }
  /* Картка в каруселі товарів на мобілі — РІВНО 2 цілих у ряд (grid_cols_mobile=2),
     щоб жодна картка не обрізалась краєм контейнера (фіксована --otc-card-w=172px
     не ділилась рівно і різала сусідню картку ~84%). Скрол — стрілками/свайпом. */
  .fplus-swiper .swiper-slide,
  .fplus-swiper .swiper-slide.product-card-wrapper {
    width: calc((100% - var(--otc-grid-gap, 20px)) / 2) !important;
  }
}
.home__categories__wrapper {
  width: 100%;
  display: flex;
  display: -webkit-flex;
}
.home__categories__wrapper .swiper-slide,
.home__categories__wrapper > a.home__categories__card {
  margin-right: 0 !important;
}
.home__categories__card.swiper-slide {
  padding: 0;
  width: auto;
  height: auto;
  display: flex;
  display: -webkit-flex;
  flex-direction: column;
  -webkit-flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  border: var(--border);
}
.home__categories__card > img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.home__categories__card__desc {
  text-align: center;
  color: #000;
  margin: 0;
  padding: 0;
}
.home__popular {
}
/* .home__popular__wrapper-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(19%, 20%));
  gap: 20px;
  width: 100%;

  @media (max-width: 1399px) {
    grid-template-columns: repeat(4, minmax(24%, 25%));
  }
  @media (max-width: 1199px) {
    grid-template-columns: repeat(3, minmax(32%, 33%));
  }
  @media (max-width: 999px) {
    grid-template-columns: repeat(2, minmax(49%, 50%));
  }
  @media (max-width: 576px) {
    grid-template-columns: repeat(1, minmax(99%, 100%));
  }
} */
.home__popular__wrapper-cards .product-card-wrapper {
  padding: 0;
}
.home__popular__wrapper-cards {
  flex-wrap: wrap;
}
/* Розмір і відступи карток тепер керуються з header.twig через CSS-змінні */

/* ════════════════════════════════════════════════════════════════════════════
   Wide-viewport guardrails (> 1920px design baseline)
   On 2K/4K monitors the design baseline is 1920px; anything wider should keep
   section spacing visually proportional to the centered content column instead
   of letting full-width banner backgrounds + per-section padding inflate the
   perceived gaps. The rules below preserve the banner's 100vw breakout for the
   background but keep section transitions tight and predictable.
   ════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1921px) {
  /* Cap top spacing between consecutive home sections. The constructor's
     section_gap setting still drives the value within 0–60px; this cap only
     kicks in when no explicit section_gap is configured AND a banner section
     precedes a regular content section, which is where the disproportion
     was reported. */
  .onetap-home-section ~ .onetap-home-section {
    margin-top: clamp(0px, 4vw, 60px) !important;
  }

  /* Banner section: ensure no implicit padding adds visual gap below the
     banner image. Background still spreads via existing 100vw breakout. */
  .onetap-home-section:has(.otb-slider) {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Categories / popular wrappers immediately following banner: trim any
     inherited top space. The constructor's paddingTop on the section element
     still wins when explicitly set in admin. */
  .onetap-home-section:has(.otb-slider) + .onetap-home-section .home__categories,
  .onetap-home-section:has(.otb-slider) + .onetap-home-section .home__popular,
  .onetap-home-section:has(.otb-slider) + .onetap-home-section .home__update-product {
    margin-top: 0;
  }
}

.home__update-product {
}
.home__update-product__wrapper-cards {
  display: flex;
  display: -webkit-flex;
  align-items: center;
  -webkit-align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  -webkit-flex-wrap: wrap;
  gap: 20px;
}
.home__delivery-time .text-h1 {
  font-size: 26px;
}
.home__delivery-time__item {
  width: 369px;
  min-height: 100px;
  display: flex;
  display: -webkit-flex;

  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.home__delivery-time__item > img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
/* Стрілки слайдера — стилі з налаштувань шаблону (.otc-slider-btn) */
.swiper-button-prev.otc-slider-btn,
.swiper-button-next.otc-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-image: none;
  background-size: 0;
}
.swiper-button-prev.otc-slider-btn { left: 0; }
.swiper-button-next.otc-slider-btn { right: 0; }
.swiper-categories.swiper-container {
  width: 100%;
}
@media (max-width: 767px) {
  .swiper-button-prev.otc-slider-btn,
  .swiper-button-next.otc-slider-btn {
    display: none;
  }
  .home__subheaders__wrapper_btn {
    column-gap: 10px;
  }
  .home__subheaders {
    font-size: 20px;
  }
  .home__subheaders__wrapper_btn {
    font-size: 14px;
  }
}
