/* Layout styles for gallery grids */
.dress .list-product, .product .list-product {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media screen and (max-width: 1280px) {
  .dress .list-product, .product .list-product {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 1024px) {
  .dress .list-product, .product .list-product {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 640px) {
  .dress .list-product, .product .list-product {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media screen and (max-width: 390px) {
  .dress .list-product, .product .list-product {
    gap: 8px;
  }
}

.dress .item, .product .item {
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.dress .item img, .product .item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  padding: 10px;
  transform: scale(1.2); /* Added 1.5x zoom to grid images */
  transition: transform 0.3s ease;
}

/* Modal Popup Styles */
#imageModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#imageModal.hidden {
  display: none !important;
}

.modal-header {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 10000;
}

.modal-header button,
.nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-header button:hover,
.nav-btn:hover {
  opacity: 0.7;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
  padding: 20px;
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.modal-content-wrapper {
  width: 60%;
  height: 80%;
  max-width: 800px;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Prevents zoomed image from spilling out */
}

.modal-content-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  /* transform: scale(1.5); Zooms the image by 1.5x */
  transition: transform 0.3s ease; /* Smooth transition if needed */
}

@media screen and (max-width: 768px) {
  .modal-content-wrapper {
    width: 90%;
    height: 60%;
  }
  .nav-btn {
    padding: 10px;
  }
}
