/* ==========================================================================
   Global Styles - The Original Lab Template
   ========================================================================== */

/* Root Variables */
:root {
    /* Colors */
    --primary: #1a1a2e;
    --primary-light: #2d2d44;
    --accent: #2319de;
    --accent-light: #2c28ef;
    --accent-dark: #1e0ece;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* ✅ Evitar scroll horizontal */
}

/* ✅ Quitar márgenes del main */
main {
    display: block;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: calc(100vh - 200px); /* ✅ Altura mínima */
}

/* ✅ Quitar márgenes de secciones antes del footer */
main > section:last-child,
main > div:last-child {
    margin-bottom: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none !important;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

@media (min-width: 768px) {
    .header-container {
        padding: 0 var(--spacing-xl);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    max-width: 120px;
}

.logo-image {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: none;
    gap: var(--spacing-xl);
}

@media (min-width: 1024px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding: var(--spacing-xs) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: var(--spacing-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: black !important;
    background: transparent;
    border: none; /* ✅ Quitar borde */
    outline: none; /* ✅ Quitar outline */
}

.nav-icon:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

/* ✅ Quitar estilos de focus */
.nav-icon:focus,
.nav-icon:focus-visible,
.nav-icon:active {
    outline: none;
    box-shadow: none;
    border: none;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--spacing-xs);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.menu-bar {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: var(--spacing-lg);
    overflow-y: auto;
    z-index: 99;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-item {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--primary);
    color: white;
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .footer-container {
        padding: 0 var(--spacing-xl);
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

.footer-brand {
    margin-bottom: var(--spacing-md);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    max-width: 160px;
}


.footer-description {
    opacity: 0.9;
    line-height: 1.7;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-link {
    opacity: 0.9;
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-link:hover {
    opacity: 1;
    transform: translateX(4px);
    color: var(--accent-light);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.footer-bottom {
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.8;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
}

.text-center {
    text-align: center;
}

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-secondary);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: var(--spacing-lg);
}

/* ==========================================================================
   Loading & Animations
   ========================================================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ==========================================================================
   Mobile Navigation Menu (nav-mobile)
   ========================================================================== */

.nav-mobile {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 1001;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

.nav-mobile.active {
    left: 0;
}

/* Ocultar menú móvil en desktop */
@media (min-width: 1024px) {
    .nav-mobile {
        display: none !important;
    }
    
    .nav-mobile__overlay {
        display: none !important;
    }
}

/* Header del menú */
.nav-mobile__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: #1a1a2e;
}

.nav-mobile__header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.nav-mobile__close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.nav-mobile__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ef4444;
}

/* Navegación */
.nav-mobile__nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.nav-mobile__item {
    display: block;
    padding: 1rem 1.25rem;
    color: #1a1a2e;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.nav-mobile__item:hover {
    background: #f0f4ff;
    color: #2319de;
}

/* Dropdown */
.nav-mobile__dropdown {
    margin-bottom: 0.25rem;
}

.nav-mobile__dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    color: #1a1a2e;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-mobile__dropdown-toggle:hover {
    background: #f0f4ff;
    color: #2319de;
}

.nav-mobile__dropdown-toggle i {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    color: #6b7280;
}

.nav-mobile__dropdown.open .nav-mobile__dropdown-toggle {
    background: #f0f4ff;
    color: #2319de;
}

.nav-mobile__dropdown.open .nav-mobile__dropdown-toggle i {
    transform: rotate(180deg);
    color: #2319de;
}

.nav-mobile__dropdown-content {
    display: none;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-top: 0.25rem;
    border-left: 3px solid #2319de;
    margin-left: 1.25rem;
}

.nav-mobile__dropdown.open .nav-mobile__dropdown-content {
    display: block;
}

.nav-mobile__dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-mobile__dropdown-content a:hover {
    background: #f0f4ff;
    color: #2319de;
}

/* Footer del menú */
.nav-mobile__footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.nav-mobile__user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.nav-mobile__user-info i {
    font-size: 1.75rem;
    color: #2319de;
}

.nav-mobile__user-info span {
    font-weight: 600;
    color: #1a1a2e;
}

.nav-mobile__auth-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #2319de 0%, #1a1a2e 100%);
    color: #ffffff;
    border: none;
}

.nav-mobile__auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 25, 222, 0.3);
}

.nav-mobile__auth-btn--secondary {
    background: transparent;
    color: #2319de;
    border: 2px solid #2319de;
}

.nav-mobile__auth-btn--secondary:hover {
    background: #2319de;
    color: #ffffff;
}

.nav-mobile__logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: transparent;
    color: #ef4444;
    border: 2px solid #ef4444;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-mobile__logout-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Overlay */
.nav-mobile__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.nav-mobile__overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (min-width: 1024px) {
    .nav-mobile__overlay {
        display: none !important;
    }
}

/* ===== OCULTAR ICONOS EN MÓVIL ===== */
@media (max-width: 767px) {
    /* Ocultar wishlist y usuario en header móvil */
    .nav-actions > a.nav-icon[title="Favoritos"],
    .nav-actions > .user-menu-wrapper {
        display: none !important;
    }
    
    /* Solo mostrar búsqueda, carrito y hamburguesa */
    .nav-actions {
        gap: 0.5rem;
    }
}

/* ===== NUEVOS ESTILOS MENÚ MÓVIL ===== */

/* Sección de usuario en el menú móvil */
.nav-mobile__user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ebff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.nav-mobile__user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2319de 0%, #1a1a2e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.nav-mobile__user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-mobile__user-name {
    font-weight: 700;
    color: #1a1a2e;
    font-size: 1rem;
}

