/* ============================================
   Es Vegano? — Ajustes de UX/UI
   Sobrescribe y complementa la plantilla base
   ============================================ */

/* Variables de color — Modo Claro */
:root {
    --ev-primary: #E88F2A;
    --ev-primary-dark: #d17a1b;
    --ev-text: #2c3038;
    --ev-text-muted: #5a626a;
    --ev-bg-soft: #FAFAF8;
    --ev-card-bg: #FFFFFF;
    --ev-border: rgba(0, 0, 0, 0.08);
    --ev-border-strong: #ced4da;
    --ev-apto: #2E7D32;
    --ev-noapto: #C62828;
    --ev-faltainfo: #F9A825;
}

/* Variables de color — Modo Oscuro */
[data-theme="dark"] {
    --ev-primary: #E88F2A;
    --ev-primary-dark: #f09f42;
    --ev-text: #E4E6EB;
    --ev-text-muted: #B0B3B8;
    --ev-bg-soft: #121212;
    --ev-card-bg: #1E1E1E;
    --ev-border: rgba(255, 255, 255, 0.12);
    --ev-border-strong: #444444;
    --ev-apto: #4CAF50;
    --ev-noapto: #EF5350;
    --ev-faltainfo: #FFCA28;
}

/* Layout base y sticky footer */
html {
    height: 100%;
    background-color: var(--ev-bg-soft);
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    color: var(--ev-text);
    background-color: var(--ev-bg-soft);
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.site-footer-wrapper {
    margin-top: auto !important;
}

h1, h2, h3, h4, h5, h6,
.display-4, .display-5 {
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.02em;
}

.text-uppercase {
    letter-spacing: 0.04em;
}

.font-secondary {
    font-family: 'Pacifico', cursive;
    letter-spacing: 0;
}

/* Títulos de sección */
.section-title h2.font-secondary {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-title h1.display-4 {
    font-size: 2.5rem;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .section-title h1.display-4 {
        font-size: 1.75rem;
    }
}

/* Cards de producto */
.product-card {
    background: var(--ev-card-bg);
    border: 1px solid var(--ev-border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--ev-bg-soft);
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.45em 0.9em;
    border-radius: 0.25rem;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.badge-apto {
    background-color: var(--ev-apto);
}

.badge-noapto {
    background-color: var(--ev-noapto);
}

.badge-faltainfo {
    background-color: var(--ev-faltainfo);
    color: #333;
}

.product-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.product-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ev-primary);
    margin-bottom: 0.5rem;
}

.product-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--ev-text);
}

.product-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ev-text-muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
}

.product-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ev-primary);
    text-decoration: none;
    margin-top: auto;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.product-link:hover {
    color: var(--ev-primary-dark);
    text-decoration: underline;
}

/* Detalle de producto */
.product-detail-image {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    aspect-ratio: 4 / 3;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    display: block;
}

@media (max-width: 575.98px) {
    .product-detail-image {
        aspect-ratio: 1 / 1;
        max-height: 360px;
    }
}

[data-theme="dark"] .product-detail-image {
    background-color: var(--ev-card-bg) !important;
    border-color: var(--ev-border) !important;
}

.product-detail-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.65rem, 4.5vw, 2.35rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ev-text, #2B2825);
    word-break: break-word;
}

.product-main-card {
    border-radius: 0.75rem;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
}

.product-image-block {
    max-width: 100%;
}

.ingredient-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 2rem;
    background-color: #f1f3f5;
    color: var(--ev-text);
    border: 1px solid var(--ev-border);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ingredient-chip:hover {
    background-color: #e9ecef;
}

[data-theme="dark"] .ingredient-chip {
    background-color: #242526;
    border-color: #383838;
    color: #e4e6eb;
}

.product-spec-box {
    border-radius: 0.65rem;
    border: 1px solid var(--ev-border);
    background-color: #f8f9fa;
}

[data-theme="dark"] .product-spec-box {
    background-color: var(--ev-card-bg);
    border-color: var(--ev-border);
}

.product-spec-item {
    background-color: #ffffff;
    border: 1px solid var(--ev-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    height: 100%;
}

[data-theme="dark"] .product-spec-item {
    background-color: #242526;
    border-color: #383838;
}

[data-theme="dark"] .product-main-card {
    background-color: var(--ev-card-bg) !important;
    border-color: var(--ev-border) !important;
}

.product-detail-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.product-detail-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

[data-theme="dark"] .product-detail-section {
    border-bottom-color: #383838;
}

.product-detail-section h4 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.18rem, 3.5vw, 1.35rem);
    font-weight: 700;
    color: var(--ev-primary);
    margin-bottom: 0.5rem;
}

.product-detail-text {
    font-size: clamp(1.02rem, 2.7vw, 1.1rem);
    line-height: 1.7;
    color: var(--ev-text, #2B2825);
    margin-bottom: 0;
}

.btn-outline-primary {
    border-color: var(--ev-primary);
    color: var(--ev-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ev-primary);
    border-color: var(--ev-primary);
    color: #fff;
}

/* Indicador de clasificación en detalle de producto */
.product-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    border-radius: 0.75rem;
    border-left: 6px solid;
    margin-bottom: 1.25rem;
}

.status-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.status-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.status-text {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.45;
}

