/*
Theme Name: Sabor Sellado
Theme URI: https://saborsellado.com
Author: Clippi
Description: Tema editorial propio para saborsellado.com — hero a sangre, jerarquía tipográfica fuerte, un solo acento cromático.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: saborsellado
*/

/* ============================================================
   1. Tokens
   ============================================================ */
:root {
  --ink: #12100e;
  --ink-soft: #3d3733;
  --muted: #726b64;
  --line: #e8e4de;
  --surface: #f6f4f1;
  --bg: #ffffff;
  --accent: #234a3d;
  --accent-hover: #17352b;
  --accent-soft: #eaf1ed;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --gutter: clamp(20px, 4vw, 40px);
  --container: 1240px;
  --measure: 72ch;
  --shadow-sm: 0 1px 2px rgb(18 16 14 / 0.04);
  --shadow: 0 10px 30px rgb(18 16 14 / 0.08);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============================================================
   2. Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 160ms var(--ease);
}

a:hover { color: var(--accent); }

button, input, select, textarea { font: inherit; color: inherit; }

/* Focus visible: accesible y consistente */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   3. Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 820px;
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section--tight {
  padding-block: clamp(40px, 5vw, 64px);
}

.section--surface {
  background: var(--surface);
}

.bleed {
  width: 100%;
  max-width: none;
}

/* ============================================================
   4. Tipografía
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.85rem, 3.2vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); letter-spacing: -0.015em; }
h4 { font-size: 1.15rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
  flex: none;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ============================================================
   5. Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgb(255 255 255 / 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.site-brand:hover { color: var(--ink); }

.site-brand__mark {
  width: 27px;
  height: 27px;
  flex: none;
  color: var(--accent);
}

.site-brand__text { white-space: nowrap; }

.site-brand__text em {
  font-style: normal;
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-nav .sub-menu {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ============================================================
   6. Hero a sangre
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: clamp(460px, 76vh, 760px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

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

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgb(12 11 9 / 0.86) 0%, rgb(12 11 9 / 0.62) 42%, rgb(12 11 9 / 0.20) 100%),
    linear-gradient(180deg, rgb(12 11 9 / 0.28) 0%, rgb(12 11 9 / 0) 40%, rgb(12 11 9 / 0.55) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  text-align: left;
  color: #fff;
}

.hero__content h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  max-width: 19ch;
  margin-bottom: 0.5em;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgb(0 0 0 / 0.5);
}

.hero__content p {
  color: rgb(255 255 255 / 0.92);
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  line-height: 1.62;
  max-width: 48ch;
  margin: 0 0 2.1em;
  text-wrap: pretty;
  text-shadow: 0 1px 14px rgb(0 0 0 / 0.6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ============================================================
   7. Botones
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgb(35 74 61 / 0.22);
}

.btn--light {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.btn--light:hover {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.24);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: #fff;
}

.btn--block { width: 100%; }

/* ============================================================
   8. Barra de anuncio
   ============================================================ */
.announce {
  background: var(--ink);
  color: rgb(255 255 255 / 0.88);
  text-align: center;
  padding-block: 11px;
}

.announce p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   9. Bloques editoriales
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.split--reverse .split__media { order: 2; }

.split__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.split__body p {
  color: var(--ink-soft);
  max-width: 52ch;
}

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split--reverse .split__media { order: 0; }
}

/* ============================================================
   10. Contenido editorial
   ============================================================ */
.entry-content {
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.entry-content > * + * { margin-top: 1.15em; }

.entry-content h2 {
  margin-top: 2.6em;
  color: var(--ink);
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--line);
}

.entry-content h3 { margin-top: 2em; color: var(--ink); }

.entry-content ul,
.entry-content ol { padding-left: 1.35em; margin: 1.15em 0; }

.entry-content li { margin-bottom: 0.5em; }

.entry-content li::marker { color: var(--accent); }

.entry-content img {
  border-radius: var(--radius);
  margin-block: 1.8em;
}

.entry-content blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-size: 1.12rem;
  color: var(--ink);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

/* Tablas anchas (comparativas): scroll horizontal en pantallas chicas. */
.entry-content .wp-block-table {
  display: block;
  max-width: 100%;
}

@media (max-width: 899px) {
  .entry-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .entry-content .wp-block-table table {
    min-width: 680px;
  }
}

.entry-content th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding: 12px 14px;
}

.entry-content td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  vertical-align: top;
}

.entry-content figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: left;
  margin-top: 10px;
}

/* ============================================================
   11. Tarjetas de producto
   ============================================================ */
.hostinger-affiliate-block-list-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 2vw, 26px);
  margin-block: 2.4em;
  align-items: stretch;
}

.hostinger-affiliate-block-list-cards__item {
  flex: 1 1 288px;
  max-width: 400px;
}

@media (max-width: 640px) {
  .hostinger-affiliate-block-list-cards__item { flex-basis: 100%; max-width: none; }
}

.hostinger-affiliate-block-list-cards__item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
}

.hostinger-affiliate-block-list-cards__item:hover {
  border-color: #d5cec5;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* "MÁS VENDIDO #2 / #3" es un badge del plugin que no se puede verificar
   y se repite en la misma fila: resta credibilidad en vez de sumarla. */
.hostinger-affiliate-block-list-cards__bestseller-label {
  display: none;
}

.hostinger-affiliate-block-list-cards__image {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 6px;
}

.hostinger-affiliate-block-list-cards__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
}

