/**
 * Recipe Ecosystem Pro — estilos do front-end.
 *
 * Estrutura:
 *   1. Base do cartão (variáveis CSS)
 *   2. Componentes (avaliação, botões, grade de infos, ingredientes,
 *      instruções, nutrição, modo cozinha, modal, toast…)
 *   3. Temas dos 10 templates (modern, classic, minimalist, elegant, bold,
 *      terracotta, studio, gazeta, metodo, diario)
 *   4. Índice de receitas, responsivo e impressão
 */

/* ============================================
   1. BASE
   ============================================ */

/* Página própria da receita: o tema (GeneratePress) imprimia a imagem
   destacada e o título antes do conteúdo, duplicando o que o cartão já
   mostra — o H1 e a foto da página agora são os do cartão. O PHP remove
   via filtros (WPRE_Template_Selector::suppress_theme_*); estas regras são
   a rede de segurança para outros temas. */
.single-wpre_recipe .entry-header .entry-title,
.single-wpre_recipe .featured-image.page-header-image-single {
    display: none;
}

.wpre-recipe-card {
    --wpre-accent: #b9553d;
    /* Versão RGB das cores-chave para fundos/bordas com opacidade
       (padrão premium do WP Delicious: paleta harmônica sem cinzas soltos). */
    --wpre-accent-rgb: 185, 85, 61;
    --wpre-text-rgb: 51, 56, 62;
    --wpre-card-bg: #ffffff;
    --wpre-section-bg: #faf6ec;
    --wpre-text-color: #33383e;
    --wpre-muted-color: #6b7280;
    --wpre-heading-color: #21262c;
    --wpre-heading-font: inherit;
    --wpre-heading-transform: none;
    --wpre-border-color: rgba(var(--wpre-text-rgb), 0.1);
    --wpre-radius: 14px;
    --wpre-star-color: #f5a623;
    --wpre-footer-icon-color: var(--wpre-accent);
    /* Fundo próprio da caixa de valores nutricionais, sempre diferente das
       demais áreas internas (que usam --wpre-section-bg). */
    --wpre-nutrition-bg: rgba(0, 0, 0, 0.045);

    /* Estados do accent — cada template que troca --wpre-accent redefine
       também o par hover/rgb; soft e focus-ring derivam do RGB. */
    --wpre-accent-hover: #a2452f;
    --wpre-accent-soft: rgba(var(--wpre-accent-rgb), 0.12);
    --wpre-focus-ring: rgba(var(--wpre-accent-rgb), 0.45);

    /* Semânticas (antes hard-coded em .wpre-allergen-tag e afins). */
    --wpre-success: #2f9e63;
    --wpre-success-bg: #eaf7ef;
    --wpre-danger: #b3382c;
    --wpre-danger-bg: #fdeceb;

    /* Cores de marca social (rodapé). */
    --wpre-social-instagram: #c13584;
    --wpre-social-facebook: #1877f2;
    --wpre-social-pinterest: #c8232c;

    /* Escala tipográfica — contraste de peso real entre título (800) e
       títulos de seção (700), labels em semibold uppercase. */
    --wpre-fs-display: 2.25rem;
    --wpre-fs-h3: 1.25rem;
    --wpre-fs-body-lg: 1.0625rem;
    --wpre-fs-body: 1rem;
    --wpre-fs-small: 0.9375rem;
    --wpre-fs-label: 0.75rem;
    --wpre-fs-caption: 0.8125rem;
    --wpre-fw-display: 800;
    --wpre-fw-h3: 700;
    --wpre-fw-label: 600;

    /* Escala de espaçamento base 4px. */
    --wpre-space-1: 4px;
    --wpre-space-2: 8px;
    --wpre-space-3: 12px;
    --wpre-space-4: 16px;
    --wpre-space-5: 20px;
    --wpre-space-6: 24px;
    --wpre-space-7: 32px;
    --wpre-space-8: 40px;
    --wpre-space-9: 48px;
    --wpre-space-10: 64px;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    max-width: 800px;
    margin: 2rem auto;
    /* Fundo sempre sólido: nunca herda transparência do tema/editor. */
    background: var(--wpre-card-bg, #ffffff);
    background-color: var(--wpre-card-bg, #ffffff);
    color: var(--wpre-text-color);
    border-radius: var(--wpre-radius);
    border: 1px solid var(--wpre-border-color);
    /* Sombra suave de dispersão ampla (estética WP Delicious). */
    box-shadow: 0 15px 45px rgba(25, 22, 12, 0.07), 0 3px 10px rgba(25, 22, 12, 0.04);
    overflow: hidden;
}

.wpre-card-body {
    padding: var(--wpre-space-7) var(--wpre-space-8) var(--wpre-space-8);
}

.wpre-recipe-title {
    font-family: var(--wpre-heading-font);
    font-size: var(--wpre-fs-display);
    font-weight: var(--wpre-fw-display);
    color: var(--wpre-heading-color);
    text-transform: var(--wpre-heading-transform);
    margin: 0 0 0.75rem;
    line-height: 1.25;
}

.wpre-recipe-description {
    color: var(--wpre-muted-color);
    font-size: var(--wpre-fs-body-lg);
    margin: 1rem 0;
}

.wpre-section-title {
    font-family: var(--wpre-heading-font);
    font-size: var(--wpre-fs-h3);
    font-weight: var(--wpre-fw-h3);
    color: var(--wpre-heading-color);
    text-transform: var(--wpre-heading-transform);
    margin: 0 0 1.1rem;
}

.wpre-recipe-section {
    margin: var(--wpre-space-8) 0 0;
}

.wpre-recipe-image {
    position: relative;
}

.wpre-recipe-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    margin: 0;
}

.wpre-icon {
    vertical-align: -0.18em;
    flex-shrink: 0;
}

/* Texto somente para leitores de tela (a página de impressão não carrega o tema). */
.wpre-recipe-card .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

/* ============================================
   2. COMPONENTES
   ============================================ */

/* --- Foco visível (WCAG 2.4.7) — cobre todos os controles do cartão --- */
.wpre-recipe-card a:focus-visible,
.wpre-recipe-card button:focus-visible,
.wpre-recipe-card input:focus-visible,
.wpre-recipe-card select:focus-visible,
.wpre-recipe-card textarea:focus-visible,
.wpre-recipe-card [tabindex]:focus-visible {
    outline: 2px solid var(--wpre-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.wpre-servings-btn:focus-visible,
.wpre-scale-btn:focus-visible {
    outline-offset: 3px;
}

/* --- Byline e termos (curso / cozinha / dificuldade) --- */
.wpre-byline {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    color: var(--wpre-muted-color);
    font-style: italic;
}

.wpre-byline span,
.wpre-byline strong {
    font-style: normal;
    font-weight: 700;
    color: var(--wpre-heading-color);
}

.wpre-terms-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--wpre-border-color);
    border-bottom: 1px solid var(--wpre-border-color);
    font-size: 0.9rem;
    color: var(--wpre-muted-color);
}

.wpre-terms-line strong {
    color: var(--wpre-heading-color);
}

/* Rótulo curto acima do título (curso/categoria) — usado pelos templates
   Terracota e Gazeta como uma "editoria" antes da manchete. */
.wpre-kicker {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: var(--wpre-accent);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* --- Avaliação (estrelas) --- */
.wpre-recipe-rating {
    margin: 0.6rem 0;
}

.wpre-rating-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.wpre-stars {
    display: inline-flex;
    gap: 2px;
    line-height: 1;
}

.wpre-star {
    font-size: 1.4rem;
    color: #d8d8d8;
}

.wpre-star.filled {
    color: var(--wpre-star-color);
}

.wpre-star.half {
    color: var(--wpre-star-color);
    background: linear-gradient(90deg, var(--wpre-star-color) 50%, #d8d8d8 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wpre-rating-count {
    color: var(--wpre-muted-color);
    font-size: 0.88rem;
    font-style: italic;
}

.wpre-rating-average {
    font-weight: 800;
    color: var(--wpre-heading-color);
}

/* Estrelas grandes antes do convite final de avaliação (template Editorial) —
   a mesma nota já aparece pequena no topo, junto do byline; aqui reforça o
   convite a avaliar com um tamanho bem mais visível. */
.wpre-recipe-rating-lg {
    text-align: center;
    margin: var(--wpre-space-7) 0 var(--wpre-space-3);
}

.wpre-recipe-rating-lg .wpre-rating-display {
    cursor: pointer;
}

.wpre-recipe-rating-lg .wpre-star {
    font-size: 2.6rem;
}

.wpre-recipe-rating-lg .wpre-rating-average {
    font-size: 1.3rem;
}

.wpre-recipe-rating-lg .wpre-rating-count {
    font-size: 1rem;
}

.wpre-comment-stars {
    display: block;
    margin-bottom: 4px;
}

.wpre-comment-stars .wpre-star {
    font-size: 1.05rem;
}

/* Estrelas de seleção (formulário de comentários) */
.wpre-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.wpre-stars-input input {
    display: none;
}

.wpre-stars-input label {
    font-size: 1.9rem;
    color: #d8d8d8;
    cursor: pointer;
    transition: color 0.15s;
}

.wpre-stars-input label:hover,
.wpre-stars-input label:hover ~ label,
.wpre-stars-input input:checked ~ label {
    color: var(--wpre-star-color, #f5a623);
}

/* Animação sutil ao passar o mouse: as estrelas sobem levemente até onde o
   cursor está. Nas listas de exibição (ordem 1→5 no DOM) todas sobem e as
   DEPOIS da apontada voltam; nos formulários (ordem invertida no DOM, 5→1)
   a apontada e as irmãs seguintes — visualmente as anteriores — sobem. */
@media (prefers-reduced-motion: no-preference) {
    .wpre-rating-display .wpre-star,
    .wpre-stars-rating label,
    .wpre-stars-input label {
        transition: color 0.15s, transform 0.18s ease;
    }

    .wpre-rating-display .wpre-stars:hover .wpre-star {
        transform: translateY(-3px);
    }

    .wpre-rating-display .wpre-stars .wpre-star:hover ~ .wpre-star {
        transform: none;
    }

    .wpre-stars-rating label:hover,
    .wpre-stars-rating label:hover ~ label,
    .wpre-stars-input label:hover,
    .wpre-stars-input label:hover ~ label {
        transform: translateY(-3px);
    }
}

/* --- Botões --- */
.wpre-recipe-actions {
    display: flex;
    gap: var(--wpre-space-3);
    flex-wrap: wrap;
    margin: 1.1rem 0;
}

.wpre-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 10px 20px;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 10px;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.wpre-btn:hover {
    border-color: var(--wpre-accent);
    color: var(--wpre-accent);
    box-shadow: 0 4px 12px rgba(var(--wpre-accent-rgb), 0.18);
    transform: translateY(-2px);
}

.wpre-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wpre-actions-pill {
    justify-content: center;
}

.wpre-actions-pill .wpre-btn {
    background: var(--wpre-accent);
    border-color: var(--wpre-accent);
    color: #fff;
    /* Pílula de verdade (referência Tastebite), não retângulo arredondado. */
    border-radius: 999px;
    padding: 0.75rem 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(var(--wpre-accent-rgb), 0.28);
}

.wpre-actions-pill .wpre-btn:hover {
    background: var(--wpre-accent-hover);
    border-color: var(--wpre-accent-hover);
    color: #fff;
    box-shadow: 0 8px 22px rgba(var(--wpre-accent-rgb), 0.36);
    transform: translateY(-2px);
}

.wpre-actions-inline {
    gap: 0.5rem;
}

.wpre-actions-inline .wpre-btn {
    border: 0;
    padding: 0.35rem 0.6rem;
    background: transparent;
    color: var(--wpre-muted-color);
    font-size: 0.85rem;
}

.wpre-actions-inline .wpre-btn:hover {
    color: var(--wpre-accent);
    transform: none;
}

.wpre-btn-save.is-saved {
    background: var(--wpre-accent);
    border-color: var(--wpre-accent);
    color: #fff;
}

/* --- Botões sobre a imagem (Pin / Imprimir) --- */
.wpre-image-overlay-actions {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    gap: 8px;
}

.wpre-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    line-height: 1;
}

.wpre-overlay-pin {
    background: #c8332b;
    box-shadow: 0 4px 14px rgba(200, 51, 43, 0.4);
}

.wpre-overlay-print {
    background: rgba(17, 17, 17, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.wpre-overlay-btn:hover {
    filter: brightness(1.12);
    color: #fff;
}

/* --- Grade de infos com ícones (Porções / Preparo / Cozimento / Calorias) ---
   Componente de destaque real (fundo, radius, sombra), não tabela tracejada. */
.wpre-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    background: var(--wpre-section-bg);
    border: 1px solid var(--wpre-border-color);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wpre-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
    padding: 1.1rem 0.75rem;
    border-left: 1px solid var(--wpre-border-color);
    transition: background 0.15s;
}

.wpre-stat:hover {
    background: var(--wpre-accent-soft);
}

.wpre-stat:first-child {
    border-left: 0;
}

.wpre-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wpre-accent-soft);
    color: var(--wpre-accent);
    margin-bottom: 0.35rem;
}

.wpre-stat-label {
    font-size: var(--wpre-fs-label);
    font-weight: var(--wpre-fw-label);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wpre-heading-color);
}

.wpre-stat-value {
    font-size: 0.9rem;
    color: var(--wpre-muted-color);
}

/* --- Linha Tempo total / Rendimento (estilo Tasty) --- */
.wpre-total-yield-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 2rem;
    padding: 0.9rem 0;
    margin: 0.5rem 0 0;
    border-top: 1px solid var(--wpre-border-color);
    font-size: 0.95rem;
}

