/* =============================================
   Local Swiper Fix — ensures product media 
   images visible without Swiper JS init
   ============================================= */

/* Force swiper slides visible (Swiper JS not initialized) */
.m-product-media .swiper-slide {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Override base-style column direction — let product-media-style handle layout */
.m-product-media--columns .swiper-wrapper {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  transform: none !important;
  height: auto !important;
}

.m-product-media--columns .swiper-slide {
  width: 50% !important;
  box-sizing: border-box;
  padding: .8rem;
}

.m-product-media--columns .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* =============================================
   Product Card Image Slider Fix — collection grids
   Swiper JS не инициализирован, поэтому слайды
   скрыты из-за flex-direction:column и height:100%
   ============================================= */

/* Product card swiper wrapper — show as normal block */
.m-product-card__image-slider .swiper-wrapper,
.m-product-card__image-slider-wrapper.swiper-wrapper,
.m-product-card__image-slider-wrapper {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  height: auto !important;
  transform: none !important;
  overflow: hidden !important;
}

/* Show only first slide, hide others (no JS slider) */
.m-product-card__image-slider .swiper-slide,
.m-product-card__image-slider-wrapper > .swiper-slide {
  display: none !important;
  flex-shrink: 0 !important;
  height: auto !important;
  width: 100% !important;
}

.m-product-card__image-slider .swiper-slide:first-child,
.m-product-card__image-slider-wrapper > .swiper-slide:first-child {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure product card images are visible and fill container like original */
.m-product-card__image-slider .swiper-slide img,
.m-product-card__image-slider-wrapper .swiper-slide img,
.m-product-card__image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  visibility: visible !important;
  opacity: 1 !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Product card image container — fill media height */
.m-product-card__image {
  overflow: hidden !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
}

/* Product card content — shrink to minimum, don't steal space from media */
.m-product-card__content {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  height: auto !important;
}

/* Product card media — grow to fill available space in flex column */
.m-product-card__media {
  position: relative !important;
  overflow: hidden !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
}

/* Swiper wrapper and slide fill full height of media */
.m-product-card__image-slider .swiper-wrapper,
.m-product-card__image-slider-wrapper {
  height: 100% !important;
}

.m-product-card__image-slider .swiper-slide:first-child,
.m-product-card__image-slider-wrapper > .swiper-slide:first-child {
  height: 100% !important;
}

/* Announcement bar slider fix */
.o-announcement-bar--slider .swiper-wrapper {
  flex-direction: row !important;
  height: auto !important;
}

.o-announcement-bar--slider .swiper-slide {
  height: auto !important;
}

/* General swiper fix for non-initialized swipers */
.swiper:not(.swiper-initialized) .swiper-wrapper {
  flex-direction: row !important;
  height: auto !important;
  transform: none !important;
}

.swiper:not(.swiper-initialized) .swiper-slide {
  height: auto !important;
}
