/* ===== SOLUCIÓN DEFINITIVA PARA BOTONES ===== */

/* RESET COMPLETO DE TODOS LOS ESTILOS DE BOTONES */
* {
    box-sizing: border-box;
}

/* BOTONES SIEMPRE ARRIBA - SOBRESCRIBE TODO */
.menu-toggle,
.theme-toggle,
body .menu-toggle,
body .theme-toggle,
.header .menu-toggle,
.header .theme-toggle,
.header-actions .menu-toggle,
.header-actions .theme-toggle,
.categories-dropdown .menu-toggle,
.categories-dropdown .theme-toggle,
.categories-dropdown.active .menu-toggle,
.categories-dropdown.active .theme-toggle {
    position: fixed !important;
    top: 20px !important;
    z-index: 99999999 !important;
    width: 35px !important;
    height: 35px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #495057 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    text-align: center !important;
    vertical-align: middle !important;
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* HOVER EFFECTS */
.menu-toggle:hover,
.theme-toggle:hover,
body .menu-toggle:hover,
body .theme-toggle:hover,
.header .menu-toggle:hover,
.header .theme-toggle:hover,
.header-actions .menu-toggle:hover,
.header-actions .theme-toggle:hover,
.categories-dropdown .menu-toggle:hover,
.categories-dropdown .theme-toggle:hover,
.categories-dropdown.active .menu-toggle:hover,
.categories-dropdown.active .theme-toggle:hover {
    background: #0056b3 !important;
    border-color: #004085 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4) !important;
}

/* POSICIONAMIENTO ESPECÍFICO */
.menu-toggle,
body .menu-toggle,
.header .menu-toggle,
.header-actions .menu-toggle,
.categories-dropdown .menu-toggle,
.categories-dropdown.active .menu-toggle {
    right: 20px !important;
    z-index: 99999999 !important;
}

.theme-toggle,
body .theme-toggle,
.header .theme-toggle,
.header-actions .theme-toggle,
.categories-dropdown .theme-toggle,
.categories-dropdown.active .theme-toggle {
    right: 75px !important;
    z-index: 99999998 !important;
}

/* ESTADO ACTIVO DEL BOTÓN HAMBURGUESA */
.menu-toggle.active,
.categories-dropdown.active .menu-toggle {
    background: #dc3545 !important;
    border-color: #c82333 !important;
}

/* LÍNEAS DEL HAMBURGUESA - SIMPLES */
.hamburger-line {
    display: block !important;
    width: 3px !important;
    height: 16px !important;
    background: #495057 !important;
    margin: 0 2px !important;
    border-radius: 2px !important;
    transition: none !important;
    transform: none !important;
}

/* MENÚ DE CATEGORÍAS - MUY DEBAJO */
.categories-dropdown {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: none !important;
    pointer-events: none !important;
}

.categories-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.categories-container {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 400px !important;
    height: 100vh !important;
    background: white !important;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1) !important;
    transform: translateX(100%) !important;
    transition: none !important;
    overflow-y: auto !important;
    z-index: 1 !important;
}

.categories-dropdown.active .categories-container {
    transform: translateX(0) !important;
}

/* ANIMACIÓN DEL BOTÓN HAMBURGUESA - SIN DELAY */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px) !important;
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0 !important;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px) !important;
}

/* ESTILOS DEL BUSCADOR */
.menu-search-section,
.categories-dropdown .menu-search-section {
    padding: 20px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    background: white !important;
}

.menu-search-section .search-input,
.categories-dropdown .menu-search-section .search-input {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    background: #f8f9fa !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.menu-search-section .search-input:focus,
.categories-dropdown .menu-search-section .search-input:focus {
    border-color: #007bff !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

.menu-search-section .search-input::placeholder,
.categories-dropdown .menu-search-section .search-input::placeholder {
    color: #6c757d !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .menu-toggle,
    .theme-toggle,
    body .menu-toggle,
    body .theme-toggle,
    .header .menu-toggle,
    .header .theme-toggle,
    .header-actions .menu-toggle,
    .header-actions .theme-toggle,
    .categories-dropdown .menu-toggle,
    .categories-dropdown .theme-toggle,
    .categories-dropdown.active .menu-toggle,
    .categories-dropdown.active .theme-toggle {
        width: 40px !important;
        height: 40px !important;
        top: 15px !important;
    }
    
    .menu-toggle,
    body .menu-toggle,
    .header .menu-toggle,
    .header-actions .menu-toggle,
    .categories-dropdown .menu-toggle,
    .categories-dropdown.active .menu-toggle {
        right: 15px !important;
    }
    
    .theme-toggle,
    body .theme-toggle,
    .header .theme-toggle,
    .header-actions .theme-toggle,
    .categories-dropdown .theme-toggle,
    .categories-dropdown.active .theme-toggle {
        right: 65px !important;
    }
    
    .hamburger-line {
        width: 2px !important;
        height: 16px !important;
        margin: 0 2px !important;
    }
}