.wpre-tyl-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.wpre-tyl-item .wpre-icon {
    color: var(--wpre-accent);
}

.wpre-tyl-item em {
    font-style: normal;
    color: var(--wpre-accent);
    font-weight: 600;
}

/* --- Linha minimalista --- */
.wpre-minimal-meta {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    color: var(--wpre-muted-color);
    white-space: pre-wrap;
}

.wpre-minimal-rule {
    border: 0;
    /* Regra sutil, coerente com o restante do template (antes usava a cor de
       título, escura demais para um divisor). */
    border-top: 1px solid var(--wpre-border-color);
    margin: 1.1rem 0 0;
}

/* --- Controle de porções --- */
.wpre-recipe-servings-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    padding: var(--wpre-space-4) var(--wpre-space-5);
    margin: 1.2rem 0;
    background: var(--wpre-section-bg);
    border-radius: 10px;
    font-size: 0.92rem;
}

.wpre-recipe-servings-control > label {
    font-weight: 700;
    color: var(--wpre-heading-color);
}

.wpre-servings-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wpre-servings-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 50%;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}

.wpre-servings-btn:hover {
    border-color: var(--wpre-accent);
    color: var(--wpre-accent);
    background: var(--wpre-accent-soft);
}

.wpre-servings-input {
    width: 54px;
    text-align: center;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 8px;
    padding: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
}

