/* Layout adaptations only; colors and card components come from the approved mockup. */
#view-pdp .pdp-gallery-card { align-self: start; }
#relatedProducts { padding: 16px 0 24px; }
#relatedProducts .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { #relatedProducts .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { #relatedProducts .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#relatedProducts[hidden] { display: none; }
#relatedProducts .p-card { min-width: 0; }
.product-specs { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-hairline); }
.product-specs h2 { font: 700 17px var(--font-display); margin-bottom: 12px; }
.product-specs-list { margin: 0; }
.product-specs-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-hairline); font-size: 12.5px; overflow-wrap: anywhere; }
.product-specs-list dt { color: var(--text-secondary); }
.product-specs-list dd { margin: 0; font-weight: 600; }
.product-specs summary { cursor: pointer; font-size: 13px; font-weight: 600; padding-top: 12px; }
.product-specs-status { margin-top: 10px; font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.product-specs [hidden] { display: none; }
.merchant-content { margin-top: 24px; margin-bottom: 24px; }
.merchant-content .history-chart-card { margin: 20px 0; }
.merchant-content p { line-height: 1.7; }
.merchant-content h2 { margin-bottom: 16px; }
.merchant-content .faq-clean details { margin-bottom: 12px; }
.merchant-content .faq-clean p { margin-top: 12px; }
.merchant-content input,.merchant-content select { max-width: 100%; padding: 10px; border: 1px solid var(--border-strong); border-radius: 8px; font: inherit; }
.merchant-content #alerta-form > div { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.merchant-content #alerta-form label { display: block; }
.merchant-content #alerta-form button { cursor: pointer; }
.merchant-ad { margin: 0 auto; text-align: center; }
/* Keep slots measurable/loadable. Only remove the old empty minimum-height reservation. */
body .merchant-ad ins.adsbygoogle:not([data-ad-status="filled"]) { min-height: 0; }
.merchant-ad:has(ins[data-ad-status="filled"]) { margin: 20px auto; }
@media(max-width:1100px) {
  #relatedProducts .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width:600px) {
  #relatedProducts .product-grid { grid-template-columns: minmax(0, 1fr); }
}
@media(min-width:1460px) {
  body[data-merchant-static] > #view-pdp > .container,
  body[data-merchant-static] > .merchant-content,
  body[data-merchant-static] > #relatedProducts > .container { max-width:1100px; }
}
/* Semantic heading parity (replaces h5/h4/h3 in nav, footer and modal) */
.mega-col .mega-heading { font-family: var(--font-display); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 10px; font-weight: 700; }
.footer-col .footer-heading { font-family: var(--font-display); color: #FFFFFF; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }
.modal-prod-name { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--brand-navy); margin-bottom: 6px; }
/* DOM-first SEO: H1 & buybox (.pdp-info-col) come FIRST in HTML, gallery+specs SECOND.
   On desktop (>=961px), place gallery in col 1 (left) and info in col 2 (right). */
@media(min-width:961px) {
  #view-pdp .pdp-grid { display: grid; grid-template-columns: 430px 1fr; gap: 32px; align-items: start; }
  #view-pdp .pdp-grid > .pdp-gallery-card { grid-column: 1; grid-row: 1; }
  #view-pdp .pdp-grid > .pdp-info-col { grid-column: 2; grid-row: 1; }
}
@media(max-width:960px) {
  #view-pdp .pdp-grid { display: flex; flex-direction: column; gap: 20px; }
}
a.mega-nav-item { text-decoration: none; color: inherit; }
nav.cat-strip { display: block; }
nav.mega-drawer { display: none; }
nav.mega-drawer.open { display: grid; }
html, body { overflow-x: clip; }

/* === Smart Hide-on-Scroll-Down / Reveal-on-Scroll-Up Header & UX Polish v2 (2026-11-21) === */
html, body {
  overflow-x: clip !important;
}
header.site-header,
#siteHeader {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease !important;
  will-change: transform;
}
header.site-header.hdr-scrolled,
#siteHeader.hdr-scrolled {
  box-shadow: 0 8px 24px -4px rgba(36, 36, 36, 0.09), 0 2px 6px -1px rgba(36, 36, 36, 0.05) !important;
}
header.site-header.hdr-hidden,
#siteHeader.hdr-hidden {
  transform: translateY(-104%) !important;
  box-shadow: none !important;
}
/* Floating Back-to-Top Pill */
.pp-back-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 9999px;
  background: #242424;
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(36, 36, 36, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, background 0.18s ease;
}
.pp-back-top:hover {
  background: #D04400;
}
.pp-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .pp-back-top {
    right: 14px;
    bottom: 18px;
    padding: 9px 14px;
    font-size: 12.5px;
  }
}

