#navigationDos {
    position: fixed;
    top: 0; left: 0;
    width: 80vw; max-width: 320px;
    height: 100%;
    background: #fff;
    z-index: 10010;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.18);
    padding-top: 12px;
}
#navigationDos .navbar-nav    { flex-direction: column; }
#navigationDos .nav__item-wrapper { display: block !important; }
#navigationDos .category-link {
    display: block;
    padding: 13px 20px;
    font-size: .95rem;
    font-weight: 500;
    color: #2c3e50;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
}
#navigationDos .category-link:hover { background: #f4f6f9; color: #183e51; }

#navigationTres {
    position: fixed;
    top: 0; left: 0;
    width: 80vw; max-width: 320px;
    height: 100%;
    background: #f8f9fb;
    z-index: 10011;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.22);
    padding-top: 12px;
}
#panel-navegacion { display: block; }
#desktop-nav-wrapper {
    background: #fff;
    visibility: visible;
    opacity: 1;
}
#nav-inner {
    visibility: visible;
}

/* ── Nav inner: mismo sistema flex que buscador-header ── */
#nav-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 90%;
    padding: 0 40px;
    gap: 0;
    min-height: 46px;
    box-sizing: border-box;
}

/* Columna Categorías: mismo ancho que el logo (180px) */
#nav-cats-col {
    flex-shrink: 0;
    width: 180px;
    display: flex;
    align-items: center;
}


/* Links destacados */
#nav-destacados {
    flex: 1;
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow: hidden;
    padding-left: 16px;
    justify-content: center;
}

.mega-overlay-bg {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    cursor: default;
}
.mega-overlay-bg.open { display: block; }

.mega-panel-overlay {
    display: flex;
    position: fixed;
    top: 0; left: 0;
    height: 100%;
    z-index: 10001;
    background: #fff;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    flex-direction: row;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(0.4, 0, 0.2, 1),
                visibility .28s,
                opacity .28s ease;
    opacity: 0;
}
.mega-panel-overlay.open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    opacity: 1;
}

