/* ================================================================================================
       ----------------------------------------Header----------------------------------------
 ================================================================================================ */

/* Compensar el espacio del header fijo */
body {
    padding-top: 76px;
}

/* ======================== web ======================== */
/* Contenedor principal del header para posicionamiento de megaMenus */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 76px;
    z-index: 1000;
    background: var(--Gray-00);
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
}

/* Navbar con height específico para web */
.navbar.navbar-expand-lg.position-relative {
    height: 76px;
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar .container-fluid {
    max-width: 1280px;
    height: 76px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.navbar-nav .nav-link {
    color: var(--Primary-50) !important;
    position: relative;
    cursor: pointer;
}

/* Flecha giratoria - unificado */
.nav-link .arrow {
    display: inline-block;
    transition: transform .3s ease;
    margin-left: 4px;
    /* inicialmente girado 180° (chevron-down) */
    transform: rotate(180deg);
}

.nav-link.active .arrow {
    /* al activarse, vuelve a 0° (chevron-up) */
    transform: rotate(0deg);
}

/* Para botones con collapse */
[data-bs-toggle="collapse"][aria-expanded="true"] .arrow {
    transform: rotate(0deg);
}

/* Toggle activo = pill + flecha rotada */
.nav-link.active {
    background: #e9eff1;
    border-radius: 16px;
}

.btn-lupa {
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    padding: 10px;
}

.btn-circular-icon {
    border-radius: 999px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 5px 10px !important;
}

    .btn-circular-icon svg {
        width: 30px;
        height: 30px;
        stroke: var(--Primary-50) !important;
        stroke-width: 2;
        fill: none;
    }

/* ========================
       Navbar principal
    ======================== */
#mainNav .nav-item {
    margin-right: 16px;
}

    #mainNav .nav-item:last-child {
        margin-right: 0;
    }

/* ========================
       Títulos del megaMenu
    ======================== */
.megaMenu .i-title2-regular {
    min-height: 55px;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

/* ========================
       Mega-menús y panel búsqueda
    ======================== */
.megaMenu, #searchPanel {
    display: none; /* ocultos por defecto */
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: var(--Gray-00);
    /*box-shadow: 0 4px 8px rgba(0,0,0,0.1);*/
    position: absolute; /* Posicionamiento absoluto para overlay */
    top: 100%; /* Se posiciona justo debajo del header */
    left: 0;
    transform: none;
    z-index: 1000; /* Alto z-index para estar por encima del contenido */
}

    .megaMenu.show, #searchPanel.show {
        display: block;
    }

/* Overlay oscuro para megaMenu */
.megaMenu-overlay {
    content: '';
    position: fixed;
    top: 76px; /* Desde el header */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    pointer-events: none;
    display: none;
}

/* Overlay oscuro para searchPanel */
.searchPanel-overlay {
    content: '';
    position: fixed;
    top: 76px; /* Desde el header */
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    pointer-events: none;
    display: none;
}

/* Mega-indicator - unificado */
.mega-indicator {
    margin-top: 4px;
    height: 2px;
    display: flex;
    gap: 2px;
    align-items: center;
    justify-content: center;
    padding: 0 1px;
    min-height: 2px;
    width: 100%;
    max-width: 1280px;
    margin: 4px auto 0 auto;
}

    .mega-indicator .segment-green {
        height: 2px;
        background: var(--Green-10);
        border-radius: 1px;
        flex: 0 0 12.43%;
        min-width: 20px;
    }

    .mega-indicator .segment-orange {
        height: 2px;
        background: var(--Orange-100);
        border-radius: 1px;
        flex: 0 0 17.92%;
        min-width: 20px;
    }

    .mega-indicator .segment-yellow {
        height: 2px;
        background: var(--Orange-40);
        border-radius: 1px;
        flex: 0 0 5.06%;
        min-width: 20px;
    }

    .mega-indicator .segment-teal {
        height: 2px;
        background: var(--Jade-50);
        border-radius: 1px;
        flex: 0 0 49.89%;
        min-width: 20px;
    }