.nav-mobile__user-email {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Separador en el menú */
.nav-mobile__divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.75rem 1rem;
}

/* Items con icono */
.nav-mobile__item--icon {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
}

.nav-mobile__item--icon i {
    width: 24px;
    text-align: center;
    font-size: 1.125rem;
    color: #6b7280;
}

.nav-mobile__item--icon:hover i {
    color: #2319de;
}

/* Badge para contador */
.nav-mobile__badge {
    background: #ef4444;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

/* Botones de auth mejorados */
.nav-mobile__auth-btn i {
    margin-right: 0.5rem;
}

/* ===== LOGIN MODAL (usado por cart.js) ===== */
#login-modal.wishlist-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#login-modal.wishlist-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

#login-modal .wishlist-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

#login-modal.show .wishlist-modal {
    transform: scale(1) translateY(0);
}

#login-modal .wishlist-modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#login-modal .wishlist-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

#login-modal .wishlist-modal-header h3 i {
    color: #2319de;
}

#login-modal .wishlist-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.2s;
    font-size: 14px;
}

#login-modal .wishlist-modal-close:hover {
    background: #ef4444;
}

#login-modal .wishlist-modal-body {
    padding: 30px 24px;
}

#login-modal .wishlist-modal-buttons {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
}

#login-modal .wishlist-modal-btn {
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    border: none;
    flex: 1;
}

#login-modal .wishlist-modal-btn.confirm {
    background: linear-gradient(135deg, #2319de 0%, #1a1a2e 100%);
    color: #fff;
}

#login-modal .wishlist-modal-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(35, 25, 222, 0.4);
}

#login-modal .wishlist-modal-btn.cancel {
    background: #fff;
    color: #1a1a2e;
    border: 2px solid #e5e7eb;
}

#login-modal .wishlist-modal-btn.cancel:hover {
    border-color: #1a1a2e;
    background: #f8f9fa;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.mobile-menu-toggle:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.search-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    transform: translateY(-100%);
    transition: transform var(--transition-base);
}

.search-bar.active {
    transform: translateY(0);
}

.search-bar form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-sm);
}