.wpre-scale-buttons {
    display: inline-flex;
    gap: 6px;
}

.wpre-scale-btn {
    min-width: 40px;
    min-height: 32px;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 999px;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
}

.wpre-scale-btn.is-active,
.wpre-scale-btn:hover {
    border-color: var(--wpre-accent);
    background: var(--wpre-accent);
    color: #fff;
}

.wpre-unit-system {
    margin-left: auto;
    padding: 0.4rem 0.7rem;
    border: 1.5px solid var(--wpre-border-color);
    border-radius: 8px;
    font-size: 0.88rem;
    background: var(--wpre-card-bg);
    color: var(--wpre-heading-color);
}

/* --- Ingredientes --- */
.wpre-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpre-ingredient-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.6rem 0;
    /* Variável de borda do tema — preto fixo sumia no template escuro. */
    border-bottom: 1px solid var(--wpre-border-color);
    font-size: 1rem;
}

.wpre-ingredient-item:last-child {
    border-bottom: 0;
}

.wpre-ingredient-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 0.15rem;
    color: var(--wpre-accent);
}

.wpre-ingredient-icon svg {
    width: 100%;
    height: 100%;
}

.wpre-ingredient-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.wpre-ingredient-text {
    flex: 1;
}

.wpre-ingredient-amount {
    font-weight: 700;
    color: var(--wpre-accent);
    /* Suaviza o recálculo de quantidades (escala/conversão via JS). */
    transition: opacity 0.15s;
}

.wpre-ingredient-unit {
    color: var(--wpre-text-color);
    font-weight: 600;
}

.wpre-ingredient-check-label {
    display: inline-flex;
    align-items: center;
    padding-top: 0.2rem;
}

/* Checkbox circular com check animado (referência: tick-circle do WPZOOM). */
.wpre-ingredient-check {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid var(--wpre-border-color);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.wpre-ingredient-check:checked {
    background: var(--wpre-success, #2f9e63);
    border-color: var(--wpre-success, #2f9e63);
    box-shadow: inset 0 0 0 2px #fff;
}

.wpre-ingredient-check:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wpre-ingredient-bullet {
    width: 11px;
    height: 11px;
    margin-top: 0.5rem;
    border: 2px solid var(--wpre-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.wpre-ingredient-item.is-checked .wpre-ingredient-text {
    opacity: 0.55;
    text-decoration: line-through;
    transition: opacity 0.2s;
}

.wpre-marker-plain .wpre-ingredient-item {
    border-bottom: 0;
    padding: 0.28rem 0;
}

/* Painel destacado (ex.: fundo creme no template moderno) */
.wpre-section-panel {
    background: var(--wpre-section-bg);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    padding: var(--wpre-space-6) var(--wpre-space-7) var(--wpre-space-7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.wpre-list-section-title {
    list-style: none;
    margin: 1rem 0 0.3rem;
    padding: 0.4rem 0;
    color: var(--wpre-heading-color);
    font-weight: 800;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--wpre-border-color);
}

/* --- Instruções --- */
.wpre-instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpre-instruction-item {
    margin-bottom: 1.35rem;
}

.wpre-instruction-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.wpre-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--wpre-accent);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(var(--wpre-accent-rgb), 0.35);
}

.wpre-numbers-plain .wpre-step-number {
    background: transparent;
    color: var(--wpre-heading-color);
    font-size: 1.15rem;
    width: 28px;
    height: auto;
    justify-content: flex-start;
}

.wpre-step-body {
    flex: 1;
}

.wpre-step-heading {
    display: block;
    margin-bottom: 4px;
    color: var(--wpre-heading-color);
}

.wpre-step-text {
    margin: 0;
    line-height: 1.65;
}

/* --- Nutrição: grade --- */
.wpre-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.8rem;
}

.wpre-nutrition-item {
    text-align: center;
    padding: 0.8rem 0.5rem;
    background: var(--wpre-nutrition-bg);
    border-radius: 8px;
}

.wpre-nutrition-label {
    display: block;
    font-size: var(--wpre-fs-label);
    font-weight: var(--wpre-fw-label);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wpre-muted-color);
    margin-bottom: 0.25rem;
}

.wpre-nutrition-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--wpre-heading-color);
}

/* Calorias: título em negrito e número/unidade sem negrito (pedido explícito). */
.wpre-nutrition-item-calories .wpre-nutrition-label {
    font-weight: 700;
    color: var(--wpre-heading-color);
}

.wpre-nutrition-item-calories .wpre-nutrition-value {
    font-weight: 400;
}

/* --- Nutrição: tabela em estilo rótulo --- */
.wpre-nutrition-facts {
    margin-top: 1.6rem;
    background: var(--wpre-nutrition-bg);
    /* Borda esquerda grossa (estilo "rótulo americano") diferencia a tabela
       da grade de nutrição, que compartilha o mesmo fundo. */
    border-left: 5px solid var(--wpre-heading-color);
    border-radius: 0 8px 8px 0;
    padding: 1.1rem 1.2rem;
    font-size: 0.85rem;
}

.wpre-nutrition-facts-title {
    font-family: var(--wpre-heading-font);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--wpre-heading-color);
    margin: 0 0 0.4rem;
}

.wpre-nutrition-serving {
    margin: 0 0 0.5rem;
    color: var(--wpre-muted-color);
}

.wpre-nutrition-facts table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.wpre-nutrition-facts th,
.wpre-nutrition-facts td {
    padding: 0.32rem 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 0.85rem;
    background: transparent;
}

.wpre-nutrition-facts th {
    text-align: left;
    font-weight: 500;
    color: var(--wpre-muted-color);
}

.wpre-nutrition-facts td {
    text-align: right;
    font-weight: 700;
    color: var(--wpre-heading-color);
}

/* Calorias: título em negrito e número/unidade sem negrito (pedido explícito). */
.wpre-nutrition-row-calories th {
    font-weight: 700;
    color: var(--wpre-heading-color);
}

.wpre-nutrition-row-calories td {
    font-weight: 400;
}

/* --- Vídeo --- */
.wpre-video-embed {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.wpre-video-embed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
}

.wpre-video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.18);
    transition: background 0.2s;
}

.wpre-video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.32);
    color: #fff;
}

