/* ============================================
   MEGA MENU MODERNO - ConstruDepot
   Sistema de navegación jerárquico con diseño moderno
   ============================================ */

/* Variables */
:root {
    --menu-primary: #0673B5;
    --menu-secondary: #f7931d;
    --menu-dark: #1f2937;
    --menu-gray-50: #f9fafb;
    --menu-gray-100: #f3f4f6;
    --menu-gray-200: #e5e7eb;
    --menu-gray-300: #d1d5db;
    --menu-gray-500: #6b7280;
    --menu-gray-600: #4b5563;
    --menu-gray-700: #374151;
    --menu-gray-800: #1f2937;
    --menu-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --menu-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --menu-radius: 16px;
    --menu-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   NAVBAR PRINCIPAL - MEJORADO
   ============================================ */
.mega-navbar {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    border-bottom: none;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Borde inferior con gradiente naranja a azul */
.mega-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f7931d 0%, #0673B5 100%);
}

.mega-navbar-container {
    display: flex;
    align-items: center;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Toggle para móvil */
.mega-menu-toggle {
    display: none;
    padding: 14px;
    background: linear-gradient(135deg, var(--menu-secondary) 0%, #ffb347 100%);
    border: none;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--menu-transition);
    box-shadow: 0 2px 8px rgba(247, 147, 29, 0.3);
}

.mega-menu-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 147, 29, 0.4);
}

.mega-menu-toggle i {
    font-size: 22px;
    color: white;
}

/* Lista de navegación principal */
.mega-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.mega-nav-item {
    position: relative;
}

.mega-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 32px;
    font-size: 16px;
    font-weight: 700;
    color: var(--menu-gray-800);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: var(--menu-transition);
    position: relative;
    cursor: pointer;
}

.mega-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--menu-secondary), var(--menu-primary));
    transition: var(--menu-transition);
    transform: translateX(-50%);
    border-radius: 2px 2px 0 0;
}

.mega-nav-link:hover,
.mega-nav-item.active .mega-nav-link {
    color: var(--menu-secondary);
    text-decoration: none;
    background: linear-gradient(180deg, transparent 0%, rgba(247, 147, 29, 0.08) 100%);
}

.mega-nav-link:hover::after,
.mega-nav-item.active .mega-nav-link::after {
    width: 100%;
}

.mega-nav-link i {
    font-size: 11px;
    transition: transform 0.3s;
    color: var(--menu-gray-500);
}

.mega-nav-link:hover i,
.mega-nav-item.active .mega-nav-link i {
    color: var(--menu-secondary);
}

.mega-nav-item.active .mega-nav-link i {
    transform: rotate(180deg);
}

/* ============================================
   MEGA PANEL (El panel grande que se abre)
   ============================================ */
.mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    max-width: 1200px;
    background: white;
    border-radius: 0 0 var(--menu-radius) var(--menu-radius);
    box-shadow: var(--menu-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--menu-transition);
    z-index: 1001;
    overflow: hidden;
}

/* Posicionar el panel centrado */
.mega-nav-item:first-child .mega-panel {
    left: 0;
}

.mega-nav-item.active .mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-panel-inner {
    display: flex;
    min-height: 450px;
    max-height: 70vh;
}

/* ============================================
   SIDEBAR DE DEPARTAMENTOS
   ============================================ */
.mega-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--menu-gray-50) 0%, white 100%);
    border-right: 1px solid var(--menu-gray-200);
    padding: 16px 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.mega-sidebar-title {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--menu-gray-500);
    margin-bottom: 8px;
}

.mega-dept-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-dept-item {
    position: relative;
}

.mega-dept-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--menu-gray-700);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--menu-transition);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.mega-dept-link:hover,
.mega-dept-item.active .mega-dept-link {
    background: linear-gradient(90deg, rgba(247, 147, 29, 0.1), transparent);
    color: var(--menu-secondary);
    border-left-color: var(--menu-secondary);
    text-decoration: none;
}

.mega-dept-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: var(--menu-shadow-sm);
    transition: var(--menu-transition);
}

.mega-dept-icon i {
    font-size: 16px;
    color: var(--menu-primary);
}

.mega-dept-item.active .mega-dept-icon,
.mega-dept-link:hover .mega-dept-icon {
    background: linear-gradient(135deg, var(--menu-secondary), #ffb347);
}

.mega-dept-item.active .mega-dept-icon i,
.mega-dept-link:hover .mega-dept-icon i {
    color: white;
}

.mega-dept-arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--menu-gray-400);
    transition: var(--menu-transition);
}