@media (max-width: 575.98px) {
    .product-status {
        padding: 1rem 1.15rem;
        gap: 0.85rem;
    }

    .status-icon {
        font-size: 2.3rem;
    }

    .status-title {
        font-size: 1.4rem;
    }

    .status-text {
        font-size: 1.05rem;
        line-height: 1.55;
    }
}

.status-apto {
    background-color: rgba(46, 125, 50, 0.1);
    border-color: var(--ev-apto);
    color: var(--ev-apto);
}

.status-apto .status-title,
.status-apto .status-text {
    color: var(--ev-apto);
}

.status-noapto {
    background-color: rgba(198, 40, 40, 0.1);
    border-color: var(--ev-noapto);
    color: var(--ev-noapto);
}

.status-noapto .status-title,
.status-noapto .status-text {
    color: var(--ev-noapto);
}

.status-faltainfo {
    background-color: rgba(249, 168, 37, 0.12);
    border-color: var(--ev-faltainfo);
    color: #b07800;
}

.status-faltainfo .status-title,
.status-faltainfo .status-text {
    color: #b07800;
}

/* Tarjeta destacada de Observaciones importantes y advertencias éticas */
.product-observaciones-card {
    background: linear-gradient(135deg, #fffdfa 0%, #fff8eb 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-left: 6px solid #d97706;
    border-radius: 0.75rem;
    padding: 1.15rem 1.35rem;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.08);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-observaciones-card:hover {
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.12);
}

.product-observaciones-icon {
    font-size: 1.45rem;
    color: #d97706;
    flex-shrink: 0;
}

.product-observaciones-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.22rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #92400e;
    letter-spacing: 0.02em;
}

.product-observaciones-text {
    font-size: 0.98rem;
    line-height: 1.6;
    color: #451a03;
}

@media (max-width: 575.98px) {
    .product-observaciones-card {
        padding: 0.95rem 1.1rem;
    }

    .product-observaciones-title {
        font-size: 1.1rem;
    }

    .product-observaciones-text {
        font-size: 0.95rem;
    }
}

/* Tabla de ingredientes sospechosos */
.tipo-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35em 0.75em;
    border-radius: 0.25rem;
    color: #fff;
}

.tipo-vegano {
    background-color: var(--ev-apto);
    color: #ffffff;
}

.tipo-no-vegano {
    background-color: var(--ev-noapto);
}

.tipo-potencial {
    background-color: var(--ev-faltainfo);
    color: #333;
}

.tipo-dudoso,
.badge-dudoso {
    background-color: #555e66 !important;
    color: #ffffff !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(232, 143, 42, 0.05);
}

/* Ajustes responsive */
@media (max-width: 767px) {
    .product-image-wrapper {
        aspect-ratio: 16 / 9;
    }

    .product-body {
        padding: 1.25rem;
    }
}

/* ==========================================================================
   MEJORAS EN BOTONES (UX/UI: ELIMINACIÓN DE SUB-BORDE Y LEGIBILIDAD)
   ========================================================================== */

/* 1. Supresión total del sub-borde interno blanco invasivo en botones */
.btn.border-inner::before,
button.border-inner::before,
a.btn.border-inner::before,
input.border-inner::before,
.btn .border-inner::before,
.btn::before {
    display: none !important;
    content: none !important;
}

/* 2. Botón Primario Verde: Alto contraste, texto blanco nítido */
.btn-primary {
    color: #ffffff !important;
    background-color: #0d7313 !important;
    border-color: #0a5c0f !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 4px rgba(13, 115, 19, 0.2);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus {
    color: #ffffff !important;
    background-color: #09520e !important;
    border-color: #07400a !important;
    box-shadow: 0 4px 10px rgba(13, 115, 19, 0.35) !important;
}

.btn-primary:active,
.btn-primary.active {
    color: #ffffff !important;
    background-color: #07400a !important;
    border-color: #053008 !important;
}

.btn-primary,
.btn-primary *,
.btn-primary i,
.btn-primary span {
    color: #ffffff !important;
}

