﻿/* =========================================
   🚀 TOOLBAR OFFICIAL - NARANJA BRAND
   ========================================= */

:root {
    /* Definimos tus colores naranja oficiales */
    --color-brand: #f97316; /* Orange-500 */
    --color-brand-hover: #ea580c; /* Orange-600 */
}

.toolbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: #4b5563; /* gray-600 */
}

.dark .toolbar-item {
    color: #d1d5db; /* gray-300 */
}

/* ✨ HOVER NARANJA (Modo Claro y Oscuro) */
.toolbar-item:hover {
    background: linear-gradient(90deg, var(--color-brand), var(--color-brand-hover));
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35); /* Sombra naranja suave */
}

/* ❤️ FAVORITOS (Mantiene su identidad roja) */
.toolbar-item.text-red-600:hover {
    background: linear-gradient(90deg, #ef4444, #dc2626) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* 📂 SUBMENU ITEMS (DENTRO DEL DROPDOWN) */
.submenu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s ease;
}

.dark .submenu-item {
    color: #9ca3af;
}

.submenu-item:hover {
    background-color: #fff7ed; /* naranja ultra claro (orange-50) */
    color: var(--color-brand);
    transform: translateX(5px);
}

.dark .submenu-item:hover {
    background-color: rgba(249, 115, 22, 0.1); /* naranja sutil en dark */
    color: white;
}

/* 📸 INSTAGRAM SHOPPING (Mantiene su rosa distintivo) */
.submenu-item.text-pink-600:hover {
    background-color: rgba(219, 39, 119, 0.1) !important;
    color: #db2777 !important;
}

/* ─ SEPARADOR VERTICAL */
.border-l {
    border-color: rgba(0, 0, 0, 0.1);
    height: 1.25rem !important;
}

.dark .border-l {
    border-color: rgba(255, 255, 255, 0.1);
}




.submenu-item {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

    .submenu-item:hover {
        background-color: var(--color-hover);
        color: white;
    }

#menuToggle, #darkToggle {
    min-width: 44px;
    min-height: 44px;
}

.user-dropdown:focus-within .user-panel,
.user-dropdown:hover .user-panel {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        transform: translateX(0);
        opacity: .6;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 🌐 Menú móvil ultra-premium */
#mobileMenu {
    background: linear-gradient(135deg, rgba(255,255,255,0.75), rgba(255,255,255,0.55));
    backdrop-filter: blur(16px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateX(-100%) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s;
    opacity: 0;
}

.dark #mobileMenu {
    background: linear-gradient(135deg, rgba(17,24,39,0.85), rgba(31,41,55,0.65));
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#mobileMenu.translate-x-0 {
    transform: translateX(0) scale(1);
    opacity: 1;
}

@keyframes pulseBadge {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ─ Separadores premium */
.menu-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-brand, #f59e0b), transparent);
    margin: 1rem 0;
}

/* 🧭 Títulos de sección */
#mobileMenu p {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-top: 1rem;
    font-weight: 600;
    position: relative;
}

    #mobileMenu p::after {
        content: "";
        display: block;
        width: 40px;
        height: 2px;
        background: var(--color-brand, #f59e0b);
        margin-top: 4px;
        border-radius: 2px;
    }

.dark #mobileMenu p {
    color: #6b7280;
}

/* 🔍 Buscador móvil global */
header form.flex.lg\\:hidden {
    width: 100%;
    margin-top: 0.75rem;
    position: relative;
}

    /* Input premium */
    header form.flex.lg\\:hidden input[type="text"] {
        width: 100%;
        padding: 0.65rem 1rem;
        border-radius: 0.75rem;
        border: 1px solid rgba(156, 163, 175, 0.4); /* gray-400 */
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(12px) saturate(180%);
        font-size: 0.95rem;
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }

.dark header form.flex.lg\\:hidden input[type="text"] {
    background: rgba(31, 41, 55, 0.7); /* gray-800 */
    border: 1px solid rgba(75, 85, 99, 0.6); /* gray-600 */
    color: #f3f4f6; /* gray-100 */
}

