/**
 * qdm.css — Sistema de diseño del plugin QDM Quesos del Mundo.
 *
 * Brand Book · Ruta B (Wordmark editorial).
 * Tipografía: Newsreader variable (serif opsz 6-72) + Inter (sans).
 * Paleta papel + tintas + 4 acentos semánticos:
 *   - medalla  (ocre dorado)   → premios, Best in Show, medallas
 *   - burdeos  (rojo vino)     → DOP/AOP/IGP, énfasis editorial
 *   - tinta    (azul nocturno) → YMYL, alertas médicas y seguridad
 *   - verde    (verde oliva)   → maridajes, categorías, tags
 *
 * Iconos: SVG inline via qdm_icon(), sin librería externa.
 * Namespace: .qdm para no colisionar con el tema.
 */

/* ---------- Tokens ---------- */

.qdm {
    /* Neutros — papel editorial, tintas cálidas */
    --qdm-paper:      #FAF7F2;  /* fondo principal, no clínico */
    --qdm-paper-warm: #F2EBDC;  /* crema, secciones pausa */
    --qdm-paper-deep: #E8DEC8;  /* crema saturado */
    --qdm-bg:         #FAF7F2;  /* alias de paper (compat) */
    --qdm-ink:        #1A1714;  /* tinta, no negro puro */
    --qdm-ink-soft:   #3C3530;
    --qdm-ink-mute:   #6B6057;
    --qdm-muted:      #6B6057;  /* alias compat */
    --qdm-rule:       #CDBFA6;  /* filete editorial */
    --qdm-rule-soft:  #E0D5BE;
    --qdm-shadow:     rgba(26, 23, 20, 0.06);

    /* Acentos semánticos */
    --qdm-medalla:        #B8893A;  /* premios · ocre dorado */
    --qdm-medalla-deep:   #8C6527;
    --qdm-burdeos:        #7A2518;  /* DOP/AOP · énfasis editorial */
    --qdm-burdeos-deep:   #5C1A10;
    --qdm-tinta:          #1E3A5F;  /* YMYL · alertas médicas */
    --qdm-tinta-deep:     #142540;
    --qdm-verde:          #4A5A3A;  /* maridajes · categorías */
    --qdm-verde-deep:     #333F28;

    /* Aliases legacy (mantener compat con clases existentes) */
    --qdm-warm:       var(--qdm-burdeos);
    --qdm-warm-hover: var(--qdm-burdeos-deep);
    --qdm-warm-light: var(--qdm-paper-warm);
    --qdm-cool:       var(--qdm-verde);
    --qdm-cool-hover: var(--qdm-verde-deep);
    --qdm-cool-light: #EAE8DE;

    /* Layout */
    --qdm-container:  1240px;
    --qdm-reading:    680px;
    --qdm-gutter:     clamp(24px, 4vw, 64px);

    /* Tipografía — Brand Book Ruta B */
    --qdm-font-serif: "Newsreader", "GT Sectra", Georgia, "Times New Roman", serif;
    --qdm-font-body:  "Newsreader", Georgia, serif;
    --qdm-font-sans:  "Inter", "Söhne", system-ui, -apple-system, "Helvetica Neue", sans-serif;

    /* Transiciones */
    --qdm-ease:       cubic-bezier(0.4, 0, 0.2, 1);
    --qdm-duration:   0.2s;

    background: var(--qdm-bg);
    color: var(--qdm-ink);
    font-family: var(--qdm-font-sans);
    font-size: 17px;
    line-height: 1.7;
    font-feature-settings: "ss01", "ss02";
    -webkit-font-smoothing: antialiased;
}

/* Reset mínimo dentro del namespace */
.qdm *,
.qdm *::before,
.qdm *::after {
    box-sizing: border-box;
}

.qdm img {
    max-width: 100%;
    display: block;
}

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

.qdm a:hover {
    color: var(--qdm-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.qdm__container {
    max-width: var(--qdm-container);
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- Hero ---------- */

.qdm__hero {
    padding: 70px 0 40px;
}

.qdm__breadcrumbs {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--qdm-muted);
    margin-bottom: 28px;
}

.qdm__breadcrumbs a {
    color: var(--qdm-muted);
}

.qdm__breadcrumbs a:hover {
    color: var(--qdm-ink);
}

.qdm__sep {
    margin: 0 10px;
    color: var(--qdm-muted);
}

.qdm__kicker {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 12px;
    color: var(--qdm-ink);
    font-weight: 600;
    margin: 0 0 16px;
}

.qdm__title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: clamp(48px, 7vw, 104px);
    line-height: 0.95;
    letter-spacing: -0.025em;
    margin: 0 0 28px;
    max-width: 980px;
    font-variation-settings: "opsz" 144, "SOFT" 30;
}

.qdm__dek {
    max-width: 640px;
    font-size: 21px;
    line-height: 1.55;
    color: var(--qdm-ink-soft);
    margin: 0 0 28px;
    font-family: var(--qdm-font-serif);
    font-weight: 300;
    font-style: italic;
}

.qdm__chips {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qdm__chip {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--qdm-rule);
    border-radius: 999px;
    font-size: 12px;
    color: var(--qdm-ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--qdm-paper);
}

.qdm__byline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--qdm-rule);
    font-size: 13px;
    color: var(--qdm-muted);
    flex-wrap: wrap;
}

.qdm__byline strong {
    color: var(--qdm-ink);
    font-weight: 600;
}

/* ---------- Cover image ---------- */

.qdm__cover {
    margin: 0 auto 60px;
    max-width: var(--qdm-container);
    padding: 0 28px;
}

.qdm__cover-img {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
    background: var(--qdm-rule);
}

.qdm__cover-credit {
    font-size: 12px;
    color: var(--qdm-muted);
    letter-spacing: 0.02em;
    margin-top: 8px;
    text-align: right;
    font-style: italic;
}

/* ---------- Layout de 2 columnas ---------- */

.qdm__layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 80px;
    align-items: start;
}

/* ---------- Ficha tecnica sticky ---------- */

.qdm__facts {
    position: sticky;
    top: 110px;
    font-size: 13px;
}

.qdm__facts-title {
    font-family: var(--qdm-font-serif);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    color: var(--qdm-ink);
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--qdm-rule);
    font-weight: 600;
}

.qdm__facts dl {
    margin: 0;
}

.qdm__facts dt {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 10px;
    color: var(--qdm-muted);
    margin-top: 16px;
    font-weight: 500;
}

.qdm__facts dt .qdm__icon {
    color: var(--qdm-muted);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.qdm__facts dt .qdm__icon svg {
    width: 14px;
    height: 14px;
}

.qdm__facts dd {
    margin: 4px 0 0;
    font-family: var(--qdm-font-serif);
    font-size: 17px;
    color: var(--qdm-ink);
    line-height: 1.3;
}

.qdm__facts-note {
    font-size: 13px;
    color: var(--qdm-muted);
    font-style: italic;
}

.qdm__facts-links {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    border-top: 1px solid var(--qdm-rule);
    padding-top: 16px;
}

.qdm__facts-links li {
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.qdm__facts-links a {
    color: var(--qdm-ink);
    border-bottom: 1px solid var(--qdm-ink);
    padding-bottom: 1px;
}

/* ---------- Body ---------- */

.qdm__body {
    max-width: var(--qdm-reading);
}

/* Editorial con drop cap sobre el primer parrafo */
.qdm__editorial-p {
    font-size: 19px;
    line-height: 1.75;
    margin: 0 0 28px;
    color: var(--qdm-ink);
}

.qdm__editorial-p--lead::first-letter {
    font-family: var(--qdm-font-serif);
    float: left;
    font-size: 84px;
    line-height: 0.85;
    padding: 8px 12px 0 0;
    color: var(--qdm-ink);
    font-weight: 400;
    font-variation-settings: "opsz" 144;
}

.qdm__post-content {
    margin-top: 40px;
}

.qdm__post-content p,
.qdm__post-content li {
    font-size: 19px;
    line-height: 1.75;
    color: var(--qdm-ink);
}

.qdm__post-content h2,
.qdm__post-content h3 {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--qdm-ink);
}

.qdm__post-content h2 {
    font-size: 34px;
    margin: 56px 0 20px;
    line-height: 1.15;
}

.qdm__post-content h3 {
    font-size: 26px;
    margin: 40px 0 16px;
    line-height: 1.2;
}

.qdm__post-content blockquote {
    font-family: var(--qdm-font-serif);
    font-style: italic;
    font-size: 26px;
    line-height: 1.35;
    color: var(--qdm-ink);
    border: none;
    padding: 20px 0;
    margin: 40px 0;
    border-top: 1px solid var(--qdm-rule);
    border-bottom: 1px solid var(--qdm-rule);
    font-weight: 300;
}

/* ---------- Módulos (tarjetas blancas) ---------- */

.qdm__module {
    padding: 40px;
    background: var(--qdm-paper);
    margin: 40px 0;
    border: 1px solid var(--qdm-rule);
}

.qdm__module-kicker {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 11px;
    color: var(--qdm-ink);
    font-weight: 600;
    margin: 0 0 10px;
}

.qdm__module-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 28px;
    margin: 0 0 24px;
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--qdm-ink);
}

.qdm__tasting {
    margin: 0;
}