/* 3. Botones de Éxito (Success) */
.btn-success {
    color: #ffffff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.btn-success:hover,
.btn-success:focus {
    color: #ffffff !important;
    background-color: #146c43 !important;
    border-color: #13653f !important;
}

.btn-success,
.btn-success *,
.btn-success i,
.btn-success span {
    color: #ffffff !important;
}

/* 4. Barra de Filtros de Catálogo: Alineación y Alturas Homogéneas */
.filter-card-responsive {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.filter-card-responsive .form-control,
.filter-card-responsive .form-select,
.filter-card-responsive .btn {
    min-height: 42px;
    height: 42px;
    border-radius: 6px;
}

.filter-card-responsive .form-control,
.filter-card-responsive .form-select {
    font-size: 0.95rem;
    border-color: #d0d7de;
}

.filter-card-responsive .form-control:focus,
.filter-card-responsive .form-select:focus {
    border-color: #0d7313;
    box-shadow: 0 0 0 0.2rem rgba(13, 115, 19, 0.2);
}

.filter-card-responsive .input-group > .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.filter-card-responsive .input-group > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-color: #d0d7de;
    background-color: #f8f9fa;
    color: #495057 !important;
}

.filter-card-responsive .input-group > .btn:hover {
    background-color: #e9ecef;
    color: #212529 !important;
}

.filter-card-responsive .btn-primary {
    border-radius: 6px;
    font-size: 0.95rem;
}

/* Modo oscuro para tarjeta de filtros */
[data-theme="dark"] .filter-card-responsive {
    background-color: var(--ev-card-bg) !important;
    border-color: var(--ev-border) !important;
}

[data-theme="dark"] .filter-card-responsive .form-control,
[data-theme="dark"] .filter-card-responsive .form-select {
    background-color: #1e1e1e;
    border-color: #333333;
    color: #f0f0f0;
}

[data-theme="dark"] .filter-card-responsive .input-group > .btn {
    background-color: #2a2a2a;
    border-color: #333333;
    color: #e0e0e0 !important;
}

/* Ajuste de pills/tab de productos */
.nav-pills.color-primary .nav-item {
    color: var(--ev-primary);
    font-weight: 600;
}

/* Paginación con colores del tema */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: var(--ev-text);
    border-color: rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    color: var(--ev-primary);
    background-color: rgba(232, 143, 42, 0.08);
    border-color: var(--ev-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--ev-primary);
    border-color: var(--ev-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(232, 143, 42, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #aaaaaa;
    background-color: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.08);
}

/* Enlaces y utilidades de directorio */
.hover-primary {
    transition: color 0.15s ease-in-out;
}

.hover-primary:hover {
    color: var(--ev-primary) !important;
}

.ingredient-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ingredient-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

/* ============================================
   Ajustes de Contraste y Accesibilidad (WCAG)
   ============================================ */

/* Corrección de contraste: la plantilla redefinió secondary a #FAF3EB (color crema claro).
   Restauramos gris legible para textos, botones y badges secundarios en contenido claro */
.text-secondary {
    color: var(--ev-text-muted) !important;
}

/* En el pie de página oscuro se preserva el texto crema claro para legibilidad */
.bg-img.text-secondary,
.container-fluid.text-secondary,
.container-fluid[style*="background: #111111"] {
    color: #FAF3EB !important;
}

/* Botones outline secondary con buen contraste */
.btn-outline-secondary {
    color: var(--ev-text) !important;
    border-color: var(--ev-border-strong) !important;
    background-color: var(--ev-card-bg) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
    color: #ffffff !important;
    background-color: #5c636a !important;
    border-color: #5c636a !important;
}

/* Botones secondary sólidos con contraste asegurado */
.btn-secondary {
    color: #ffffff !important;
    background-color: #5c636a !important;
    border-color: #5c636a !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active {
    color: #ffffff !important;
    background-color: #495057 !important;
    border-color: #495057 !important;
}

/* Pills de categorías y filtros reutilizables */
.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ev-card-bg);
    color: var(--ev-text);
    border: 1px solid var(--ev-border-strong);
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.5;
}

.category-pill:hover {
    background-color: var(--ev-primary);
    color: #ffffff !important;
    border-color: var(--ev-primary);
    box-shadow: 0 2px 8px rgba(232, 143, 42, 0.25);
}

.category-pill.active {
    background-color: var(--ev-primary) !important;
    color: #ffffff !important;
    border-color: var(--ev-primary) !important;
    box-shadow: 0 3px 10px rgba(232, 143, 42, 0.35);
}

/* Navegación por pestañas (Nav Pills) */
.nav-pills .nav-link {
    color: var(--ev-text);
    background-color: transparent;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-pills .nav-link:hover {
    color: var(--ev-primary);
    background-color: rgba(232, 143, 42, 0.08);
}

.nav-pills .nav-link.active {
    color: #ffffff !important;
    background-color: var(--ev-primary) !important;
    box-shadow: 0 2px 8px rgba(232, 143, 42, 0.35);
}

/* Switches de formulario */
.form-switch .form-check-input:checked {
    background-color: var(--ev-primary);
    border-color: var(--ev-primary);
}

/* Botón de cambio de tema (Light / Dark mode toggle) */
.theme-toggle-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: transparent;
    color: #f8f9fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--ev-primary);
    border-color: var(--ev-primary);
    transform: scale(1.06);
}

/* ============================================
   Estilos específicos de MODO OSCURO
   ============================================ */

[data-theme="dark"] html,
[data-theme="dark"] body {
    background-color: #121212 !important;
    color: var(--ev-text);
}

/* Encabezados en modo oscuro */
[data-theme="dark"] h1:not(.text-white):not(.text-primary),
[data-theme="dark"] h2:not(.text-white):not(.text-primary),
[data-theme="dark"] h3:not(.text-white):not(.text-primary),
[data-theme="dark"] h4:not(.text-white):not(.text-primary),
[data-theme="dark"] h5:not(.text-white):not(.text-primary),
[data-theme="dark"] h6:not(.text-white):not(.text-primary),
[data-theme="dark"] .display-4:not(.text-white):not(.text-primary),
[data-theme="dark"] .display-5:not(.text-white):not(.text-primary) {
    color: #F0F2F5 !important;
}

/* Tarjetas y superficies */
[data-theme="dark"] .card,
[data-theme="dark"] .bg-white {
    background-color: var(--ev-card-bg) !important;
    color: var(--ev-text);
    border-color: var(--ev-border) !important;
}

[data-theme="dark"] .bg-light {
    background-color: #242526 !important;
    color: var(--ev-text) !important;
    border-color: #383838 !important;
}

