/* ============================================================
   Paz House 8.2 F4 — Product detail
   Scoped to .product-page. Replaces legacy inline product styles.
   ============================================================ */

.product-page {
  --product-info-max: 560px;
  color: var(--ph-text);
  background: var(--ph-bg);
}

.product-breadcrumb-wrap {
  border-bottom: 1px solid var(--ph-border);
  background: color-mix(in srgb, var(--ph-bg) 92%, #fff 8%);
}

.product-breadcrumb {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: var(--ph-text-muted);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.product-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.product-breadcrumb a:hover { color: var(--ph-brand-text); }
.product-breadcrumb > span:last-child {
  min-width: 0;
  overflow: hidden;
  color: var(--ph-text-soft);
  text-overflow: ellipsis;
}
.product-breadcrumb > span[aria-hidden="true"] { color: var(--ph-border-strong); }

.product-main-section { padding: 24px 0 56px; }
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* Gallery */
.product-gallery { min-width: 0; }
.product-gallery__viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--ph-radius-lg);
  background: var(--ph-surface-muted);
}
.product-gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.product-gallery__track::-webkit-scrollbar { display: none; }
.product-gallery__slide {
  flex: 0 0 100%;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #f6f1f4;
}
.product-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.product-gallery__counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: var(--ph-radius-pill);
  background: rgba(25,23,28,.74);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(8px);
}
.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.product-gallery__thumbs::-webkit-scrollbar { display: none; }
.product-gallery__thumb {
  flex: 0 0 62px;
  width: 62px;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ph-border);
  border-radius: 9px;
  background: var(--ph-surface);
  cursor: pointer;
}
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumb.is-active,
.product-gallery__thumb[aria-current="true"] {
  border-color: var(--ph-brand-text);
  box-shadow: 0 0 0 1px var(--ph-brand-text);
}

/* Product information */
.product-info {
  display: grid;
  min-width: 0;
  gap: 20px;
  max-width: var(--product-info-max);
}
.product-info__header { display: grid; gap: 9px; }
.product-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  color: var(--ph-text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.product-kicker > * + *::before {
  content: '·';
  margin-right: 9px;
  color: var(--ph-border-strong);
}
.product-kicker a { color: inherit; text-decoration: none; }
.product-kicker a:hover { color: var(--ph-brand-text); }
.product-info h1 {
  margin: 0;
  color: var(--ph-text);
  font-family: var(--ph-font-sans);
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.035em;
}
.product-review-summary {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--ph-text-muted);
  font-size: 11px;
  text-decoration: none;
}
.product-review-summary:hover { color: var(--ph-text); }
.product-review-summary__stars { display: inline-flex; gap: 2px; }
.product-review-summary__stars .paz-icon {
  width: 14px;
  height: 14px;
  color: var(--ph-border-strong);
  fill: none;
}
.product-review-summary__stars .paz-icon.is-filled {
  color: var(--ph-orange);
  fill: currentColor;
}

