/* ============================================================
   PURA HIFA — DESIGN TOKENS + STYLES
   Sistema de diseño completo para WordPress theme.
   ============================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────── */
:root {

  --color-oliva:           #7D755A;
  --color-marfil:          #F3E1D1;
  --color-ambar-rustico:   #B59A73;
  --color-oliva-medio:     #97936E;
  --color-arena-rose:      #DEB9A5;
  --color-marfil-claro:    #E9DDC5;
  --color-oliva-oscuro:    #4D4A31;
  --color-terracota:       #985433;
  --color-dorado:          #CFA673;

  --bg-base:        var(--color-marfil);
  --bg-alt:         var(--color-marfil-claro);
  --bg-dark:        var(--color-oliva-oscuro);
  --text-primary:   var(--color-oliva-oscuro);
  --text-secondary: var(--color-oliva);
  --text-on-dark:   var(--color-marfil);
  --accent:         var(--color-terracota);
  --accent-soft:    var(--color-dorado);
  --border-subtle:  rgba(77,74,49,0.15);

  --sku-melena:     #1A1A1A;
  --sku-cordyceps:  var(--color-terracota);
  --sku-reishi:     #6E3A2E;
  --sku-cola-pavo:  var(--color-oliva-oscuro);

  --color-whatsapp: #25D366;

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body:    'Poppins', system-ui, sans-serif;

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --fs-hero:    clamp(2.2rem, 5vw + 1rem, 4.5rem);
  --fs-h1:      clamp(1.9rem, 3.5vw + 1rem, 3rem);
  --fs-h2:      clamp(1.5rem, 2.5vw + 0.5rem, 2.2rem);
  --fs-h3:      clamp(1.15rem, 1.5vw + 0.5rem, 1.4rem);
  --fs-body:    clamp(0.95rem, 0.5vw + 0.8rem, 1.05rem);
  --fs-small:   clamp(0.8rem, 0.3vw + 0.7rem, 0.875rem);
  --fs-ticker:  clamp(0.7rem, 0.4vw + 0.6rem, 0.85rem);

  --line-tight:   1.1;
  --line-normal:  1.5;
  --line-relaxed: 1.7;
  --tracking-wide: 0.08em;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  1rem;
  --space-4:  1.5rem;
  --space-5:  2rem;
  --space-6:  3rem;
  --space-7:  4rem;
  --space-8:  6rem;
  --space-9:  8rem;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --maxw:   1280px;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-soft: 0 8px 30px rgba(77,74,49,0.10);
}

/* ── RESET Y BASE ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  background-color: var(--bg-base);
  line-height: var(--line-normal);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--line-tight);
}

/* ── UTILIDADES ───────────────────────────────────── */
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.screen-reader-text:focus {
  background-color: var(--bg-base);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 2px 2px rgba(77,74,49,0.4);
  clip: auto !important;
  clip-path: none;
  color: var(--text-primary);
  display: block;
  font-size: var(--fs-body);
  font-weight: var(--weight-bold);
  height: auto;
  left: var(--space-3);
  line-height: normal;
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  top: var(--space-3);
  width: auto;
  z-index: 100000;
}

.skip-link {
  left: -9999rem;
  top: var(--space-5);
  z-index: 999999999;
  text-decoration: underline;
}

.skip-link:focus {
  display: block;
  left: var(--space-3);
  top: var(--space-3);
  font-size: var(--fs-body);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  line-height: normal;
  padding: var(--space-3) var(--space-4);
  right: auto;
}

.ticker-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── HEADER ───────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
  background-color: transparent;
}

.site-header.scrolled {
  background-color: var(--bg-base);
  box-shadow: var(--shadow-soft);
}

.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-block: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  flex-shrink: 0;
  transition: color 0.35s ease;
}

.site-header.scrolled .logo {
  color: var(--text-primary);
}

.main-nav {
  display: none;
  flex: 1;
}

.main-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-5);
}

.main-nav a {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-medium);
  letter-spacing: 0.03em;
  color: var(--text-on-dark);
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
  color: var(--accent-soft);
}

.site-header.scrolled .main-nav a {
  color: var(--text-primary);
}

.site-header.scrolled .main-nav a:hover {
  color: var(--accent);
}

.cart-btn {
  display: none;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--text-on-dark);
  border-radius: 99px;
  color: var(--text-on-dark);
  flex-shrink: 0;
  transition: border-color 0.35s, color 0.35s;
  cursor: default;
  pointer-events: none;
}