/* Textos muted y secundarios */
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
    color: var(--ev-text-muted) !important;
}

[data-theme="dark"] .text-dark {
    color: #F0F2F5 !important;
}

/* Topbar en modo oscuro */
[data-theme="dark"] .bg-secondary {
    background-color: #1A1A1A !important;
    color: #E4E6EB !important;
}

[data-theme="dark"] .bg-secondary h6 {
    color: #FFFFFF !important;
}

[data-theme="dark"] .bg-secondary span {
    color: #B0B3B8 !important;
}

/* Controles de formulario */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #242526 !important;
    color: #F0F2F5 !important;
    border-color: #444444 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #2A2A2A !important;
    color: #FFFFFF !important;
    border-color: var(--ev-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(232, 143, 42, 0.25) !important;
}

[data-theme="dark"] .form-control::placeholder {
    color: #8E8E93 !important;
}

[data-theme="dark"] .form-label {
    color: #E4E6EB !important;
}

[data-theme="dark"] .input-group-text {
    background-color: #2A2A2A !important;
    color: #B0B3B8 !important;
    border-color: #444444 !important;
}

/* Tablas */
[data-theme="dark"] .table {
    color: var(--ev-text) !important;
    border-color: #333333 !important;
}

[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: var(--ev-card-bg) !important;
    color: var(--ev-text) !important;
    border-bottom-color: #333333 !important;
}

[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(232, 143, 42, 0.12) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

[data-theme="dark"] .table-light > * > * {
    background-color: #262626 !important;
    color: #E4E6EB !important;
}

[data-theme="dark"] tr.table-warning > * {
    background-color: rgba(249, 168, 37, 0.15) !important;
    color: #FFF !important;
}

/* Menús desplegables */
[data-theme="dark"] .dropdown-menu {
    background-color: #242526 !important;
    border-color: #383838 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .dropdown-item {
    color: #E4E6EB !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: rgba(232, 143, 42, 0.15) !important;
    color: var(--ev-primary) !important;
}

/* List Groups y Autocompletado Predictivo en Modo Claro y Oscuro */
.predictive-search-results {
    background-color: var(--ev-card-bg) !important;
    border: 1px solid var(--ev-border-strong) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22) !important;
    border-radius: 0.5rem !important;
    overflow-y: auto;
    z-index: 1060;
}

[data-theme="dark"] .predictive-search-results {
    background-color: #242526 !important;
    border-color: #3e4042 !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65) !important;
}

