/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/


/* Product Images Grid - 2 Column Layout */
.product-images-grid {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Desktop: Grid layout */
.product-images-grid-desktop {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.product-images-grid--single .product-images-grid-desktop {
  grid-template-columns: 1fr;
}

.product-image-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Maintain square aspect ratio */
  overflow: hidden;
}

.product-image-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile: Swiper slider */
.product-images-swiper {
  display: none;
}

.product-images-swiper-mobile {
  display: none;
}

/* Hide desktop grid on mobile, show Swiper */
@media (max-width: 768px) {
  .product-images-grid-desktop {
    display: none;
  }
  
  .product-images-swiper {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .product-images-swiper .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    transition-property: transform;
    will-change: transform;
  }
  
  .product-images-swiper .swiper-slide {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    flex-grow: 0;
    display: block;
    height: auto;
  }
  
  /* Ensure only visible slide is shown */
  .product-images-swiper.swiper-container {
    overflow: hidden;
  }
  
  .product-images-swiper-mobile {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  
  /* Swiper counter styling */
  .product-images-counter {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
  }
  
  .product-images-counter .counter-current {
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
  }
}

/* Hide mobile slider on desktop */
@media (min-width: 769px) {
  .product-images-swiper,
  .product-images-swiper-mobile {
    display: none;
  }
}