/*
 * 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;
    }
}

/* Celular y tableta: WhatsApp y sucursales ya están en la barra de abajo (<x-barra-contacto>); arriba, el horario
   en corto y las redes. */
body .salinas-topbar__hours-corto {
    display: none;
}

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

    body .salinas-topbar__hours {
        display: inline-flex !important;
        font-size: 13px;
        white-space: nowrap;
    }

    body .salinas-topbar__hours-largo {
        display: none;
    }

    body .salinas-topbar__hours-corto {
        display: inline;
    }
}

/* ---------- 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: 48px;
        min-height: 104px;
    }

    body .main__logo {
        flex: 0 0 auto;
    }

    body .header__menu {
        flex: 1 1 auto;
    }

    /* Sin el botón "Buscar llantas": los enlaces junto al logo y Cotización sola a la derecha (como Mavis). */
    body .header__menu--wrapper {
        align-items: center;
        justify-content: flex-start;
        gap: 4px 34px !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: 16px !important;
        font-weight: 600;
        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: auto;
    }

    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 .main__header--inner {
        gap: 32px;
    }

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

    body .header__menu--link {
        font-size: 15px !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 .main__header--inner {
        gap: 24px;
    }

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

/* Menú "Llantas": panel a todo el ancho del encabezado (header__mega--menu del tema) con tres columnas:
   por tipo (fondo gris), marcas y medidas más vendidas. Se abre al pasar el mouse o con el teclado. */
.header__mega--menu.tires-mega {
    display: grid;
    grid-template-columns: 290px repeat(2, minmax(0, 1fr));
    gap: 0;
    max-width: 940px;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
}

.header__menu--items:focus-within .header__mega--menu.tires-mega {
    visibility: visible;
    margin-top: 2px;
    opacity: 1;
}

/* Más aire para leer de un vistazo: márgenes amplios, renglones separados y una línea bajo cada título. */
.tires-mega__col {
    padding: 30px 34px 32px;
}

.tires-mega__col + .tires-mega__col {
    border-left: 1px solid #eeeff2;
}

.tires-mega__col--side {
    background: #f3f4f6;
}

.tires-mega__col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tires-mega__title {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4e5e9;
    color: #171717;
    font-size: 17px;
    font-weight: 800;
}

/* Menú "Sucursales": Reynosa y Río Bravo con el mismo estilo, y el horario en la columna gris a la derecha. */
.header__mega--menu.tires-mega--sucursales {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 280px;
    max-width: 880px;
}

/* Cada sucursal: nombre en negro y su referencia en gris debajo, separadas por una línea. */
.tires-mega__sucursales li + li {
    border-top: 1px solid #eeeff2;
}

.tires-mega__col .tires-mega__sucursales a {
    padding: 12px 0;
    color: #171717;
    font-weight: 700;
}

.tires-mega__col .tires-mega__sucursales a:hover {
    color: #c8272f;
}

.tires-mega__nota {
    display: block;
    margin-top: 3px;
    color: #6f6f72;
    font-size: 14px;
    font-weight: 500;
}

.tires-mega__horario {
    margin: 0 0 18px;
}

.tires-mega__horario li {
    padding: 4px 0;
    color: #3d3d40;
    font-size: 15px;
}

/* Enlace de texto rojo subrayado dentro del menú ("Ver todas en el mapa →"). */
.tires-mega__col a.tires-mega__enlace {
    display: inline-block;
    padding: 0;
    color: #c8272f;
    font-size: 15px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}


.tires-mega__group {
    margin: 20px 0 6px;
    color: #6f6f72;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tires-mega__group:first-of-type {
    margin-top: 0;
}

.tires-mega__col a {
    display: block;
    padding: 8px 0;
    color: #3d3d40;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
}

.tires-mega__col--side a {
    color: #171717;
    font-weight: 700;
}

.tires-mega__col a:hover {
    color: #c8272f;
}

/* Menú "Servicios": promoción del mes con su precio debajo, en negro (precios en negro, nombres de oferta en rojo). */
.tires-mega__col a.tires-mega__promo {
    color: #c8272f;
    font-weight: 700;
    line-height: 1.3;
}

.tires-mega__col a.tires-mega__promo span {
    display: block;
    color: #171717;
    font-size: 14px;
    font-weight: 600;
}

/* Menú del celular: "Buscar llantas" en rojo como los demás botones de búsqueda (aquí porque el panel no carga en /llantas). */
.offcanvas__promo_link.offcanvas__finder-link {
    border-color: var(--salinas-red, #c8272f) !important;
    background: var(--salinas-red, #c8272f) !important;
    color: #ffffff !important;
    box-shadow: 0 5px 12px rgba(200, 39, 47, 0.24) !important;
}

.offcanvas__promo_link.offcanvas__finder-link:hover {
    background: var(--salinas-red-dark, #a91f27) !important;
    color: #ffffff !important;
}

/* Menú del celular: Cotización alineada con los demás renglones (mismo margen izquierdo que el texto). */
@media (max-width: 991.98px) {
    .offcanvas__menu .quote-header-link--mobile {
        width: fit-content;
        margin: 14px 20px;
    }
}