.qdm__tasting dt {
    font-family: var(--qdm-font-serif);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 18px;
    color: var(--qdm-ink);
}

.qdm__tasting dt:first-child {
    margin-top: 0;
}

.qdm__tasting dd {
    margin: 6px 0 0;
    color: var(--qdm-ink-soft);
    font-size: 16px;
    line-height: 1.6;
}

.qdm__pairings {
    color: var(--qdm-ink-soft);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* ---------- Módulo YMYL ---------- */

.qdm__module--ymyl {
    border-left: 3px solid var(--qdm-ink);
}

.qdm__ymyl-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.qdm__ymyl-list li {
    position: relative;
    padding: 12px 0 12px 24px;
    border-bottom: 1px dashed var(--qdm-rule);
    color: var(--qdm-ink-soft);
    font-size: 15px;
    line-height: 1.55;
}

.qdm__ymyl-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--qdm-muted);
    font-weight: 600;
}

.qdm__ymyl-list li:last-child {
    border-bottom: none;
}

.qdm__disclaimer {
    margin: 0;
    padding: 16px 20px;
    background: var(--qdm-bg);
    font-size: 13px;
    color: var(--qdm-muted);
    font-style: italic;
    line-height: 1.5;
    border-left: 2px solid var(--qdm-muted);
}

.qdm__disclaimer strong {
    color: var(--qdm-ink);
    font-style: normal;
    font-weight: 600;
}

/* ---------- Fuentes dentro de guías YMYL ---------- */

.qdm__guide-sources {
    list-style: none;
    padding: 0;
    margin: 16px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.qdm__guide-sources li {
    padding: 10px 14px;
    background: var(--qdm-bg);
    border-left: 2px solid var(--qdm-rule);
}

.qdm__guide-sources a {
    color: var(--qdm-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 500;
}

.qdm__guide-sources a:hover {
    text-decoration-thickness: 2px;
}

/* ---------- Enlaces a guías YMYL desde fichas ---------- */

.qdm__ymyl-guide {
    display: inline;
    font-size: 12px;
    font-weight: 500;
    color: var(--qdm-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    margin-left: 4px;
    white-space: nowrap;
}

.qdm__ymyl-guide:hover {
    text-decoration-thickness: 2px;
}

/* ---------- Referencias / fuentes (E-E-A-T) ---------- */

.qdm__module--sources {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--qdm-rule);
}

.qdm__sources-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qdm__sources-list li {
    font-size: 14px;
    line-height: 1.5;
    color: var(--qdm-ink);
    padding-left: 16px;
    border-left: 2px solid var(--qdm-rule);
}

.qdm__sources-list a {
    color: var(--qdm-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.qdm__sources-list a:hover {
    text-decoration-thickness: 2px;
}

.qdm__source-publisher {
    display: block;
    font-size: 12px;
    color: var(--qdm-muted);
    margin-top: 2px;
}

/* ---------- Awards, Chefs, Buy (shortcodes embebidos) ---------- */

.qdm__module--awards ul,
.qdm__module--chefs ul,
.qdm__module--buy ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qdm__module--awards li,
.qdm__module--chefs li {
    padding: 14px 0;
    border-bottom: 1px dashed var(--qdm-rule);
    color: var(--qdm-ink);
    font-size: 15px;
    line-height: 1.5;
}

.qdm__module--awards li:last-child,
.qdm__module--chefs li:last-child {
    border-bottom: none;
}

.qdm__module--buy a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--qdm-ink);
    color: var(--qdm-bg);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 6px;
}

.qdm__module--buy a:hover {
    background: var(--qdm-ink-soft);
    text-decoration: none;
    color: var(--qdm-bg);
}

/* ---------- Related ---------- */

.qdm__related {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.qdm__related-item a {
    display: block;
}

.qdm__related-img {
    aspect-ratio: 4 / 3;
    background: var(--qdm-rule);
    margin: 0 0 14px;
    overflow: hidden;
}

.qdm__related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.qdm__related-item a:hover .qdm__related-img img {
    transform: scale(1.04);
}

.qdm__related-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 22px;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 0 0 6px;
    color: var(--qdm-ink);
}

.qdm__related-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--qdm-muted);
    margin: 0;
}

/* ---------- Sticky buy bar ---------- */

.qdm__sticky {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--qdm-ink);
    color: var(--qdm-bg);
    z-index: 100;
    box-shadow: 0 -4px 20px var(--qdm-shadow);
}

.qdm__sticky-inner {
    max-width: var(--qdm-container);
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.qdm__sticky-label {
    font-size: 14px;
    color: var(--qdm-bg);
    font-family: var(--qdm-font-serif);
    letter-spacing: 0.01em;
}

.qdm__sticky-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--qdm-paper);
    color: var(--qdm-warm);
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
    transition: all var(--qdm-duration) var(--qdm-ease);
}

.qdm__sticky-btn:hover {
    background: var(--qdm-warm-light);
    color: var(--qdm-warm-hover);
    text-decoration: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .qdm__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .qdm__facts {
        position: static;
    }

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

    .qdm__module {
        padding: 28px;
    }
}

@media (max-width: 680px) {
    .qdm {
        font-size: 16px;
    }

    .qdm__hero {
        padding: 48px 0 32px;
    }

    .qdm__title {
        font-size: clamp(40px, 10vw, 64px);
    }

    .qdm__dek {
        font-size: 18px;
    }

    .qdm__editorial-p {
        font-size: 17px;
    }

    .qdm__editorial-p--lead::first-letter {
        font-size: 64px;
    }

    .qdm__related {
        grid-template-columns: 1fr;
    }

    .qdm__sticky-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .qdm__sticky-btn {
        text-align: center;
    }
}

/* ---------- Archive de quesos ---------- */

.qdm--archive .qdm__title em {
    font-style: italic;
    font-weight: 300;
}

.qdm__archive-filters {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--qdm-rule);
    margin-bottom: 48px;
}

.qdm__filters-form {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.qdm__filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.qdm__filter-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: var(--qdm-muted);
    font-weight: 600;
}

.qdm__filter select {
    padding: 10px 14px;
    border: 1px solid var(--qdm-rule);
    background: var(--qdm-paper);
    font-family: inherit;
    font-size: 14px;
    color: var(--qdm-ink);
    border-radius: 2px;
    cursor: pointer;
}

.qdm__filter select:focus {
    outline: 2px solid var(--qdm-ink);
    outline-offset: 2px;
}

.qdm__filters-submit {
    padding: 11px 22px;
    background: var(--qdm-ink);
    color: var(--qdm-bg);
    border: 1px solid var(--qdm-ink);
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
}

.qdm__filters-submit:hover {
    background: var(--qdm-ink-soft);
}

.qdm__filters-clear {
    font-size: 13px;
    color: var(--qdm-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    align-self: center;
    margin-left: 10px;
}

.qdm__grid {
    list-style: none;
    padding: 0;
    margin: 0 0 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 32px;
}

.qdm__grid-item {
    display: flex;
    flex-direction: column;
}

.qdm__grid-link {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: inherit;
}

.qdm__grid-link:hover {
    text-decoration: none;
}

.qdm__grid-img {
    aspect-ratio: 4 / 3;
    background: var(--qdm-rule);
    margin: 0;
    overflow: hidden;
}

.qdm__grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.qdm__grid-link:hover .qdm__grid-img img {
    transform: scale(1.04);
}

.qdm__grid-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    color: var(--qdm-ink);
    font-weight: 600;
    margin: 0;
}

.qdm__grid-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 26px;
    letter-spacing: -0.015em;
    line-height: 1.12;
    margin: 0;
    color: var(--qdm-ink);
}

.qdm__grid-excerpt {
    color: var(--qdm-ink-soft);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

.qdm__grid-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: var(--qdm-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-top: 10px;
    border-top: 1px solid var(--qdm-rule);
}

.qdm__pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 40px 0 80px;
    font-size: 14px;
}

.qdm__pagination a,
.qdm__pagination span {
    padding: 10px 16px;
    border: 1px solid var(--qdm-rule);
    color: var(--qdm-ink);
    text-decoration: none;
    font-family: var(--qdm-font-serif);
}

.qdm__pagination .current {
    background: var(--qdm-ink);
    color: var(--qdm-bg);
    border-color: var(--qdm-ink);
}

.qdm__empty {
    text-align: center;
    padding: 100px 0;
    color: var(--qdm-muted);
    font-family: var(--qdm-font-serif);
    font-style: italic;
    font-size: 20px;
}

/* ---------- Shortcodes embebidos ---------- */

.qdm-shortcode {
    margin: 0;
}

.qdm-affiliates {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qdm-affiliate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--qdm-rule);
    gap: 20px;
}

.qdm-affiliate:last-child {
    border-bottom: none;
}

.qdm-affiliate__seller {
    flex: 1 1 auto;
}

.qdm-affiliate__seller strong {
    display: block;
    font-family: var(--qdm-font-serif);
    font-size: 20px;
    font-weight: 400;
    color: var(--qdm-ink);
}

.qdm-affiliate__price {
    font-size: 14px;
    color: var(--qdm-muted);
    margin-top: 2px;
    display: inline-block;
}

.qdm-affiliate__extract {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--qdm-muted);
    font-style: italic;
    line-height: 1.45;
    max-width: 560px;
}