.product-price {
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--ph-border);
  border-bottom: 1px solid var(--ph-border);
}
.product-price__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 10px;
}
.product-price__main strong {
  color: var(--ph-text);
  font-size: clamp(26px, 7vw, 36px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.035em;
}
.product-price__main del {
  color: var(--ph-text-muted);
  font-size: 13px;
}
.product-price__badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--ph-radius-pill);
  background: var(--ph-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
}
.product-campaign {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  padding: 11px 12px;
  border: 1px solid rgba(217,88,100,.20);
  border-radius: var(--ph-radius-md);
  background: rgba(217,88,100,.06);
}
.product-campaign > span {
  color: var(--ph-coral);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.product-campaign > strong {
  justify-self: end;
  color: var(--ph-coral);
  font-size: 11px;
}
.product-campaign p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--ph-text-soft);
  font-size: 12px;
}
.product-transfer {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--ph-brand-border);
  border-radius: var(--ph-radius-md);
  background: var(--ph-brand-soft);
}
.product-transfer > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ph-surface);
  color: var(--ph-brand-text);
}
.product-transfer .paz-icon { width: 18px; height: 18px; }
.product-transfer > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1px 8px;
}
.product-transfer small {
  grid-column: 1 / -1;
  color: var(--ph-text-muted);
  font-size: 10px;
}
.product-transfer strong {
  color: var(--ph-brand-text);
  font-size: 16px;
  line-height: 1.2;
}
.product-transfer em {
  color: var(--ph-brand-text);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.product-stock {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  margin: -4px 0 0;
  padding: 0 10px;
  border-radius: var(--ph-radius-pill);
  background: #eef9f2;
  color: #17683f;
  font-size: 11px;
  font-weight: 650;
}
.product-stock > span { width: 7px; height: 7px; border-radius: 50%; background: #2da66b; }
.product-stock.is-low { background: #fff4e7; color: #8b531b; }
.product-stock.is-low > span { background: var(--ph-orange); }
.product-stock.is-out { background: #f6ecee; color: #9d3946; }
.product-stock.is-out > span { background: var(--ph-coral); }

.product-option-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.product-option-group legend,
.product-field-label {
  display: block;
  margin: 0 0 9px;
  color: var(--ph-text);
  font-size: 12px;
  font-weight: 700;
}
.product-option-group legend span {
  margin-left: 5px;
  color: var(--ph-brand-text);
  font-weight: 600;
}
.product-size-list,
.product-color-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-size,
.product-color {
  position: relative;
  display: inline-flex;
  min-width: 48px;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--ph-border-strong);
  border-radius: var(--ph-radius-sm);
  background: var(--ph-surface);
  color: var(--ph-text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color var(--ph-fast), background-color var(--ph-fast), color var(--ph-fast), box-shadow var(--ph-fast);
}
.product-size:hover:not(:disabled),
.product-color:hover:not(:disabled) { border-color: var(--ph-brand-text); }
.product-size.is-selected,
.product-color.is-selected,
.product-size[aria-pressed="true"],
.product-color[aria-pressed="true"] {
  border-color: var(--ph-text);
  background: var(--ph-text);
  color: #fff;
  box-shadow: 0 0 0 1px var(--ph-text);
}
.product-size small,
.product-color small {
  display: none;
  font-size: 8px;
  font-weight: 600;
}
.product-size.is-unavailable,
.product-color.is-unavailable,
.product-size:disabled,
.product-color:disabled {
  color: #a49ba1;
  border-color: var(--ph-border);
  background: var(--ph-surface-muted);
  cursor: not-allowed;
  opacity: .72;
}
.product-size.is-unavailable > span:first-child,
.product-color.is-unavailable > span:not(.product-color__dot) { text-decoration: line-through; text-decoration-thickness: 1px; }
.product-color__dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid rgba(25,23,28,.16);
  border-radius: 50%;
  background: var(--swatch, #eee);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.48);
}
.product-color.is-selected .product-color__dot { border-color: rgba(255,255,255,.5); }

.product-quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.product-quantity-row > div:first-child { min-width: 0; }
.product-quantity-row .product-field-label { margin-bottom: 2px; }
.product-quantity-row small { color: var(--ph-text-muted); font-size: 10px; }
.product-quantity {
  display: grid;
  grid-template-columns: 44px 48px 44px;
  overflow: hidden;
  border: 1px solid var(--ph-border-strong);
  border-radius: var(--ph-radius-md);
  background: var(--ph-surface);
}
.product-quantity button,
.product-quantity input {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ph-text);
  font: inherit;
  text-align: center;
}
.product-quantity button { font-size: 19px; cursor: pointer; }
.product-quantity button:disabled { color: #c8c0c5; cursor: default; }
.product-quantity input {
  border-right: 1px solid var(--ph-border);
  border-left: 1px solid var(--ph-border);
  border-radius: 0;
  font-size: 16px;
  font-weight: 700;
  appearance: textfield;
}
.product-quantity input::-webkit-inner-spin-button { appearance: none; }

.product-option-message {
  padding: 11px 12px;
  border: 1px solid rgba(217,88,100,.24);
  border-radius: var(--ph-radius-md);
  background: rgba(217,88,100,.07);
  color: #8f3340;
  font-size: 12px;
  line-height: 1.45;
}
.product-option-message[hidden] { display: none; }

.product-actions { display: grid; gap: 9px; }
.product-actions .btn {
  width: 100%;
  min-height: 52px;
  justify-content: center;
}
.product-actions .paz-icon { width: 18px; height: 18px; }
.product-save.is-active {
  border-color: var(--ph-brand-border);
  background: var(--ph-brand-soft);
  color: var(--ph-brand-text);
}
.product-save.is-active .paz-icon { fill: currentColor; }

.product-benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--ph-border);
  border-bottom: 1px solid var(--ph-border);
}
.product-benefits > div {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 0;
}
.product-benefits > div + div { border-top: 1px solid var(--ph-border); }
.product-benefits .paz-icon { width: 19px; height: 19px; color: var(--ph-brand-text); }
.product-benefits span { display: grid; gap: 1px; }
.product-benefits b { color: var(--ph-text); font-size: 11px; }
.product-benefits small { color: var(--ph-text-muted); font-size: 10px; }

.product-accordions { border-top: 1px solid var(--ph-border); }
.product-accordions details { border-bottom: 1px solid var(--ph-border); }
.product-accordions summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  color: var(--ph-text);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.product-accordions summary::-webkit-details-marker { display: none; }
.product-accordions summary .paz-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--ph-fast);
}
.product-accordions details[open] summary .paz-icon { transform: rotate(90deg); }
.product-accordion__body {
  padding: 0 0 16px;
  color: var(--ph-text-soft);
  font-size: 12px;
  line-height: 1.7;
}
.product-accordion__body p { margin: 0 0 8px; }
.product-accordion__body p:last-child { margin-bottom: 0; }
.product-specs { display: grid; margin: 0; }
.product-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--ph-border);
}
.product-specs dt { color: var(--ph-text-muted); }
.product-specs dd { margin: 0; color: var(--ph-text); font-weight: 600; text-align: right; }