.site-header.scrolled .cart-btn {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-left: auto;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-on-dark);
  border-radius: 2px;
  transition: background-color 0.35s, transform 0.25s, opacity 0.25s;
  transform-origin: center;
}

.site-header.scrolled .hamburger span {
  background-color: var(--text-primary);
}

.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav.nav-open {
  display: flex;
  position: fixed;
  inset: 0;
  top: 58px;
  background-color: var(--bg-base);
  z-index: 199;
  flex-direction: column;
  padding: var(--space-6) var(--gutter) var(--space-8);
  overflow-y: auto;
}

.main-nav.nav-open ul {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--space-4);
}

.main-nav.nav-open a {
  color: var(--text-primary);
  font-size: var(--fs-h3);
  font-weight: var(--weight-regular);
}

/* ── HERO ─────────────────────────────────────────── */
.hero {
  position: relative;
  height: 70vh;
  min-height: 460px;
  background-image: url('img/hero-mesa.webp');
  background-size: cover;
  background-position: left center;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(77, 74, 49, 0.38);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-inline: var(--gutter);
}

.hero-content h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: var(--fs-hero);
  color: var(--text-on-dark);
  line-height: var(--line-tight);
  max-width: 14ch;
}

/* ── TICKER DE BENEFICIOS ─────────────────────────── */
.ticker {
  background-color: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: var(--space-3);
  overflow: hidden;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 28s linear infinite;
}

.ticker-content {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-ticker);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── MANIFIESTO + FORMATOS ────────────────────────── */
.manifesto {
  padding-block: var(--space-8);
  background-color: var(--bg-base);
}

.manifesto-text {
  margin-bottom: var(--space-6);
  max-width: 700px;
}

.manifesto-text h2 {
  font-weight: var(--weight-regular);
  font-size: var(--fs-h1);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.manifesto-text p {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--line-relaxed);
}

.formats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.format-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background-color: var(--bg-alt);
}

.format-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.format-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-5) var(--space-3) var(--space-3);
  background: linear-gradient(to top, rgba(77, 74, 49, 0.88) 0%, transparent 100%);
  color: var(--text-on-dark);
}

.format-card-body h3 {
  font-size: var(--fs-h3);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.format-card-body p {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: var(--line-normal);
  color: var(--color-marfil-claro);
}

/* ── BLOQUE CONCEPTUAL ────────────────────────────── */
.conceptual {
  padding-block: var(--space-8);
  background-color: var(--bg-alt);
  text-align: center;
}

.conceptual-label {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

.conceptual-heading {
  font-weight: var(--weight-light);
  font-size: var(--fs-h1);
  color: var(--text-primary);
  line-height: 1.45;
  max-width: 860px;
  margin-inline: auto;
}

.inline-img {
  display: none;
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-inline: 0.25em;
}

/* ── DESTACADOS DE ESPECIE ────────────────────────── */
.species-highlights {
  background-color: var(--bg-base);
}

.species-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.species-panel {
  position: relative;
  min-height: 440px;
  overflow: hidden;
}

.species-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.species-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  padding: var(--space-7) var(--space-5) var(--space-5);
  background: linear-gradient(to top, rgba(77, 74, 49, 0.90) 0%, rgba(77, 74, 49, 0.40) 60%, transparent 100%);
  color: var(--text-on-dark);
}

.species-scientific {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-2);
  opacity: 0.75;
}

.species-body h3 {
  font-size: var(--fs-h2);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.species-body > p:last-child {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--line-normal);
  max-width: 40ch;
  opacity: 0.9;
}

/* ── CATÁLOGO DE PRODUCTOS ────────────────────────── */
.catalog {
  padding-block: var(--space-8);
  background-color: var(--bg-alt);
}

.catalog-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.catalog-header h1,
.catalog-header h2 {
  font-weight: var(--weight-regular);
  font-size: var(--fs-h1);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.catalog-header > div > p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  max-width: 52ch;
}

.shop-all-link {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  align-self: flex-start;
  cursor: default;
  pointer-events: none;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.product-card {
  background-color: var(--bg-base);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--bg-alt);
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.04);
}

.product-body {
  padding: var(--space-4);
}

.product-name {
  font-size: var(--fs-h3);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.product-desc {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--line-normal);
}

.product-price {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-top: var(--space-2);
}