/* ---------- Widget de votación ---------- */
.qdm-vote {
    padding: 20px 0;
    border-top: 1px solid var(--qdm-rule);
    border-bottom: 1px solid var(--qdm-rule);
    margin: 28px 0;
    text-align: center;
}
.qdm-vote__label {
    font-family: var(--qdm-font-sans, 'Inter', sans-serif);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--qdm-muted);
    margin: 0 0 10px;
}
.qdm-vote__stars {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 10px;
}
.qdm-vote__star {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 2px 6px;
    color: #d8cfbd;
    transition: color 0.12s ease, transform 0.12s ease;
}
.qdm-vote__star:hover,
.qdm-vote__star.is-on {
    color: var(--qdm-ocre, #b08a3e);
}
.qdm-vote__star:focus-visible {
    outline: 2px solid var(--qdm-ink);
    outline-offset: 2px;
    border-radius: 2px;
}
.qdm-vote__star:disabled {
    cursor: wait;
    opacity: 0.6;
}
.qdm-vote__summary {
    font-size: 14px;
    color: var(--qdm-muted);
    margin: 0;
}
.qdm-vote__summary strong {
    color: var(--qdm-ink);
    font-weight: 500;
}
.qdm-vote__feedback {
    margin: 6px 0 0;
    min-height: 1em;
    font-size: 12px;
    color: var(--qdm-verde, #4a6b3a);
    font-style: italic;
}

/* CTAs comerciales unificados (afiliado + amazon) — tokens alineados con
   .qdm__btn--primary canónico. El sticky-btn se queda con su propia regla
   porque va invertido sobre la barra burdeos. Audit 2026-05-03. */
.qdm-affiliate__btn,
.qdm-amazon__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--qdm-warm);
    color: var(--qdm-paper);
    border: none;
    border-radius: 999px;
    font-family: var(--qdm-font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--qdm-duration) var(--qdm-ease);
}

.qdm-affiliate__btn:hover,
.qdm-amazon__btn:hover {
    background: var(--qdm-warm-hover);
    text-decoration: none;
    color: var(--qdm-paper);
}

/* Focus visible para teclado (WCAG 2.4.7). */
.qdm__btn:focus-visible,
.qdm-affiliate__btn:focus-visible,
.qdm-amazon__btn:focus-visible,
.qdm__sticky-btn:focus-visible {
    outline: 2px solid var(--qdm-ink);
    outline-offset: 3px;
}

.qdm-affiliate__meta {
    margin: 20px 0 0;
    font-size: 12px;
    color: var(--qdm-muted);
    font-style: italic;
    line-height: 1.5;
}

/* Awards */

.qdm-awards {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qdm-award {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px dashed var(--qdm-rule);
}

.qdm-award:last-child {
    border-bottom: none;
}

.qdm-award__year {
    font-family: var(--qdm-font-serif);
    font-size: 28px;
    color: var(--qdm-ink);
    font-weight: 400;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    width: 70px;
}

.qdm-award__body {
    flex: 1 1 auto;
}

.qdm-award__name {
    color: var(--qdm-ink);
    font-size: 15px;
    display: block;
}

.qdm-award__medal {
    font-size: 12px;
    color: var(--qdm-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 2px;
    display: block;
}

.qdm-award__note {
    margin: 8px 0 0;
    font-family: var(--qdm-serif, Fraunces, Georgia, serif);
    font-size: 14px;
    line-height: 1.55;
    color: var(--qdm-ink);
    font-style: italic;
    max-width: var(--qdm-reading, 680px);
}

/* Chefs */

.qdm-chefs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.qdm-chef {
    padding: 14px 0;
    border-bottom: 1px dashed var(--qdm-rule);
}

.qdm-chef:last-child {
    border-bottom: none;
}

.qdm-chef__name {
    font-family: var(--qdm-font-serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--qdm-ink);
    display: block;
}

.qdm-chef__restaurant {
    font-size: 13px;
    color: var(--qdm-muted);
    display: block;
    margin-top: 2px;
}

.qdm-chef__link {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--qdm-ink);
    border-bottom: 1px solid var(--qdm-ink);
    padding-bottom: 1px;
    display: inline-block;
    margin-top: 6px;
}

/* Responsive archive */

@media (max-width: 900px) {
    .qdm__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .qdm__filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .qdm__filter {
        min-width: auto;
    }
}

@media (max-width: 560px) {
    .qdm__grid {
        grid-template-columns: 1fr;
    }

    .qdm-affiliate {
        flex-direction: column;
        align-items: flex-start;
    }

    .qdm-affiliate__btn {
        align-self: stretch;
        text-align: center;
    }
}

/* ---------- Coexistencia con el tema ---------- */
/* IMPORTANTE: no ocultamos nada del tema por defecto.
   El wordmark del plugin se apila encima del header del tema.
   Si el usuario quiere ocultarlo, que añada la clase qdm-hide-theme-chrome al <body>. */
body.qdm-hide-theme-chrome #masthead,
body.qdm-hide-theme-chrome #colophon,
body.qdm-hide-theme-chrome .site-header,
body.qdm-hide-theme-chrome .site-footer { display: none !important; }

/* ---------- Home Editorial (Opción A) ---------- */
/* Hero artículo + 3 secundarios + queso destacado como sección sec. */

.qdm__home-hero-editorial {
    position: relative;
    height: clamp(420px, 70vh, 720px);
    overflow: hidden;
    margin-bottom: 0;
    /* Fallback cuando no hay featured image: fondo tinta texturizado */
    background: var(--qdm-ink);
    background-image:
        radial-gradient(at 20% 30%, rgba(122,37,24,0.4) 0%, transparent 50%),
        radial-gradient(at 80% 70%, rgba(74,90,58,0.3) 0%, transparent 50%);
}
.qdm__home-hero-editorial-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: var(--qdm-paper);
    position: relative;
}
.qdm__home-hero-editorial-img {
    position: absolute;
    inset: 0;
    margin: 0;
    z-index: 0;
}
/* Selector defensivo: cualquier <img> dentro del section, esté o no
   envuelto en .qdm__home-hero-editorial-img. Cubre el caso en que un
   filtro/sanitizador elimine el <figure> wrapper. */
.qdm__home-hero-editorial-img img,
.qdm__home-hero-editorial > a > img,
.qdm__home-hero-editorial img:not(.qdm__home-hero-editorial-overlay img) {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 8s ease-out;
}
.qdm__home-hero-editorial-overlay {
    z-index: 1;
}
.qdm__home-hero-editorial-link:hover .qdm__home-hero-editorial-img img {
    transform: scale(1.04);
}
.qdm__home-hero-editorial-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.75) 100%);
    display: flex;
    align-items: flex-end;
    padding-bottom: 56px;
}
.qdm__home-hero-editorial-overlay > .qdm__container {
    max-width: 880px;
}
.qdm__home-hero-editorial-kicker {
    font-family: var(--qdm-font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 12px;
    color: var(--qdm-paper);
    opacity: 0.85;
}
.qdm__home-hero-editorial-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: clamp(36px, 5.5vw, 64px);
    line-height: 1.1;
    color: var(--qdm-paper);
    margin: 0 0 16px;
    max-width: 860px;
}
.qdm__home-hero-editorial-excerpt {
    font-family: var(--qdm-font-serif);
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.5;
    color: var(--qdm-paper);
    opacity: 0.92;
    margin: 0 0 16px;
    max-width: 680px;
}
.qdm__home-hero-editorial-byline {
    font-family: var(--qdm-font-sans);
    font-size: 13px;
    color: var(--qdm-paper);
    opacity: 0.75;
    margin: 0;
    letter-spacing: 0.02em;
}

/* Grid 3 columnas estilo NYT */
.qdm__home-secundarios {
    padding: 56px 0;
    border-bottom: 0.5px solid var(--qdm-rule);
}
.qdm__home-secundarios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.qdm__home-secundario-link {
    display: block;
    text-decoration: none;
    color: var(--qdm-ink);
}
.qdm__home-secundario-img {
    margin: 0 0 16px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.qdm__home-secundario-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.qdm__home-secundario-link:hover .qdm__home-secundario-img img {
    transform: scale(1.03);
}
.qdm__home-secundario-kicker {
    font-family: var(--qdm-font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--qdm-ink-mute);
    display: block;
    margin-bottom: 6px;
}
.qdm__home-secundario-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: clamp(20px, 1.8vw, 24px);
    line-height: 1.25;
    margin: 0 0 8px;
    color: var(--qdm-ink);
}
.qdm__home-secundario-excerpt {
    font-family: var(--qdm-font-serif);
    font-size: 15px;
    line-height: 1.55;
    color: var(--qdm-ink-soft);
    margin: 0;
}

/* Queso destacado: bloque secundario tipo split */
.qdm__home-queso-destacado {
    padding: 64px 0;
    background: var(--qdm-paper-warm);
    border-top: 0.5px solid var(--qdm-rule);
    border-bottom: 0.5px solid var(--qdm-rule);
}
.qdm__home-queso-destacado-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    text-decoration: none;
    color: var(--qdm-ink);
}
.qdm__home-queso-destacado-img {
    margin: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}