.search-bar input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-bar button[type="submit"] {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.search-bar button[type="submit"]:hover {
    background: var(--accent-dark);
}

.search-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.search-close:hover {
    background: var(--bg-secondary);
    color: var(--error);
}

/* ==========================================================================
   User Dropdown Menu
   ========================================================================== */

.user-menu-wrapper {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 220px;
    box-shadow: var(--shadow-xl);
    z-index: 200;
    overflow: hidden;
}

.user-dropdown-menu .user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.user-dropdown-menu .user-info i {
    font-size: 1.5rem;
    color: var(--accent);
}

.user-dropdown-menu .user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: var(--spacing-xs) 0;
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.user-dropdown-menu .dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}

.user-dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.user-dropdown-menu .dropdown-item:hover i {
    color: var(--accent);
}

.user-dropdown-menu .logout-item:hover {
    background: #fef2f2;
    color: var(--error);
}

.user-dropdown-menu .logout-item:hover i {
    color: var(--error);
}

/* ==========================================================================
   Mini Cart
   ========================================================================== */

.cart-icon-wrapper {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

.mini-cart {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 380px;
    max-width: 90vw;
    box-shadow: var(--shadow-xl);
    z-index: 200;
    max-height: 610px;
    overflow: hidden;
}

/* Mostrar con clase show (usado por cart.js) */
.mini-cart.show,
.mini-cart.active {
    display: block;
}

.mini-cart-header {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.mini-cart-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.mini-cart-empty {
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
}

.mini-cart-empty-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.mini-cart-empty h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.mini-cart-empty p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-md) 0;
}

.mini-cart-items {
    padding: var(--spacing-md);
    max-height: 300px;
    overflow-y: auto;
}

.mini-cart-footer {
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.mini-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    font-size: 1.125rem;
}

.mini-cart-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.btn-view-cart,
.btn-checkout-mini {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    display: block;
    border: none;
}

.btn-view-cart {
    background: var(--accent);
    color: white;
}

.btn-view-cart:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-checkout-mini {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-checkout-mini:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--accent);
}

/* Mini Cart Item Styles (generados por cart.js) */
.mini-cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.mini-cart-item:last-child {
    margin-bottom: 0;
}

.mini-cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.mini-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-cart-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mini-cart-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cart-item-variants {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mini-cart-item-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--accent);
}

.mini-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.mini-cart-qty-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mini-cart-qty-controls {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    overflow: hidden;
}

.mini-cart-qty-btn {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mini-cart-qty-btn:hover {
    background: var(--accent);
    color: white;
}

.mini-cart-qty-input {
    width: 32px;
    height: 26px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    -moz-appearance: textfield;
}

.mini-cart-qty-input::-webkit-outer-spin-button,
.mini-cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mini-cart-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 22px;
    height: 22px;
    background: white;
    border: 1px solid #fecaca;
    border-radius: 50%;
    color: #ef4444;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.mini-cart-item-remove:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Wishlist Count Badge */
.wishlist-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

/* Logo Styles */
.logo a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-sub {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
}

@media (max-width: 767px) {
    .logo-text {
        display: none;
    }
}

/* Payment Methods in Footer */
.payment-methods {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    font-size: 1.5rem;
    opacity: 0.7;
}

/* ===== MINICART RESPONSIVE ===== */
@media (max-width: 767px) {
    .mini-cart {
        position: fixed;
        top: 70px; /* ✅ Debajo del header */
        right: 10px;
        left: 10px;
        width: auto;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 100px);
        border-radius: 16px;
        z-index: 9999;
    }
    
    .mini-cart-items {
        max-height: calc(100vh - 300px);
        overflow-y: auto;
    }
    
    .mini-cart-item {
        padding: 12px;
    }
    
    .mini-cart-item-image {
        width: 60px;
        height: 60px;
        min-width: 60px;
    }
    
    .mini-cart-item-details {
        min-width: 0; /* ✅ Permite que el texto se trunque */
    }
    
    .mini-cart-item-name {
        font-size: 0.875rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mini-cart-qty-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
    
    .mini-cart-qty-input {
        width: 35px;
    }
}