/* ============================================================
   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);

  --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-inline: var(--gutter);
  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 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);
}

/* ── 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);
  }

  .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;
  }
}