.qdm__home-queso-destacado-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qdm__home-queso-destacado-origen {
    font-family: var(--qdm-font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--qdm-ink-mute);
    margin: 12px 0 4px;
}
.qdm__home-queso-destacado-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: clamp(32px, 3.5vw, 44px);
    line-height: 1.15;
    margin: 0 0 16px;
    color: var(--qdm-ink);
}
.qdm__home-queso-destacado-excerpt {
    font-family: var(--qdm-font-serif);
    font-size: 17px;
    line-height: 1.6;
    color: var(--qdm-ink-soft);
    margin: 0 0 16px;
}

@media (max-width: 900px) {
    .qdm__home-hero-editorial { height: clamp(360px, 60vh, 520px); }
    .qdm__home-secundarios-grid { grid-template-columns: 1fr; gap: 24px; }
    .qdm__home-queso-destacado-link { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Home: Hero split editorial (legacy queso, mantenido) ---------- */
/* Texto a la izquierda sobre papel, imagen a la derecha. Sin superposición. */

.qdm__home-hero {
    position: relative;
    background: var(--qdm-paper);
    border-bottom: 1px solid var(--qdm-rule);
}

.qdm__home-hero-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    min-height: 68vh;
    color: var(--qdm-ink);
    text-decoration: none;
}

.qdm__home-hero-link:hover { text-decoration: none; color: var(--qdm-ink); }

.qdm__home-hero-img {
    margin: 0;
    position: relative;
    overflow: hidden;
    order: 2;
    min-height: 68vh;
}

.qdm__home-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: transform 1.2s ease;
}

.qdm__home-hero-link:hover .qdm__home-hero-img img {
    transform: scale(1.03);
}

.qdm__home-hero-overlay {
    position: relative;
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px clamp(32px, 6vw, 88px);
    background: var(--qdm-paper);
}

.qdm__home-hero-overlay > .qdm__container {
    width: 100%;
    max-width: 560px;
    margin: 0;
    padding: 0;
}

.qdm__home-hero-kicker {
    font-family: var(--qdm-font-sans);
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 11px;
    font-weight: 500;
    color: var(--qdm-ink-mute);
    margin: 0 0 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--qdm-rule);
}

.qdm__home-hero-title {
    font-family: var(--qdm-font-serif);
    font-weight: 300;
    font-size: clamp(44px, 5.5vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    color: var(--qdm-ink);
    font-variation-settings: "opsz" 72;
}

.qdm__home-hero-excerpt {
    font-family: var(--qdm-font-body);
    font-size: 18px;
    line-height: 1.55;
    max-width: 480px;
    margin: 0 0 28px;
    color: var(--qdm-ink-soft);
}

.qdm__home-hero .qdm__grid-meta {
    color: var(--qdm-ink-mute);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-top: 20px;
    border-top: 1px solid var(--qdm-rule);
}

/* ---------- Home: Intro + stats ---------- */

.qdm__home-intro {
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--qdm-rule);
}

.qdm__home-intro-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: end;
}

.qdm__home-intro-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 12px 0 20px;
}

.qdm__home-intro-title em {
    font-style: italic;
    font-weight: 300;
}

.qdm__home-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.qdm__home-stat {
    padding: 20px 0;
    border-top: 1px solid var(--qdm-rule);
}

.qdm__home-stat strong {
    color: var(--qdm-ink);
    font-weight: 600;
    display: block;
    font-size: 28px;
    font-family: var(--qdm-font-serif);
    letter-spacing: -0.02em;
}

.qdm__home-stat span {
    font-size: 13px;
    color: var(--qdm-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---------- Home: Taxo pills ---------- */

.qdm__taxo-bar {
    padding: 32px 0;
    border-bottom: 1px solid var(--qdm-rule);
    background: var(--qdm-paper);
}

.qdm__taxo-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.qdm__taxo-pill {
    padding: 10px 18px;
    border: 1px solid var(--qdm-rule);
    border-radius: 999px;
    font-size: 13px;
    color: var(--qdm-ink-soft);
    transition: all .2s ease;
    text-decoration: none;
    background: transparent;
}

.qdm__taxo-pill:hover { border-color: var(--qdm-ink); color: var(--qdm-ink); text-decoration: none; }
.qdm__taxo-pill--active { background: var(--qdm-ink); color: var(--qdm-bg); border-color: var(--qdm-ink); }
.qdm__taxo-pill--active:hover { color: var(--qdm-bg); }

/* ---------- Home: Section headings ---------- */

.qdm__home-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--qdm-rule);
}

.qdm__home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 32px;
    flex-wrap: wrap;
}

.qdm__home-section-link {
    font-size: 14px;
    border-bottom: 1px solid var(--qdm-ink);
    padding-bottom: 2px;
    color: var(--qdm-ink);
    text-decoration: none;
}

/* ---------- Home: Masonry ---------- */

.qdm__masonry {
    columns: 3;
    column-gap: 28px;
}

.qdm__masonry-item {
    break-inside: avoid;
    margin-bottom: 28px;
}

.qdm__masonry-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.qdm__masonry-link:hover { text-decoration: none; }

.qdm__masonry-img {
    margin: 0;
    background: var(--qdm-rule);
    overflow: hidden;
}

.qdm__masonry-item--tall .qdm__masonry-img { aspect-ratio: 3/4; }
.qdm__masonry-item--wide .qdm__masonry-img { aspect-ratio: 4/3; }
.qdm__masonry-item--square .qdm__masonry-img { aspect-ratio: 1/1; }

.qdm__masonry-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.qdm__masonry-link:hover .qdm__masonry-img img {
    transform: scale(1.04);
}

.qdm__masonry-body {
    padding: 16px 0 8px;
}

.qdm__masonry-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 24px;
    letter-spacing: -0.015em;
    line-height: 1.12;
    margin: 6px 0 8px;
    color: var(--qdm-ink);
}

.qdm__masonry-item--tall .qdm__masonry-title {
    font-size: 30px;
}

/* ---------- Home: País destacado ---------- */

.qdm__home-pais {
    background: var(--qdm-paper);
}

.qdm__home-pais-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.qdm__home-pais-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.qdm__home-pais-link:hover { text-decoration: none; }

.qdm__home-pais-img {
    margin: 0;
    aspect-ratio: 3/4;
    background: var(--qdm-rule);
    overflow: hidden;
}

.qdm__home-pais-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.qdm__home-pais-link:hover .qdm__home-pais-img img {
    transform: scale(1.04);
}

.qdm__home-pais-body {
    padding: 14px 0;
}

.qdm__home-pais-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 22px;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 0 0 6px;
    color: var(--qdm-ink);
}

/* ---------- Home: Footer ---------- */

.qdm__home-footer {
    background: var(--qdm-ink);
    color: #d9c9b6;
    padding: 80px 0 40px;
}

.qdm__home-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.qdm__home-footer-title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--qdm-bg);
    margin: 0 0 18px;
}

.qdm__home-footer a {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    color: #b8a58e;
    text-decoration: none;
}

.qdm__home-footer a:hover { color: white; text-decoration: none; }

.qdm__home-footer-about {
    font-size: 15px;
    line-height: 1.7;
    color: #b8a58e;
    max-width: 360px;
}

.qdm__home-footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #3f2c1e;
    font-size: 13px;
    color: #8b7355;
    text-align: center;
}

/* ---------- Home: Responsive ---------- */

@media (max-width: 900px) {
    .qdm__home-intro-grid { grid-template-columns: 1fr; gap: 40px; }
    .qdm__masonry { columns: 2; }
    .qdm__home-pais-grid { grid-template-columns: repeat(2, 1fr); }
    .qdm__home-footer-grid { grid-template-columns: 1fr 1fr; }
    .qdm__home-hero-link {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .qdm__home-hero-img {
        min-height: 52vh;
        order: 1;
    }
    .qdm__home-hero-overlay {
        order: 2;
        padding: 48px 24px 56px;
    }
}

@media (max-width: 560px) {
    .qdm__masonry { columns: 1; }
    .qdm__home-pais-grid { grid-template-columns: 1fr 1fr; }
    .qdm__home-footer-grid { grid-template-columns: 1fr; }
    .qdm__home-stats { grid-template-columns: 1fr 1fr; gap: 16px; }
    .qdm__home-hero-title { font-size: clamp(36px, 10vw, 64px); }
}

/* ---------- Site header (plugin propio) ---------- */

.qdm__site-header {
    border-bottom: 1px solid var(--qdm-rule);
    padding: 22px 0;
    background: var(--qdm-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(8px);
}

.qdm__header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Logo: ver sección "Logo monograma + wordmark" más abajo */

.qdm__nav {
    display: flex;
    gap: 32px;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--qdm-ink-soft);
}

.qdm__nav a {
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    color: var(--qdm-ink-soft);
    text-decoration: none;
}

.qdm__nav a:hover {
    border-color: var(--qdm-ink);
    color: var(--qdm-ink);
    text-decoration: none;
}

@media (max-width: 680px) {
    .qdm__nav {
        display: none;
    }
}

/* ================================================================
   SISTEMA DE DISEÑO v2 — Componentes
   ================================================================ */

/* ---------- Logo Wordmark · Ruta B ---------- */

.qdm__logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--qdm-ink);
    line-height: 1;
}

.qdm__logo:hover {
    text-decoration: none;
    color: var(--qdm-ink);
}

.qdm__logo-text {
    font-family: var(--qdm-font-serif);
    font-weight: 280;
    font-size: 26px;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 72;
    line-height: 1.05;
    white-space: nowrap;
}

