/* Secțiunea Produse */
.products-section {
  background-color: white;
  padding-top: 3%;
  padding-bottom: 80px;
  padding-inline: 5%;
  margin-bottom: 10px;
  text-align: center;
}

/* Titlu "Produse" */
.products-title {
  font-family: "Mrs Saint Delafield", cursive;
  font-size: 250px;
  font-weight: 100;
  margin-bottom: -90px;
  color: black;
}

/* Shown only when countdown reaches 00:00:00:00 (see birthday.js + body.countdown-finished) */
.products-discount-note {
  display: none;
  margin: 0 0 28px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 600;
  color: #7c0a02;
}

body.countdown-finished .products-discount-note {
  display: block;
}

/* Grid de produse: 3 pe rând pe PC, 1 pe rând pe mobile/tabletă */
.products-grid {
  display: grid !important;
  grid-template-columns: repeat(
    3,
    1fr
  ) !important; /* 3 coloane pe ecrane mari */
  gap: 30px !important;
  justify-content: center !important;
  width: 100% !important;
}

/* Container produs */
.product {
  position: relative;
  border: 25px solid darkred;
  overflow: hidden;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  cursor: pointer; /* Show pointer cursor to indicate it's clickable */
}

.product-discount-teaser {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  background: rgba(124, 10, 2, 0.9);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(12px, 1.3vw, 16px);
  font-weight: 700;
  letter-spacing: 0.4px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

/* Imaginea produsului */
.product img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  transition: opacity 0.3s ease-in-out;
}

/* Overlay — serif white text like reference (Georgia / Times) */
.product-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(
    to bottom,
    rgba(124, 10, 2, 0.3),
    rgba(124, 10, 2, 0.6)
  );
  color: #fff;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 400;
  /* Lining figures: stops “9” etc. from using old-style descenders */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  font-size: clamp(18px, 2.6vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Efect hover - afișează prețul peste imagine */
.product:hover .product-info {
  opacity: 1;
}

/* Face imaginea să fie vizibilă vag sub overlay */
.product:hover img {
  opacity: 0.58;
}

.product-info p {
  margin: 6px 0;
  text-align: center;
  text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.45);
  line-height: 1.2;
  max-width: 92%;
  font-family: inherit;
}

/* Product name — slightly larger, like “Tricou” / “Hanorac” in reference */
.product-info p:first-child {
  font-size: 1.04em;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Donation line — match second photo: white serif */
.product-info p:last-child {
  font-size: 0.85em;
  font-weight: 400;
}

.old-price {
  text-decoration: line-through;
  opacity: 0.92;
  font-size: 0.95em;
  font-weight: 400;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.discount-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Discounted amount — golden highlight (like earlier design) */
.new-price {
  font-weight: 600;
  color: #fff8b3;
  font-size: 1em;
  letter-spacing: 0.03em;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.55), 0 0 14px rgba(255, 230, 150, 0.35);
}

.discount-badge {
  display: inline-block;
  margin-left: 0;
  padding: 6px 11px;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 0.56em;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.5px;
  vertical-align: middle;
  background: rgba(124, 10, 2, 0.86);
}

.product-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 10px solid darkred;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-slide2 {
  display: flex; /* Ensures images appear in a row */
  transition: transform 0.5s ease-in-out;
  height: 100%;
  width: 300%; /* FIX: Must have a width based on image count */
}

.carousel-slide2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 0 0 100%; /* FIX: Ensures images take full width */
}

/* Responsivitate: pe tabletă și mobil 1 produs pe rând */
@media screen and (max-width: 1024px) {
  .products-grid {
    grid-template-columns: 1fr !important; /* 1 coloană pe tabletă */
  }

  .products-title {
    font-size: 250px;
  }
}

@media screen and (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr !important; /* 1 coloană pe mobil */
  }

  .products-title {
    font-size: 180px;
    margin-bottom: -60px;
  }

  .product-discount-teaser {
    top: 10px;
    right: 10px;
    padding: 4px 9px;
  }
}

@media screen and (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr !important; /* Asigură 1 produs pe rând pentru telefoane */
    display: block !important;
    /* justify-content: center; */
    width: 90% !important;
    margin-inline: auto;
  }
  .product {
    width: 100% !important;
    margin-bottom: 20px !important;
  }

  .products-title {
    font-size: 130px;
    margin-bottom: -40px;
  }

  .products-discount-note {
    margin-bottom: 14px;
  }

  .product-info {
    font-size: clamp(16px, 6.5vw, 30px);
  }

  .discount-row {
    gap: 8px;
  }

  .discount-badge {
    padding: 5px 9px;
  }
}