.mega-content {
    padding: 2rem 0;
    max-width: 1280px;
    margin: 0 auto;
}

.mega-col {
    margin-bottom: 1.5rem;
}

    .mega-col h6 {
        font-weight: bold;
        margin-bottom: 1rem;
    }

    .mega-col a {
        display: flex;
        align-items: center;
        color: var(--Gray-85);
        text-decoration: none;
        margin-bottom: .5rem;
    }

        .mega-col a .bi {
            margin-right: .5rem;
            font-size: 1.2em;
        }

        .mega-col a:hover {
            text-decoration: underline;
        }

    .mega-col .badge {
        margin-left: .5rem;
        font-size: .6em;
        padding: .2em .4em;
    }

.mega-content .row {
    align-items: stretch; /* las columnas se estiran al alto máximo */
}

/*------>Novedades*/

.mega-content .novedades {
    margin-left: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: -1px 0 0 var(--Gray-35);
    padding-left: 15px;
}

.novedades h6 {
    font-weight: bold;
    margin-bottom: .75rem;
}

.novedades p {
    display: flex;
    align-items: center;
    margin-bottom: .5rem;
}

    .novedades p .bi {
        margin-right: .5rem;
        font-size: 1.2em;
    }

/* Grid de novedades igual al de plataformas */
.novedades .novedades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 110px);
    gap: 8px;
    justify-content: start;
    margin-top: 1rem;
}

    /* Contenedor de cada tarjeta de novedad */
    .novedades .novedades-grid .grid-item-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    /* Cada tarjeta de novedad */
    .novedades .novedades-grid .grid-item {
        width: 110px;
        height: 105px;
        background: var(--Gray-10);
        border-radius: 12px;
        text-decoration: none;
        color: var(--Gray-85);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: background .2s;
    }

        /* Icono dentro de la tarjeta */
        .novedades .novedades-grid .grid-item img {
            width: 48px;
            height: 48px;
            object-fit: contain;
        }

    /* Texto debajo de la tarjeta */
    .novedades .novedades-grid .grid-item-container span {
        font-size: 0.75rem;
        line-height: 1.2;
        text-align: center;
        width: 100%;
    }

/*Imagen contactos*/
/* 1) dimensiones fijas 300×350 como en Figma */
.contact-img {
    width: 300px;
    height: 350px;
    object-fit: cover;
    margin: 0;
    padding: 32px 16px;
    box-sizing: border-box;
}

/* 2) padding alrededor según el Figma */
#megaContact .contact-img {
    padding: 32px 16px;
    box-sizing: border-box;
    border-radius: 15% !important;
}

/* Enlaces internos tipo tarjeta ligera */
.mega-col a.menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--Gray-00); /* ligero gris */
    border-radius: 0.5rem; /* esquinas suaves */
    text-decoration: none;
    color: var(--Gray-85);
    transition: background .2s;
}

    .mega-col a.menu-link:hover {
        background: var(--Primary-2);
        color: var(--Primary-50);
    }
    /* Flecha */
    .mega-col a.menu-link .bi {
        font-size: 1rem;
        margin: 0;
    }

/* Badge verde independiente que va después del link */
.mega-col .compra-badge {
    background: var(--Success-25);
    color: var(--Gray-85);
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    /*    font-size: 0.7rem;
    font-weight: 500;*/
    margin: 0;
    display: inline-block;
    margin-left: 1rem;
    position: relative;
    top: -1rem;
    line-height: 1;
}