.product-price ins {
  text-decoration: none;
  color: var(--text-primary);
}

.product-price del {
  color: var(--text-secondary);
  opacity: 0.6;
  margin-right: var(--space-2);
}

/* ── MIS PRODUCTOS (CARRITO) ──────────────────────── */
.cart-section {
  padding-block: var(--space-8);
  background-color: var(--bg-alt);
  min-height: 50vh;
}

.cart-empty {
  text-align: center;
  padding-block: var(--space-7);
}

.cart-empty p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  margin-bottom: var(--space-5);
}

.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-on-dark);
  background-color: var(--accent);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-primary);
  background-color: transparent;
  border: 1.5px solid var(--border-subtle);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.products-grid--cart {
  margin-bottom: var(--space-6);
}

.cart-item-price {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.cart-item-qty {
  margin-bottom: var(--space-3);
}

.cart-item-qty .quantity {
  display: inline-flex;
}

.cart-item-qty input[type="number"] {
  width: 64px;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-primary);
  background-color: var(--bg-base);
}

.cart-item-subtotal {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.cart-item-remove {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-medium);
  color: var(--accent);
  text-decoration: underline;
}

.cart-summary {
  max-width: 420px;
  margin-left: auto;
  padding: var(--space-5);
  background-color: var(--bg-base);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-body);
  color: var(--text-primary);
}

.cart-summary-row.total {
  font-weight: var(--weight-semibold);
  font-size: var(--fs-h3);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-3);
}

.cart-summary-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cart-summary-actions .btn-primary,
.cart-summary-actions .btn-secondary {
  text-align: center;
}

/* ── BANNER DE CIERRE ─────────────────────────────── */
.banner-cierre {
  background-color: var(--color-oliva-oscuro);
  overflow: hidden;
  line-height: 0;
}

.banner-cierre img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  max-height: 380px;
}

/* ── FOOTER ───────────────────────────────────────── */
.site-footer {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-top: var(--space-8);
  padding-bottom: var(--space-7);
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-h3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--color-oliva-medio);
}

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-ambar-rustico);
  margin-bottom: var(--space-3);
}

.footer-nav ul,
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-nav a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-small);
  color: var(--text-on-dark);
  opacity: 0.75;
  transition: opacity 0.2s;
}

.footer-nav a:hover,
.footer-contact a:hover {
  opacity: 1;
}

.footer-legal p {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--color-oliva-medio);
  line-height: var(--line-relaxed);
  font-style: italic;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-4);
}

.footer-bottom p {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--color-oliva-medio);
  text-align: center;
}

