/* =========================================================
   HEADER MOCK (HOME) - CLEAN
   ========================================================= */

/* Iconos genéricos */
.home-mock .icon {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor;
    stroke-width: 1.8 !important;
    fill: none !important;
    flex-shrink: 0;
    display: block;
}
.home-mock .icon-small {
    width: 18px !important;
    height: 18px !important;
}

/* TOP NAVBAR */
.top-navbar {
    background: var(--white);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 130px;
}
.logo-img {
    height: 50px;
    display: block;
    max-width: none;
}

/* SEARCH */
.search-bar {
    flex: 1;
    max-width: 750px;
    display: flex;
    align-items: center;
    background: var(--grey-04);
    border-radius: 999px;
    padding: 4px 4px 4px 16px;
    gap: 12px;
}
.search-bar input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 0.9rem;
    color: var(--grey-01);
}
.search-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--white);
    padding: 0;
}
.search-btn:hover {
    background: var(--primary-dark);
}

/* Right icons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.9rem;
    color: var(--grey-01);
}
.nav-icon-btn {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-01);
    gap: 6px;
}
.nav-icon-btn:hover {
    color: var(--color-dark);
}

/* Badge carrito */
.nav-icon-btn .nav-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}

/* CTA */
.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: rgb(28, 133, 143);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(28, 133, 143, 0.25);
    transition: all 0.15s ease;
}
.nav-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(28, 133, 143, 0.3);
}
.nav-cta-icon {
    width: 18px;
    height: 18px;
    stroke: #fff;
    stroke-width: 2.4;
    fill: none;
    display: block;
}

/* caret */
.nav-caret {
    font-size: 12px;
    line-height: 1;
    margin-left: 2px;
    color: var(--grey-01);
    display: inline-block;
    transform: translateY(1px);
}

/* username */
.nav-user-name {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================
   HEADER MOBILE: logo left + icons right, search below
   ========================= */
@media (max-width: 768px) {
    .top-navbar-inner {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .logo-area {
        order: 1 !important;
        flex: 0 0 auto !important;
    }

    .logo-img {
        height: 42px !important;
    }

    .nav-actions {
        order: 2 !important;
        flex: 0 0 auto !important;
        width: auto !important;
        justify-content: flex-end !important;
        gap: 14px !important;
        margin-left: auto !important;
    }

    .search-bar {
        order: 3 !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: none !important;
        margin-top: 2px !important;
    }

    .nav-user-name {
        display: none !important;
    }
    .nav-caret {
        display: none !important;
    }
}

/* =========================
   DROPDOWNs (user + settings)
   ========================= */
.top-navbar,
.top-navbar .container,
.top-navbar-inner {
    overflow: visible !important;
}

.user-dd .dropdown-menu {
    border-radius: 14px;
    border: 0;
    padding: 10px 0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    min-width: 220px;
}
.user-dd-menu .dropdown-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 10px 18px;
    color: #202020;
}
.user-dd-menu .dropdown-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #5d6c80;
}
.user-dd-menu .dropdown-item:hover {
    background: #f8f9fb;
}
.user-dd-menu .dropdown-divider {
    margin: 8px 0;
}

/* settings panel */
#settings-dd {
    position: relative;
}
#settings-dd .dropdown-menu.mock-dd-panel {
    width: 320px;
    padding: 18px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    background: #fff;
    z-index: 9999 !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
}

/* =========================
   CATEGORY BAR
   ========================= */
.category-bar {
    background: var(--white);
    border-bottom: 1px solid rgba(17, 24, 39, 0.05);
    position: relative;
    z-index: 45;
}
.category-bar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: center;
}
.category-bar-inner::-webkit-scrollbar {
    display: none;
}

.category-pill-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--grey-05);
    white-space: nowrap;
    font-size: 0.86rem;
    color: var(--grey-01);
}
.category-pill {
    white-space: nowrap;
    font-size: 0.88rem;
    cursor: pointer;
    color: var(--grey-01);
}

/* Pills ocultas en móvil/tablet (las movemos al panel como quick links via JS) */
@media (max-width: 991.98px) {
    .category-bar-inner a.category-pill {
        display: none !important;
    }
    .category-bar-inner {
        justify-content: center !important;
        gap: 0 !important;
    }
}

/* =========================
   MEGAMENU DESKTOP (normal)
   ========================= */
#hover-category-menu {
    top: 100%;
    left: 0;
    right: 0;
    width: 100vw;
    background: #fff;
    z-index: 60;
}

/* centramos el contenido real SOLO en desktop */
#hover-category-menu > .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
#hover-category-menu .row {
    max-width: 1200px;
    margin: 0 auto;
}
#hover-category-menu .sub-cat-menu {
    background: #fff;
}

/* =========================
   MEGAMENU MOBILE/TABLET (cuando JS pone .mm-mobile)
   ========================= */
#hover-category-menu.mm-mobile{
    position: fixed !important;
    top: 170px !important;      /* 👈 AJUSTE CLAVE */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100vw !important;
    background: #fff !important;
    z-index: 9999 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* mata container/row/col cuando es panel */
#hover-category-menu.mm-mobile .container,
#hover-category-menu.mm-mobile .row,
#hover-category-menu.mm-mobile .col-lg-3,
#hover-category-menu.mm-mobile .category-menu,
#hover-category-menu.mm-mobile #category-sidebar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
}

#hover-category-menu.mm-mobile ul.categories {
    padding: 0 !important;
    margin: 0 !important;
}

/* barra superior inyectada */
.mm-mobile-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
}
.mm-mobile-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
}
.mm-mobile-close {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    padding: 6px 10px;
    cursor: pointer;
    color: #0f172a;
}

/* items táctiles */
#hover-category-menu.mm-mobile .category-nav-element > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px;
    padding: 14px 14px !important;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08) !important;
    background: #fff !important;
    font-weight: 600;
}

/* caret */
#hover-category-menu.mm-mobile .category-nav-element.mm-has-children > a::after {
    content: "▾";
    font-size: 12px;
    color: #64748b;
}
#hover-category-menu.mm-mobile .category-nav-element.is-open > a::after {
    content: "▴";
}

/* submenú acordeón full */
#hover-category-menu.mm-mobile .sub-cat-menu {
    position: static !important;
    display: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    background: #f8fafc !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
#hover-category-menu.mm-mobile .category-nav-element.is-open .sub-cat-menu {
    display: block !important;
}

/* 1 columna */
#hover-category-menu.mm-mobile .sub-cat-menu .card-columns {
    column-count: 1 !important;
    column-gap: 0 !important;
}
#hover-category-menu.mm-mobile .sub-cat-menu .card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}
#hover-category-menu.mm-mobile .sub-cat-menu a {
    display: block !important;
    padding: 8px 0 !important;
}

/* Quick links dentro del panel */
.mm-quick {
    padding: 12px 14px 6px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    background: #fff;
}
.mm-quick-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mm-quick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mm-quick-grid a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    text-decoration: none;
}

/* bloqueo scroll body cuando el panel está abierto */
body.mm-no-scroll {
    overflow: hidden;
}

/* overlay desactivado */
.mm-overlay {
    display: none !important;
}