.qdm__logo-rule {
    display: block;
    width: 60%;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
    margin: 4px 0 2px;
}

.qdm__logo-kicker {
    font-family: var(--qdm-font-sans);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--qdm-ink-mute);
}

/* Header alineado a izquierda: wordmark sin centrar */
.qdm__site-header .qdm__logo {
    align-items: flex-start;
}
.qdm__site-header .qdm__logo-rule { margin-left: 0; }

/* Footer invertido sobre fondo oscuro */
.qdm__home-footer .qdm__logo--footer {
    color: var(--qdm-paper);
}
.qdm__home-footer .qdm__logo--footer .qdm__logo-kicker {
    color: var(--qdm-paper-warm);
    opacity: 0.7;
}

@media (max-width: 680px) {
    .qdm__logo-text { font-size: 20px; }
    .qdm__logo-kicker { font-size: 8px; letter-spacing: 0.22em; }
}

/* ---------- Footer legal ---------- */

.qdm__home-footer-legal {
    margin-top: 18px;
    font-family: var(--qdm-font-sans);
    font-size: 12px;
    color: var(--qdm-paper-warm);
    opacity: 0.7;
    line-height: 1.8;
}
.qdm__home-footer-legal a,
.qdm__home-footer-legal .qdm-cookies-manage {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- Botones CTA ---------- */

/* Base compartida */
.qdm__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--qdm-font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--qdm-duration) var(--qdm-ease);
    line-height: 1;
}

.qdm__btn:hover {
    text-decoration: none;
}

.qdm__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Primario — compra (cálido, pill) */
.qdm__btn--primary {
    background: var(--qdm-warm);
    color: var(--qdm-paper);
    padding: 12px 24px;
    border-radius: 999px;
}

.qdm__btn--primary:hover {
    background: var(--qdm-warm-hover);
    color: var(--qdm-paper);
}

/* Secundario — explorar (frío, pill outline) */
.qdm__btn--secondary {
    background: transparent;
    color: var(--qdm-cool);
    padding: 11px 23px;
    border: 1px solid var(--qdm-cool);
    border-radius: 999px;
}

.qdm__btn--secondary:hover {
    background: var(--qdm-cool);
    color: var(--qdm-paper);
    border-color: var(--qdm-cool);
}

/* Ghost — navegación (underline) */
.qdm__btn--ghost {
    background: none;
    color: var(--qdm-cool);
    padding: 0;
    border-bottom: 1px solid var(--qdm-cool);
    padding-bottom: 2px;
    border-radius: 0;
}

.qdm__btn--ghost:hover {
    color: var(--qdm-cool-hover);
    border-color: var(--qdm-cool-hover);
}

/* Tamaño pequeño */
.qdm__btn--sm {
    font-size: 11px;
    padding: 8px 16px;
}

/* ---------- Iconos SVG ---------- */

.qdm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.qdm__icon svg {
    width: 100%;
    height: 100%;
}

.qdm__icon--sm svg { width: 16px; height: 16px; }
.qdm__icon--lg svg { width: 24px; height: 24px; }

/* ---------- Rating estrellas ---------- */

.qdm__rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--qdm-rule);
}

.qdm__rating-stars {
    display: flex;
    gap: 2px;
}

.qdm__rating-stars svg {
    width: 18px;
    height: 18px;
    color: var(--qdm-warm);
}

.qdm__rating-stars svg.qdm__star--empty {
    color: var(--qdm-rule);
}

.qdm__rating-score {
    font-family: var(--qdm-font-serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--qdm-ink);
    margin-left: 8px;
}

.qdm__rating-votes {
    font-size: 12px;
    color: var(--qdm-muted);
    margin-left: 4px;
}

/* ---------- Tabla nutricional ---------- */

.qdm__nutrition {
    margin-top: 20px;
    border-top: 1px solid var(--qdm-rule);
    padding-top: 16px;
}

.qdm__nutrition summary {
    cursor: pointer;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--qdm-muted);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qdm__nutrition summary::-webkit-details-marker { display: none; }

.qdm__nutrition summary svg {
    width: 14px;
    height: 14px;
    transition: transform var(--qdm-duration) var(--qdm-ease);
}

.qdm__nutrition[open] summary svg {
    transform: rotate(180deg);
}

.qdm__nutrition-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}

.qdm__nutrition-table tr {
    border-bottom: 1px solid var(--qdm-rule);
}

.qdm__nutrition-table tr:last-child {
    border-bottom: none;
}

.qdm__nutrition-table td {
    padding: 8px 0;
}

.qdm__nutrition-table td:first-child {
    color: var(--qdm-ink-soft);
}

.qdm__nutrition-table td:last-child {
    text-align: right;
    font-family: var(--qdm-font-serif);
    font-weight: 500;
    color: var(--qdm-ink);
}

/* ---------- Comparador vs ---------- */

.qdm__compare-trigger {
    margin-top: 20px;
    width: 100%;
}

.qdm__compare-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    background: rgba(17, 17, 17, 0.6);
    backdrop-filter: blur(4px);
}

.qdm__compare-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qdm__compare-panel {
    background: var(--qdm-paper);
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.qdm__compare-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--qdm-muted);
    padding: 8px;
    line-height: 1;
}

.qdm__compare-close:hover {
    color: var(--qdm-ink);
}

.qdm__compare-search {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--qdm-rule);
    font-family: var(--qdm-font-sans);
    font-size: 16px;
    color: var(--qdm-ink);
    background: var(--qdm-bg);
    margin-bottom: 24px;
    outline: none;
}

.qdm__compare-search:focus {
    border-color: var(--qdm-cool);
    box-shadow: 0 0 0 3px var(--qdm-cool-light);
}

.qdm__compare-results {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.qdm__compare-result {
    padding: 12px 16px;
    border-bottom: 1px solid var(--qdm-rule);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background var(--qdm-duration) var(--qdm-ease);
}

.qdm__compare-result:hover {
    background: var(--qdm-cool-light);
}

.qdm__compare-result img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.qdm__compare-result-name {
    font-family: var(--qdm-font-serif);
    font-size: 16px;
    color: var(--qdm-ink);
}

.qdm__compare-result-meta {
    font-size: 12px;
    color: var(--qdm-muted);
}

.qdm__compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 24px;
}

.qdm__compare-col {
    border: 1px solid var(--qdm-rule);
    padding: 24px;
}

.qdm__compare-col h3 {
    font-family: var(--qdm-font-serif);
    font-size: 24px;
    margin: 0 0 16px;
    font-weight: 400;
}

.qdm__compare-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--qdm-rule);
    font-size: 14px;
}

.qdm__compare-row:last-child {
    border-bottom: none;
}

.qdm__compare-row dt {
    color: var(--qdm-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
}

.qdm__compare-row dd {
    margin: 0;
    font-family: var(--qdm-font-serif);
    color: var(--qdm-ink);
}

@media (max-width: 680px) {
    .qdm__compare-grid { grid-template-columns: 1fr; }
    .qdm__compare-panel { padding: 24px; }
}

/* ---------- Migrar botones existentes a nuevo sistema ---------- */

/* Affiliate buy button: definición canónica unificada arriba (línea ~1097).
   Override !important retirado tras unificación 2026-04-26. */

/* Sticky buy bar → cálido */
.qdm__sticky {
    background: var(--qdm-warm);
}

.qdm__sticky-btn {
    background: var(--qdm-paper);
    color: var(--qdm-warm);
}

.qdm__sticky-btn:hover {
    background: var(--qdm-warm-light);
    color: var(--qdm-warm-hover);
}

/* Section links → ghost frío */
.qdm__home-section-link {
    color: var(--qdm-cool);
    border-color: var(--qdm-cool);
}

/* Facts links → ghost frío */
.qdm__facts-links a {
    color: var(--qdm-cool);
    border-color: var(--qdm-cool);
}

/* Taxo pills active → frío */
.qdm__taxo-pill--active {
    background: var(--qdm-cool);
    border-color: var(--qdm-cool);
}

/* Archive filter submit → frío */
.qdm__filters-submit {
    background: var(--qdm-cool);
    border-color: var(--qdm-cool);
}

.qdm__filters-submit:hover {
    background: var(--qdm-cool-hover);
}

/* YMYL module border → cálido (warning) */
.qdm__module--ymyl {
    border-left-color: var(--qdm-warm);
}

/* ---------- Iconos en chips + botones ---------- */

.qdm__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.qdm__chip .qdm__icon {
    opacity: 0.5;
    width: 14px;
    height: 14px;
}

.qdm__chip .qdm__icon svg {
    width: 14px;
    height: 14px;
}

.qdm__compare-trigger .qdm__icon,
.qdm__btn--ghost .qdm__icon {
    width: 14px;
    height: 14px;
}

.qdm__compare-trigger .qdm__icon svg,
.qdm__btn--ghost .qdm__icon svg {
    width: 14px;
    height: 14px;
}

/* ---------- Taxonomía intro editorial ---------- */

.qdm__taxonomy-intro {
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--qdm-rule);
}

.qdm__taxonomy-intro .qdm__editorial {
    max-width: var(--qdm-reading);
}

.qdm__taxonomy-intro p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--qdm-ink-soft);
    margin: 0 0 20px;
}

.qdm__taxonomy-intro p:first-child {
    font-size: 20px;
    color: var(--qdm-ink);
}