/* Botón ancho completo + semi-redondeado */
.mega-col .btn-full {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border-radius: 1.5rem;
    text-align: center;
    font-weight: 500;
    margin-top: 1rem;
}
/* grid que se adapta al ancho y salta filas */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 95px); /* tantas columnas de 95px como quepan */
    gap: 1rem;
    justify-content: start; /* alinea al inicio y deja espacio sobrante a la derecha */
}

    /* Contenedor de cada tarjeta de enlace */
    .links-grid .grid-item-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    /* Cada "tarjeta" de enlace */
    .links-grid .grid-item {
        width: 95px;
        height: 95px;
        background: var(--Gray-10);
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--Gray-85);
        transition: background .2s;
    }

        /* Icono dentro de la tarjeta */
        .links-grid .grid-item img {
            width: 48px;
            height: 48px;
            object-fit: contain;
        }

    /* Texto debajo de la tarjeta */
    .links-grid .grid-item-container span {
        font-size: 0.75rem;
        text-align: center;
        line-height: 1.2;
        width: 100%;
    }

/*Botones inferiores de menús*/
.btnhdrDown {
    width: 100%;
    display: block !important;
}

/* ======================== movil ======================== */
/* ------------------------------- */
/* 1) Barra azul con Plataformas INS (solo móvil) */
.plataformas-mobile-header {
    /* color de fondo, usa tu variable o hex */
    background-color: var(--Primary-100);
    color: #fff;
    /* centrar texto */
    text-align: center;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* mostrar solo en <lg */
@media (min-width: 992px) {
    .plataformas-mobile-header {
        display: none !important;
    }
}

/* Estilos para la franja de navegación móvil - unificado */
#mobileNavigationHeader {
    background-color: var(--Primary-100);
    color: #fff;
    text-align: center;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #mobileNavigationHeader .btn-link {
        color: #fff !important;
        text-decoration: none;
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }

        #mobileNavigationHeader .btn-link:hover {
            color: #fff !important;
            opacity: 0.8;
        }

    #mobileNavigationHeader #mobileNavTitle {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        text-align: center;
        z-index: 5;
    }

/* Estilos específicos para el botón de regreso móvil */
#mobileNavBackBtn {
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    /*    background: transparent !important;
    border: none !important;
    color: #fff !important;
    padding: 8px !important;*/
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    #mobileNavBackBtn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    #mobileNavBackBtn:active {
        background: rgba(255, 255, 255, 0.2) !important;
    }

/* ------------------------------- */
/* 2) Estilos para móvil - unificado */
@media (max-width: 991.98px) {
    /* Estilos generales para móvil - mayor especificidad */
    .mega-indicator {
        height: 5px !important;
        min-height: 5px !important;
    }

        .mega-indicator .segment-green,
        .mega-indicator .segment-orange,
        .mega-indicator .segment-yellow,
        .mega-indicator .segment-teal {
            height: 5px !important;
            border-radius: 2.5px !important;
        }

    #megaPlataformas .mega-indicator {
        display: flex !important;
        height: 5px;
        gap: 2px;
        align-items: center;
        justify-content: center;
        padding: 0 1px;
        min-height: 5px;
        width: 100%;
    }

        #megaPlataformas .mega-indicator .segment-green {
            height: 5px;
            background: var(--Green-10);
            border-radius: 2.5px;
            flex: 0 0 12.43%;
            min-width: 20px;
        }

        #megaPlataformas .mega-indicator .segment-orange {
            height: 5px;
            background: var(--Orange-100);
            border-radius: 2.5px;
            flex: 0 0 17.92%;
            min-width: 20px;
        }

        #megaPlataformas .mega-indicator .segment-yellow {
            height: 5px;
            background: var(--Orange-40);
            border-radius: 2.5px;
            flex: 0 0 5.06%;
            min-width: 20px;
        }

        #megaPlataformas .mega-indicator .segment-teal {
            height: 5px;
            background: var(--Jade-50);
            border-radius: 2.5px;
            flex: 0 0 49.89%;
            min-width: 20px;
        }

    /* Header fijo en móvil también */
    header {
        height: 76px;
    }

    /* Navbar fijo en móvil también */
    .navbar.navbar-expand-lg.position-relative {
        height: 76px;
    }

    /* Asegurar que el navbar en móvil tenga altura fija */
    header .navbar {
        height: 76px;
    }

    /* Eliminar box-shadow de novedades en móvil */
    .mega-content .novedades {
        box-shadow: none;
    }

    /* MegaPlataformas: contenedor que llega hasta el fondo de la pantalla */
    #megaPlataformas .mega-content {
        position: fixed;
        top: 136px; /* 76px del header + 60px del header móvil */
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 136px);
        background: var(--Gray-00);
        z-index: 1001;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem !important;
    }

        #megaPlataformas .mega-content .container-fluid {
            height: 100%;
            overflow-y: auto;
            overflow-x: hidden;
        }

    /* SearchPanel: contenedor que llega hasta el fondo de la pantalla */
    #searchPanel .mega-content {
        position: fixed;
        top: 136px; /* 76px del header + 60px del header móvil */
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(100vh - 136px);
        background: var(--Gray-00);
        z-index: 1001;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem !important;
    }

        #searchPanel .mega-content .container-fluid {
            height: 100%;
            overflow-y: auto;
            overflow-x: hidden;
        }
}

