/* ============================================================
   ComprarJamónIbérico.com — Global Stylesheet v2.0
   Carga en: functions.php via wp_enqueue_style()
   Aplica a: home, categorías, fichas de producto, blog, estáticas
   ============================================================ */

/* ── VARIABLES ──────────────────────────────────────────────── */
:root {
  --negro:   #0F0D0A;
  --tierra:  #1C1509;
  --dorado:  #B8924A;
  --dorado2: #D4A853;
  --crema:   #F5EED8;
  --gris:    #6B6358;
  --serif:  'Playfair Display', Georgia, serif;
  --corm:   'Cormorant', Georgia, serif;
  --sans:   'Jost', sans-serif;
  --max-w:  1200px;
  --nav-h:  72px;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--negro);
  color: var(--crema);
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }

/* ── TIPOGRAFÍA BASE ────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--crema);
}

/* ── BOTONES ────────────────────────────────────────────────── */
.btn-gold {
  display: inline-block;
  padding: .85rem 2.4rem;
  background: var(--dorado);
  color: var(--negro);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .25s, transform .2s;
}
.btn-gold:hover { background: var(--dorado2); transform: translateY(-1px); }

.btn-outline {
  display: inline-block;
  padding: .85rem 2.4rem;
  border: 1px solid rgba(184,146,74,.4);
  color: var(--crema);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: border-color .25s, background .25s;
}
.btn-outline:hover { border-color: var(--dorado); background: rgba(184,146,74,.08); }

/* ── NAV ────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3rem;
  transition: background .3s, border-color .3s;
}
.site-nav.nav-transparent {
  background: linear-gradient(to bottom, rgba(15,13,10,.96) 0%, transparent 100%);
}
.site-nav.nav-solid {
  background: rgba(15,13,10,.98);
  border-bottom: 1px solid rgba(184,146,74,.1);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--dorado2);
  text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--crema);
  text-decoration: none;
  opacity: .75;
  transition: opacity .2s, color .2s;
}
.nav-links a:hover,
.nav-links a.active { opacity: 1; color: var(--dorado2); }

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.cji-breadcrumb {
  background: rgba(28,21,9,.6);
  border-bottom: 1px solid rgba(184,146,74,.1);
  padding: .9rem 3rem;
}
.cji-breadcrumb-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .68rem;
  color: var(--gris);
  flex-wrap: wrap;
}
.cji-breadcrumb a { color: var(--gris); text-decoration: none; transition: color .2s; }
.cji-breadcrumb a:hover { color: var(--dorado); }
.cji-breadcrumb .sep { opacity: .4; }
.cji-breadcrumb .current { color: var(--crema); opacity: .7; }

/* ── SECCIONES GENÉRICAS ────────────────────────────────────── */
.cji-section { padding: 5rem 2rem; }
.cji-section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-label {
  font-size: .63rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: .9rem;
  display: block;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  color: var(--crema);
  margin-bottom: .8rem;
  line-height: 1.15;
}
.section-desc {
  font-family: var(--corm);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--crema);
  opacity: .5;
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ── FRANJA DORADA ──────────────────────────────────────────── */
.gold-strip {
  background: var(--dorado);
  padding: 2.5rem 2rem;
  text-align: center;
}
.gold-strip p {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--negro);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── TRUST STRIP ────────────────────────────────────────────── */
.trust-strip {
  background: rgba(184,146,74,.04);
  border-top: 1px solid rgba(184,146,74,.1);
  border-bottom: 1px solid rgba(184,146,74,.1);
  padding: 3rem 2rem;
}
.trust-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.trust-icon { font-size: 1.4rem; margin-bottom: .6rem; display: block; opacity: .65; }
.trust-title { font-family: var(--serif); font-size: 1rem; font-weight: 500; color: var(--crema); margin-bottom: .3rem; }
.trust-desc { font-size: .74rem; color: var(--gris); line-height: 1.5; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: #0A0805;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid rgba(184,146,74,.1);
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(184,146,74,.1);
  margin-bottom: 2rem;
}
.footer-brand { font-family: var(--serif); font-size: 1.15rem; color: var(--dorado2); margin-bottom: .8rem; }
.footer-tagline { font-family: var(--corm); font-size: 1rem; font-style: italic; color: var(--gris); line-height: 1.6; }
.footer-col-title {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: 1.2rem;
  opacity: .75;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { font-size: .8rem; color: var(--gris); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--crema); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: .7rem; color: var(--gris); opacity: .55; }
.footer-legal { display: flex; gap: 1.5rem; list-style: none; }
.footer-legal a { font-size: .7rem; color: var(--gris); opacity: .55; text-decoration: none; transition: opacity .2s; }
.footer-legal a:hover { opacity: 1; }

/* ── ANIMACIÓN SCROLL ───────────────────────────────────────── */
.fi { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.fi.v { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════════════
   FICHA DE PRODUCTO (page-producto.php)
   ══════════════════════════════════════════════════════════════ */

/* Cabecera: ancho completo, sin columna de imagen */
.producto-header {
  background: var(--tierra);
  margin-top: var(--nav-h);
  border-bottom: 1px solid rgba(184,146,74,.1);
}
.producto-info {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.producto-cat {
  font-size: .63rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: .9rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.producto-cat::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(184,146,74,.2);
}
.producto-titulo {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--crema);
  margin-bottom: .6rem;
}
.producto-subtitulo {
  font-family: var(--corm);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gris);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(184,146,74,.1);
}

/* Specs rápidas */
.producto-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 2rem;
}
.spec-item {
  background: rgba(15,13,10,.35);
  padding: .85rem 1rem;
}
.spec-label {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: .25rem;
  display: block;
}
.spec-val {
  font-family: var(--serif);
  font-size: .92rem;
  color: var(--crema);
}

