/* VERSION: assets/css/shop.css v1.2.0-image-lightbox (2025-11-21, 18:45:00)
 * Changes vs v1.1.0-fixed-image-height:
 * - Added image lightbox overlay (popup preview) with fade / scale animation.
 * - Kept fixed card image height to align titles/buttons.
 * - Small tweaks for shop intro text and price emphasis.
 */

/* ===== 1) Shop main layout ===== */

.shop-page-main {
  padding-bottom: 80px;
}

/* Grid for product cards */
.shop-products-grid {
  gap: 24px;
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .shop-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Tablet / mobile: auto-fit columns */
@media (max-width: 1023.98px) {
  .shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* Card as flex column so button can stick to the bottom */
.shop-products-grid .project-card {
  display: flex;
  flex-direction: column;
}

/* ===== 2) Product image wrapper (fixed height) ===== */

.shop-products-grid .card-image-wrapper {
  width: 100%;
  height: 220px;             /* fixed height for all cards */
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: zoom-in;           /* hint that image can be opened */
}

/* Keep existing hover/lighten effect from global styles; just ensure proper sizing */
.shop-products-grid .card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* crop but keep proportions */
  display: block;
}

/* ===== 3) Titles, texts, price & button ===== */

.shop-products-grid .project-card .card-title {
  margin-bottom: 8px;
}

.shop-products-grid .project-card p {
  margin-bottom: 6px;
}

.shop-products-grid .project-card .price,
.shop-products-grid .project-card .price-display {
  font-weight: 600;
}

/* Button goes to the bottom of the card */
.shop-products-grid .project-card .btn {
  margin-top: auto;
}

/* ===== 4) Shop intro text ===== */

.shop-intro {
  font-size: 0.98rem;
  line-height: 1.6;
}

.shop-intro p + p {
  margin-top: 6px;
}

/* ===== 5) Image lightbox (popup preview) ===== */

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;                  /* hidden by default */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-lightbox.is-open {
  display: flex;
  opacity: 1;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
}

/* Actual popup content */
.image-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.image-lightbox.is-open .image-lightbox-content {
  transform: scale(1);
  opacity: 1;
}

/* Large preview image */
.image-lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* Close button (X) in top-right corner */
.image-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.85);
}