/* asegurarnos de que en desktop siga viéndose */
@media (min-width: 992px) {
    #megaPlataformas .mega-indicator {
        display: flex !important;
        /* aquí tus estilos originales */
        height: 2px;
        gap: 2px;
        align-items: center;
        justify-content: center;
        padding: 0 1px;
        min-height: 2px;
        width: 100%;
    }

        #megaPlataformas .mega-indicator .segment-green {
            height: 2px;
            background: var(--Green-10);
            border-radius: 1px;
            flex: 0 0 12.43%;
            min-width: 20px;
        }

        #megaPlataformas .mega-indicator .segment-orange {
            height: 2px;
            background: var(--Orange-100);
            border-radius: 1px;
            flex: 0 0 17.92%;
            min-width: 20px;
        }

        #megaPlataformas .mega-indicator .segment-yellow {
            height: 2px;
            background: var(--Orange-40);
            border-radius: 1px;
            flex: 0 0 5.06%;
            min-width: 20px;
        }

        #megaPlataformas .mega-indicator .segment-teal {
            height: 2px;
            background: var(--Jade-50);
            border-radius: 1px;
            flex: 0 0 49.89%;
            min-width: 20px;
        }
}

/* ================================================================================================
       ----------------------------------------Footer----------------------------------------
 ================================================================================================ */
.bg-ins-dark {
    background-color: var(--Primary-Dim);
}

.bg-ins-panel {
    background-color: var(--Primary-100);
}

.footer-panel ul li {
    padding: .25rem 0;
}

.border-top {
    border-top: var(--Gray-30) 1px solid !important;
}

/* Estilos para footerAccordionDesktop - mantener disposición horizontal */
#footerAccordionDesktop {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
}

    #footerAccordionDesktop .btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        min-width: fit-content;
        max-width: none !important;
    }

/* Asegurar que el contenedor padre no interfiera */
.col-md-8 {
    overflow: visible !important;
    position: relative;
}

#footerAccordionDesktop {
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

/* Asegurar que el logo esté por encima de los elementos del footer */
.col-md-4.d-flex.align-items-center.mb-3.mb-md-0 {
    position: relative;
    z-index: 2;
}

/* Cuando el footer se desborda, cambiar el layout del contenedor padre */
@media (max-width: 991.98px) {
    .d-none.d-md-block .row.align-items-center {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }

    .d-none.d-md-block .col-md-4.d-flex.align-items-center.mb-3.mb-md-0 {
        margin-bottom: 1rem !important;
        width: 100%;
        justify-content: center !important;
    }

    .d-none.d-md-block .col-md-8 {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    #footerAccordionDesktop {
        justify-content: center !important;
    }

    /* Footer accordion desktop - mantener horizontal */
    #footerAccordionDesktop {
        flex-wrap: nowrap !important;
        justify-content: flex-end;
        gap: 0.5rem;
        display: flex !important;
    }

        #footerAccordionDesktop .btn {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
            flex-shrink: 0 !important;
            white-space: nowrap !important;
        }
}

/* Borde blanco cuando abierto */
[data-bs-toggle="collapse"][aria-expanded="true"] {
    border-color: var(--Gray-20) !important;
}

