/* ==========================================================================
   product-detail.css — Product page
   Gallery, name/price, quantity, tabs, reviews, sticky add-to-cart bar.
   Self-contained: every value is written out (no CSS variables) and every
   selector has its own rule, so changing one block never touches another.
   ========================================================================== */

/* ── .product-detail-grid ── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 64px 0;
  align-items: start;
}

/* ── .product-gallery ── */
.product-gallery {
  position: sticky;
  top: 100px;
}

/* ── .gallery-main ── */
.gallery-main {
  border-radius: 1px;
  overflow: hidden;
  margin-bottom: 12px;
}

.gallery-main img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

/* ── .gallery-thumbs ── */
.gallery-thumbs {
  display: flex;
  gap: 10px;
}

.gallery-thumbs img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #00000000;
  transition: border-color 0.3s cubic-bezier(0.4,0,0.2,1);
}

.gallery-thumbs img.active {
  border-color: #4a154b;
}

/* ── .product-detail-category ── */
.product-detail-category {
  color: #805b81;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ── .product-detail-name ── */
.product-detail-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  color: #4a154b;
  margin-bottom: 16px;
  line-height: 1.15;
}

/* ── .product-detail-rating ── */
.product-detail-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #4a154bb2;
}

.product-detail-rating span:first-child {
  color: #f5b301;
  font-size: 1.4rem;
  letter-spacing: 2px;
}

/* ── .product-detail-price ── */
.product-detail-price {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.product-detail-price .price-current {
  font-size: 1.6rem;
  font-weight: 600;
  color: #4a154b;
}

/* ── .qty-selector ── */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
  border: 1.5px solid #e0c8e8;
  border-radius: 50px;
  width: fit-content;
  overflow: hidden;
}

/* ── .qty-btn ── */
.qty-btn {
  width: 40px;
  height: 44px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a154b;
  transition: background 0.3s cubic-bezier(0.4,0,0.2,1);
}

.qty-btn:hover {
  background: #f0e0f2;
}

/* ── .qty-input ── */
.qty-input {
  width: 54px;
  text-align: center;
  font-family: "Jost", sans-serif;
  font-size: 0.95rem;
  border: none;
  border-left: 1.5px solid #e0c8e8;
  border-right: 1.5px solid #e0c8e8;
  height: 44px;
  outline: none;
  background: #ffffff;
}

/* ── .tab-btn ── */
.tab-btn {
  padding: 14px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a154bb2;
  border-bottom: 2px solid #00000000;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

.tab-btn.active {
  color: #4a154b;
  border-bottom-color: #4a154b;
}

/* ── .stock-pill ── */
.stock-pill {
  display: inline-block;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}

/* ── .stock-in ── */
.stock-in {
  background: #f3e9f6;
  color: #4a154b;
}

/* ── .stock-low ── */
.stock-low {
  background: #fdeef6;
  color: #4a154b;
}

/* ── .stock-out ── */
.stock-out {
  background: #f7d4e6;
  color: #4a154b;
}

/* ── .reviews-list ── */
.reviews-list .review {
  border-bottom: 1px solid #e0c8e8;
  padding: 18px 0;
}

.reviews-list .review .stars {
  color: #4a154b;
  letter-spacing: 2px;
}

.reviews-list .review small {
  color: #4a154bb2;
}

/* ── .rating-input ── */
.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.rating-input input {
  display: none;
}

.rating-input label {
  font-size: 1.8rem;
  color: #e0c8e8;
  cursor: pointer;
  line-height: 1;
}

.rating-input input:checked ~ label {
  color: #4a154b;
}

.rating-input label:hover {
  color: #4a154b;
}

.rating-input label:hover ~ label {
  color: #4a154b;
}

/* ── .sticky-atc ── */
.sticky-atc {
  display: none;
}

@media (max-width: 700px) {
  .sticky-atc {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: #ffffff;
    padding: 10px 16px;
    gap: 12px;
    align-items: center;
    box-shadow: 0 -4px 20px #4a154b1f;
  }

  .sticky-atc strong {
    color: #4a154b;
    font-size: .95rem;
    flex: 1;
  }

}

/* ── .product-detail-info ── */
.product-detail-info {
  min-width: 0;
}

/* ── .product-detail-desc ── */
.product-detail-desc {
  color: #4a154bd6;
  line-height: 1.75;
  margin-bottom: 22px;
}

/* ── .product-detail-btns ── */
.product-detail-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: stretch;
}