/* ── MEDIA QUERIES: TABLET >=640px ────────────────── */
@media (min-width: 640px) {

  .hero {
    height: 78vh;
    min-height: 520px;
  }

  .inline-img {
    display: inline-block;
  }

  .formats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .format-card {
    aspect-ratio: 3 / 4;
  }

  .species-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .species-panel {
    min-height: 520px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner-cierre img {
    max-height: 450px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

/* ── MEDIA QUERIES: DESKTOP >=1024px ──────────────── */
@media (min-width: 1024px) {

  .hamburger {
    display: none;
  }

  .main-nav {
    display: flex;
  }

  .cart-btn {
    display: inline-flex;
    align-items: center;
  }

  .hero {
    height: 87vh;
    min-height: 600px;
    justify-content: flex-end;
  }

  .hero-overlay {
    background:
      linear-gradient(to bottom, rgba(77, 74, 49, 0.28) 0%, transparent 14%),
      linear-gradient(to left, rgba(77, 74, 49, 0.65) 35%, rgba(77, 74, 49, 0.10) 65%, transparent 100%);
  }

  .hero-content {
    max-width: 52%;
    text-align: right;
    padding-right: var(--gutter);
    padding-left: 0;
  }

  .formats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
  }

  .format-card {
    aspect-ratio: 2 / 3;
  }

  .species-panel {
    min-height: 620px;
  }

  .catalog-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .shop-all-link {
    align-self: flex-end;
    flex-shrink: 0;
    margin-bottom: var(--space-2);
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .products-grid--cart {
    grid-template-columns: repeat(3, 1fr);
  }

  .banner-cierre img {
    max-height: none;
    height: 52vh;
  }

  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1.6fr 2fr;
    gap: var(--space-7);
  }
}

/* ── ACCESIBILIDAD: MOVIMIENTO REDUCIDO ───────────── */
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   PÁGINA DE PRODUCTO (PDP) — single-product.php
   Portado de producto.css. El acento --sku se define inline en
   .pdp-wrap según la categoría del producto (ver ph_product_sku_var()).
   ══════════════════════════════════════════════════════════════

     §1  Header sólido en la PDP
     §2  Layout .product (galería + summary)
     §3  Galería (imagen principal + miniaturas) + lightbox
     §4  Summary: título, rating, beneficios
     §5  Selector de formato + precio + CTA
     §6  Acordeones
     §6b Carrusel de productos
     §7  Sección "a nivel celular"
     §8  Sección "qué hay adentro" (oscura)
     §9  Media queries
   ─────────────────────────────────────────────────────────── */

/* ── §1 HEADER SÓLIDO EN LA PDP ───────────────────── */
.single-product .site-header {
  background-color: var(--bg-base);
  box-shadow: var(--shadow-soft);
}

.single-product .logo,
.single-product .main-nav a,
.single-product .submenu-toggle,
.single-product .cart-btn {
  color: var(--text-primary);
}

.single-product .cart-btn { border-color: var(--text-primary); }
.single-product .hamburger span { background-color: var(--text-primary); }
.single-product .main-nav a:hover,
.single-product .submenu-toggle:hover { color: var(--accent); }

/* ── §2 LAYOUT .product ───────────────────────────── */
.product {
  padding-top: calc(58px + var(--space-6));
  padding-bottom: var(--space-8);
  background-color: var(--bg-base);
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* ── §3 GALERÍA ────────────────────────────────────── */
.woocommerce-product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.gallery-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--bg-alt);
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
}

.zoom-hint {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
  transition: background-color 0.2s ease;
}

.gallery-main:hover .zoom-hint { background-color: #fff; }
.zoom-hint svg { width: 20px; height: 20px; }

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

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-alt);
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: border-color 0.2s ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.thumb.is-active { border-color: var(--sku); }
.thumb:hover { border-color: var(--accent-soft); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  background-color: rgba(26, 26, 26, 0.92);
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.lightbox img.is-zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
  z-index: 2;
}

.lightbox-nav:hover { background-color: rgba(255, 255, 255, 0.25); }
.lightbox-prev { left: var(--space-4); }
.lightbox-next { right: var(--space-4); }

.lightbox-counter {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lightbox-close:hover { background-color: rgba(255, 255, 255, 0.25); }

/* ── §4 SUMMARY ────────────────────────────────────── */
.summary {
  display: flex;
  flex-direction: column;
}

.product_title {
  font-weight: var(--weight-regular);
  font-size: var(--fs-h1);
  color: var(--text-primary);
  line-height: var(--line-tight);
}

.product-latin {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.woocommerce-product-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.star-rating {
  color: var(--color-dorado);
  font-size: 1rem;
  letter-spacing: 0.15em;
}

.woocommerce-review-link {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-short-desc {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text-primary);
  line-height: var(--line-relaxed);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.beneficios-inline {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.beneficios-inline li {
  position: relative;
  padding-left: var(--space-5);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--line-normal);
}

.beneficios-inline li::before {
  content: "\2727";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sku);
  font-size: 0.95em;
}

/* ── §5 SELECTOR DE FORMATO + PRECIO + CTA ────────── */
.variations_form {
  margin-top: var(--space-5);
}

.format-selector {
  border: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.format-selector legend {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.format-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.format-option input {
  accent-color: var(--sku);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.format-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.format-name {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.format-detail {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.format-price {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  flex-shrink: 0;
}

.format-option.is-selected {
  border-color: var(--sku);
  background-color: var(--bg-alt);
}

.format-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.price {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-h2);
  color: var(--text-primary);
}

.price-note {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.single_add_to_cart_button {
  margin-top: var(--space-4);
  width: 100%;
  padding: var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  background-color: var(--sku);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.single_add_to_cart_button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cart-microcopy {
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-align: center;
}

/* ── §6 ACORDEONES ─────────────────────────────────── */
.product-accordions {
  margin-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-align: left;
}

.accordion-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  background-color: var(--text-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.accordion-icon::before {
  top: 6px; left: 0; width: 14px; height: 2px;
}

.accordion-icon::after {
  top: 0; left: 6px; width: 2px; height: 14px;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon::after {
  transform: scaleY(0);
  opacity: 0;
}

.accordion-panel {
  padding-bottom: var(--space-4);
}

.accordion-panel p,
.accordion-panel li {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--line-relaxed);
}

/* ── §6b CARRUSEL DE PRODUCTOS ─────────────────────── */
.product-carousel {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-3);
  scrollbar-width: none;
}

.product-carousel::-webkit-scrollbar { display: none; }

.product-carousel .product-card {
  flex: 0 0 76%;
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .product-carousel .product-card {
    flex-basis: calc((100% - var(--space-4)) / 2);
  }
}

@media (min-width: 1024px) {
  .product-carousel .product-card {
    flex-basis: calc((100% - 3 * var(--space-4)) / 4);
  }
}

/* ── §7 SECCIÓN "A NIVEL CELULAR" ──────────────────── */
.cellular {
  padding-block: var(--space-8);
  background-color: var(--bg-alt);
}

.cellular-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.eyebrow--light { color: var(--color-ambar-rustico); }

.cellular-text h2 {
  font-weight: var(--weight-light);
  font-size: var(--fs-h1);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-5);
}

.cellular-attrs {
  display: flex;
  flex-direction: column;
}

.cellular-attrs li {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-subtle);
}

.cellular-attrs li:last-child { border-bottom: 1px solid var(--border-subtle); }

.cellular-attrs h3 {
  position: relative;
  padding-left: var(--space-4);
  font-size: var(--fs-h3);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.cellular-attrs h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--sku);
}

.cellular-attrs li.is-active h3::before { background-color: var(--sku); }

.cellular-attrs p {
  padding-left: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: var(--line-relaxed);
}

.cellular-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--bg-base);
}

.cellular-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ── §8 SECCIÓN "QUÉ HAY ADENTRO" (oscura) ─────────── */
.inside {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(151,147,110,0.25) 0%, transparent 60%),
    var(--bg-dark);
  color: var(--text-on-dark);
  padding-block: var(--space-8);
}

.inside-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.inside-head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-7);
}

.inside-head h2 {
  font-weight: var(--weight-light);
  font-size: var(--fs-h1);
  color: var(--text-on-dark);
  margin-bottom: var(--space-3);
}

.inside-lede {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-marfil-claro);
  line-height: var(--line-relaxed);
}