/* --- Equipamentos (linha ícone + nome + comprar, referência: imagem 12) --- */
.wpre-equipment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.wpre-equipment-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--wpre-border-color);
    border-radius: 10px;
    background: var(--wpre-card-bg);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.wpre-equipment-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: var(--wpre-accent);
}

.wpre-equipment-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--wpre-section-bg);
    color: var(--wpre-accent);
}

.wpre-equipment-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpre-equipment-row-icon svg {
    width: 26px;
    height: 26px;
}

.wpre-equipment-row-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wpre-equipment-row-title {
    color: var(--wpre-heading-color);
    font-size: 0.92rem;
}

.wpre-equipment-row-price {
    font-weight: 700;
    color: var(--wpre-accent);
    font-size: 0.8rem;
}

.wpre-equipment-row-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--wpre-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.wpre-equipment-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--wpre-border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--wpre-card-bg);
}

.wpre-equipment-card-image img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.wpre-equipment-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.9rem;
}

.wpre-equipment-card-title {
    color: var(--wpre-heading-color);
    font-size: 0.95rem;
}

.wpre-equipment-card-price {
    font-weight: 700;
    color: var(--wpre-accent);
    font-size: 0.88rem;
}

.wpre-equipment-card-cta {
    justify-content: center;
    margin-top: 0.35rem;
}

/* --- Notas / alérgenos --- */
.wpre-notes-content {
    background: var(--wpre-section-bg);
    border-left: 4px solid var(--wpre-accent);
    border-radius: 0 8px 8px 0;
    padding: var(--wpre-space-4) var(--wpre-space-5);
    font-size: 0.95rem;
}

.wpre-notes-content p:last-child {
    margin-bottom: 0;
}

.wpre-allergens-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.wpre-allergen-tag {
    padding: 0.4rem 0.9rem;
    background: var(--wpre-danger-bg);
    color: var(--wpre-danger);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- Marca (patrocínio/parceria) --- */
.wpre-brands-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.wpre-brand-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--wpre-border-color);
    border-radius: 999px;
    background: var(--wpre-section-bg);
    color: var(--wpre-heading-color);
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s;
}

a.wpre-brand-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: var(--wpre-accent);
}

.wpre-brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.wpre-brand-name {
    font-weight: 700;
    font-size: 0.88rem;
}

/* --- Modo Cozinha --- */
.wpre-cook-mode {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.6rem 0 0.4rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--wpre-border-color);
    border-radius: 10px;
    font-size: 0.92rem;
}

.wpre-cook-mode-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.wpre-cook-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wpre-cook-mode-slider {
    position: absolute;
    inset: 0;
    background: #cfcfcf;
    border-radius: 999px;
    transition: background 0.2s;
}

.wpre-cook-mode-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.wpre-cook-mode-toggle:checked + .wpre-cook-mode-slider {
    background: var(--wpre-accent);
}

.wpre-cook-mode-toggle:checked + .wpre-cook-mode-slider::before {
    transform: translateX(20px);
    /* Thumb com sombra ao ativar (padrão de toggles iOS/Material). */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.wpre-cook-mode-text strong {
    color: var(--wpre-heading-color);
}

/* Versão compacta, lado a lado com o botão Compartilhar na barra de ações. */
.wpre-cook-mode-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.35rem 0.6rem 0.35rem 0.2rem;
    border: 0;
    cursor: pointer;
}

.wpre-cook-mode-inline .wpre-cook-mode-switch {
    width: 36px;
    height: 20px;
}

.wpre-cook-mode-inline .wpre-cook-mode-slider::before {
    width: 14px;
    height: 14px;
}

.wpre-cook-mode-inline .wpre-cook-mode-toggle:checked + .wpre-cook-mode-slider::before {
    transform: translateX(16px);
}

.wpre-cook-mode-inline .wpre-cook-mode-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--wpre-heading-color);
}

/* --- Convite de avaliação --- */
.wpre-feedback-cta {
    text-align: center;
    margin: 2rem 0 0.5rem;
    padding: var(--wpre-space-7);
    background: var(--wpre-section-bg);
    border-radius: 10px;
}

.wpre-btn-feedback {
    background: var(--wpre-accent);
    border-color: var(--wpre-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(var(--wpre-accent-rgb), 0.28);
}

.wpre-btn-feedback:hover {
    background: var(--wpre-accent-hover);
    border-color: var(--wpre-accent-hover);
    color: #fff;
    box-shadow: 0 8px 22px rgba(var(--wpre-accent-rgb), 0.36);
}

.wpre-feedback-title {
    font-family: var(--wpre-heading-font);
    font-size: 1.4rem;
    color: var(--wpre-heading-color);
    margin: 0 0 0.8rem;
}

/* --- Rodapé social --- */
.wpre-social-footer {
    margin: var(--wpre-space-7) calc(-1 * var(--wpre-space-8)) calc(-1 * var(--wpre-space-8));
    padding: var(--wpre-space-7) var(--wpre-space-8);
    background: var(--wpre-section-bg);
}

.wpre-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wpre-social-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 2px solid var(--wpre-footer-icon-color);
    border-radius: 999px;
    color: var(--wpre-footer-icon-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    transition: border-color 0.2s, color 0.2s;
}

/* Cores de marca reais por rede no hover (padrão Delicious Recipes). */
.wpre-social-links a[href*="instagram"]:hover {
    border-color: var(--wpre-social-instagram);
    color: var(--wpre-social-instagram);
}

.wpre-social-links a[href*="facebook"]:hover {
    border-color: var(--wpre-social-facebook);
    color: var(--wpre-social-facebook);
}

.wpre-social-links a[href*="pinterest"]:hover {
    border-color: var(--wpre-social-pinterest);
    color: var(--wpre-social-pinterest);
}

/* --- Duas colunas (minimalist / elegant) --- */
.wpre-two-columns {
    display: grid;
    grid-template-columns: minmax(230px, 2fr) 3fr;
    gap: 2.4rem;
    margin-top: 0.6rem;
}

/* --- Modal de avaliação --- */
.wpre-rating-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 16px;
}

.wpre-modal-content {
    background: #fff;
    color: #33383e;
    padding: 2rem;
    border-radius: 12px;
    max-width: 460px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow: auto;
}

.wpre-modal-content h3 {
    margin: 0 0 0.6rem;
    color: #21262c;
}

.wpre-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.9rem;
    border: 0;
    background: none;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

.wpre-rating-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1rem;
}

.wpre-stars-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.4rem;
}

.wpre-stars-rating input {
    display: none;
}

.wpre-stars-rating label {
    font-size: 2.4rem;
    color: #d8d8d8;
    cursor: pointer;
    transition: color 0.15s;
}