.qdm__taxonomy-intro p:last-child {
    margin-bottom: 0;
}

/* Drop cap editorial en el primer párrafo de la intro de taxonomía. */
.qdm__taxonomy-intro p:first-child::first-letter {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 300;
    font-size: 4.2em;
    float: left;
    line-height: 0.88;
    margin: 6px 10px 0 0;
    color: var(--qdm-ink);
    font-feature-settings: "opsz" 72;
}

/* Ornamento decorativo al cerrar la intro — sólo si hay más de 1 párrafo. */
.qdm__taxonomy-intro .qdm__editorial p + p ~ *:last-child::after {
    content: "❦";
    display: block;
    text-align: center;
    margin-top: 28px;
    color: var(--qdm-rule);
    font-size: 18px;
}

/* ---------- Guías YMYL ---------- */

.qdm--guia .qdm__kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.qdm__guia-body {
    max-width: var(--qdm-reading);
    padding: 48px 0 80px;
}

.qdm__guia-body h2 {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 28px;
    letter-spacing: -0.015em;
    margin: 48px 0 20px;
    line-height: 1.2;
    color: var(--qdm-ink);
}

.qdm__guia-body h2:first-child {
    margin-top: 0;
}

.qdm__guia-body p {
    font-size: 18px;
    line-height: 1.75;
    margin: 0 0 24px;
    color: var(--qdm-ink);
}

.qdm__guia-body ul,
.qdm__guia-body ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.qdm__guia-body li {
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 10px;
    color: var(--qdm-ink-soft);
}

.qdm__guia-body li strong {
    color: var(--qdm-ink);
}

.qdm__guia-body em {
    font-style: italic;
    color: var(--qdm-muted);
    font-size: 15px;
}

/* ============================================================
   Premios (CPT premio)
   ============================================================ */
.qdm__premio-winners {
    padding: 60px 0 80px;
    border-top: 1px solid var(--qdm-rule);
    margin-top: 60px;
}
.qdm__premio-winners .qdm__section-title {
    font-family: var(--qdm-serif);
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0 0 8px;
}
.qdm__premio-winners .qdm__section-dek {
    color: var(--qdm-muted);
    font-size: 16px;
    margin: 0 0 40px;
}
.qdm__premio-year {
    margin-bottom: 48px;
}
.qdm__premio-year-title {
    font-family: var(--qdm-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--qdm-muted);
    border-bottom: 1px solid var(--qdm-rule);
    padding-bottom: 8px;
    margin: 0 0 20px;
}
.qdm__grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.qdm__grid--compact .qdm__grid-img {
    aspect-ratio: 4 / 3;
}
.qdm__grid--compact .qdm__grid-title {
    font-size: 18px;
}

/* ============================================================
   Banner de cookies (AEPD)
   ============================================================ */
