/*
 * Encabezado y navegación (2026).
 * Franja superior con WhatsApp, sucursales y horario; menú en una sola línea,
 * centrado con el contenido, con la página actual en rojo y subrayada.
 * Se carga después de style.css, brand-theme-2026.css, ui-rounded-system.css y
 * quote-header.css, por eso algunas reglas necesitan !important.
 */

/* ---------- Franja superior ---------- */

body .header__topbar {
    padding: 0;
}

body .salinas-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
}

body .salinas-topbar__group {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

body .salinas-topbar__group > li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 22px;
}

body .salinas-topbar__group > li:first-child {
    padding-left: 0;
}

body .salinas-topbar__group > li:last-child {
    padding-right: 0;
}

/* Separador vertical entre elementos, como en la propuesta. */
body .salinas-topbar__group > li + li {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

body .salinas-topbar__group > li::before {
    display: none !important;
}

body .salinas-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

body a.salinas-topbar__item:hover {
    color: var(--salinas-yellow, #f8ca48) !important;
}

body .salinas-topbar__item svg {
    flex: 0 0 auto;
    margin: 0 !important;
}

body .salinas-topbar__social {
    gap: 16px;
}

body .salinas-topbar__social .social__share--icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
}

body .salinas-topbar__social .social__share--icon:hover {
    color: var(--salinas-yellow, #f8ca48) !important;
}

/* Pantallas medianas: se oculta el horario; móvil: solo WhatsApp y redes. */
@media (max-width: 1199.98px) {
    body .salinas-topbar__hours {
        display: none !important;
    }

    body .salinas-topbar__group:last-child > li {
        border-left: 0;
    }
}

@media (max-width: 575.98px) {
    body .salinas-topbar__branches {
        display: none !important;
    }
}

/* ---------- Encabezado principal ---------- */

/* Logo un poco más chico en computadora para que no compita con el título de la página. */
@media (min-width: 1300px) {
    body .main__logo--img {
        width: 210px !important;
        max-width: 210px !important;
    }
}

@media (min-width: 992px) {
    body .main__header--inner {
        gap: 24px;
        min-height: 104px;
    }

    body .main__logo {
        flex: 0 0 auto;
    }

    body .header__menu {
        flex: 1 1 auto;
    }

    body .header__menu--wrapper {
        align-items: center;
        justify-content: flex-end;
        gap: 4px 30px !important;
    }

    /* Enlaces: texto limpio, sin óvalo ni separadores. */
    body .header__menu--link {
        display: inline-flex;
        align-items: center;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--salinas-black) !important;
        font-size: 15px !important;
        font-weight: 500;
        line-height: 44px !important;
        white-space: nowrap;
    }

    body .header__menu--link::before {
        display: none !important;
    }

    /* Página actual y paso del ratón: rojo con subrayado. */
    body .header__menu--link::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 3px;
        border-radius: 2px;
        background: transparent;
    }

    body .header__menu--items:hover .header__menu--link,
    body .header__menu--link.active {
        color: var(--salinas-red) !important;
    }

    body .header__menu--link.active::after {
        background: var(--salinas-red);
    }

    /* PROMOCIONES siempre en rojo y en negritas. */
    body .header__menu--link.promo-header-link,
    body .header__menu--link.promo-header-link:hover,
    body .header__menu--link.promo-header-link.active {
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: var(--salinas-red) !important;
        font-weight: 800;
        letter-spacing: 0.02em;
    }

    /* Cotización: botón rojo separado del resto del menú. */
    body .header__menu--items:last-child {
        margin-left: 14px;
    }

    body .header__menu--link.quote-header-link {
        gap: 10px;
        min-height: 50px;
        padding: 0 22px !important;
        border-radius: 8px !important;
        background: var(--salinas-red) !important;
        color: #ffffff !important;
        font-size: 15px !important;
        font-weight: 700;
        line-height: 50px !important;
        box-shadow: 0 8px 18px rgba(200, 39, 47, 0.22) !important;
    }

    body .header__menu--link.quote-header-link::after {
        display: none;
    }

    body .header__menu--link.quote-header-link:hover,
    body .header__menu--link.quote-header-link.active {
        background: var(--salinas-red-dark, #a91f27) !important;
        color: #ffffff !important;
    }

    body .header__account {
        flex: 0 0 auto;
    }
}

/* Pantallas medianas: un poco menos de espacio para que todo quepa en una línea. */
@media (min-width: 992px) and (max-width: 1299.98px) {
    body .main__logo--img {
        width: 200px !important;
        max-width: 200px !important;
    }

    body .header__menu--wrapper {
        gap: 4px 20px !important;
    }

    body .header__menu--link {
        font-size: 14px !important;
    }

    body .header__menu--link.quote-header-link {
        padding: 0 16px !important;
    }
}

/* Laptop pequeña y tableta horizontal (992-1199 px): aún más compacto. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    body .main__header--inner {
        gap: 16px;
    }

    body .main__logo--img {
        width: 170px !important;
        max-width: 170px !important;
    }

    body .header__menu--wrapper {
        gap: 4px 14px !important;
    }

    body .header__menu--link {
        font-size: 13.5px !important;
    }

    body .header__menu--items:last-child {
        margin-left: 4px;
    }

    body .header__menu--link.quote-header-link {
        gap: 8px;
        padding: 0 12px !important;
    }
}