.predictive-search-item {
    background-color: transparent !important;
    color: var(--ev-text) !important;
    border-bottom: 1px solid var(--ev-border) !important;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.predictive-search-item:last-child {
    border-bottom: none !important;
}

.predictive-search-item:hover,
.predictive-search-item:focus {
    background-color: rgba(232, 143, 42, 0.12) !important;
}

[data-theme="dark"] .predictive-search-item:hover,
[data-theme="dark"] .predictive-search-item:focus {
    background-color: rgba(232, 143, 42, 0.22) !important;
}

.predictive-search-item .prod-title {
    color: var(--ev-text) !important;
    font-weight: 700;
}

.predictive-search-item:hover .prod-title {
    color: var(--ev-primary) !important;
}

.predictive-search-item .prod-meta {
    color: var(--ev-text-muted) !important;
}

.predictive-search-item .badge-id {
    background-color: rgba(125, 125, 125, 0.18) !important;
    color: var(--ev-text) !important;
    border: 1px solid var(--ev-border) !important;
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .predictive-search-item .badge-id {
    background-color: #333538 !important;
    color: #E4E6EB !important;
    border-color: #4a4d50 !important;
}

[data-theme="dark"] .list-group-item {
    background-color: var(--ev-card-bg) !important;
    color: var(--ev-text) !important;
    border-color: var(--ev-border) !important;
}

[data-theme="dark"] .list-group-item-action:hover,
[data-theme="dark"] .list-group-item-action:focus {
    background-color: rgba(232, 143, 42, 0.15) !important;
    color: var(--ev-primary) !important;
}

/* Modales */
[data-theme="dark"] .modal-content {
    background-color: #1E1E1E !important;
    color: var(--ev-text) !important;
    border-color: #333333 !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #333333 !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Breadcrumb */
[data-theme="dark"] .breadcrumb {
    background-color: var(--ev-card-bg) !important;
}

[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: var(--ev-text-muted) !important;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--ev-text) !important;
}

/* Paginación en modo oscuro */
[data-theme="dark"] .pagination .page-link {
    background-color: var(--ev-card-bg);
    border-color: #383838;
    color: var(--ev-text);
}

[data-theme="dark"] .pagination .page-link:hover {
    background-color: rgba(232, 143, 42, 0.15);
    color: var(--ev-primary);
    border-color: var(--ev-primary);
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: #181818;
    border-color: #262626;
    color: #666666;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--ev-primary);
    border-color: var(--ev-primary);
    color: #ffffff;
}

/* Botones outline en modo oscuro */
[data-theme="dark"] .btn-outline-dark {
    color: #E4E6EB !important;
    border-color: #555555 !important;
    background-color: transparent !important;
}

[data-theme="dark"] .btn-outline-dark:hover {
    color: #121212 !important;
    background-color: #E4E6EB !important;
    border-color: #E4E6EB !important;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #E4E6EB !important;
    border-color: #444444 !important;
    background-color: #242526 !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    color: #ffffff !important;
    background-color: #5c636a !important;
    border-color: #5c636a !important;
}

/* Botón toggle de tema en modo oscuro */
[data-theme="dark"] .theme-toggle-btn {
    color: #FFCA28;
    border-color: rgba(255, 202, 40, 0.4);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    background-color: rgba(255, 202, 40, 0.15);
    border-color: #FFCA28;
}

/* Bloques de código */
[data-theme="dark"] pre,
[data-theme="dark"] code {
    background-color: #242526;
    color: #E4E6EB;
}

/* Bordes y separadores */
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Lema en sección Definición del Veganismo */
.veganismo-lema {
    color: var(--ev-primary) !important;
    font-size: clamp(1.4rem, 3.2vw, 2.2rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

[data-theme="dark"] .veganismo-lema {
    color: var(--ev-primary-dark, #f09f42) !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Buscador asincrónico y selector de ingredientes
   ============================================ */
.ingrediente-search-container {
    position: relative;
}

.ingredientes-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background-color: var(--ev-card-bg, #ffffff);
    border: 1px solid var(--ev-border-strong, #ced4da);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.ingrediente-item-option {
    padding: 10px 14px;
    border-bottom: 1px solid var(--ev-border, rgba(0, 0, 0, 0.06));
    cursor: pointer;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ingrediente-item-option:last-child {
    border-bottom: none;
}

.ingrediente-item-option:hover,
.ingrediente-item-option:focus,
.ingrediente-item-option.active {
    background-color: var(--ev-bg-soft, #f8f9fa);
}

[data-theme="dark"] .ingredientes-dropdown {
    background-color: #1e1e1e;
    border-color: #444444;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .ingrediente-item-option:hover,
[data-theme="dark"] .ingrediente-item-option:focus,
[data-theme="dark"] .ingrediente-item-option.active {
    background-color: #2a2a2a;
}

/* Chips de ingredientes seleccionados */
.ingredientes-chips-box {
    min-height: 52px;
    padding: 8px;
    border-radius: 0.5rem;
    border: 1px dashed var(--ev-border-strong, #ced4da);
    background-color: var(--ev-bg-soft, #fafafa);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .ingredientes-chips-box {
    background-color: #1a1a1a;
    border-color: #444444;
}

.ingrediente-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: var(--ev-card-bg, #ffffff);
    border: 1px solid var(--ev-border-strong, #dee2e6);
    border-radius: 50rem;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.ingrediente-chip:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.ingrediente-chip a.ingrediente-chip-link {
    color: var(--ev-text, #212529);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ingrediente-chip a.ingrediente-chip-link:hover {
    color: var(--ev-primary, #0d7313) !important;
    text-decoration: underline;
}

.ingrediente-chip .btn-remove-chip {
    background: none;
    border: none;
    padding: 0;
    margin-left: 4px;
    color: var(--ev-text-muted, #6c757d);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ingrediente-chip .btn-remove-chip:hover {
    color: #dc3545;
}

[data-theme="dark"] .ingrediente-chip {
    background-color: #252525;
    border-color: #444444;
    color: var(--ev-text, #e4e6eb);
}

[data-theme="dark"] .ingrediente-chip a.ingrediente-chip-link {
    color: var(--ev-text, #e4e6eb) !important;
}

[data-theme="dark"] .ingrediente-chip a.ingrediente-chip-link:hover {
    color: var(--ev-primary-light, #2ecc71) !important;
}

/* Tarjetas selectoras de clasificación */
.clasificacion-card {
    border: 2px solid var(--ev-border-strong, #dee2e6);
    border-radius: 0.5rem;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--ev-card-bg, #ffffff);
    display: block;
    height: 100%;
}

.clasificacion-card:hover {
    border-color: var(--ev-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.clasificacion-card.selected-apto {
    border-color: var(--ev-apto, #2E7D32) !important;
    background-color: rgba(46, 125, 50, 0.07);
}

.clasificacion-card.selected-noapto {
    border-color: var(--ev-noapto, #C62828) !important;
    background-color: rgba(198, 40, 40, 0.07);
}

.clasificacion-card.selected-faltainfo {
    border-color: var(--ev-faltainfo, #F9A825) !important;
    background-color: rgba(249, 168, 37, 0.08);
}

[data-theme="dark"] .clasificacion-card {
    background-color: #1e1e1e;
    border-color: #444444;
}

[data-theme="dark"] .clasificacion-card.selected-apto {
    background-color: rgba(76, 175, 80, 0.15);
}

[data-theme="dark"] .clasificacion-card.selected-noapto {
    background-color: rgba(239, 83, 80, 0.15);
}

[data-theme="dark"] .clasificacion-card.selected-faltainfo {
    background-color: rgba(255, 202, 40, 0.15);
}

/* Previsualización de imágenes */
.image-preview-thumb {
    position: relative;
    display: inline-block;
    width: 90px;
    height: 90px;
    border-radius: 0.4rem;
    overflow: hidden;
    border: 2px solid var(--ev-border-strong, #dee2e6);
    background-color: #f8f9fa;
    margin-right: 8px;
    margin-bottom: 8px;
}

.image-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[data-theme="dark"] .image-preview-thumb {
    background-color: #2a2a2a;
    border-color: #444444;
}

/* ============================================
   Miniaturas y Galería Unificada de Productos
   ============================================ */
.cursor-pointer {
    cursor: pointer;
}

.product-thumbnails {
    margin-top: 10px;
}

.product-thumb-item {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 0.45rem;
    overflow: hidden;
    border: 2px solid var(--ev-border-strong, #dee2e6);
    background-color: var(--ev-card-bg, #ffffff);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb-item:hover {
    border-color: var(--ev-primary, #E88F2A);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.product-thumb-item.active {
    border-color: var(--ev-primary, #E88F2A);
    box-shadow: 0 0 0 2px rgba(232, 143, 42, 0.4);
}

.product-thumb-item .thumb-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.thumb-badge-principal {
    background-color: var(--ev-primary, #E88F2A);
}

.thumb-badge-ingredientes {
    background-color: #198754;
}

.thumb-badge-adicional {
    background-color: #6c757d;
}

.galeria-card {
    transition: all 0.25s ease;
}

.galeria-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
}

.galeria-card-link {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.galeria-card-link:hover {
    opacity: 0.9;
}

[data-theme="dark"] .product-thumb-item {
    background-color: #242526;
    border-color: #444444;
}

[data-theme="dark"] .galeria-card .bg-white {
    background-color: #1e1e1e !important;
}

/* Badges sutiles y filtros de ingrediente en modo oscuro */
[data-theme="dark"] .bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.2) !important;
    color: #75b798 !important;
}
[data-theme="dark"] .bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #ea868f !important;
}
[data-theme="dark"] .bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #ffda6a !important;
}
[data-theme="dark"] .bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.25) !important;
    color: #c0c6cc !important;
}
[data-theme="dark"] .border-success-subtle {
    border-color: rgba(25, 135, 84, 0.35) !important;
}
[data-theme="dark"] .border-danger-subtle {
    border-color: rgba(220, 53, 69, 0.35) !important;
}
[data-theme="dark"] .border-warning-subtle {
    border-color: rgba(255, 193, 7, 0.35) !important;
}
[data-theme="dark"] .border-secondary-subtle {
    border-color: rgba(108, 117, 125, 0.35) !important;
}

/* Utilidades para administración de usuarios */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08) !important;
}
.hover-primary:hover {
    color: var(--ev-primary) !important;
}
.bg-primary-subtle {
    background-color: rgba(232, 143, 42, 0.12) !important;
    color: var(--ev-primary) !important;
}
.border-primary-subtle {
    border-color: rgba(232, 143, 42, 0.3) !important;
}
[data-theme="dark"] .bg-primary-subtle {
    background-color: rgba(232, 143, 42, 0.2) !important;
    color: #f09f42 !important;
}
[data-theme="dark"] .border-primary-subtle {
    border-color: rgba(232, 143, 42, 0.35) !important;
}
[data-theme="dark"] .hover-lift:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35) !important;
}

/* Pantalla de invitación para registro de aportes */
.community-invite-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.community-invite-card:hover {
    transform: translateY(-2px);
}
[data-theme="dark"] .card-footer.bg-white {
    background-color: var(--ev-card-bg) !important;
    border-color: var(--ev-border) !important;
}

/* ==========================================================================
   Historial Granular de Cambios y Trazabilidad de Productos
   ========================================================================== */
.timeline-historial {
    position: relative;
    padding-left: 24px;
}

.timeline-historial::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 7px;
    width: 2px;
    background: #dee2e6;
}

[data-theme="dark"] .timeline-historial::before {
    background: #3e4042;
}

.timeline-historial .timeline-item {
    position: relative;
}

.timeline-historial .timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--ev-primary);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(232, 143, 42, 0.25);
    z-index: 1;
}

[data-theme="dark"] .timeline-historial .timeline-item::before {
    border-color: #1e1e1e;
    box-shadow: 0 0 0 2px rgba(232, 143, 42, 0.4);
}

.timeline-historial .timeline-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

[data-theme="dark"] .table-white {
    background-color: #2a2b2d !important;
    color: #f0f2f5 !important;
}

[data-theme="dark"] .table-bordered {
    border-color: #3e4042 !important;
}

[data-theme="dark"] .table-bordered td,
[data-theme="dark"] .table-bordered th {
    border-color: #3e4042 !important;
}

/* ==========================================================================
   Optimizaciones de Responsividad y Espacio (Móviles & Tablets)
   ========================================================================== */

/* Marca / Logo responsive en navbar */
.mobile-brand-logo {
    font-size: clamp(1.1rem, 4.5vw, 1.45rem);
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .mobile-brand-logo i {
        font-size: 1.35rem !important;
        margin-right: 0.4rem !important;
    }
}

/* Píldoras de categorías y tipos deslizables por gestos táctiles en móvil y tablet */
.category-pills-container {
    width: 100%;
}

.category-pills-scroll {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 6px;
    padding-top: 2px;
}

.category-pills-scroll::-webkit-scrollbar {
    display: none;
}

.category-pills-scroll .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .category-pills-scroll {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
        padding-bottom: 0;
    }
}

/* ============================================
   Índice Alfabético con Scroll Horizontal Táctil
   ============================================ */
.alphabet-nav-wrapper {
    background: var(--ev-card-bg);
    border: 1px solid var(--ev-border);
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.alphabet-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding: 3px 1px 6px 1px;
}

.alphabet-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.alphabet-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--ev-border-strong);
    border-radius: 4px;
}

.alphabet-scroll-track {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 0;
}

.alphabet-pill {
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--ev-text);
    background: var(--ev-bg-soft);
    border: 1px solid var(--ev-border);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
    user-select: none;
}

.alphabet-pill:hover:not(.disabled) {
    color: #ffffff;
    background-color: var(--ev-primary);
    border-color: var(--ev-primary);
}

.alphabet-pill.active {
    color: #ffffff !important;
    background-color: var(--ev-primary) !important;
    border-color: var(--ev-primary) !important;
    box-shadow: 0 2px 8px rgba(232, 143, 42, 0.35);
}

.alphabet-pill.disabled {
    pointer-events: none;
    opacity: 0.35;
    background: transparent;
    cursor: default;
}

[data-theme="dark"] .alphabet-nav-wrapper {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .alphabet-pill {
    background: #282828;
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--ev-text);
}

[data-theme="dark"] .alphabet-pill.active {
    color: #ffffff !important;
    background-color: var(--ev-primary) !important;
    border-color: var(--ev-primary) !important;
}

[data-theme="dark"] .alphabet-pill.disabled {
    background: transparent;
    opacity: 0.25;
}


/* Footer con margen superior adaptable */
.site-footer {
    margin-top: clamp(35px, 7vw, 90px);
}

.footer-brand-card {
    min-height: 180px;
}

.footer-quick-links a {
    color: #adb5bd !important;
    transition: color 0.2s ease;
}

.footer-quick-links a:hover {
    color: var(--ev-primary) !important;
    text-decoration: underline !important;
}

.footer-quick-links a.fw-bold {
    color: #ffffff !important;
}


/* Espaciados de secciones adaptados a pantallas móviles y tablets */
@media (max-width: 767.98px) {
    .container-fluid.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .container.py-5 {
        padding-top: 1.75rem !important;
        padding-bottom: 1.75rem !important;
    }
}

@media (max-width: 575.98px) {
    .product-body {
        padding: 0.95rem !important;
    }

    .ingredient-card .card-body {
        padding: 0.95rem !important;
    }
}

/* Tira de miniaturas táctil para la galería del detalle del producto */
#galeriaMiniaturas {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#galeriaMiniaturas::-webkit-scrollbar {
    display: none;
}

#galeriaMiniaturas .gallery-thumb {
    flex-shrink: 0;
    min-width: 64px;
    max-width: 80px;
}

/* ==========================================================================
   ESCALA TIPOGRÁFICA AUMENTADA PARA DISPOSITIVOS MÓVILES Y TABLETS
   Garantiza lectura cómoda "anti-small" en smartphones y tablets sin zoom
   ========================================================================== */

@media (max-width: 767.98px) {
    /* 1. Base tipográfica del documento: rem scale base */
    html {
        font-size: 16.5px;
    }

    body {
        font-size: 1.05rem;
        line-height: 1.68;
    }

    p {
        font-size: 1.05rem;
        line-height: 1.68;
    }

    p.lead {
        font-size: 1.18rem;
        line-height: 1.65;
    }

    /* 2. Textos pequeños y secundarios legibles (erradica micro-fuentes de 10-12px) */
    small,
    .small {
        font-size: 0.94rem !important;
        line-height: 1.55 !important;
    }

    /* 3. Escala armónica de encabezados en pantalla móvil */
    h1, .h1 {
        font-size: clamp(1.85rem, 5.5vw, 2.35rem);
        line-height: 1.25;
    }

    h2, .h2 {
        font-size: clamp(1.55rem, 4.8vw, 1.85rem);
        line-height: 1.3;
    }

    h3, .h3 {
        font-size: clamp(1.35rem, 4.2vw, 1.55rem);
        line-height: 1.35;
    }

    h4, .h4 {
        font-size: clamp(1.2rem, 3.8vw, 1.38rem);
        line-height: 1.4;
    }

    h5, .h5 {
        font-size: 1.14rem;
        line-height: 1.45;
    }

    h6, .h6 {
        font-size: 1.04rem;
        line-height: 1.5;
    }

    .display-4 {
        font-size: clamp(2rem, 6.2vw, 2.45rem);
    }

    .display-5 {
        font-size: clamp(1.75rem, 5.2vw, 2.15rem);
    }

    .section-title h1.display-4 {
        font-size: clamp(1.95rem, 5.8vw, 2.4rem);
    }

    .section-title h2.font-secondary {
        font-size: 1.85rem;
    }

    /* 4. Tarjetas de producto en catálogo y destacados */
    .product-card .product-category {
        font-size: 0.88rem;
        font-weight: 700;
    }

    .product-card .product-title {
        font-size: 1.22rem;
        line-height: 1.35;
    }

    .product-card .product-description {
        font-size: 1.02rem;
        line-height: 1.62;
    }

    .product-card .product-link {
        font-size: 1rem;
        font-weight: 700;
    }

    .product-badge {
        font-size: 0.84rem;
        padding: 0.48em 0.95em;
    }

    /* 5. Vista de Detalle de Producto */
    .product-detail-title {
        font-size: clamp(1.75rem, 5.5vw, 2.35rem);
    }

    .product-detail-section h4 {
        font-size: clamp(1.22rem, 3.8vw, 1.38rem);
    }

    .product-detail-text {
        font-size: 1.08rem;
        line-height: 1.72;
    }

    .status-title {
        font-size: 1.42rem;
    }

    .status-text {
        font-size: 1.05rem;
        line-height: 1.55;
    }

    .ingredient-chip {
        font-size: 0.95rem;
        padding: 0.42rem 0.85rem;
    }

    .category-pill,
    .category-pills-scroll .btn {
        font-size: 0.95rem;
        padding: 0.5rem 1.05rem;
    }

    /* 6. Badges e insignias generales */
    .badge {
        font-size: 0.86rem;
        padding: 0.45em 0.8em;
    }

    /* 7. Formularios, controles y botones táctiles */
    label,
    .form-label {
        font-size: 1.02rem;
        font-weight: 600;
        margin-bottom: 0.4rem;
    }

    .form-control,
    .form-select {
        font-size: 1.04rem !important;
        min-height: 48px;
    }

    .form-text {
        font-size: 0.92rem !important;
        line-height: 1.5;
    }

    .input-group-text {
        font-size: 1.02rem;
    }

    .btn {
        font-size: 1.02rem;
        min-height: 46px;
    }

    .btn-sm {
        font-size: 0.92rem;
        min-height: 38px;
    }

    /* 8. Navegación, dropdowns y breadcrumbs */
    .navbar-dark .navbar-nav .nav-link {
        font-size: 1.12rem;
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .dropdown-item {
        font-size: 1.04rem;
        padding: 0.65rem 1.25rem;
    }

    .breadcrumb-item {
        font-size: 0.96rem;
    }

    /* 9. Directorio de Ingredientes */
    .ingredient-card .card-title {
        font-size: 1.22rem;
    }

    .ingredient-card .card-text {
        font-size: 1rem;
        line-height: 1.62;
    }

    .ingredient-description-text {
        font-size: 1.08rem;
        line-height: 1.75;
    }

    /* 10. Modales y diálogos */
    .modal-title {
        font-size: 1.22rem;
    }

    .modal-body {
        font-size: 1.02rem;
    }

    /* 11. Footer del sitio */
    .site-footer-wrapper p,
    .site-footer-wrapper a,
    .site-footer-wrapper span {
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .site-footer-wrapper h4,
    .site-footer-wrapper h5 {
        font-size: 1.25rem;
    }
}

/* Ajustes finos para pantallas muy compactas (menores a 576px) */
@media (max-width: 575.98px) {
    html {
        font-size: 16.5px;
    }

    body {
        font-size: 1.03rem;
    }

    h1, .h1 {
        font-size: 1.85rem;
    }

    h2, .h2 {
        font-size: 1.55rem;
    }

    h3, .h3 {
        font-size: 1.35rem;
    }

    h4, .h4 {
        font-size: 1.2rem;
    }

    .product-actions-bottom .btn {
        font-size: 1.04rem;
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }
}

/* ============================================
   Página Acerca De y Manifiesto Ético de Publicidad
   ============================================ */
.disclaimer-manifesto-box {
    background: linear-gradient(145deg, #fffaf3 0%, #ffffff 100%);
    border: 2px solid rgba(232, 143, 42, 0.35);
    box-shadow: 0 8px 30px rgba(232, 143, 42, 0.08);
}

.manifesto-decor-badge {
    position: absolute;
    right: 25px;
    top: 20px;
    color: var(--ev-primary);
    opacity: 0.07;
    pointer-events: none;
}

.disclaimer-quote-card {
    background: #ffffff;
    border-left: 5px solid var(--ev-primary);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.manifesto-highlight-text {
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.02em;
    color: var(--ev-text);
    font-size: 1.35rem;
    line-height: 1.45;
}

.manifesto-point-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.manifesto-point-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.manifesto-cta-banner {
    background: rgba(232, 143, 42, 0.08);
    border: 1px dashed var(--ev-primary);
}

/* Modo oscuro para Acerca de y Manifiesto */
[data-theme="dark"] .disclaimer-manifesto-box {
    background: linear-gradient(145deg, #241c14 0%, #1a1a1a 100%);
    border-color: rgba(232, 143, 42, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .manifesto-decor-badge {
    opacity: 0.12;
}

[data-theme="dark"] .disclaimer-quote-card {
    background: #232323;
    border-left-color: var(--ev-primary);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .manifesto-highlight-text {
    color: var(--ev-text);
}

[data-theme="dark"] .manifesto-point-card {
    background: #202020;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .manifesto-point-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .manifesto-cta-banner {
    background: rgba(232, 143, 42, 0.14);
    border-color: var(--ev-primary);
}

/* Modo oscuro para observaciones importantes */
[data-theme="dark"] .product-observaciones-card {
    background: linear-gradient(135deg, #2a1c0d 0%, #1f1509 100%);
    border-color: rgba(245, 158, 11, 0.4);
    border-left-color: #f59e0b;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .product-observaciones-icon {
    color: #fbbf24;
}

[data-theme="dark"] .product-observaciones-title {
    color: #fbbf24;
}

[data-theme="dark"] .product-observaciones-text {
    color: #fef3c7;
}

/* Honeypot anti-spam (invisible para humanos y lectores de pantalla, señuelo para bots) */
.form-hp {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