.qdm-cookies { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.qdm-cookies[hidden] { display: none; }
.qdm-cookies__backdrop {
    position: absolute; inset: 0;
    background: rgba(10, 12, 18, 0.45);
    pointer-events: auto;
}
.qdm-cookies__banner {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid var(--qdm-rule, #e5e0d6);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
    pointer-events: auto;
}
.qdm-cookies__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}
.qdm-cookies__title {
    font-family: var(--qdm-sans, system-ui);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 6px;
    color: var(--qdm-ink, #141414);
}
.qdm-cookies__text {
    font-family: var(--qdm-sans, system-ui);
    font-size: 14px;
    line-height: 1.55;
    color: var(--qdm-ink, #222);
    margin: 0;
}
.qdm-cookies__text a { color: inherit; text-decoration: underline; }
.qdm-cookies__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.qdm-cookies__btn {
    font-family: var(--qdm-sans, system-ui);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--qdm-ink, #141414);
    cursor: pointer;
    min-width: 110px;
    transition: transform 0.1s ease, background 0.2s ease, color 0.2s ease;
}
.qdm-cookies__btn:hover { transform: translateY(-1px); }
.qdm-cookies__btn--primary {
    background: var(--qdm-ink, #141414);
    color: #fff;
}
.qdm-cookies__btn--secondary {
    background: #fff;
    color: var(--qdm-ink, #141414);
}
.qdm-cookies__panel {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100% - 32px));
    max-height: calc(100vh - 64px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.qdm-cookies__panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--qdm-rule, #e5e0d6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.qdm-cookies__panel-header h2 {
    font-family: var(--qdm-serif, Georgia);
    font-size: 22px;
    font-weight: 400;
    margin: 0;
}
.qdm-cookies__close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--qdm-muted, #666);
    padding: 0 8px;
}
.qdm-cookies__panel-body {
    padding: 20px 24px;
    overflow-y: auto;
}
.qdm-cookies__panel-intro {
    font-size: 14px;
    color: var(--qdm-muted, #555);
    line-height: 1.5;
    margin: 0 0 20px;
}
.qdm-cookies__cat {
    border: 1px solid var(--qdm-rule, #e5e0d6);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.qdm-cookies__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
    font-family: var(--qdm-sans, system-ui);
    font-size: 15px;
    font-weight: 600;
}
.qdm-cookies__cat-desc {
    font-size: 13px;
    color: var(--qdm-muted, #666);
    line-height: 1.5;
    margin: 8px 0 0;
}
.qdm-cookies__cat-state {
    font-size: 12px;
    font-weight: 500;
    color: var(--qdm-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.qdm-cookies__toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.qdm-cookies__toggle input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}
.qdm-cookies__toggle-track {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 999px;
    transition: background 0.2s ease;
}
.qdm-cookies__toggle-track::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.qdm-cookies__toggle input:checked + .qdm-cookies__toggle-track {
    background: var(--qdm-ink, #141414);
}
.qdm-cookies__toggle input:checked + .qdm-cookies__toggle-track::before {
    transform: translateX(20px);
}
.qdm-cookies__panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--qdm-rule, #e5e0d6);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.qdm-cookies-manage {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    font: inherit;
    padding: 0;
}
@media (max-width: 720px) {
    .qdm-cookies__inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .qdm-cookies__actions { justify-content: stretch; }
    .qdm-cookies__btn { flex: 1 1 auto; }
}

/* ============================================================
   Brand Book · Acentos semánticos aplicados a módulos
   ============================================================ */

/* Premios → ocre dorado (medalla) */
.qdm__module--awards .qdm__module-kicker,
.qdm-award__year,
.qdm-award__medal { color: var(--qdm-medalla-deep); }

.qdm-award__medal {
    font-family: var(--qdm-font-sans);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 2px 8px;
    border: 1px solid var(--qdm-medalla);
    border-radius: 999px;
    display: inline-block;
    color: var(--qdm-medalla-deep);
    background: rgba(184, 137, 58, 0.08);
}

.qdm-award__note {
    font-family: var(--qdm-font-body);
    font-style: italic;
    color: var(--qdm-ink-soft);
    font-size: 15px;
    line-height: 1.55;
    margin-top: 6px;
}

/* Denominación / DOP / AOP → burdeos */
.qdm__appellation,
.qdm__dop,
.qdm__grid-meta span:first-child {
    color: var(--qdm-burdeos);
}
.qdm__kicker,
.qdm__eyebrow { color: var(--qdm-burdeos); }

/* YMYL · seguridad alimentaria → azul tinta */
.qdm__module--ymyl {
    border-left: 3px solid var(--qdm-tinta);
    background: rgba(30, 58, 95, 0.03);
}
.qdm__module--ymyl .qdm__module-kicker { color: var(--qdm-tinta); }
.qdm__ymyl-guide { color: var(--qdm-tinta); font-weight: 500; }

/* Maridajes / categorías → verde oliva */
.qdm__module--pairings .qdm__module-kicker,
.qdm__pairings-title { color: var(--qdm-verde-deep); }
.qdm__tag,
.qdm__category-tag {
    color: var(--qdm-verde-deep);
    border: 1px solid var(--qdm-verde);
    background: rgba(74, 90, 58, 0.05);
}

/* Tipografía global actualizada a Newsreader */
.qdm__title,
.qdm__grid-title,
.qdm__module-title,
.qdm__section-title {
    font-family: var(--qdm-font-serif);
    font-variation-settings: "opsz" 72;
    font-weight: 300;
    letter-spacing: -0.022em;
}

.qdm__dek,
.qdm__excerpt,
.qdm__grid-excerpt {
    font-family: var(--qdm-font-body);
    font-weight: 380;
}

/* Body text en Newsreader (body) cuando es contenido largo */
.qdm__guia-body,
.qdm__editorial,
.qdm__article-body {
    font-family: var(--qdm-font-body);
    font-size: 18px;
    line-height: 1.65;
    font-weight: 380;
}

/* Kickers y meta siguen en Inter sans */
.qdm__kicker,
.qdm__module-kicker,
.qdm__byline,
.qdm__grid-kicker,
.qdm__eyebrow {
    font-family: var(--qdm-font-sans);
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 11px;
}

/* ================================================================
   BRAND BOOK · Tipografía editorial aplicada
   Drop caps, small caps, ligaduras, filetes, volumen editorial
   ================================================================ */

/* ---------- Ligaduras y features tipográficas globales ---------- */
.qdm__editorial,
.qdm__editorial p,
.qdm__home-hero-title,
.qdm__title,
.qdm__section-title,
.qdm__module-title {
    font-feature-settings: "liga" 1, "dlig" 1, "kern" 1, "onum" 1;
    font-variant-ligatures: common-ligatures discretionary-ligatures contextual;
}

/* ---------- Small caps editoriales ---------- */
.qdm__smallcaps,
.qdm__kicker {
    font-family: var(--qdm-font-sans);
    font-variant: small-caps;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 500;
    color: var(--qdm-ink-mute);
}

/* ---------- Drop cap: primera letra del editorial ---------- */
.qdm__editorial > p:first-of-type::first-letter,
.qdm__dropcap::first-letter {
    font-family: var(--qdm-font-serif);
    font-weight: 300;
    font-size: 5.2em;
    line-height: 0.88;
    float: left;
    margin: 0.08em 0.12em 0 0;
    color: var(--qdm-ink);
    font-variation-settings: "opsz" 72;
}

/* ---------- Editorial: medida de lectura + ritmo ---------- */
.qdm__editorial {
    font-family: var(--qdm-font-body);
    font-size: 19px;
    line-height: 1.65;
    color: var(--qdm-ink-soft);
    max-width: 68ch;
}

.qdm__editorial p { margin: 0 0 1.1em; }
.qdm__editorial p + p { text-indent: 1.2em; } /* primera línea indentada estilo libro */
.qdm__editorial > p:first-of-type { text-indent: 0; }

.qdm__editorial em,
.qdm__editorial i {
    font-style: italic;
    font-variation-settings: "opsz" 14;
}

.qdm__editorial strong,
.qdm__editorial b {
    font-weight: 500;
    color: var(--qdm-ink);
}

/* ---------- Filetes decorativos de sección ---------- */
.qdm__rule-double {
    border: 0;
    height: 4px;
    border-top: 1px solid var(--qdm-rule);
    border-bottom: 1px solid var(--qdm-rule);
    margin: 48px 0;
}

.qdm__rule-hairline {
    border: 0;
    border-top: 0.5px solid var(--qdm-rule);
    margin: 32px 0;
}

.qdm__rule-ornament {
    border: 0;
    text-align: center;
    margin: 56px 0;
    color: var(--qdm-ink-mute);
}

.qdm__rule-ornament::before {
    content: "❦";
    font-size: 20px;
    font-family: var(--qdm-font-serif);
}

/* ---------- Volumen editorial: cabecera de sección con romano ---------- */
.qdm__section-header {
    position: relative;
    padding: 32px 0 24px;
    border-top: 1px solid var(--qdm-rule);
    border-bottom: 1px solid var(--qdm-rule);
    margin-bottom: 48px;
}

.qdm__section-header::after {
    content: "";
    display: block;
    position: absolute;
    left: 0; right: 0;
    bottom: -4px;
    height: 1px;
    background: var(--qdm-rule);
    opacity: 0.6;
}

.qdm__section-numeral {
    font-family: var(--qdm-font-serif);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.4em;
    color: var(--qdm-ink-mute);
    display: block;
    margin-bottom: 8px;
    font-variation-settings: "opsz" 14;
}

.qdm__section-header h2,
.qdm__section-header .qdm__section-title {
    font-family: var(--qdm-font-serif);
    font-weight: 300;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0;
    color: var(--qdm-ink);
    font-variation-settings: "opsz" 60;
}

.qdm__section-dek {
    font-family: var(--qdm-font-body);
    font-style: italic;
    font-size: 17px;
    color: var(--qdm-ink-mute);
    margin: 10px 0 0;
    max-width: 56ch;
    font-variation-settings: "opsz" 14;
}

/* ---------- Tratamiento fotográfico Brand Book ---------- */
.qdm__home-hero-img img,
.qdm__card-img img,
.qdm__queso-hero-img img,
.qdm__masonry-item img {
    filter: contrast(1.04) saturate(0.92) brightness(0.98);
}

.qdm__photo-duotone img {
    filter: grayscale(0.3) contrast(1.08) sepia(0.15);
}

/* Marco papel para fotos destacadas */
.qdm__photo-frame {
    position: relative;
    padding: 14px;
    background: var(--qdm-paper-warm);
    border: 0.5px solid var(--qdm-rule);
}

.qdm__photo-caption {
    display: block;
    margin-top: 12px;
    font-family: var(--qdm-font-sans);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--qdm-ink-mute);
    line-height: 1.5;
}

/* ---------- Iconografía Brand Book: tamaños + acentos ---------- */
.qdm__icon--brand {
    display: inline-flex;
    width: 48px;
    height: 48px;
    vertical-align: middle;
}

.qdm__icon--brand svg { width: 100%; height: 100%; }

/* Ganado: tinta oscura */
.qdm__icon--vaca, .qdm__icon--oveja,
.qdm__icon--cabra, .qdm__icon--bufala { color: var(--qdm-ink); }

/* Denominaciones: burdeos (DOP/AOP) + ocre (IGP) */
.qdm__icon--dop, .qdm__icon--aop { color: var(--qdm-burdeos); }
.qdm__icon--igp { color: var(--qdm-medalla); }

/* YMYL: tinta azul */
.qdm__icon--leche-cruda, .qdm__icon--embarazo,
.qdm__icon--alergeno, .qdm__icon--listeria { color: var(--qdm-tinta); }

/* Premios: ocre */
.qdm__icon--medalla, .qdm__icon--trofeo,
.qdm__icon--estrella-brand { color: var(--qdm-medalla); }

/* Maridaje: verde */
.qdm__icon--maridaje { color: var(--qdm-verde); }

/* Editorial: tinta oscura */
.qdm__icon--libro, .qdm__icon--cuna, .qdm__icon--rueda { color: var(--qdm-ink); }

/* ---------- Pullquote editorial ---------- */
.qdm__pullquote {
    font-family: var(--qdm-font-serif);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.25;
    color: var(--qdm-ink);
    max-width: 640px;
    margin: 48px auto;
    padding: 32px 0;
    border-top: 1px solid var(--qdm-rule);
    border-bottom: 1px solid var(--qdm-rule);
    text-align: center;
    font-variation-settings: "opsz" 48;
}

.qdm__pullquote cite {
    display: block;
    margin-top: 16px;
    font-family: var(--qdm-font-sans);
    font-style: normal;
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--qdm-ink-mute);
}

/* ---------- Listas editoriales ---------- */
.qdm__editorial ul,
.qdm__editorial ol {
    margin: 1.2em 0 1.4em;
    padding-left: 1.6em;
}

.qdm__editorial ul li::marker { color: var(--qdm-ink-mute); content: "— "; }
.qdm__editorial ol { list-style: decimal-leading-zero; }
.qdm__editorial ol li::marker {
    color: var(--qdm-ink-mute);
    font-family: var(--qdm-font-serif);
    font-size: 0.85em;
}

/* ---------- Blockquote editorial ---------- */
.qdm__editorial blockquote {
    margin: 2em 0;
    padding: 0 0 0 24px;
    border-left: 2px solid var(--qdm-rule);
    font-style: italic;
    color: var(--qdm-ink-soft);
    font-family: var(--qdm-font-serif);
    font-variation-settings: "opsz" 18;
}

/* ---------- Folio (número de página estilo periódico) ---------- */
.qdm__folio {
    font-family: var(--qdm-font-sans);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--qdm-ink-mute);
    padding: 12px 0;
    border-top: 0.5px solid var(--qdm-rule);
    display: flex;
    justify-content: space-between;
}

/* ---------- Accesibilidad: reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .qdm__home-hero-link:hover .qdm__home-hero-img img { transform: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   ARTÍCULOS EDITORIALES (single.php) — reviews, guías, comparativas
   ============================================================ */

.qdm--article { background: var(--qdm-paper); }

.qdm__article-hero {
    padding: 60px 0 32px;
    border-bottom: 0.5px solid var(--qdm-rule);
    text-align: center;
}
.qdm__article-kicker {
    font-family: var(--qdm-font-sans);
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--qdm-ink-mute);
    margin: 0 0 14px;
}
.qdm__article-title {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 300;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--qdm-ink);
    max-width: 880px;
    margin: 0 auto 18px;
}
.qdm__article-excerpt {
    font-family: 'Newsreader', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(17px, 1.6vw, 21px);
    line-height: 1.5;
    color: var(--qdm-ink-mute);
    max-width: 640px;
    margin: 0 auto 18px;
}
.qdm__article-meta {
    font-family: var(--qdm-font-sans);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--qdm-ink-mute);
    margin: 0;
}

.qdm__article-cover {
    margin: 0;
    max-width: 1080px;
    padding: 0 24px;
    margin: 28px auto 0;
}
.qdm__article-cover img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.qdm__article-body {
    padding: 56px 0 80px;
}
.qdm__article-content {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 400;
    font-size: 19px;
    line-height: 1.65;
    color: var(--qdm-ink);
}
.qdm__article-content > p:first-of-type::first-letter {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 300;
    font-size: 4.2em;
    float: left;
    line-height: 0.88;
    margin: 6px 10px 0 0;
    color: var(--qdm-ink);
    font-feature-settings: "opsz" 72;
}
.qdm__article-content p { margin: 0 0 1.1em; }
.qdm__article-content h2 {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 400;
    font-size: 28px;
    line-height: 1.2;
    margin: 2.2em 0 0.6em;
    padding-top: 0.6em;
    border-top: 0.5px solid var(--qdm-rule);
    color: var(--qdm-ink);
}
.qdm__article-content h3 {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 500;
    font-size: 21px;
    margin: 1.8em 0 0.4em;
    color: var(--qdm-ink);
}
.qdm__article-content ul,
.qdm__article-content ol {
    margin: 0.6em 0 1.4em 1.4em;
    padding: 0;
}
.qdm__article-content li { margin: 0 0 0.45em; }

.qdm__article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 16px;
    font-family: var(--qdm-font-sans);
}
.qdm__article-content th,
.qdm__article-content td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 0.5px solid var(--qdm-rule);
    vertical-align: top;
}
.qdm__article-content th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--qdm-ink-mute);
    border-bottom: 1px solid var(--qdm-ink);
}

