/* Encabezado y mega menú extraídos del styles.css y nav.js originales. */
body:not(.admin-bar) {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.sticky-header,
.sticky-header * {
    box-sizing: border-box;
}

.sticky-header a {
    color: inherit;
    text-decoration: none;
}

.sticky-header ul,
.sticky-header h3 {
    margin: 0;
    padding: 0;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10000;
    box-shadow: none;
    width: 100%;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0 !important;
}

/* Sombra continua en todo el ancho del navegador. */
.sticky-header::after {
    content: "";
    position: absolute;
    z-index: 10002;
    left: 50%;
    bottom: 0;
    width: 100vw;
    width: 100dvw;
    height: 1px;
    transform: translateX(-50%);
    background: transparent;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.header-top {
    background-color: #e6e6e6;
    padding: 13px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    position: relative;
    isolation: isolate;
}

.header-top::before,
.main-header::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    width: 100dvw;
    transform: translateX(-50%);
    pointer-events: none;
}

.header-top::before {
    background-color: #e6e6e6;
}

.header-top .left-text {
    font-weight: 400;
}

.header-top .right-text {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    transition: color 0.25s ease;
    cursor: pointer;
}

.whatsapp-icon-wrapper {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #000;
    -webkit-mask: url('img/wpp_b_top.svg') no-repeat center / contain;
    mask: url('img/wpp_b_top.svg') no-repeat center / contain;
    transition: background-color 0.25s ease;
}

.whatsapp-link:hover,
.whatsapp-link:hover b {
    color: #086AD8 !important;
}

.whatsapp-link:hover .whatsapp-icon-wrapper {
    background-color: #086AD8 !important;
}

.main-header {
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    isolation: isolate;
}

.main-header::before {
    background-color: #ffffff;
}

.main-header .logo-placeholder {
    display: flex;
    align-items: center;
}

.main-header .logo-placeholder .logo-img {
    height: 48px;
    width: auto;
    display: block;
}

.sticky-header .main-nav > ul {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.sticky-header .main-nav > ul > li > a:not(.contact-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
}

.main-nav a {
    color: #0c2049;
    font-weight: 400;
    font-size: 16px;
}

.main-nav a:hover {
    text-decoration: underline;
}

.qs-nav-active {
    color: #086AD8 !important;
    font-weight: 700 !important;
}

.contact-btn,
.main-nav a.contact-btn {
    background-color: #0a73e1;
    color: #ffffff !important;
    padding: 11px 44px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.contact-btn:hover {
    background-color: #0962bd;
    text-decoration: none !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: #0c2049;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-contact-btn-item {
    display: none;
}

.dropdown-container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.main-nav .nav-productos-link {
    border-radius: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav .nav-dropdown-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.dropdown-container:hover .nav-dropdown-arrow,
.dropdown-container:focus-within .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-container:hover .nav-productos-link {
    background-color: #086AD8;
    color: #ffffff !important;
    font-weight: 400;
    text-decoration: none;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    padding: 20px;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 15px;
    z-index: 9999;
    pointer-events: none;
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    height: 25px;
    background: transparent;
}

.dropdown-container:hover .mega-menu,
.dropdown-container:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 10px;
    pointer-events: auto;
}

.mega-menu-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mega-menu-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px !important;
    color: #0A1A4D;
    border-bottom: 2px solid #086AD8;
    padding-bottom: 5px;
    display: inline-block;
    width: max-content;
}

.mega-menu-title a {
    font-size: inherit;
    color: inherit;
}

.mega-menu-erp {
    color: #FF3E01;
    border-bottom-color: #FF3E01;
}

.mega-menu-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.mega-menu-list::-webkit-scrollbar {
    width: 5px;
}

.mega-menu-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mega-menu-list::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 4px;
}

.mega-menu-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.mega-menu-list a {
    background-color: #E6E6E6;
    color: #333;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: block;
}

.mega-menu-col:first-child .mega-menu-list a:hover {
    background-color: #0A1A4D;
    color: #fff;
}

.mega-menu-col:last-child .mega-menu-list a:hover {
    background-color: #FF3E01;
    color: #fff;
}

@media (max-width: 1300px) {
    .header-top,
    .main-header {
        padding-left: 5% !important;
        padding-right: 5% !important;
    }

    .sticky-header .main-nav > ul {
        gap: 10px;
    }

    .contact-btn,
    .main-nav a.contact-btn {
        padding: 11px 20px;
    }
}

@media (max-width: 1024px) {
    .header-top .left-text {
        display: none;
    }

    .hamburger {
        display: flex;
        margin-left: auto;
    }

    .desktop-contact-btn {
        display: none;
    }

    .mobile-contact-btn-item {
        display: block;
        margin-top: 15px;
        text-align: center;
        width: 100%;
    }

    .main-header {
        position: relative;
        justify-content: space-between;
        align-items: center;
        padding-top: 25px;
        padding-bottom: 25px;
    }

    .main-header .logo-placeholder {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .main-header .logo-placeholder .logo-img {
        height: 32px !important;
        width: auto;
    }

    .main-nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 30px 20px;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .main-nav ul.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .dropdown-container .mega-menu {
        display: none !important;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 600px) {
    .mega-menu-list {
        max-height: 200px;
    }
}