.wpre-stars-rating label:hover,
.wpre-stars-rating label:hover ~ label,
.wpre-stars-rating input:checked ~ label {
    color: var(--wpre-star-color, #f5a623);
}

.wpre-rating-form input,
.wpre-rating-form textarea {
    padding: 0.7rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.wpre-rating-form input:focus,
.wpre-rating-form textarea:focus {
    /* Indicador de foco robusto (WCAG 2.4.7): borda + anel, sem outline:none. */
    outline: none;
    border-color: var(--wpre-accent, #b9553d);
    box-shadow: 0 0 0 3px var(--wpre-focus-ring, rgba(185, 85, 61, 0.35));
}

/* Honeypot antispam: fora da tela para pessoas, visível para bots. */
.wpre-rating-form .wpre-hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
}

.wpre-btn-submit {
    background: var(--wpre-accent, #b9553d);
    border-color: var(--wpre-accent, #b9553d);
    color: #fff;
    padding: 0.85rem;
    font-size: 1rem;
    box-shadow: 0 6px 16px rgba(var(--wpre-accent-rgb, 185, 85, 61), 0.28);
}

.wpre-btn-submit:hover {
    background: var(--wpre-accent-hover, #a2452f);
    border-color: var(--wpre-accent-hover, #a2452f);
    color: #fff;
    box-shadow: 0 8px 22px rgba(var(--wpre-accent-rgb, 185, 85, 61), 0.36);
}

/* --- Toast de notificação --- */
.wpre-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(8px);
    background: #21262c;
    color: #fff;
    padding: 0.75rem 1.3rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    max-width: min(92vw, 480px);
    text-align: center;
}

.wpre-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   3. TEMAS DOS TEMPLATES
   ============================================ */

/* ---------- MODERNO (imagem 8 — Tastebite) ---------- */
.wpre-template-modern {
    --wpre-accent: #ee7524;
    --wpre-accent-rgb: 238, 117, 36;
    --wpre-accent-hover: #d86315;
    --wpre-star-color: #ee7524;
    --wpre-heading-font: Georgia, 'Times New Roman', serif;
    --wpre-section-bg: #f6f6f4;
    --wpre-radius: 12px;
    border-width: 1px;
}

.wpre-template-modern .wpre-card-body {
    padding: 2.2rem 2.4rem;
}

.wpre-template-modern .wpre-recipe-title {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wpre-template-modern .wpre-recipe-description {
    margin-top: 0.9rem;
}

.wpre-template-modern .wpre-recipe-image {
    margin: 1.3rem 0 0.6rem;
}

.wpre-template-modern .wpre-recipe-image img {
    height: 460px;
    border-radius: 12px;
}

.wpre-template-modern .wpre-section-title {
    font-size: 1.45rem;
}

/* Círculos de marcar ingrediente, como na referência. */
.wpre-template-modern .wpre-ingredient-check {
    border-radius: 50%;
}

.wpre-template-modern .wpre-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

/* Convite final: título grande serifado à esquerda, botão contornado e a
   régua laranja fechando a seção — como no rodapé da referência. */
.wpre-template-modern .wpre-feedback-cta {
    text-align: left;
    background: none;
    padding: 1.4rem 0 1.8rem;
    border-radius: 0;
    border-bottom: 3px solid var(--wpre-accent);
}

.wpre-template-modern .wpre-feedback-title {
    font-size: 2rem;
}

.wpre-template-modern .wpre-btn-feedback {
    background: none;
    color: var(--wpre-heading-color);
    border: 1.5px solid var(--wpre-heading-color);
    box-shadow: none;
}

.wpre-template-modern .wpre-btn-feedback:hover {
    background: var(--wpre-accent);
    border-color: var(--wpre-accent);
    color: #fff;
    box-shadow: none;
}

/* ---------- CLÁSSICO (imagem 5 — Tasty) ---------- */
.wpre-template-classic {
    --wpre-accent: #f09422;
    --wpre-accent-rgb: 240, 148, 34;
    --wpre-accent-hover: #d6820f;
    --wpre-star-color: #f5a623;
    --wpre-teal: #2ec4b6;
    --wpre-heading-font: Georgia, 'Times New Roman', serif;
    --wpre-section-bg: #fdf8ef;
    --wpre-radius: 22px;
    border-width: 1px;
}

.wpre-template-classic .wpre-recipe-header {
    text-align: center;
}

.wpre-template-classic .wpre-recipe-title {
    font-size: 2.15rem;
    font-weight: 700;
}

.wpre-template-classic .wpre-recipe-description {
    font-style: italic;
    text-align: left;
}

.wpre-template-classic .wpre-total-yield-line .wpre-tyl-item .wpre-icon,
.wpre-template-classic .wpre-total-yield-line em {
    color: var(--wpre-teal);
}

.wpre-template-classic .wpre-ingredients-section .wpre-section-title,
.wpre-template-classic .wpre-instructions-section .wpre-section-title {
    color: var(--wpre-accent);
    font-size: 1.5rem;
    text-align: left;
}

.wpre-template-classic .wpre-recipe-image img {
    height: 400px;
    /* A foto herda os cantos superiores do card (radius 22px) — sem isso,
       cantos retos "estouram" contra o card muito arredondado. */
    border-radius: 22px 22px 0 0;
}

/* Reaproveita o teal do template em mais pontos (antes usado só na linha
   Tempo/Rendimento): overlay de vídeo e links do rodapé social. */
.wpre-template-classic .wpre-video-play-overlay {
    color: var(--wpre-teal);
}

.wpre-template-classic {
    --wpre-footer-icon-color: var(--wpre-teal);
}

/* ---------- MINIMALISTA (imagem 11 — página impressa) ---------- */
.wpre-template-minimalist {
    --wpre-accent: #22262a;
    --wpre-accent-rgb: 34, 38, 42;
    --wpre-accent-hover: #000000;
    --wpre-section-bg: #fafafa;
    --wpre-border-color: #dedede;
    --wpre-muted-color: #7a7a7a;
    --wpre-radius: 0;
    box-shadow: none;
    max-width: 760px;
}

.wpre-template-minimalist .wpre-card-body {
    padding: 2.6rem 3rem 2.4rem;
}

.wpre-template-minimalist .wpre-recipe-header {
    text-align: center;
}

.wpre-template-minimalist .wpre-recipe-title {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.wpre-template-minimalist .wpre-recipe-image {
    margin: 1.6rem auto;
}

.wpre-template-minimalist .wpre-recipe-image img {
    height: 340px;
}

.wpre-template-minimalist .wpre-recipe-description {
    text-align: center;
    font-size: 0.95rem;
}

.wpre-template-minimalist .wpre-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wpre-template-minimalist .wpre-ingredient-item,
.wpre-template-minimalist .wpre-step-text {
    font-size: 0.92rem;
    color: #44484c;
}

.wpre-template-minimalist .wpre-ingredient-amount {
    color: #22262a;
}

.wpre-template-minimalist .wpre-instruction-item {
    margin-bottom: 0.9rem;
}

.wpre-template-minimalist .wpre-column-ingredients .wpre-recipe-section,
.wpre-template-minimalist .wpre-column-instructions .wpre-recipe-section {
    margin-top: 1rem;
}

.wpre-template-minimalist .wpre-actions-inline {
    justify-content: center;
    margin-top: 2rem;
}

/* ---------- EDITORIAL / ELEGANTE (imagem 8 — Tastebite) ---------- */
.wpre-template-elegant {
    --wpre-accent: #f26b3a;
    --wpre-accent-rgb: 242, 107, 58;
    --wpre-accent-hover: #d9552a;
    --wpre-heading-font: Georgia, 'Times New Roman', serif;
    --wpre-section-bg: #f7f7f5;
    --wpre-border-color: #e8e8e4;
    --wpre-radius: 8px;
    max-width: 860px;
    box-shadow: none;
    /* Sem sombra, o card precisa de uma borda perceptível para não "sumir"
       contra fundos claros do tema. */
    border: 1px solid #dcdcd6;
}

.wpre-template-elegant .wpre-card-body {
    padding: 2.4rem 2.6rem;
}

.wpre-template-elegant .wpre-recipe-title {
    font-size: 2.3rem;
    font-weight: 700;
}

/* Byline (autor • data • estrelas) — compartilhada por Moderno e Editorial. */
.wpre-editorial-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.2rem;
    font-size: 0.85rem;
    color: var(--wpre-muted-color);
    margin-bottom: 0.4rem;
}

.wpre-template-elegant .wpre-recipe-image {
    margin: 1.2rem 0;
}

.wpre-template-elegant .wpre-recipe-image img {
    height: 430px;
    border-radius: 8px;
}

.wpre-editorial-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--wpre-border-color);
    border-bottom: 1px solid var(--wpre-border-color);
    margin: 0.6rem 0 1.2rem;
}

.wpre-editorial-chip {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.3;
}

.wpre-chip-label {
    font-size: var(--wpre-fs-label);
    font-weight: var(--wpre-fw-label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--wpre-muted-color);
}

.wpre-chip-value {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--wpre-heading-color);
}

.wpre-editorial-toolbar .wpre-recipe-actions {
    margin: 0 0 0 auto;
}

.wpre-template-elegant .wpre-section-title {
    font-size: 1.3rem;
}

.wpre-template-elegant .wpre-column-ingredients .wpre-recipe-section {
    margin-top: 0.6rem;
}

.wpre-template-elegant .wpre-column-instructions .wpre-recipe-section {
    margin-top: 0.6rem;
}

.wpre-template-elegant .wpre-step-number {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.wpre-template-elegant .wpre-recipe-servings-control {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    gap: 0.55rem;
}

.wpre-template-elegant .wpre-unit-system {
    margin-left: 0;
}

/* ---------- OBSIDIANA NEGRA (imagem 4 — estilos Vibrant/Amber) ---------- */
.wpre-template-bold {
    --wpre-accent: #ffc531;
    --wpre-accent-rgb: 255, 197, 49;
    --wpre-accent-hover: #e6b02b;
    --wpre-card-bg: #17181c;
    --wpre-section-bg: #22242a;
    --wpre-nutrition-bg: rgba(255, 255, 255, 0.08);
    --wpre-text-color: #d9dadf;
    --wpre-muted-color: #9ca1ab;
    --wpre-heading-color: #ffffff;
    --wpre-border-color: #33353d;
    --wpre-star-color: #ffc531;
    --wpre-danger: #ff9b8f;
    --wpre-danger-bg: #3a2326;
    --wpre-radius: 16px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}

.wpre-bold-hero {
    position: relative;
}

.wpre-bold-hero .wpre-recipe-image img {
    height: 470px;
    /* Foto nítida onde não há texto — o gradiente abaixo garante contraste
       apenas na área do título, sem escurecer a imagem inteira. */
}

.wpre-bold-hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3.4rem 2rem 1.4rem;
    background: linear-gradient(180deg, rgba(23, 24, 28, 0) 0%, rgba(23, 24, 28, 0.55) 40%, rgba(23, 24, 28, 0.97) 100%);
}

.wpre-bold-kicker {
    display: inline-block;
    background: var(--wpre-accent);
    color: #17181c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.6rem;
}

.wpre-template-bold .wpre-bold-hero .wpre-recipe-title {
    color: #fff;
    margin-bottom: 0.2rem;
}

.wpre-template-bold .wpre-stats-grid {
    background: var(--wpre-accent);
    border: 0;
    border-radius: 0;
    margin: 0;
    /* Sombra interna no topo suaviza o corte hero escuro → faixa amarela. */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.wpre-template-bold .wpre-stat {
    border-left-color: rgba(23, 24, 28, 0.25);
}

.wpre-template-bold .wpre-stat:hover {
    background: rgba(23, 24, 28, 0.08);
}

.wpre-template-bold .wpre-stat-icon {
    background: rgba(23, 24, 28, 0.12);
}

.wpre-template-bold .wpre-stat-icon,
.wpre-template-bold .wpre-stat-label,
.wpre-template-bold .wpre-stat-value {
    color: #17181c;
}

.wpre-template-bold .wpre-step-number {
    color: #17181c;
}

.wpre-template-bold .wpre-btn {
    background: transparent;
    color: #fff;
}

.wpre-template-bold .wpre-btn:hover {
    color: var(--wpre-accent);
}

.wpre-template-bold .wpre-actions-pill .wpre-btn,
.wpre-template-bold .wpre-btn-submit {
    background: var(--wpre-accent);
    color: #17181c;
}

.wpre-template-bold .wpre-scale-btn,
.wpre-template-bold .wpre-servings-btn,
.wpre-template-bold .wpre-servings-input,
.wpre-template-bold .wpre-unit-system {
    background: var(--wpre-section-bg);
    color: #fff;
}

.wpre-template-bold .wpre-scale-btn.is-active,
.wpre-template-bold .wpre-scale-btn:hover {
    background: var(--wpre-accent);
    color: #17181c;
}

.wpre-template-bold .wpre-notes-content,
.wpre-template-bold .wpre-equipment-row,
.wpre-template-bold .wpre-recipe-servings-control,
.wpre-template-bold .wpre-feedback-cta,
.wpre-template-bold .wpre-social-footer {
    background: var(--wpre-section-bg);
}

/* O realce branco interno do painel (tema claro) não faz sentido no escuro. */
.wpre-template-bold .wpre-section-panel {
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ---------- TERRACOTA (Claude + modernismo geométrico anos 70-80) ---------- */
.wpre-template-terracotta {
    --wpre-accent: #c2653f;
    --wpre-accent-rgb: 194, 101, 63;
    --wpre-accent-hover: #a8532f;
    --wpre-card-bg: #fbf8f2;
    --wpre-section-bg: #f5f0e6;
    --wpre-text-color: #4a3b30;
    --wpre-muted-color: #8a7460;
    --wpre-heading-color: #3a2b22;
    --wpre-heading-font: 'Century Gothic', Futura, Avenir, 'Trebuchet MS', sans-serif;
    --wpre-heading-transform: uppercase;
    --wpre-border-color: rgba(58, 43, 34, 0.14);
    --wpre-star-color: #c2653f;
    --wpre-radius: 6px;
    --wpre-nutrition-bg: rgba(58, 43, 34, 0.06);
    border-width: 2px;
    border-color: #3a2b22;
}

.wpre-template-terracotta .wpre-recipe-title {
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

/* Friso decorativo tipo "sunburst" atrás do cabeçalho — referência direta ao
   modernismo geométrico dos anos 70-80 (posters/discos da época). */
.wpre-terracotta-header {
    position: relative;
    padding-top: 0.4rem;
}

.wpre-terracotta-header::before {
    content: "";
    position: absolute;
    top: -18px;
    right: -18px;
    width: 130px;
    height: 130px;
    background: repeating-radial-gradient(circle at center, var(--wpre-accent-soft) 0, var(--wpre-accent-soft) 3px, transparent 3px, transparent 10px);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.7;
}

.wpre-terracotta-header > * {
    position: relative;
    z-index: 1;
}

.wpre-template-terracotta .wpre-recipe-image img {
    border-bottom: 4px solid var(--wpre-heading-color);
}

.wpre-template-terracotta .wpre-recipe-section {
    border-top: 4px solid var(--wpre-heading-color);
    padding-top: var(--wpre-space-6);
}

.wpre-template-terracotta .wpre-section-title {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

/* Números de passo em quadrado mostarda, não em círculo — assinatura retrô. */
.wpre-template-terracotta .wpre-step-number,
.wpre-template-terracotta .wpre-ingredient-bullet {
    background: #d9a441;
    color: #3a2b22;
    border: 0;
    border-radius: 4px;
    box-shadow: none;
}

.wpre-template-terracotta .wpre-ingredient-check,
.wpre-template-terracotta .wpre-ingredient-check:checked {
    border-radius: 3px;
}

.wpre-template-terracotta .wpre-notes-content {
    border-left: 6px solid var(--wpre-heading-color);
    border-radius: 0;
}

/* ---------- STUDIO (Apple) ---------- */
.wpre-template-studio {
    --wpre-accent: #0071e3;
    --wpre-accent-rgb: 0, 113, 227;
    --wpre-accent-hover: #0059b3;
    --wpre-card-bg: #ffffff;
    --wpre-section-bg: #f5f5f7;
    --wpre-text-color: #424245;
    --wpre-muted-color: #86868b;
    --wpre-heading-color: #1d1d1f;
    --wpre-heading-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --wpre-border-color: #d2d2d7;
    --wpre-star-color: #1d1d1f;
    --wpre-radius: 28px;
    --wpre-nutrition-bg: transparent;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 0;
}

.wpre-template-studio .wpre-card-body {
    padding: 3rem 3.2rem 3.2rem;
}

.wpre-template-studio .wpre-recipe-title {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.wpre-template-studio .wpre-recipe-image img {
    border-radius: 20px;
    height: 440px;
}

.wpre-template-studio .wpre-section-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.wpre-template-studio .wpre-stats-grid {
    background: var(--wpre-section-bg);
    border: 0;
    box-shadow: none;
}

.wpre-template-studio .wpre-stat-icon {
    background: #fff;
}

.wpre-template-studio .wpre-btn {
    border-radius: 999px;
}

.wpre-template-studio .wpre-btn:hover {
    box-shadow: none;
    transform: none;
}

/* Nutrição como "tabela de especificações": linhas finas, sem caixa/borda
   grossa — a mesma linguagem visual das páginas de specs técnicas da Apple. */
.wpre-template-studio .wpre-nutrition-facts {
    background: transparent;
    border-left: 0;
    border-top: 1px solid var(--wpre-border-color);
    border-radius: 0;
    padding: 1.1rem 0;
}

.wpre-template-studio .wpre-nutrition-facts th,
.wpre-template-studio .wpre-nutrition-facts td {
    border-bottom: 1px solid var(--wpre-border-color);
}

/* ---------- GAZETA (NYT Cooking) ---------- */
.wpre-template-gazeta {
    --wpre-accent: #a8232f;
    --wpre-accent-rgb: 168, 35, 47;
    --wpre-accent-hover: #841b25;
    --wpre-card-bg: #fbf9f4;
    --wpre-section-bg: #f3efe4;
    --wpre-text-color: #262422;
    --wpre-muted-color: #6f6a61;
    --wpre-heading-color: #121212;
    --wpre-heading-font: Georgia, 'Times New Roman', serif;
    --wpre-border-color: #ddd6c6;
    --wpre-star-color: #a8232f;
    --wpre-radius: 2px;
    box-shadow: none;
    border: 1px solid #ddd6c6;
}

.wpre-gazeta-masthead {
    text-align: center;
    border-bottom: 3px double var(--wpre-heading-color);
    padding-bottom: 1.2rem;
}

.wpre-template-gazeta .wpre-recipe-title {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.wpre-gazeta-headnote {
    font-style: italic;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.wpre-template-gazeta .wpre-recipe-image img {
    border-radius: 0;
}

.wpre-template-gazeta .wpre-total-yield-line {
    justify-content: center;
    font-style: italic;
}

/* Módulo de receita isolado do texto editorial — régua dupla fina, como o
   quadro de receita destacado do texto no NYT Cooking. */
.wpre-gazeta-recipe-box {
    border-top: 3px double var(--wpre-heading-color);
    border-bottom: 3px double var(--wpre-heading-color);
    padding: 1.8rem 0;
    margin-top: 1.8rem;
}

.wpre-template-gazeta .wpre-section-title {
    font-style: italic;
    font-weight: 700;
}

/* ---------- MÉTODO (Serious Eats) ---------- */
.wpre-template-metodo {
    --wpre-accent: #1f3a5f;
    --wpre-accent-rgb: 31, 58, 95;
    --wpre-accent-hover: #14293f;
    --wpre-card-bg: #ffffff;
    --wpre-section-bg: #f4f6f8;
    --wpre-text-color: #262b30;
    --wpre-muted-color: #62696f;
    --wpre-heading-color: #14181c;
    --wpre-heading-font: Arial, Helvetica, sans-serif;
    --wpre-border-color: #d7dce0;
    --wpre-star-color: #e8a33d;
    --wpre-radius: 4px;
    box-shadow: none;
    border: 1px solid #d7dce0;
}

.wpre-template-metodo .wpre-recipe-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.wpre-template-metodo .wpre-section-title {
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--wpre-heading-color);
    padding-bottom: 0.4rem;
}

.wpre-template-metodo .wpre-stats-grid {
    border-radius: 4px;
    border-top: 3px solid var(--wpre-accent);
}

/* Numeral de passo em caixa quadrada, cor secundária mel — "ficha técnica",
   não decoração. */
.wpre-template-metodo .wpre-step-number {
    background: #e8a33d;
    color: #14181c;
    border-radius: 3px;
    box-shadow: none;
}

/* Quantidades alinhadas (algarismos tabulares) para leitura rápida em lista
   densa — referência direta ao layout de receita do Serious Eats. */
.wpre-template-metodo .wpre-ingredient-amount {
    font-variant-numeric: tabular-nums;
    min-width: 2.6em;
    display: inline-block;
    color: var(--wpre-heading-color);
}

.wpre-template-metodo .wpre-notes-content {
    border-left-color: var(--wpre-accent);
    border-radius: 0;
}

/* ---------- DIÁRIO (blog de receita pessoal — "pular para a receita") ---------- */
.wpre-template-diario {
    --wpre-accent: #ff6f59;
    --wpre-accent-rgb: 255, 111, 89;
    --wpre-accent-hover: #e85940;
    --wpre-card-bg: #fffdfb;
    --wpre-section-bg: #fff7f0;
    --wpre-text-color: #4a3a34;
    --wpre-muted-color: #9c8880;
    --wpre-heading-color: #3a2b25;
    --wpre-heading-font: 'Trebuchet MS', 'Segoe UI', sans-serif;
    --wpre-border-color: #f3ddd0;
    --wpre-star-color: #ff6f59;
    --wpre-radius: 26px;
    box-shadow: 0 12px 34px rgba(255, 111, 89, 0.12);
    border: 0;
}

.wpre-template-diario .wpre-recipe-title {
    font-size: 2.3rem;
    font-weight: 800;
}

.wpre-diario-photo {
    position: relative;
}

.wpre-template-diario .wpre-recipe-image img {
    border-radius: 24px;
    height: 400px;
}

.wpre-diario-rating-badge {
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.wpre-diario-rating-badge .wpre-recipe-rating {
    margin: 0;
}

/* Caixa "Pular para a receita" — recurso de blog pessoal de receita que
   nenhum dos outros 9 templates tem. */
.wpre-jump-to-recipe {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    padding: 0.7rem 1.3rem;
    background: var(--wpre-accent);
    color: #fff;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
}

.wpre-jump-to-recipe:hover {
    background: var(--wpre-accent-hover);
    color: #fff;
}

.wpre-template-diario .wpre-btn {
    border-radius: 999px;
}

.wpre-template-diario .wpre-recipe-servings-control,
.wpre-template-diario .wpre-nutrition-item,
.wpre-template-diario .wpre-notes-content {
    border-radius: 18px;
}

/* ============================================
   4. ÍNDICE, RESPONSIVO E IMPRESSÃO
   ============================================ */
.wpre-recipe-search-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(130px, 180px)) auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 24px;
}

.wpre-recipe-search-form input,
.wpre-recipe-search-form select {
    width: 100%;
    min-height: 40px;
}

.wpre-recipe-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.wpre-recipe-index-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.wpre-recipe-index-card:hover {
    box-shadow: 0 10px 24px rgba(15, 15, 15, 0.1);
    transform: translateY(-3px);
    border-color: #d8dbe0;
}

.wpre-recipe-index-card a {
    color: inherit;
    text-decoration: none;
}

.wpre-recipe-index-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wpre-recipe-index-card:hover img {
    transform: scale(1.03);
}

.wpre-recipe-index-card h3,
.wpre-recipe-index-card p {
    padding: 0 14px;
}

/* Telas médias: reduz o formulário de busca antes do colapso total em 768px. */
@media (max-width: 1024px) {
    .wpre-recipe-search-form {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets em retrato: iguala as duas colunas antes do empilhamento em 768px. */
@media (max-width: 900px) {
    .wpre-two-columns {
        grid-template-columns: 1fr 1fr;
        gap: 1.6rem;
    }
}

@media (max-width: 768px) {
    .wpre-recipe-card {
        margin: 1rem auto;
    }

    .wpre-card-body {
        padding: 1.2rem 1.1rem 1.4rem;
    }

    .wpre-template-minimalist .wpre-card-body,
    .wpre-template-elegant .wpre-card-body {
        padding: 1.4rem 1.2rem;
    }

    .wpre-recipe-image img,
    .wpre-template-modern .wpre-recipe-image img,
    .wpre-template-classic .wpre-recipe-image img,
    .wpre-bold-hero .wpre-recipe-image img,
    .wpre-template-elegant .wpre-recipe-image img,
    .wpre-template-minimalist .wpre-recipe-image img {
        height: 250px;
    }

    .wpre-recipe-title {
        font-size: 1.5rem;
    }

    .wpre-template-classic .wpre-recipe-title,
    .wpre-template-elegant .wpre-recipe-title {
        font-size: 1.65rem;
    }

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

    .wpre-stat:nth-child(2n+1) {
        border-left: 0;
    }

    .wpre-stat {
        border-top: 1px solid var(--wpre-border-color);
    }

    .wpre-stat:nth-child(-n+2) {
        border-top: 0;
    }

    .wpre-two-columns {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .wpre-recipe-actions {
        flex-direction: row;
    }

    .wpre-btn {
        flex: 1 1 calc(50% - 0.7rem);
    }

    .wpre-actions-inline .wpre-btn {
        flex: 0 1 auto;
    }

    .wpre-recipe-servings-control {
        gap: 0.6rem;
    }

    .wpre-unit-system {
        margin-left: 0;
        width: 100%;
    }

    .wpre-editorial-toolbar .wpre-recipe-actions {
        margin-left: 0;
    }

    .wpre-social-footer {
        margin: 2rem -1.1rem -1.4rem;
        padding: 1.4rem 1.2rem;
    }

    .wpre-recipe-search-form {
        grid-template-columns: 1fr;
    }
}

/* Celulares pequenos: ajustes finos abaixo de 480px. */
@media (max-width: 480px) {
    .wpre-recipe-image img,
    .wpre-template-modern .wpre-recipe-image img,
    .wpre-template-classic .wpre-recipe-image img,
    .wpre-bold-hero .wpre-recipe-image img,
    .wpre-template-elegant .wpre-recipe-image img,
    .wpre-template-minimalist .wpre-recipe-image img {
        height: 200px;
    }

    .wpre-recipe-title {
        font-size: 1.375rem;
    }

    /* Com 5-6 stats, 2 colunas fixas apertam demais — auto-fit acomoda melhor. */
    .wpre-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .wpre-btn {
        flex: 1 1 100%;
    }

    .wpre-two-columns {
        gap: var(--wpre-space-4);
    }
}

@media print {
    .wpre-recipe-actions,
    .wpre-recipe-servings-control,
    .wpre-cook-mode,
    .wpre-feedback-cta,
    .wpre-rating-modal,
    .wpre-image-overlay-actions,
    .wpre-social-footer {
        display: none !important;
    }

    .wpre-recipe-card {
        /* Paleta econômica: títulos/acentos em cinza escuro em vez da cor do
           template (laranja/terracota gastam tinta colorida sem ganho). */
        --wpre-accent: #333;
        --wpre-accent-rgb: 51, 51, 51;
        box-shadow: none;
        border: 1px solid #bbb;
        /* Cantos muito arredondados (até 22px no Clássico) serrilham em
           impressoras a laser simples. */
        border-radius: 0 !important;
        max-width: none;
        margin: 0;
    }

    /* Foto ao lado do título (padrão WPZOOM): economiza papel. */
    .wpre-recipe-image {
        float: left;
        width: 38%;
        margin: 0 16px 8px 0;
    }

    .wpre-recipe-image img {
        max-height: 200px;
        height: auto;
        width: 100%;
        object-fit: cover;
    }

    .wpre-recipe-header {
        overflow: hidden;
    }

    .wpre-recipe-section,
    .wpre-instruction-item,
    .wpre-ingredient-item {
        break-inside: avoid;
    }

    /* A faixa amarela do Obsidiana Negra deve manter o fundo mesmo quando a
       impressora suprime cores de fundo por padrão. */
    .wpre-bold-kicker {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