.inside-diagram {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  justify-items: center;
}

.inside-product {
  order: -1;
  width: min(320px, 70%);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.inside-product img {
  width: 100%;
  height: auto;
}

.inside-attr {
  text-align: center;
  max-width: 34ch;
}

.inside-attr h3 {
  font-size: var(--fs-h3);
  font-weight: var(--weight-medium);
  color: var(--color-ambar-rustico);
  margin-bottom: var(--space-2);
}

.inside-attr p {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--color-marfil-claro);
  line-height: var(--line-normal);
}

/* ── §9 MEDIA QUERIES (PDP) ────────────────────────── */
@media (min-width: 640px) {
  .inside-diagram {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-6) var(--space-7);
  }

  .inside-product {
    order: 0;
    grid-column: 1 / -1;
    grid-row: 1 / 3;
    justify-self: center;
  }

  .inside-attr--tl { grid-column: 1; grid-row: 1; text-align: right; justify-self: end; }
  .inside-attr--tr { grid-column: 2; grid-row: 1; text-align: left; justify-self: start; }
  .inside-attr--bl { grid-column: 1; grid-row: 2; text-align: right; justify-self: end; }
  .inside-attr--br { grid-column: 2; grid-row: 2; text-align: left; justify-self: start; }
}

@media (min-width: 1024px) {
  .product-layout {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-7);
    align-items: start;
  }

  .summary {
    position: sticky;
    top: calc(58px + var(--space-4));
  }

  .cellular-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .inside-diagram {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--space-7) var(--space-6);
  }

  .inside-product {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 300px;
  }

  .inside-attr--tl { grid-column: 1; grid-row: 1; }
  .inside-attr--tr { grid-column: 3; grid-row: 1; }
  .inside-attr--bl { grid-column: 1; grid-row: 2; }
  .inside-attr--br { grid-column: 3; grid-row: 2; }
}

/* ══════════════════════════════════════════════════════════════
   BOTÓN FLOTANTE DE WHATSAPP (global, footer.php)
   ══════════════════════════════════════════════════════════════ */
.wpp-float {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 56px;
  height: 56px;
  background-color: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.40);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 900;
}

.wpp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}

.wpp-float svg {
  width: 30px;
  height: 30px;
}
