/**
 * Product Page - Collage Layout for Images and Variants
 */

/* ===========================
   COLOR VARIANTS AS DOTS
   =========================== */

.variant--centered {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.color-variants--dots {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
  align-items: center;
}

.color-variants--dots .color-variant {
  margin: 0;
}

.color-variants--dots .color-variant label {
  cursor: pointer;
  position: relative;
  display: block;
}

.color-variants--dots .color-variant .input-color {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-variants--dots .color-variant .color {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.color-variants--dots .color-variant .color.texture {
  background-size: 130% 130% !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  overflow: hidden;
}

/* Active state - orange border ring */
.color-variants--dots .color-variant .color.active,
.color-variants--dots .color-variant .input-color:checked + .color {
  border-color: #ff8c42;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.4);
  transform: scale(1.1);
}

/* Hover effect */
.color-variants--dots .color-variant label:hover .color {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.color-variants--dots .color-variant label:hover .color.active,
.color-variants--dots .color-variant label:hover .input-color:checked + .color {
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.5);
}

/* ===========================
   PRODUCT IMAGES COLLAGE GRID
   =========================== */

.product__images--collage {
  margin-bottom: 2rem !important;
}


.product-image-item {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: transform 0.3s ease !important;
  background-color: #f5f5f5 !important;
  min-height: 200px !important;
  height: 100% !important;
}

.product-image-item:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.product-image-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.product-image-item--tall {
  min-height: 400px !important;
}

/* Product name overlay on last image */
.product-name-overlay {
  position: absolute !important;
  bottom: 2rem !important;
  right: 2rem !important;
  text-align: right !important;
  z-index: 2 !important;
  animation: fadeIn 0.6s ease-in-out !important;
}

.product-name-overlay__title {
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  color: #ff8c42 !important;
  text-transform: uppercase !important;
  margin: 0 !important;
  line-height: 1.1 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  letter-spacing: 0.5px !important;
}

.product-name-overlay__subtitle {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #666 !important;
  margin: 0.5rem 0 0 0 !important;
  text-transform: uppercase !important;
}

/* "See More Style" link */
.product-images-more {
  grid-column: 1 / 4 !important;
  grid-row: 4 / 5 !important;
  text-align: left !important;
  padding: 1rem 0 !important;
}

.product-images-more__link {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #ff8c42 !important;
  text-decoration: underline !important;
  transition: color 0.3s ease !important;
  display: inline-block !important;
}

.product-images-more__link:hover {
  color: #e67a30 !important;
  text-decoration: underline !important;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   RESPONSIVE STYLES
   =========================== */

@media (max-width: 991px) {
  .product-name-overlay__title {
    font-size: 1.75rem !important;
  }

  .product-name-overlay__subtitle {
    font-size: 1rem !important;
  }
}

@media (max-width: 575px) {
  .color-variants--dots {
    gap: 0.75rem !important;
  }

  .color-variants--dots .color-variant .color {
    width: 36px !important;
    height: 36px !important;
  }

  .product-image-item {
    min-height: 150px !important;
  }

  .product-image-item--tall {
    min-height: 250px !important;
  }

  .product-name-overlay {
    bottom: 1rem !important;
    right: 1rem !important;
  }

  .product-name-overlay__title {
    font-size: 1.5rem !important;
  }

  .product-name-overlay__subtitle {
    font-size: 0.875rem !important;
  }

  .product-images-more__link {
    font-size: 1rem !important;
  }
}

/* ===========================
   COLLAGE LIGHTBOX
   =========================== */

.collage-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.collage-lightbox.is-open {
  display: flex;
  opacity: 1;
  animation: collageLbFadeIn 0.25s ease forwards;
}

@keyframes collageLbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.collage-lightbox__img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
  animation: collageLbImgIn 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes collageLbImgIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.collage-lightbox__close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background:var(--bs-orange);
  border: 1px solid var(--bs-orange);
  color: white;
  font-size: 1.75rem;
  line-height: 1;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  outline: none;
  z-index: 10000;
}

.collage-lightbox__close:hover {
  background: var(--bs-orange);
  border: 1px solid var(--bs-orange);
  transform: scale(1.1) rotate(90deg);
}

/* Zoom-in cursor already set via JS; add touch highlight suppression */
.collage-img {
  -webkit-tap-highlight-color: transparent;
}

/* ── Mobile lightbox tweaks ── */
@media (max-width: 767.98px) {
  /* Make images fill as much of the screen as possible */
  .collage-lightbox__img {
    max-width: 98vw;
    max-height: 85vh;
  }

  /* Bigger close button — easier to tap */
  .collage-lightbox__close {
    top: 0.75rem;
    right: 0.75rem;
    width: 3.25rem;
    height: 3.25rem;
    font-size: 2rem;
  }

  /* Slightly less padding so the image has more room */
  .collage-lightbox {
    padding: 0.5rem;
  }
}

/* Hide product flags in collage mode */
.product__images--collage .product-flags {
  display: none !important;
}

/* Hide quantity field on product page */
.product-actions__quantity,
.js-quantity-button,
#quantity_wanted {
  display: none !important;
}

/* Adjust add to cart button layout when quantity is hidden */
.product-actions__button.add {
  width: 100% !important;
}

.product__add-to-cart .row.g-2 {
  display: block !important;
}

/* View cart button styling */
.view-cart-btn {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
  transition: all 0.3s ease !important;
}

.view-cart-btn:hover {
  background-color: #218838 !important;
  border-color: #1e7e34 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3) !important;
}

.view-cart-btn:active {
  transform: translateY(0) !important;
}

.mobile-cover-product__image {
  height: 35vh !important;
}

.product-images-collage {
  width: 100% !important;

  img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  .collage-row-1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    height: 35vh;
    margin-bottom: 15px;
    gap: 15px;
    img {
      height: 35vh;
    }
  }

  .collage-row-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    height: 55vh;

    .collage-row-2-col-1 {
      height: 55vh;
      display: flex;
      gap: 15px;
      flex-direction: column;
      justify-content: space-between;
   
    }

    .collage-row-2-col-2 {
      height: 55vh;
      image {
       height: 55vh;
      }
    }
  }

}