.mega-col-cats {
    display: flex; flex-direction: column;
    width: 260px; min-width: 260px;
    height: 100%;
    background: #fff;
    flex-shrink: 0;
}
.mega-col-cats__header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #071C27 0%, #0a2636 100%);
    border: none;
    padding: 15px 16px;
    text-align: left;
    font-size: 1rem;
    color: white;
    cursor: default;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: background 0.3s ease;
    flex-shrink: 0;
    box-sizing: border-box;
    min-height: 42px;
}
.mega-col-cats__header span {
    font-size: 1rem; font-weight: 600;
    text-transform: none; letter-spacing: normal;
    color: #fff;
    flex: 1;
}
.mega-close-btn {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.7); font-size: 1rem; padding: 2px 6px; line-height: 1;
}
.mega-close-btn:hover { color: #fff; }

.mega-cat-list {
    list-style: none !important; margin: 0 !important;
    padding: 6px 0 !important; flex: 1; overflow-y: auto;
}
.mega-cat-list li { list-style: none !important; margin: 0 !important; padding: 0 !important; }

.mega-cat-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px 11px 20px;
    color: #2c3e50; text-decoration: none;
    font-size: .9rem; font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
    cursor: pointer; box-sizing: border-box; width: 100%; user-select: none;
}
.mega-cat-item:hover, .mega-cat-item.active {
    background: #eef2f7; border-left-color: #183e51; color: #183e51;
}
.mega-cat-arrow { font-size: .6rem; color: #aab0bb; flex-shrink: 0; }

.mega-col-fams {
    width: 480px; min-width: 480px;
    height: 100%; background: #f8f9fb;
    border-right: none;
    overflow-y: auto; flex-shrink: 0;
    display: flex; flex-direction: column;
}
.mega-col-fams__placeholder {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; color: #c0c7d2;
    text-align: center; gap: 10px; padding: 20px;
}
.mega-col-fams__placeholder i { font-size: 2.2rem; opacity: .35; }
.mega-col-fams__placeholder p { font-size: .88rem; margin: 0; line-height: 1.5; }

.mega-fam-block { display: none; padding: 20px 24px; }
.mega-fam-block.active { display: block; }

.mega-fam-block__title {
    display: block; font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .09em;
    color: #1a75bb; text-decoration: none;
    text-align: center; padding-bottom: 6px;
    margin-bottom: 0; border-bottom: 2px solid #183e51;
}
.mega-fam-block__title:hover { text-decoration: underline; }

.mega-fam-block__title-col1 {
    display: block; font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .09em;
    text-align: center; padding-bottom: 6px;
    margin-bottom: 0; border-bottom: 2px solid #183e51;
}


.mega-fam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0 12px;
    padding: 19px;
}
.mega-fam-link {
    display: block; padding: 7px 4px;
    color: #3a4558; text-decoration: none;
    font-size: .88rem; border-bottom: 1px solid #f0f2f5;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .12s, padding-left .12s;
}
.mega-fam-link:hover { color: #183e51; padding-left: 8px; }

.mega-fam-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 4px; color: #3a4558;
    font-size: .88rem; border-bottom: 1px solid #f0f2f5;
    cursor: pointer; user-select: none;
    transition: color .12s, padding-left .12s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mega-fam-item:hover, .mega-fam-item.active {
    color: #183e51; padding-left: 8px;
    background: #eef2f7; border-left: 3px solid #183e51;
}
.mega-fam-arrow { font-size: .6rem; color: #aab0bb; flex-shrink: 0; margin-left: 6px; }

.mega-col-subs {
    width: 260px; min-width: 260px;
    height: 100%; background: #f8f9fb;
    flex-shrink: 0; overflow-y: auto;
    display: flex; flex-direction: column;
}
.mega-sub-block { display: none; flex-direction: column; }
.mega-sub-block.active { display: flex; }

.mega-sub-block__header {
    display: flex; align-items: center; justify-content: center;
    padding: 19px 16px 10px;
    border-bottom: none; flex-shrink: 0;
}

.mega-sub-list {
    list-style: none !important; margin: 0 !important;
    padding: 6px 0 !important; flex: 1; overflow-y: auto;
}
.mega-sub-list li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mega-sub-link {
    display: block; padding: 10px 16px 10px 20px;
    color: #3a4558; text-decoration: none; font-size: .88rem;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #f5f6f8;
    transition: background .12s, color .12s, border-color .12s;
}
.mega-sub-link:hover { background: #eef2f7; color: #183e51; border-left-color: #4576AA; }

.mega-cat-list::-webkit-scrollbar,
.mega-col-fams::-webkit-scrollbar,
.mega-col-subs::-webkit-scrollbar { width: 4px; }
.mega-cat-list::-webkit-scrollbar-thumb,
.mega-col-fams::-webkit-scrollbar-thumb,
.mega-col-subs::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 2px; }

.mega-back-bar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #071C27 0%, #0a2636 100%);
    border: none;
    padding: 13px 16px;
    text-align: left;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    transition: background 0.3s ease;
    flex-shrink: 0;
    user-select: none;
    box-sizing: border-box;
    min-height: 42px;
}
.mega-back-bar:hover {
    background: linear-gradient(135deg, #0d2e42 0%, #102f45 100%);
}
.mega-back-bar i    { font-size: .8rem; color: #fff; flex-shrink: 0; }
.mega-back-bar span { color: #fff; }

@media (min-width: 768px) {
    .mega-col-fams {
        width: 0 !important; min-width: 0 !important;
        opacity: 0; overflow: hidden;
        pointer-events: none;
        border-right: none;
        transition: none;
    }
    .mega-col-fams.col-visible {
        width: 480px !important; min-width: 480px !important;
        opacity: 1; overflow-y: auto;
        pointer-events: auto;
        border-right: none;
        transition: none;
    }
    .mega-col-subs {
        width: 0 !important; min-width: 0 !important;
        opacity: 0; overflow: hidden;
        pointer-events: none;
        transition: none;
    }
    .mega-col-subs.col-visible {
        width: 260px !important; min-width: 260px !important;
        opacity: 1; overflow-y: auto;
        pointer-events: auto;
        transition: none;
    }
}

@media (max-width: 767px) {

    .mega-panel-overlay {
        flex-direction: column !important;
        width: 80vw !important;
        max-width: 320px !important;
        overflow: hidden !important;
    }

    .mega-col-cats,
    .mega-col-fams,
    .mega-col-subs {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        height: 100% !important;
        flex-shrink: 0;
        overflow-y: auto;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .mega-col-fams { background: #fff !important; }

    .mega-fam-grid {
        grid-template-columns: 1fr !important;
    }
}

.mega-close-btn span {
    font-size: .85rem;
    font-weight: 500;
    margin-right: 6px;
    color: rgba(255, 255, 255, 0.7);
    vertical-align: middle;
}