.product-detail-btns .btn {
  flex: 1 1 150px;
}

/* ── .product-meta ── */
.product-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .86rem;
  color: #4a154bd6;
  padding: 18px 0;
  border-top: 1px solid #e0c8e8;
  border-bottom: 1px solid #e0c8e8;
  margin-bottom: 8px;
}

/* ── .product-tabs ── */
.product-tabs {
  margin-top: 18px;
}

/* ── .tab-headers ── */
.tab-headers {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e0c8e8;
  flex-wrap: wrap;
}

/* ── .tab-content ── */
.tab-content {
  display: none;
  padding: 22px 0;
  color: #4a154bd6;
  line-height: 1.8;
  font-size: .94rem;
}

.tab-content.active {
  display: block;
}

/* ── .gallery-main ── */
.gallery-main {
  background: #f0e0f2;
}

/* ── .gallery-thumbs ── */
.gallery-thumbs img:hover {
  border-color: #805b81;
}

/* ── .sticky-atc ── */
.sticky-atc .btn {
  padding: 11px 24px;
}

@media (max-width: 800px) {
  /* ── .product-detail-grid ── */
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0;
  }

  /* ── .product-gallery ── */
  .product-gallery {
    position: static;
  }

  /* ── .gallery-main ── */
  .gallery-main img {
    height: 380px;
  }

}

/* ── .qty-btn ── */
.qty-btn {
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease, text-decoration-color .25s ease;
}

/* ── .tab-btn ── */
.tab-btn {
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease, text-decoration-color .25s ease;
}

/* ── .qty-btn ── */
.qty-btn:hover {
  background: #4a154b;
  color: #fff;
}

/* ── .tab-btn ── */
.tab-btn:hover {
  color: #805b81;
  border-bottom-color: #805b81;
  background: #f9f0fa;
}

.tab-btn:hover {
  text-decoration: none;
}

/* ── .qty-btn ── */
.qty-btn:hover {
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════
   Add to Cart / Buy Now / heart — always ONE row, on every screen
   ══════════════════════════════════════════════════════════════════ */
.product-detail-btns { flex-wrap: nowrap; gap: 10px; }
.product-detail-btns .btn {
  flex: 1 1 0;          /* both big buttons share the space equally */
  min-width: 0;
  padding: 14px 10px;
  white-space: nowrap;
}
.product-detail-btns .wishlist-btn {
  flex: 0 0 52px;       /* heart keeps a fixed 52px square-ish size */
  min-width: 52px;
  padding: 0;
}
@media (max-width: 480px) {
  .product-detail-btns { gap: 8px; }
  .product-detail-btns .btn { padding: 14px 6px; font-size: 0.8rem; letter-spacing: 0.04em; }
  .product-detail-btns .wishlist-btn { flex-basis: 48px; min-width: 48px; }
}

/* ══════════════════════════════════════════════════════════════════
   WhatsApp button must never cover the sticky "Add to Cart" bar (phones)
   product.php adds the body class "has-sticky-atc" whenever the bar is shown
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  body.has-sticky-atc .whatsapp-float { bottom: 88px !important; }   /* bar is ~66px tall → this clears it */
  body.has-sticky-atc { padding-bottom: 72px; }                      /* so the footer isn't hidden behind the bar */

  /* cart drawer open → the sticky bar is hidden behind it, so WhatsApp goes back to its normal corner spot */
  body.has-sticky-atc.cart-open .whatsapp-float { bottom: 16px !important; }
}