.hostinger-affiliate-block-list-cards__product-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  min-height: 2.76em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hostinger-affiliate-block-list-cards__product-pricing {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.hostinger-affiliate-block-list-cards__product-price {
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.hostinger-affiliate-block-list-cards__product-price::after {
  content: " USD";
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.hostinger-affiliate-block-list-cards__product-button-wrap {
  margin-top: auto;
  padding-top: 4px;
}

.hostinger-affiliate-block-list-cards__product-amazon-button,
.hostinger-affiliate-block-list-cards a.button,
.hostinger-affiliate-block-list-cards a[class*="button"] {
  --amazon-button-bg: var(--accent);
  --amazon-button-border: var(--accent);
  --amazon-button-color: #ffffff;
  --buy-button-bg: var(--accent);
  --buy-button-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 180ms var(--ease);
}

.hostinger-affiliate-block-list-cards__product-amazon-button:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ============================================================
   12. Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgb(255 255 255 / 0.72);
  padding-block: clamp(48px, 6vw, 76px) 32px;
  margin-top: clamp(56px, 8vw, 96px);
  font-size: 0.92rem;
}

.site-footer a { color: rgb(255 255 255 / 0.86); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer h2, .site-footer h3, .site-footer h4 {
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2em;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-bottom: 48px;
}

@media (max-width: 800px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.6em; }

.site-footer__bottom {
  border-top: 1px solid rgb(255 255 255 / 0.14);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgb(255 255 255 / 0.5);
}

/* ============================================================
   13. Página interior
   ============================================================ */
.page-hero {
  padding-block: clamp(48px, 7vw, 88px) clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.page-hero h1 {
  max-width: 20ch;
  margin-bottom: 0;
}

.page-hero--narrow h1 { max-width: 26ch; }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 20px var(--gutter) 24px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-nav a { display: block; width: 100%; padding-block: 12px; font-size: 0.85rem; }
  .site-header__inner { position: relative; }
}

/* ============================================================
   14. Accesibilidad y movimiento
   ============================================================ */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 160ms var(--ease);
}

.skip-link:focus { top: 16px; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .hero__scrim, .nav-toggle { display: none !important; }
}

/* ============================================================
   10. Composición editorial del contenido
   El contenido viene de Gutenberg como una pila de h2 + párrafos.
   Estas reglas le dan ritmo de revista sin tocar el markup.
   ============================================================ */

.entry-content {
  font-size: 1.06rem;
  line-height: 1.72;
}

.entry-content > p { max-width: 68ch; }
.entry-content > * + * { margin-top: 1.05em; }

.entry-content h2 {
  margin-top: clamp(3.4rem, 6.5vw, 5.2rem);
  border-bottom: 0;
  padding-bottom: 0;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.entry-content h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 20px;
}

.entry-content h2 + p { margin-top: 0.9em; }

.entry-content h3 {
  margin-top: 2.4em;
  letter-spacing: -0.012em;
}

/* Los separadores de Gutenberg (35 en la home, en naranja del tema anterior)
   competían con el acento verde y partían el texto en migas. El ritmo ahora
   lo marcan los h2 y su regla de acento. */
.entry-content hr.wp-block-separator {
  display: none;
}

/* Las tarjetas de afiliado son un grid de producto, no texto de artículo:
   rompen la columna angosta y ocupan el ancho del contenedor. */
.entry-content .hostinger-affiliate-block-list-cards {
  width: min(var(--container), calc(100vw - 2 * var(--gutter)));
  margin-inline: calc(50% - min(var(--container), calc(100vw - 2 * var(--gutter))) / 2);
  margin-block: 2.6em 3.4em;
}

/* Una tarjeta sin imagen ni título deja un hueco blanco roto. Se oculta
   hasta que el bloque tenga los datos del producto. */
@supports selector(:has(*)) {
  .hostinger-affiliate-block-list-cards__item:not(:has(.hostinger-affiliate-block-list-cards__image)) {
    display: none;
  }
}

/* Divulgación de afiliado junto al primer CTA (T3) */
.ss-disclosure {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent, #234a3d);
  background: var(--surface, #f6f4f1);
  color: var(--ink-soft, #3d3733);
  font-size: 0.875rem;
  line-height: 1.5;
}
.ss-disclosure a {
  color: var(--accent, #234a3d);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Banner de consentimiento (T4, modo básico) */
.ss-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 999;
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1.125rem;
  background: #ffffff;
  border: 1px solid var(--line, #e8e4de);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgb(18 16 14 / 0.16);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft, #3d3733);
}
.ss-consent p { margin: 0 0 0.75rem; }
.ss-consent p:last-child { margin-bottom: 0; }
.ss-consent a { color: var(--accent, #234a3d); text-decoration: underline; text-underline-offset: 2px; }
.ss-consent__actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
.ss-consent__btn {
  font: inherit;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line, #e8e4de);
  background: #ffffff;
  color: var(--ink, #12100e);
  cursor: pointer;
}
.ss-consent__btn--primary {
  background: var(--accent, #234a3d);
  border-color: var(--accent, #234a3d);
  color: #ffffff;
}