/* Mobile sticky CTA */
.product-sticky-cta {
  position: fixed;
  z-index: var(--ph-z-cta);
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(138px, 48%);
  align-items: center;
  gap: 12px;
  min-height: calc(64px + var(--safe-bottom));
  padding: 8px 16px calc(8px + var(--safe-bottom));
  border-top: 1px solid var(--ph-border);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -12px 30px rgba(52,35,46,.08);
  backdrop-filter: blur(14px);
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--ph-fast), opacity var(--ph-fast);
}
.product-sticky-cta.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.product-sticky-cta__price { display: grid; gap: 1px; min-width: 0; }
.product-sticky-cta__price small { color: var(--ph-text-muted); font-size: 9px; }
.product-sticky-cta__price strong { overflow: hidden; color: var(--ph-text); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.product-sticky-cta .btn { min-height: 48px; justify-content: center; padding-inline: 14px; }
.product-sticky-cta .paz-icon { width: 17px; height: 17px; }
.product-page.has-sticky-cta { padding-bottom: calc(76px + var(--safe-bottom)); }
.drawer-abierto .product-sticky-cta,
.buscador-abierto .product-sticky-cta,
.carrito-abierto .product-sticky-cta { opacity: 0; pointer-events: none; }

/* Reviews / related adjusted to the new light system */
.product-reviews,
.related-products {
  border-top: 1px solid var(--ph-border);
  background: var(--ph-surface);
}
.product-section-heading { margin-bottom: 24px; text-align: left; }
.product-section-heading .linea-oro { display: none; }
.product-section-heading .t-label { color: var(--ph-brand-text); }
.product-section-heading .section__titulo { color: var(--ph-text); }
.product-section-heading .section__subtitulo { color: var(--ph-text-muted); }
.product-reviews .opiniones-grid { gap: 18px; }
.product-reviews .review,
.product-review-form,
.product-reviews .f2-empty {
  border-color: var(--ph-border);
  background: var(--ph-bg);
  color: var(--ph-text);
}
.product-reviews .product-review-empty { align-content:center; min-height:0; padding:24px 20px; }
.product-review-empty .paz-icon { width:28px; height:28px; margin:0 auto; color:var(--ph-brand-text); }
.product-review-empty h2 { margin:8px 0 4px; }
.product-review-empty p { max-width:360px; margin:0 auto; color:var(--ph-text-muted); font-size:var(--ph-fs-12); line-height:1.6; }
.product-reviews .review h3,
.product-review-form h2,
.product-reviews .f2-empty h2 { color: var(--ph-text); }
.product-reviews .review p,
.product-review-form .f2-muted,
.product-reviews .review footer { color: var(--ph-text-muted); }
.product-reviews .review-answer { border-left-color: var(--ph-brand); background: var(--ph-brand-soft); }
.product-review-form .f2-form input,
.product-review-form .f2-form select,
.product-review-form .f2-form textarea {
  border-color: var(--ph-border-strong);
  background: var(--ph-surface);
  color: var(--ph-text);
}
.product-review-form .f2-form label { color: var(--ph-text-soft); }

@media (max-width: 767px) {
  .product-breadcrumb-wrap .container { padding-inline: 16px; }
  .product-breadcrumb { font-size: 10px; }
  .product-main-section { padding: 14px 0 38px; }
  .product-layout { gap: 20px; }
  .product-gallery { margin-inline: -16px; }
  .product-gallery__viewport { border-radius: 0; }
  .product-gallery__thumbs { padding-inline: 16px; }
  .product-info { max-width: none; gap: 17px; }
  .product-info h1 { font-size: clamp(25px, 7.4vw, 32px); }
  .product-price { padding-block: 15px; }
  .product-price__main strong { font-size: 27px; }
  .product-transfer > div { grid-template-columns: 1fr; }
  .product-transfer em { margin-top: 1px; }
  .product-size,
  .product-color { min-height: 46px; }
  .product-benefits { grid-template-columns: 1fr; }
  .product-reviews .opiniones-grid { grid-template-columns: 1fr; }

  .related-products .product-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .related-products .product-grid::-webkit-scrollbar { display: none; }
  .related-products .product-card {
    flex: 0 0 min(66vw, 240px);
    scroll-snap-align: start;
  }
}

@media (min-width: 768px) {
  .product-main-section { padding: 32px 0 72px; }
  .product-layout {
    grid-template-columns: minmax(0, 1.06fr) minmax(360px, .94fr);
    gap: clamp(36px, 5vw, 72px);
  }
  .product-gallery {
    position: sticky;
    top: calc(var(--ph-header-h) + 18px);
  }
  .product-gallery__viewport { border-radius: var(--ph-radius-lg); }
  .product-info { padding-top: 4px; }
  .product-benefits { grid-template-columns: repeat(3, 1fr); }
  .product-benefits > div {
    grid-template-columns: 30px minmax(0,1fr);
    padding: 12px 8px;
  }
  .product-benefits > div + div { border-top: 0; border-left: 1px solid var(--ph-border); }
  .product-sticky-cta { display: none; }
  .product-page.has-sticky-cta { padding-bottom: 0; }
}

@media (min-width: 1180px) {
  .product-layout { grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); }
  .product-gallery__viewport { max-width: 720px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-sticky-cta,
  .product-accordions summary .paz-icon { transition: none; }
  .product-gallery__track { scroll-behavior: auto; }
}