.mega-dept-item.active .mega-dept-arrow,
.mega-dept-link:hover .mega-dept-arrow {
    color: var(--menu-secondary);
    transform: translateX(4px);
}

/* ============================================
   CONTENIDO PRINCIPAL (Categorías y Grupos)
   ============================================ */
.mega-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
    display: none;
}

.mega-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mega-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--menu-gray-100);
}

.mega-content-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--menu-gray-800);
    margin: 0;
}

.mega-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--menu-primary), #0a8fd8);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--menu-transition);
}

.mega-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 115, 181, 0.4);
    color: white;
    text-decoration: none;
}

/* Grid de categorías */
.mega-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.mega-category {
    min-width: 0;
}

.mega-category-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--menu-gray-800);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--menu-secondary);
    display: inline-block;
}

.mega-category-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--menu-transition);
}

.mega-category-title a:hover {
    color: var(--menu-secondary);
}

.mega-groups-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-group-item {
    margin-bottom: 6px;
}

.mega-group-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: var(--menu-gray-600);
    text-decoration: none;
    font-size: 13px;
    transition: var(--menu-transition);
}

.mega-group-link::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--menu-gray-300);
    border-radius: 50%;
    transition: var(--menu-transition);
}

.mega-group-link:hover {
    color: var(--menu-secondary);
    transform: translateX(6px);
    text-decoration: none;
}

.mega-group-link:hover::before {
    background: var(--menu-secondary);
}

/* ============================================
   ESTADO VACÍO
   ============================================ */
.mega-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--menu-gray-500);
    text-align: center;
    padding: 40px;
}

.mega-empty-state i {
    font-size: 48px;
    color: var(--menu-gray-300);
    margin-bottom: 16px;
}

.mega-empty-state p {
    font-size: 14px;
    margin: 0;
}

/* ============================================
   OVERLAY
   ============================================ */
.mega-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--menu-transition);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.mega-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .mega-panel {
        max-width: 100%;
        left: 0 !important;
        right: 0;
        border-radius: 0;
    }

    .mega-sidebar {
        width: 240px;
    }

    .mega-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .mega-content {
        padding: 20px 24px;
    }
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */
@media (max-width: 991px) {
    .mega-menu-toggle {
        display: block;
    }

    .mega-nav-list {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 360px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 0;
        gap: 0;
        z-index: 1002;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: var(--menu-shadow);
    }

    .mega-nav-list.active {
        left: 0;
    }

    .mega-nav-list-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--menu-gray-200);
        background: linear-gradient(135deg, var(--menu-primary), var(--menu-secondary));
    }

    .mega-nav-list-title {
        font-size: 18px;
        font-weight: 700;
        color: white;
        margin: 0;
    }

    .mega-nav-close {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.2);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: white;
        font-size: 18px;
    }

    .mega-nav-item {
        border-bottom: 1px solid var(--menu-gray-100);
    }

    .mega-nav-link {
        padding: 16px 20px;
        justify-content: space-between;
    }

    .mega-nav-link::after {
        display: none;
    }

    .mega-panel {
        position: static;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
    }

    .mega-nav-item.active .mega-panel {
        max-height: 2000px;
    }

    .mega-panel-inner {
        flex-direction: column;
        min-height: auto;
        max-height: none;
    }

    .mega-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--menu-gray-200);
        padding: 12px 0;
        max-height: none;
    }

    .mega-dept-link {
        padding: 12px 20px;
    }

    .mega-content {
        padding: 16px 20px;
        display: none;
    }

    .mega-content.active {
        display: block;
    }

    .mega-categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mega-content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Overlay para cerrar en móvil */
    .mega-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: var(--menu-transition);
    }

    .mega-mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ============================================
   ANIMACIONES SUAVES
   ============================================ */
.mega-dept-item,
.mega-group-item {
    opacity: 0;
    animation: slideIn 0.3s ease forwards;
}

