/* Products grid */
.product_container {
  display: flex;
  justify-self: center;
  height: auto;
  width: 100%;

  opacity: 1;
}

.products {
    display: grid;
    justify-content: center; /* centers the whole grid */
    justify-items: center;   /* centers each item */
    gap: 4rem 6rem;
    width: 100%;
    margin: 10vh auto 0 auto;


  grid-template-columns: repeat(4, minmax(220px, 250px));
}

@media screen and (max-width: 1500px) {
  .products {
    grid-template-columns: repeat(3, minmax(200px, 250px));
  }
}

@media screen and (max-width: 1200px) {
  .products {
    grid-template-columns: repeat(2, minmax(200px, 250px));
  }
}

@media screen and (max-width: 700px) {
  .products {
    grid-template-columns: repeat(2, minmax(120px, 200px));
    gap: 4rem 4rem;
  }
}

.product-card {
  display: grid;
  justify-items: center;
  background-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, width 0.3s ease;
  max-width: 300px;
  width: 100%;  /* fills the column but respects max-width */
  height: auto;
  backdrop-filter: blur(6px);
}

.product-card .text {
  flex-direction: column;
}

.product-card:hover { transform: translateY(-5px); }

.product-card img {
  display: grid;
  align-items: center;
  width: 50%;
  max-height: 100%;
  border-radius: 8px;
}

.product-card h3 { margin: 1rem 0 0.5rem; }
.product-card .desc { font-size: 0.9rem; color: #666; margin-bottom: 0.5rem; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content.product-popup {
  background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: fadeIn 0.25s ease;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 26px;
  cursor: pointer;
  color: #333;
}

.popup-body {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Popup Swiper */
/* .popup-image {
  flex: 1;
  min-width: 280px;
  max-width: 340px;
  display: flex;    
  justify-content: center;
  align-items: center;
}

.productSwiper {
  width: 100%;
  height: 100%; 
  overflow: hidden;
}

.productSwiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
}

.productSwiper .swiper-slide img {
  max-width: 100%;
  max-height: auto;
  object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
  color: #462D0C !important;
  
} */






/* Info section */
.popup-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #333;
}

.popup-info h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.popup-price { font-weight: 600; font-size: 1.2rem; margin-bottom: 0.3rem; }
.popup-material { color: #777; margin-bottom: 0.8rem; }
.popup-desc { color: #555; font-size: 0.95rem; margin-bottom: 1.2rem; }

.buy-btn { background: linear-gradient(90deg, #5c3b1e, #8b5a2b, #5c3b1e); color: #fff; border: none; border-radius: 6px; padding: 0.8rem 1.4rem; cursor: pointer; }
.buy-btn:hover { background: #5c3b1e; }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 600px) {
  .popup-body { flex-direction: column; align-items: center; text-align: center; }
  .popup-info { align-items: center; }
  .popup-image { width: 100%; max-width: 320px; }
  .productSwiper { height: 250px; }
}