/* === Multi-Image Thumbnail Gallery on Static & Dynamic PDP (2026-11-21) === */
.pdp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  justify-content: center;
}
.pdp-thumb {
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 1.5px solid rgba(36, 36, 36, 0.16);
  border-radius: 8px;
  background: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.pdp-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pdp-thumb:hover {
  border-color: #FF6B00;
  transform: translateY(-1px);
}
.pdp-thumb.active {
  border-color: #D04400;
  box-shadow: 0 0 0 2px rgba(208, 68, 0, 0.18);
}

/* === Product Image Zoom & Fullscreen Lightbox Preview (2026-11-21) === */
.pdp-main-img {
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 12px;
}
.pdp-main-img img {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.pdp-main-img:hover img {
  transform: scale(1.04);
}
.pdp-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #242424;
  border: 1px solid rgba(36, 36, 36, 0.15);
  font-size: 11.5px;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(36, 36, 36, 0.08);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.pdp-main-img:hover .pdp-zoom-hint {
  background: #FFF3EB;
  color: #D04400;
  border-color: #FF6B00;
}
.pp-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(18, 18, 18, 0.86);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.pp-lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}
.pp-lightbox-card {
  position: relative;
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(36, 36, 36, 0.12);
}
.pp-lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(36, 36, 36, 0.1);
  background: #FFFFFF;
}
.pp-lightbox-title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 14.5px;
  font-weight: 700;
  color: #242424;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-lightbox-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pp-lightbox-counter {
  font-size: 12.5px;
  font-weight: 700;
  color: #D04400;
  background: #FFF3EB;
  border: 1px solid #FDBA74;
  padding: 4px 10px;
  border-radius: 999px;
}
.pp-lightbox-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(36, 36, 36, 0.16);
  background: #FFFFFF;
  color: #242424;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pp-lightbox-close:hover {
  background: #D04400;
  color: #FFFFFF;
  border-color: #D04400;
}
.pp-lightbox-stage {
  position: relative;
  flex: 1;
  min-height: 380px;
  max-height: 66vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 64px;
  background: #FFFFFF;
  overflow: hidden;
  user-select: none;
}
.pp-lightbox-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.pp-lightbox-img.zoomed {
  transform: scale(1.75);
  cursor: zoom-out;
}
.pp-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(36, 36, 36, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: #242424;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(36, 36, 36, 0.12);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pp-lightbox-nav:hover {
  background: #D04400;
  color: #FFFFFF;
  border-color: #D04400;
}
.pp-lightbox-nav.prev { left: 16px; }
.pp-lightbox-nav.next { right: 16px; }
.pp-lightbox-bottom {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(36, 36, 36, 0.08);
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .pp-lightbox-stage { min-height: 280px; padding: 16px 48px; }
  .pp-lightbox-nav { width: 38px; height: 38px; }
  .pp-lightbox-nav.prev { left: 8px; }
  .pp-lightbox-nav.next { right: 8px; }
}

/* === Enterprise Inline Price Alert Box (#alerta-box) — Email Default + WhatsApp Secondary (2026-11-22) === */
#alerta-box {
  background: #FFFBF8 !important;
  border: 1.5px solid #FDBA74 !important;
  border-radius: 16px !important;
  padding: 22px 24px !important;
  margin-top: 24px !important;
  box-shadow: 0 4px 14px rgba(208, 68, 0, 0.05) !important;
}
#alerta-box h2.sec-title {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #242424 !important;
  margin: 0 0 6px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}
#alerta-box .pp-alerta-sub {
  font-size: 13.5px !important;
  color: #4B5563 !important;
  margin: 0 0 16px 0 !important;
}
#alerta-form .pp-alerta-grid {
  display: grid !important;
  grid-template-columns: 190px 1.4fr 170px auto !important;
  gap: 12px !important;
  align-items: end !important;
}
#alerta-form .pp-field-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}
#alerta-form label,
#alerta-form .pp-field-label {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #242424 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  margin: 0 !important;
}
#alerta-box #alerta-canal,
#alerta-box #alerta-contacto,
#alerta-box #alerta-precio {
  width: 100% !important;
  height: 44px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  border: 1.5px solid #D1D5DB !important;
  background: #FFFFFF !important;
  color: #242424 !important;
  font-family: var(--font-sans, 'Inter', sans-serif) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
#alerta-box #alerta-canal:focus,
#alerta-box #alerta-contacto:focus,
#alerta-box #alerta-precio:focus {
  border-color: #D04400 !important;
  box-shadow: 0 0 0 3px rgba(208, 68, 0, 0.12) !important;
}
#alerta-box button.btn-card-primary,
#alerta-box .pp-alerta-submit {
  height: 44px !important;
  padding: 0 22px !important;
  border-radius: 10px !important;
  border: none !important;
  background: #D04400 !important;
  color: #FFFFFF !important;
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: background 0.15s ease !important;
}
#alerta-box button.btn-card-primary:hover,
#alerta-box .pp-alerta-submit:hover {
  background: #B83B00 !important;
}
#alerta-box .pp-alerta-note {
  font-size: 12px !important;
  color: #6B7280 !important;
  margin: 10px 0 0 0 !important;
}
#alerta-box #alerta-ok {
  background: #FFF3EB !important;
  border: 1.5px solid #FDBA74 !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  color: #242424 !important;
  font-weight: 600 !important;
  align-items: center !important;
  gap: 12px !important;
}
@media (max-width: 900px) {
  #alerta-form .pp-alerta-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  #alerta-box button.btn-card-primary,
  #alerta-box .pp-alerta-submit {
    grid-column: 1 / -1 !important;
    width: 100% !important;
  }
}
@media (max-width: 560px) {
  #alerta-form .pp-alerta-grid {
    grid-template-columns: 1fr !important;
  }
}