.mega-content.active .mega-dept-item,
.mega-content.active .mega-group-item {
    animation-delay: calc(var(--item-index, 0) * 0.03s);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Para items de la sidebar */
.mega-dept-list .mega-dept-item {
    opacity: 1;
    animation: none;
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */
.mega-sidebar::-webkit-scrollbar,
.mega-content::-webkit-scrollbar {
    width: 6px;
}

.mega-sidebar::-webkit-scrollbar-track,
.mega-content::-webkit-scrollbar-track {
    background: var(--menu-gray-100);
}

.mega-sidebar::-webkit-scrollbar-thumb,
.mega-content::-webkit-scrollbar-thumb {
    background: var(--menu-gray-300);
    border-radius: 3px;
}

.mega-sidebar::-webkit-scrollbar-thumb:hover,
.mega-content::-webkit-scrollbar-thumb:hover {
    background: var(--menu-gray-400);
}

/* ============================================
   NUEVA BARRA DE CATEGORÍAS VISUALES
   Diseño E-commerce con chips/badges
   ============================================ */

/* Navbar de categorías */
.category-navbar {
    display: block !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%) !important;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-height: 60px;
}

.category-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.category-navbar-container {
    display: flex !important;
    align-items: center;
    padding: 12px 24px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 16px;
}

/* Toggle móvil */
.category-mobile-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f7931d 0%, #ffb347 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(247, 147, 29, 0.3);
}

.category-mobile-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 147, 29, 0.4);
}

.category-mobile-toggle i {
    font-size: 18px;
}

/* Wrapper de chips con scroll horizontal */
.category-chips-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.category-chips {
    display: flex !important;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

/* Chips de categoría - Diseño limpio y minimalista */
.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-chip:hover {
    background: #0673B5;
    border-color: #0673B5;
    color: white;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(6, 115, 181, 0.25);
}

.chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.chip-icon i {
    font-size: 11px;
    color: #64748b;
    transition: color 0.2s ease;
}

.category-chip:hover .chip-icon {
    background: rgba(255, 255, 255, 0.2);
}

.category-chip:hover .chip-icon i {
    color: white;
}

.chip-text {
    color: inherit;
}

/* Chip "Ver todos" */
.category-chip-all {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.category-chip-all:hover {
    background: #475569;
    border-color: #475569;
    color: white;
}

.category-chip-all .chip-arrow {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.category-chip-all.active .chip-arrow {
    transform: rotate(180deg);
}

/* Badge de ofertas - El único con color destacado */
.offers-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #f7931d;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.offers-badge:hover {
    background: #e8850f;
    box-shadow: 0 4px 12px rgba(247, 147, 29, 0.35);
    color: white;
    text-decoration: none;
}

.offers-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.offers-badge-tag {
    display: none;
}

/* Panel de todos los departamentos */
.all-depts-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 24px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.all-depts-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.all-depts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
}

.dept-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dept-grid-item:hover {
    background: #0673B5;
    border-color: #0673B5;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(6, 115, 181, 0.25);
}

.dept-grid-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dept-grid-icon i {
    font-size: 18px;
    color: #64748b;
    transition: color 0.2s ease;
}

.dept-grid-item:hover .dept-grid-icon {
    background: rgba(255, 255, 255, 0.2);
}

.dept-grid-item:hover .dept-grid-icon i {
    color: white;
}

.dept-grid-name {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-align: center;
    transition: color 0.2s ease;
}

.dept-grid-item:hover .dept-grid-name {
    color: white;
}

/* Barra promocional - Diseño limpio */
.promo-bar {
    background: #1e3a5f;
    padding: 8px 24px;
    display: flex;
    align-items: center;
}

/* Ocultar botones de menú y ofertas en pantallas grandes */
.promo-menu-btn,
.promo-offers-btn,
.promo-text-center {
    display: none !important;
}

.promo-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 400;
    flex: 1;
}

.promo-bar-content i {
    font-size: 13px;
    color: #f7931d;
    margin-right: 6px;
}

.promo-bar-divider {
    color: rgba(255, 255, 255, 0.3);
}

/* Ocultar mega menu en desktop, mostrar en móvil */
.mega-nav-mobile-wrapper {
    display: none;
}

/* ============================================
   RESPONSIVE - Barra de categorías
   ============================================ */
@media (max-width: 1200px) {
    .category-chips {
        gap: 8px;
    }

    .category-chip {
        padding: 8px 14px;
        font-size: 13px;
    }

    .chip-icon {
        width: 22px;
        height: 22px;
    }

    .chip-icon i {
        font-size: 11px;
    }
}

