/* snacks.css - background-image approach: perfect centering and alignment */

/* page base (keep black page) */
body.snacks-page {
  background: #0c0c0c;
  color: #fff;
  margin: 0;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

/* nav sticky */
.snacks-page #nav {
  background: transparent;
  z-index: 999;
  position: sticky;
  top: 0;
}

/* hero */
.page-hero {
  text-align: center;
  padding: 26px 12px 6px;
  background: transparent;
}
.page-title {
  color: #fff;
  font-size: 2rem;
  letter-spacing: 1px;
  margin: 0;
}
.page-sub {
  color: rgba(255, 255, 255, 0.75);
  margin-top: 6px;
}

/* grid */
.product-container {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px;
  box-sizing: border-box;
}
@media (max-width: 1100px) {
  .product-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}
@media (max-width: 700px) {
  .product-container {
    grid-template-columns: 1fr;
    padding: 0 14px;
    gap: 20px;
  }
}

/* card */
.product-card {
  background: #fff;
  color: #111;
  border-radius: 10px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

/* IMAGE WRAPPER now uses background-image */
.product-card .img-wrap {
  width: 100%;
  height: 300px; /* fixed visual box */
  background-color: #fafafa; /* fallback bg inside card */
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain; /* important: contain the whole image */
  border-radius: 6px;
  display: block;
  box-sizing: border-box;
  margin: 0; /* no negative margins */
}

/* visually-hidden <img> (kept for accessibility & fallback) */
.product-card .img-wrap img {
  position: absolute;
  width: 1px;
  height: 1px;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* sale badge */
.product-card .sale-badge {
  position: absolute;
  right: 20px;
  top: 16px;
  background: #000;
  color: #fff;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.6px;
  z-index: 6;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* failed placeholder state: use a neutral background and text */
.product-card .img-wrap.failed {
  background-color: #f3f4f6;
  background-image: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa0a6;
  font-weight: 600;
  font-size: 14px;
}

/* Title, price, button */
.product-card .title {
  margin: 18px 0 8px 0;
  text-align: center;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 2px;
}
.product-card .price-row {
  text-align: center;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.product-card .mrp {
  color: #111;
  opacity: 0.6;
  text-decoration: line-through;
  font-size: 14px;
}
.product-card .price {
  color: #000;
  font-weight: 800;
  font-size: 16px;
}
.product-card .btn-add {
  margin-top: 12px;
  width: 68%;
  max-width: 220px;
  background: #111;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 28px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.product-card .btn-add:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.12);
}

/* mobile tweaks */
@media (max-width: 520px) {
  .product-card {
    min-height: auto;
    padding: 14px;
  }
  .product-card .img-wrap {
    height: 220px;
  }
  .product-card .sale-badge {
    width: 62px;
    height: 62px;
    top: 12px;
    right: 12px;
    font-size: 12px;
  }
  .product-card .btn-add {
    width: 86%;
  }
}

/* toast fallback */
#pufnut-toast {
  pointer-events: none;
  z-index: 99999;
}