/* Full-width ~90% en móvil */
@media (max-width: 767.98px) {
    .mobile-btn {
        width: 90% !important;
    }
}

/* Pantallas muy pequeñas - ajustar tamaños de botones */
@media (max-width: 575.98px) {
    #footerAccordionDesktop {
        gap: 0.25rem;
    }

        #footerAccordionDesktop .btn {
            font-size: 0.65rem;
            padding: 0.2rem 0.4rem;
            margin-right: 0;
            min-width: auto;
        }
}

/* ================================================================================================
       ----------------------------------------Estilos Inline Movidos----------------------------------------
 ================================================================================================ */

/* Estilos para el menú desplegable móvil */
#mobileDropdownMenu {
    display: none;
    z-index: 1050;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--Gray-00);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Botón de emergencias - unificado */
.emergency-button {
    position: absolute;
    top: 76px;
    right: max(20px, calc(50% - 720px + 20px));
    background: var(--Error-60);
    color: white;
    padding: 8px 12px;
    border-radius: 50px 0 0 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    z-index: 997; /* Below megaMenu (megaMenu has z-index 1000) */
    transition: all 0.3s ease;
}

    .emergency-button:hover {
        background: #c82333;
        color: white;
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
    }

    .emergency-button svg {
        width: 16px;
        height: 16px;
    }

/* ========================
       Menú móvil
    ======================== */
#mobileDropdownMenu {
    position: fixed;
    top: 76px; /* Desde el header */
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 76px);
    background: var(--Gray-00);
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Bloquear scroll del body cuando el menú móvil está abierto */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Contenedor de elementos del menú móvil */
#mobileDropdownMenu .p-4 {
    height: 100%;
    min-height: calc(100vh - 76px);
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 16px !important;
}

/* Asegurar que los elementos del menú no hagan scroll */
#mobileDropdownMenu .list-group {
    overflow: visible;
}

#mobileDropdownMenu .list-group-item {
    overflow: visible;
    padding: 0.75rem 0 !important;
    margin: 0 !important;
}

/* Asegurar que todos los elementos del menú móvil estén alineados */
#mobileDropdownMenu .list-group {
    margin: 0 !important;
    padding: 0 !important;
}

#mobileDropdownMenu .mb-4 {
    margin-bottom: 1.5rem !important;
}

#mobileDropdownMenu .btn {
    margin: 0 !important;
}

/* Asegurar alineación consistente para todos los elementos del menú móvil */
#mobileDropdownMenu .d-flex.align-items-center.mb-4.justify-content-between {
    margin: 0 !important;
    padding: 0 !important;
}

#mobileDropdownMenu .mb-4 {
    margin-bottom: 1.5rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#mobileDropdownMenu .mobile-menu-item {
    padding: 0.75rem 0 !important;
    margin: 0 !important;
}

#mobileDropdownMenu .mt-3 {
    margin-top: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Estilo para compra-badge en menú móvil */
#mobileDropdownMenu .compra-badge {
    background: var(--Success-25);
    color: var(--Gray-85);
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    margin: 0;
    display: inline-block;
    line-height: 1;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Asegurar que el menú móvil cubra completamente el viewport */
#mobileDropdownMenu {
    position: fixed !important;
    top: 76px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: calc(100vh - 76px) !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Estilos para móvil - emergencia button */
@media (max-width: 991.98px) {
    /* Asegurar que el botón de emergencias sea visible en móvil */
    .emergency-button {
        position: absolute !important;
        top: 76px !important;
        right: 0 !important;
        z-index: 998 !important; /* Below megaMenu */
        display: flex !important;
        border-radius: 50px 0 0 50px;
    }
}

.logoFooter{
    height: 60px;
}

.social-icon-img {
  width: 15px;     /* ajusta según lo que necesites */
  height: auto;    /* mantiene proporción dentro del círculo */
  object-fit: contain;
  filter: brightness(0) invert(1); /* blanco como los SVG previos */
}
