/* ==========================================================================
   SINGLE PRODUCT PAGE
   ========================================================================== */

/* ---- Product layout ---- */
.product-page { padding: var(--s8) 0 var(--s16); }
.product-page__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s12);
  align-items: start;
}

/* ---- Gallery ---- */
.product-gallery { position: sticky; top: calc(var(--bar-height) + var(--header-height) + var(--s8)); }
.product-gallery__main {
  aspect-ratio: 3 / 4;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--s3);
  position: relative;
}
.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.product-gallery__discount {
  position: absolute;
  top: var(--s3);
  left: var(--s3);
  background: var(--red);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.product-gallery__thumbs {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
}
.product-gallery__thumb {
  width: 64px;
  height: 86px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--off-white);
  transition: border-color var(--dur) var(--ease);
}
.product-gallery__thumb.is-active { border-color: var(--text); }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Product info ---- */
.product-info { }
.product-info__publisher {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: var(--s2);
}
.product-info__title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--s3); }
.product-info__rating {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.product-info__rating a { color: var(--amber); text-decoration: underline; font-size: var(--text-sm); }

/* Price */
.product-info__price {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--border);
}
.product-info__price-now {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}
.product-info__price-was {
  font-size: var(--text-lg);
  color: var(--text-muted);
  text-decoration: line-through;
}
.product-info__price-save {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--red);
  background: var(--red-pale);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* Variants */
.product-info__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: var(--s2);
}
.product-info__variants {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.variant-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.variant-btn:hover { border-color: var(--text); }
.variant-btn.is-active { border-color: var(--text); background: var(--text); color: var(--white); }
.variant-btn:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

/* Stock */
.product-info__stock {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--s5);
}
.product-info__stock--low { color: var(--red); }
.product-info__stock--in { color: var(--green); }
.product-info__stock--out { color: var(--text-muted); }

/* Quantity + ATC */
.product-info__qty-row {
  display: flex;
  gap: var(--s3);
  margin-bottom: var(--s4);
  align-items: center;
}
.qty-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.qty-selector__btn {
  width: 40px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
  border: none;
  transition: background var(--dur) var(--ease);
}
.qty-selector__btn:hover { background: var(--off-white); }
.qty-selector__num {
  width: 44px;
  text-align: center;
  font-size: var(--text-base);
  font-weight: 700;
  border: none;
  outline: none;
  -webkit-appearance: none;
  background: transparent;
}
.product-info__atc { flex: 1; height: 48px; }
.product-info__whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  width: 100%;
  padding: 11px;
  background: #25D366;
  color: var(--white);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--s4);
  transition: opacity var(--dur) var(--ease);
}
.product-info__whatsapp:hover { opacity: 0.9; }

/* Trust row */
.product-info__trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
  padding: var(--s4);
  background: var(--off-white);
  border-radius: var(--radius-md);
  margin-bottom: var(--s5);
}
.product-info__trust-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
}
.product-info__trust-item svg { color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.product-info__trust-label { font-weight: 700; font-size: var(--text-xs); }
.product-info__trust-sub { font-size: 0.6875rem; color: var(--text-muted); }

/* ---- Tabs ---- */
.product-tabs { margin-top: var(--s10); }
.product-tabs__nav {
  display: flex;
  border-bottom: 1.5px solid var(--border);
  gap: 0;
  overflow-x: auto;
}
.product-tab-btn {
  padding: var(--s3) var(--s6);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color var(--dur) var(--ease);
}
.product-tab-btn.is-active { color: var(--text); border-bottom-color: var(--text); }
.product-tab-content { display: none; padding: var(--s8) 0; }
.product-tab-content.is-active { display: block; }
.product-tab-content .entry-content { font-size: var(--text-base); color: var(--text-light); line-height: 1.75; }
.product-tab-content .entry-content p { margin-bottom: var(--s4); max-width: 72ch; }
.product-tab-content .entry-content h3 { margin-bottom: var(--s3); margin-top: var(--s6); }

/* Specs table */
.specs-table { width: 100%; max-width: 600px; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border-light); }
.specs-table th {
  text-align: left;
  padding: var(--s3) var(--s4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-light);
  background: var(--off-white);
  width: 40%;
}
.specs-table td { padding: var(--s3) var(--s4); font-size: var(--text-sm); color: var(--text); }

/* Reviews tab */
.review-summary {
  display: flex;
  align-items: center;
  gap: var(--s8);
  padding-bottom: var(--s6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s6);
}
.review-summary__score { font-family: var(--font-display); font-size: 3.5rem; font-weight: 800; line-height: 1; color: var(--text); }
.review-summary__label { font-size: var(--text-xs); color: var(--text-muted); }
.review-list { display: flex; flex-direction: column; gap: var(--s5); }
.review-item { padding-bottom: var(--s5); border-bottom: 1px solid var(--border-light); }
.review-item__head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s3); flex-wrap: wrap; }
.review-item__name { font-weight: 700; font-size: var(--text-sm); }
.review-item__date { font-size: var(--text-xs); color: var(--text-muted); }
.review-item__verified { font-size: var(--text-xs); color: var(--green); }
.review-item__title { font-weight: 700; margin-bottom: var(--s2); }
.review-item__text { font-size: var(--text-sm); color: var(--text-light); line-height: 1.7; }

/* ---- FBT (Frequently Bought Together) ---- */
.fbt { background: var(--off-white); border-radius: var(--radius-lg); padding: var(--s6); margin: var(--s8) 0; }
.fbt__title { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--s5); }
.fbt__items { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.fbt__item { display: flex; align-items: center; gap: var(--s3); }
.fbt__item-img { width: 56px; height: 74px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: var(--white); }
.fbt__item-title { font-size: var(--text-xs); font-weight: 600; }
.fbt__item-price { font-size: var(--text-xs); color: var(--amber); font-weight: 700; }
.fbt__plus { font-size: var(--text-lg); color: var(--text-muted); }
.fbt__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.fbt__savings { font-size: var(--text-sm); color: var(--green); font-weight: 700; }
.fbt__total { font-size: var(--text-sm); color: var(--text-light); }

/* ---- Sticky ATC bar ---- */
.sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: var(--s3) 0;
  z-index: 50;
  transform: translateY(100%);
  transition: transform 250ms var(--ease);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.07);
}
.sticky-atc.is-visible { transform: translateY(0); }
.sticky-atc__inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.sticky-atc__img {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.sticky-atc__title { font-weight: 700; font-size: var(--text-sm); flex: 1; }
.sticky-atc__price { font-weight: 800; font-size: var(--text-md); color: var(--text); }
.sticky-atc__btn { flex-shrink: 0; }

/* ---- Related products ---- */
.related-products { margin-top: var(--s12); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .product-page__inner { grid-template-columns: 1fr; gap: var(--s8); }
  .product-gallery { position: static; }
  .product-gallery__main { aspect-ratio: 3/4; max-width: 320px; margin-left: auto; margin-right: auto; }
  .product-info__trust { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .product-info__trust { grid-template-columns: 1fr; }
  .sticky-atc__img { display: none; }
  .sticky-atc__title { font-size: var(--text-xs); }
}
