/* ============================================================
   IBACT — Custom Single Product Page styling
   Upload to: /wp-content/themes/YOUR-CHILD-THEME/assets/ibact-pdp.css
   ============================================================ */

.ibact-pdp, .ibact-pdp * {
  box-sizing: border-box;
}

.ibact-pdp {
  font-family: 'Quicksand', sans-serif;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 5vw 50px;
}

.ibact-pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* ---------- GALLERY ---------- */
.ibact-pdp-main-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  border-radius: 18px;
  overflow: hidden;
  background: #efe4d2;
}

.ibact-pdp-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.ibact-pdp-main-img.is-active { display: block; }

.ibact-pdp-zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2c2117;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.ibact-pdp-zoom svg { width: 18px; height: 18px; }

.ibact-pdp-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #2c2117;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ibact-pdp-prev { left: 14px; }
.ibact-pdp-next { right: 14px; }

.ibact-pdp-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  overflow-x: auto;
}

.ibact-pdp-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: #efe4d2;
}
.ibact-pdp-thumb.is-active { border-color: #c1622c; }
.ibact-pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- LIGHTBOX ---------- */
.ibact-pdp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20,14,8,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.ibact-pdp-lightbox.is-open { display: flex; }
.ibact-pdp-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}
.ibact-pdp-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---------- DETAILS ---------- */
.ibact-pdp-badge {
  display: inline-block;
  background: #c1622c;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.ibact-pdp-title {
  font-weight: 800;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  color: #2c2117;
  margin: 0 0 12px;
  line-height: 1.15;
}

.ibact-pdp-desc {
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #5c5044;
  margin-bottom: 16px;
  max-width: 480px;
}

.ibact-pdp-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.ibact-pdp-rating .star-rating { color: #c1622c; font-size: 0.95rem; }
.ibact-pdp-rating-text {
  font-weight: 600;
  font-size: 0.9rem;
  color: #5c5044;
}

.ibact-pdp-price {
  font-weight: 800;
  font-size: 1.9rem;
  color: #2c2117;
}
.ibact-pdp-price ins { text-decoration: none; }
.ibact-pdp-price del { color: #a8998a; font-size: 0.65em; margin-right: 8px; }

.ibact-pdp-tax-note {
  font-weight: 500;
  font-size: 0.82rem;
  color: #8a7863;
  margin-bottom: 20px;
}

/* ---------- HIGHLIGHTS ROW ---------- */
.ibact-pdp-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(58,36,23,0.1);
  border-bottom: 1px solid rgba(58,36,23,0.1);
  padding: 18px 0;
  margin-bottom: 24px;
}
.ibact-pdp-highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 0 6px;
  border-right: 1px solid rgba(58,36,23,0.08);
}
.ibact-pdp-highlight:last-child { border-right: none; }
.ibact-pdp-highlight-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px dashed #c98a1f;
  color: #c1622c;
  padding: 6px;
}
.ibact-pdp-highlight-icon svg { width: 100%; height: 100%; }
.ibact-pdp-highlight-label {
  font-weight: 600;
  font-size: 0.76rem;
  line-height: 1.3;
  color: #4a3f34;
}

/* ---------- PACK SIZE SWATCHES ---------- */
.ibact-pdp-packsize { margin-bottom: 22px; }
.ibact-pdp-packsize-label {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a3f34;
  margin-bottom: 10px;
}
.ibact-pdp-packsize-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ibact-pdp-pack-btn {
  min-width: 96px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(58,36,23,0.18);
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ibact-pdp-pack-btn:hover { border-color: #c1622c; }
.ibact-pdp-pack-btn.is-active {
  border-color: #c1622c;
  background: rgba(193,98,44,0.06);
}
.ibact-pdp-pack-name { font-weight: 700; font-size: 0.95rem; color: #2c2117; }
.ibact-pdp-pack-save { font-weight: 600; font-size: 0.72rem; color: #8a7863; }

/* ---------- WOOCOMMERCE DEFAULT VARIATION TABLE (hide visually, keep functional) ---------- */
.ibact-pdp .variations { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ibact-pdp .woocommerce-variation-description,
.ibact-pdp .woocommerce-variation-price,
.ibact-pdp .reset_variations { display: none !important; }

/* ---------- QUANTITY + ADD TO CART (styling WooCommerce's own markup) ---------- */
.ibact-pdp form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.ibact-pdp .quantity {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(58,36,23,0.18);
  border-radius: 10px;
  overflow: hidden;
}
.ibact-pdp .quantity input.qty {
  width: 52px;
  border: none;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 0;
  -moz-appearance: textfield;
}
.ibact-pdp .quantity input.qty::-webkit-outer-spin-button,
.ibact-pdp .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ibact-pdp-qty-btn {
  width: 40px;
  height: 44px;
  border: none;
  background: #F5ECE0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c2117;
  cursor: pointer;
}

.ibact-pdp button[type="submit"].single_add_to_cart_button,
.ibact-pdp-buy-now {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  margin-top: 6px;
}

.ibact-pdp button[type="submit"].single_add_to_cart_button {
  flex-basis: 100%;
  background: #c1622c;
  color: #fff;
  border: 1.5px solid #c1622c;
}
.ibact-pdp button[type="submit"].single_add_to_cart_button:hover {
  background: #a4501f;
  box-shadow: 0 10px 20px rgba(193,98,44,0.28);
}

.ibact-pdp-buy-now {
  background: transparent;
  color: #c1622c;
  border: 1.5px solid #c1622c;
}
.ibact-pdp-buy-now:hover { background: rgba(193,98,44,0.06); }

/* ---------- TRUST ROW ---------- */
.ibact-pdp-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(58,36,23,0.1);
  padding-top: 18px;
  margin-top: 18px;
}
.ibact-pdp-trust-item {
  text-align: center;
  border-right: 1px solid rgba(58,36,23,0.08);
  padding: 0 8px;
}
.ibact-pdp-trust-item:last-child { border-right: none; }
.ibact-pdp-trust-item strong {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: #2c2117;
  margin-bottom: 3px;
}
.ibact-pdp-trust-item span {
  font-weight: 500;
  font-size: 0.76rem;
  color: #8a7863;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .ibact-pdp-grid { grid-template-columns: 1fr; gap: 30px; }
  .ibact-pdp-highlights { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .ibact-pdp-highlight:nth-child(2) { border-right: none; }
  .ibact-pdp-trust { grid-template-columns: 1fr; row-gap: 12px; }
  .ibact-pdp-trust-item { border-right: none; border-bottom: 1px solid rgba(58,36,23,0.08); padding-bottom: 12px; }
  .ibact-pdp-trust-item:last-child { border-bottom: none; padding-bottom: 0; }
}