/* Focus animado */
header form.flex.lg\\:hidden input[type="text"]:focus {
    outline: none;
    border-color: var(--color-brand, #f59e0b);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
    transform: scale(1.02);
}

/* Botón lupa */
header form.flex.lg\\:hidden button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280; /* gray-500 */
    transition: color 0.3s ease;
}

.dark header form.flex.lg\\:hidden button {
    color: #d1d5db; /* gray-300 */
}

header form.flex.lg\\:hidden button:hover {
    color: var(--color-brand, #f59e0b);
}



/* 🔍 Panel de autocompletado móvil */
#mobileAutocompletePanel {
    position: absolute;
    top: 100%; /* justo debajo del input */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px) saturate(180%);
    border-radius: 0.75rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    z-index: 50;
    max-height: 60vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.dark #mobileAutocompletePanel {
    background: rgba(31,41,55,0.95); /* gris oscuro translúcido */
}

/* 🔎 Items dentro del panel */
#mobileAutocompletePanel .autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

    #mobileAutocompletePanel .autocomplete-item img {
        width: 48px;
        height: 48px;
        border-radius: 0.5rem;
        object-fit: cover;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    #mobileAutocompletePanel .autocomplete-item:hover {
        background: linear-gradient(90deg, var(--color-brand, #f59e0b), var(--color-brand-hover, #f97316));
        color: white;
        transform: translateX(4px);
    }

    /* 📝 Texto dentro del item */
    #mobileAutocompletePanel .autocomplete-item p {
        margin: 0;
        line-height: 1.2;
    }

        #mobileAutocompletePanel .autocomplete-item p.font-semibold {
            font-weight: 600;
        }

        #mobileAutocompletePanel .autocomplete-item p.text-sm {
            font-size: 0.85rem;
            color: #6b7280; /* gray-500 */
        }

.dark #mobileAutocompletePanel .autocomplete-item p.text-sm {
    color: #d1d5db; /* gray-300 */
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem; /* compacto en mobile */
    font-size: 0.85rem;
    border-radius: 0.5rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

/* Primario: Crear cuenta */
.auth-btn-primary {
    background: #f97316;
    color: #fff;
    font-weight: 600;
}

    .auth-btn-primary:hover {
        background: #ea580c;
        transform: translateY(-1px);
    }

/* Secundario: Ingresar */
.auth-btn-secondary {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    color: #111;
    font-weight: 500;
}

.dark .auth-btn-secondary {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: #eee;
}

.auth-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}


/* =========================================
   👑 TOOLBAR & DROPDOWN REFINEMENTS
   ========================================= */

/* Fondo y desenfoque para el Toolbar */
.toolbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .toolbar {
    background-color: rgba(17, 24, 39, 0.9); /* gray-900 original */
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Dropdown Container */
.toolbar-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    z-index: 50;
    /* Estado inicial para animación */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Mostrar dropdown al hacer hover en el grupo */
.group:hover .toolbar-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Modo oscuro para el dropdown */
.dark .toolbar-dropdown {
    background: #111827; /* Tailwind gray-900 */
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Estilo de los items del submenú */
.submenu-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563; /* gray-600 */
    transition: all 0.2s ease;
}

.dark .submenu-item {
    color: #d1d5db; /* gray-300 */
}

.submenu-item:hover {
    background-color: #f3f4f6; /* gray-100 */
    color: var(--color-brand, #3b82f6); /* Cambia a tu color principal */
    transform: translateX(4px);
}

.dark .submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Ajuste específico para el item de Instagram en el dropdown */
.submenu-item.text-pink-600:hover {
    background-color: rgba(219, 39, 119, 0.1);
    color: #db2777 !important;
}

/* Badge del Wishlist con animación suave */
[data-role="wishlist-badge"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 2px white;
}

.dark [data-role="wishlist-badge"] {
    box-shadow: 0 0 0 2px #111827;
}