.qdm__article-content a {
    color: var(--qdm-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 0.5px;
}

/* Byline al inicio del post + caja "Sobre el autor" al final.
   Inyectados por QDM_Author via filter the_content en posts estándar.
   E-E-A-T para señales de autor en Content Warehouse. */
.qdm-post-byline {
    font-family: var(--qdm-font-sans);
    font-size: 13px;
    color: var(--qdm-ink-mute);
    margin: 0 0 32px;
    padding-bottom: 16px;
    border-bottom: 0.5px solid var(--qdm-rule-soft);
    letter-spacing: 0.02em;
}
.qdm-post-byline a {
    color: var(--qdm-ink);
    text-decoration: none;
    border-bottom: 0.5px solid var(--qdm-rule);
}
.qdm-post-byline a:hover {
    border-bottom-color: var(--qdm-ink);
}
.qdm-post-byline__sep {
    margin: 0 4px;
    color: var(--qdm-rule);
}
.qdm-post-byline__updated {
    font-style: italic;
}

/* FAQ block: pareja con FAQPage schema. Aparece antes de la
   author-box al final de los posts que tienen `qdm_faq_json` meta. */
.qdm-faq {
    margin: 56px 0 0;
    padding-top: 32px;
    border-top: 0.5px solid var(--qdm-rule);
}
.qdm-faq__title {
    font-family: var(--qdm-font-serif);
    font-weight: 400;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 24px;
    color: var(--qdm-ink);
}
.qdm-faq__list {
    margin: 0;
    padding: 0;
}
.qdm-faq__question {
    font-family: var(--qdm-font-serif);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.4;
    margin: 24px 0 8px;
    color: var(--qdm-ink);
}
.qdm-faq__question:first-child {
    margin-top: 0;
}
.qdm-faq__answer {
    margin: 0 0 0;
    font-family: var(--qdm-font-serif);
    font-size: 17px;
    line-height: 1.65;
    color: var(--qdm-ink-soft);
}

.qdm-author-box {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin: 64px 0 32px;
    padding: 28px 32px;
    background: var(--qdm-paper-warm);
    border-radius: 4px;
    border-top: 1px solid var(--qdm-rule);
}
.qdm-author-box__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--qdm-rule);
}
.qdm-author-box__body {
    flex: 1;
    min-width: 0;
}
.qdm-author-box__kicker {
    margin: 0 0 8px;
    font-family: var(--qdm-font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--qdm-ink-mute);
}
.qdm-author-box__name {
    margin: 0 0 4px;
    font-family: var(--qdm-font-serif);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--qdm-ink);
}
.qdm-author-box__name a {
    color: inherit;
    text-decoration: none;
}
.qdm-author-box__role {
    margin: 0 0 12px;
    font-family: var(--qdm-font-sans);
    font-size: 13px;
    color: var(--qdm-ink-soft);
    font-style: italic;
}
.qdm-author-box__bio {
    margin: 0 0 12px;
    font-family: var(--qdm-font-serif);
    font-size: 16px;
    line-height: 1.55;
    color: var(--qdm-ink-soft);
}
.qdm-author-box__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.qdm-author-box__links a {
    font-family: var(--qdm-font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--qdm-ink);
    text-decoration: none;
    border-bottom: 0.5px solid var(--qdm-rule);
    padding-bottom: 1px;
}
.qdm-author-box__links a:hover {
    border-bottom-color: var(--qdm-ink);
}

@media (max-width: 560px) {
    .qdm-author-box {
        flex-direction: column;
        padding: 24px;
    }
    .qdm-author-box__avatar {
        width: 72px;
        height: 72px;
    }
}

/* Módulo "Cómo se hace" en fichas de queso (vídeo YouTube nocookie). */
.qdm__module--video .qdm__video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--qdm-paper-deep);
    border-radius: 4px;
    overflow: hidden;
}
.qdm__module--video .qdm__video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.qdm__module--video .qdm__video-credit {
    margin-top: 10px;
    font-family: var(--qdm-font-sans);
    font-size: 12px;
    color: var(--qdm-ink-mute);
    font-style: italic;
}

/* Figuras + vídeos embebidos en artículos editoriales y posts WP estándar.
   Soportan tanto el wrapper qdm__article-content (CPT guía) como el de
   post estándar (.entry-content). */
.qdm__article-content figure,
.entry-content figure {
    margin: 2em 0;
}
.qdm__article-content figure img,
.entry-content figure img,
.qdm__article-content p img,
.entry-content p img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}
.qdm__article-content figcaption,
.entry-content figcaption {
    margin-top: 8px;
    font-family: var(--qdm-font-sans);
    font-size: 13px;
    color: var(--qdm-ink-mute);
    line-height: 1.5;
    text-align: left;
}
.qdm__article-content figcaption em,
.entry-content figcaption em {
    font-style: italic;
}

/* Responsive iframe para oEmbed de YouTube/Vimeo. WP envuelve en
   .wp-embedded-content (clásico) o .wp-block-embed__wrapper (Gutenberg).
   Nos cubrimos todos los casos. */
.qdm__article-content iframe,
.entry-content iframe,
.wp-block-embed__wrapper iframe {
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 2em 0;
    display: block;
}
.wp-block-embed,
.wp-block-embed__wrapper {
    margin: 2em 0;
}
.qdm__article-content a:hover { text-decoration-thickness: 1.5px; }

.qdm__article-content blockquote {
    border-left: 2px solid var(--qdm-ink);
    margin: 1.6em 0;
    padding: 0.4em 0 0.4em 1.2em;
    font-style: italic;
    color: var(--qdm-ink-mute);
}

.qdm__article-tags {
    max-width: 720px;
    margin: 36px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    border-top: 0.5px solid var(--qdm-rule);
}

/* ============================================================
   MÓDULO AMAZON (qdm_amazon shortcode)
   ============================================================ */

.qdm-amazon {
    margin: 1.8em 0;
    padding: 22px 22px 18px;
    background: #fff;
    border: 0.5px solid var(--qdm-rule);
    border-radius: 2px;
    font-family: var(--qdm-font-sans);
}
.qdm-amazon__title {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    margin: 0 0 14px;
    color: var(--qdm-ink);
    padding-bottom: 8px;
    border-bottom: 0.5px solid var(--qdm-rule);
}
.qdm-amazon__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}
.qdm-amazon__item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 0.5px solid var(--qdm-rule);
}
.qdm-amazon__item:last-child { border-bottom: 0; padding-bottom: 0; }
.qdm-amazon__img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: var(--qdm-paper);
    padding: 6px;
    border-radius: 2px;
}
.qdm-amazon__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.qdm-amazon__name {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    color: var(--qdm-ink);
}
.qdm-amazon__desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--qdm-ink-mute);
    margin: 0;
}
/* .qdm-amazon__btn comparte tokens con .qdm-affiliate__btn (regla unificada
   arriba). Aquí solo posicionamiento específico al layout amazon-card. */
.qdm-amazon__btn {
    align-self: flex-start;
    margin-top: 4px;
}
.qdm-amazon__disclaimer {
    font-size: 11px;
    color: var(--qdm-ink-mute);
    margin: 14px 0 0;
    padding-top: 10px;
    border-top: 0.5px solid var(--qdm-rule);
    font-style: italic;
}

@media (max-width: 640px) {
    .qdm-amazon__item { grid-template-columns: 80px 1fr; gap: 12px; }
    .qdm-amazon__img { width: 80px; height: 80px; }
}

/* ============================================================
   HOME — bloque "En el blog" (artículos)
   ============================================================ */

.qdm__home-articulos { padding: 60px 0; }
.qdm__home-articulos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 32px;
}
@media (max-width: 900px) {
    .qdm__home-articulos-grid { grid-template-columns: 1fr; gap: 24px; }
}
.qdm__home-articulo-card {
    background: var(--qdm-paper);
}
.qdm__home-articulo-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.qdm__home-articulo-img {
    margin: 0 0 16px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 2px;
}
.qdm__home-articulo-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
.qdm__home-articulo-link:hover .qdm__home-articulo-img img { transform: scale(1.03); }
.qdm__home-articulo-kicker {
    font-family: var(--qdm-font-sans);
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--qdm-ink-mute);
    display: block;
    margin-bottom: 8px;
}
.qdm__home-articulo-title {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 400;
    font-size: 22px;
    line-height: 1.2;
    margin: 0 0 8px;
    color: var(--qdm-ink);
}
.qdm__home-articulo-excerpt {
    font-size: 15px;
    line-height: 1.5;
    color: var(--qdm-ink-mute);
    margin: 0;
}