/* Botón Amazon */
.producto-cta {
  display: block;
  width: 100%;
  padding: 1.1rem 2rem;
  background: var(--dorado);
  color: var(--negro);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .25s;
  margin-bottom: .7rem;
}
.producto-cta:hover { background: var(--dorado2); }
.producto-cta-note {
  font-size: .68rem;
  color: var(--gris);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* Garantías */
.producto-garantias {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(184,146,74,.1);
}
.garantia-item { display: flex; align-items: flex-start; gap: .6rem; }
.garantia-icon { font-size: .9rem; opacity: .55; margin-top: .15rem; flex-shrink: 0; }
.garantia-text { font-size: .72rem; color: var(--gris); line-height: 1.5; }
.garantia-text strong { color: var(--crema); display: block; font-size: .74rem; }

/* ── CONTENIDO EDITORIAL DEL PRODUCTO ─────────────────────── */
.producto-content-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 5rem;
  align-items: flex-start;
}

/* Contenido WordPress (the_content) */
.producto-editorial h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 400;
  color: var(--crema);
  margin: 2.5rem 0 .9rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(184,146,74,.1);
  line-height: 1.2;
}
.producto-editorial h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.producto-editorial h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--crema);
  margin: 1.8rem 0 .6rem;
}
.producto-editorial p {
  font-size: .88rem;
  color: var(--gris);
  line-height: 1.95;
  margin-bottom: 1.1rem;
}
.producto-editorial strong { color: var(--crema); font-weight: 500; }
.producto-editorial ul {
  list-style: none;
  margin: .8rem 0 1.2rem 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.producto-editorial ul li {
  font-size: .86rem;
  color: var(--gris);
  line-height: 1.6;
  padding-left: 1.2rem;
  position: relative;
}
.producto-editorial ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--dorado);
  opacity: .6;
}
.producto-editorial a {
  color: var(--dorado);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,146,74,.3);
  transition: border-color .2s;
}
.producto-editorial a:hover { border-color: var(--dorado); }
.producto-editorial hr {
  border: none;
  border-top: 1px solid rgba(184,146,74,.1);
  margin: 2rem 0;
}
/* Imágenes dentro del contenido */
.producto-editorial figure,
.producto-editorial .wp-block-image { margin: 2rem 0; }
.producto-editorial figure img,
.producto-editorial .wp-block-image img { width: 100%; }
/* Ocultar botones Amazon del contenido (los reemplazamos con el CTA de arriba) */
.producto-editorial .wp-block-buttons,
.producto-editorial a[href*="amzn"] { display: none !important; }

/* Ficha técnica lateral */
.producto-ficha {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.ficha-box {
  background: rgba(28,21,9,.8);
  border: 1px solid rgba(184,146,74,.12);
  padding: 2rem;
  margin-bottom: 1rem;
}
.ficha-title {
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--dorado);
  margin-bottom: 1.4rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid rgba(184,146,74,.15);
}
.ficha-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(184,146,74,.06);
  gap: 1rem;
}
.ficha-row:last-child { border-bottom: none; }
.ficha-key { font-size: .71rem; color: var(--gris); flex-shrink: 0; }
.ficha-val { font-size: .78rem; color: var(--crema); text-align: right; line-height: 1.4; }

/* CTA lateral */
.ficha-cta {
  display: block;
  width: 100%;
  padding: .95rem 1rem;
  background: var(--dorado);
  color: var(--negro);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: background .2s;
  margin-bottom: .5rem;
}
.ficha-cta:hover { background: var(--dorado2); }
.ficha-cta-note { font-size: .66rem; color: var(--gris); text-align: center; line-height: 1.5; }

/* ── RELACIONADOS ───────────────────────────────────────────── */
.relacionados-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 2.5rem;
}
.rel-card {
  background: rgba(28,21,9,.6);
  text-decoration: none;
  display: block;
  overflow: hidden;
  transition: background .25s;
}
.rel-card:hover { background: rgba(184,146,74,.07); }
.rel-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .6s;
}
.rel-card:hover .rel-img { transform: scale(1.04); }
.rel-info { padding: 1.3rem; }
.rel-tag {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dorado);
  opacity: .7;
  margin-bottom: .4rem;
  display: block;
}
.rel-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--crema);
  line-height: 1.25;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .producto-wrap { grid-template-columns: 1fr; }
  .producto-imagen {
    position: relative;
    top: 0;
    height: 55vw;
    max-height: 500px;
  }
  .producto-info { padding: 2.5rem 2rem; }
  .producto-content-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .producto-ficha { position: relative; top: 0; }
  .relacionados-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .site-nav { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  .cji-breadcrumb { padding: .9rem 1.5rem; }
  .producto-specs { grid-template-columns: 1fr; }
  .producto-garantias { grid-template-columns: 1fr; }
  .relacionados-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 580px) {
  .cji-section { padding: 3.5rem 1.2rem; }
  .producto-info { padding: 2rem 1.2rem; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
}