@media (max-width: 991px) {
    .category-navbar-container {
        padding: 10px 16px;
    }

    .category-mobile-toggle {
        display: flex;
    }

    .category-chips-wrapper {
        display: none;
    }

    .offers-badge {
        padding: 8px 14px;
        font-size: 12px;
    }

    .offers-badge-tag {
        display: none;
    }

    /* Mostrar mega menu legacy en móvil */
    .mega-nav-mobile-wrapper {
        display: block;
    }

    .promo-bar-content {
        font-size: 11px;
        gap: 8px;
    }

    .promo-bar-divider {
        display: none;
    }

    .promo-bar-content span:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 576px) {
    .category-navbar-container {
        padding: 8px 12px;
    }

    .category-mobile-toggle {
        padding: 8px 12px;
        font-size: 13px;
    }

    .category-mobile-toggle span {
        display: none;
    }

    .offers-badge {
        padding: 8px 12px;
    }

    .offers-badge-text {
        display: none;
    }

    .promo-bar {
        padding: 8px 12px;
    }

    .promo-bar-content {
        font-size: 10px;
    }

    .all-depts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .dept-grid-item {
        padding: 12px 8px;
    }

    .dept-grid-icon {
        width: 40px;
        height: 40px;
    }

    .dept-grid-icon i {
        font-size: 16px;
    }

    .dept-grid-name {
        font-size: 11px;
    }
}

/* ============================================
   FIX MOBILE OVERFLOW - Evitar scroll horizontal
   ============================================ */
@media (max-width: 768px) {
    /* Mega navbar wrapper */
    .mega-nav-wrapper,
    .mega-nav-mobile-wrapper {
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Category navbar */
    .category-navbar {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }

    .category-navbar-container {
        width: 100%;
        max-width: 100%;
        padding: 8px 12px;
        box-sizing: border-box;
    }

    /* Chips de categoría con scroll horizontal controlado */
    .category-chips-scroll {
        width: 100%;
        max-width: calc(100vw - 24px);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 5px;
    }

    .category-chips-scroll::-webkit-scrollbar {
        display: none;
    }

    .category-chips {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        padding-right: 12px;
    }

    .category-chip {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Ocultar barra de navegación desktop en móvil */
    .mega-navbar {
        display: none !important;
    }

    /* Promo bar - mostrar solo el primer item en móvil */
    .promo-bar {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
        box-sizing: border-box;
        padding: 6px 12px;
    }

    .promo-bar-content {
        justify-content: center;
        gap: 6px;
        font-size: 11px;
        flex-wrap: nowrap;
    }

    /* Ocultar divisores y items extras en móvil */
    .promo-bar-content .promo-bar-divider {
        display: none !important;
    }

    /* Solo mostrar el primer item (truck + texto) */
    .promo-bar-content > span:not(:first-of-type),
    .promo-bar-content > i:not(:first-of-type) {
        display: none !important;
    }

    .promo-bar-content > i:first-of-type {
        margin-right: 4px;
    }
}

/* ============================================
   MÓVIL (menos de 767px)
   Promo bar con botones de Menú y Ofertas
   ============================================ */
@media (max-width: 767px) {
    /* Ocultar completamente la barra de categorías en móvil */
    .category-navbar {
        display: none !important;
    }

    /* Promo bar con botones de menú y ofertas integrados */
    .promo-bar {
        padding: 0;
        position: relative;
    }

    /* Botón de menú en promo bar */
    .promo-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 14px;
        background: rgba(247, 147, 29, 0.9);
        color: white;
        border: none;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        transition: background 0.2s ease;
    }

    .promo-menu-btn:hover {
        background: #f7931d;
    }

    .promo-menu-btn i {
        color: white;
        margin-right: 0;
    }

    /* Texto central */
    .promo-text-center {
        display: block !important;
        flex: 1;
        text-align: center;
        padding: 10px 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: rgba(255, 255, 255, 0.9);
    }

    .promo-text-center i {
        color: #f7931d;
        margin-right: 4px;
    }

    /* Botón de ofertas en promo bar */
    .promo-offers-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px 14px;
        background: rgba(239, 68, 68, 0.9);
        color: white;
        border: none;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        text-decoration: none;
        transition: background 0.2s ease;
    }

    .promo-offers-btn:hover {
        background: #ef4444;
        color: white;
        text-decoration: none;
    }

    .promo-offers-btn i {
        color: white;
        margin-right: 0;
    }

    /* Ocultar contenido original de promo-bar-content */
    .promo-bar-content {
        display: none !important;
    }
}

/* ============================================
   PANTALLAS MUY PEQUEÑAS (menos de 400px)
   Ajustes adicionales
   ============================================ */
@media (max-width: 400px) {
    /* Panel de departamentos ajustado */
    .all-depts-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000;
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
    }

    .all-depts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .dept-grid-item {
        padding: 10px 6px;
    }

    .dept-grid-icon {
        width: 36px;
        height: 36px;
    }

    .dept-grid-icon i {
        font-size: 14px;
    }

    .dept-grid-name {
        font-size: 10px;
    }
}
