/* SupMenu — quick wins: buscador, horario, mesa, carrito abandonado */

/* Contenedor solo-buscador (menú especial): evitar recorte del dropdown */
.nav-container.nav-container--search-only {
    overflow: visible !important;
    position: relative;
    z-index: 90;
}

body.menu-especial .nav-container--search-only {
    position: sticky;
    top: 0;
    z-index: 120;
    background: var(--bg-color, var(--color-bg-nav, #fff));
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.menu-especial .nav-container--search-only:has(.menu-search-bar--open) {
    z-index: 400;
    padding-bottom: min(50vh, 326px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.menu-especial .menu-content {
    position: relative;
    z-index: 1;
}

.menu-search-bar {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 12px;
    padding: 0 4px;
    z-index: 1;
}

.menu-search-bar--open {
    z-index: 401;
}

.nav-container--search-only {
    padding-top: 12px;
    padding-bottom: 12px;
}

.menu-search-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    pointer-events: none;
    z-index: 1;
}

.menu-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 40px 12px 42px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    font-size: 1rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.menu-search-input:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.menu-search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    color: #555;
    cursor: pointer;
    padding: 0 4px;
}

.menu-search-results {
    position: absolute;
    left: 4px;
    right: 4px;
    top: calc(100% + 6px);
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    max-height: min(50vh, 320px);
    overflow-y: auto;
    z-index: 402;
}

.menu-search-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.menu-search-result:hover,
.menu-search-result:focus {
    background: rgba(0, 0, 0, 0.04);
}

.menu-search-result--category .menu-search-result-name {
    font-weight: 700;
}

.menu-search-result--category .menu-search-result-cat {
    color: var(--accent-color, #0d6efd);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.menu-search-result-name {
    font-weight: 600;
    color: #222;
}

.menu-search-result-cat {
    font-size: 0.82rem;
    color: #777;
}

.menu-search-empty {
    padding: 12px 14px;
    color: #666;
    font-size: 0.92rem;
}

.venue-status-banner {
    max-width: 640px;
    margin: 10px auto 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: center;
}

.venue-status-banner--closed {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
}

.venue-status-banner strong {
    display: block;
    margin-bottom: 4px;
}

.venue-status-hours {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.table-label-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
}

.cart-resume-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 640px;
    margin: 12px auto 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #eef6ff;
    border: 1px solid #cfe2ff;
    color: #084298;
    font-size: 0.92rem;
}

.cart-resume-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-resume-btn {
    border: 1px solid #9ec5fe;
    background: #fff;
    color: #084298;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.88rem;
    cursor: pointer;
}

.cart-resume-btn--primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.order-cart-closed-hint {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff3cd;
    color: #664d03;
    font-size: 0.9rem;
    line-height: 1.4;
}

.product-card--highlight,
.featured-product-card.product-card--highlight,
.super-featured-card.product-card--highlight {
    animation: product-highlight-pulse 2.2s ease-out;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.35);
}

@keyframes product-highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.45); }
    40% { box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Accesibilidad WCAG (menú público) — bajo impacto visual ── */

/* Skip link: invisible hasta Tab; no altera layout en uso táctil */
.skip-link {
    position: absolute;
    left: 12px;
    top: 0;
    z-index: 10000;
    padding: 10px 14px;
    background: #111;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    transform: translateY(-120%);
    transition: transform 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Foco visible solo con teclado — no cambia look en tap móvil */
:where(
    a,
    button,
    input,
    select,
    textarea,
    summary,
    [tabindex]:not([tabindex="-1"])
):focus-visible {
    outline: 2px solid var(--a11y-focus-color, #0d6efd);
    outline-offset: 2px;
}

main#menu-main:focus {
    outline: none;
}

/* Flyers con link semántico (<a>) — mismo look que el div clickable */
a.flyer-item {
    display: block;
    color: inherit;
    text-decoration: none;
}

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

/* ── WCAG AA contraste — mínimo indispensable ──
   Texto secundario #999/#aaa/#888 falla en beige/blanco.
   Acentos claros fallan como color de texto; se oscurecen solo ahí.
   --accent-color de marca se mantiene para bordes/decoración.
*/
:root {
    --muted-text: #555555;
    /* Fallback: naranja oscuro AA sobre blanco/beige */
    --accent-text: #964f0d;
    /* Rellenos con texto blanco (botones) */
    --accent-fill: #9a520a;
}

body.theme-negroni-brickell {
    --accent-text: #a8320e;
    /* Blanco sobre #e94e1b ya ~3.8:1 (OK UI/large); fill un poco más oscuro para labels */
    --accent-fill: #c03912;
}

body.theme-negroni {
    --accent-text: #964f0d;
    --accent-fill: #9a520a;
}

/* Textos secundarios / metadatos */
.menu-header .subtitle,
.header .subtitle,
.price-without-vat,
.price-without-vat-special,
.product-price.old-price,
.old-price,
.featured-price-old,
.featured-section .featured-price-old,
.multi-price-label,
.menu-search-empty,
.menu-search-result-cat,
.order-cart-empty,
.order-cart-line-variant,
.section-title-description,
.category-small-footer-text {
    color: var(--muted-text) !important;
    opacity: 1 !important;
}

.branding-footer a {
    opacity: 1 !important;
    color: var(--text-color, #1a1a1a) !important;
}

/* Acento usado como TEXTO (precios promo, chef, badges) — no cambia fills de marca */
.product-price.promo-price,
.promo-price,
.chef-special-price,
.chef-special-card .product-price,
.featured-price-new,
.featured-product-price,
.promo-price-value,
.generic-promo-card .promo-price-value,
.generic-promo-in-category .promo-price-value,
.featured-section .featured-price-new,
.featured-section .promo-price-value.featured,
.spotlight-badge,
.back-to-menu-btn {
    color: var(--accent-text) !important;
}

.spotlight-badge {
    border-color: var(--accent-text) !important;
}

/* Controles con texto blanco sobre naranja claro (falla AA en Negroni) */
body.theme-negroni .lang-btn.active,
body.theme-negroni .back-to-top,
body.theme-negroni .legend-btn,
body.theme-negroni-brickell .lang-btn.active {
    background: var(--accent-fill) !important;
    background-color: var(--accent-fill) !important;
    border-color: var(--accent-fill) !important;
}

/* Buscador / banners compartidos */
.menu-search-input::placeholder {
    color: #666666;
    opacity: 1;
}

.venue-status-banner--closed {
    color: #5c4400;
}
