/* ===================================================
   WANT - COMPONENTES RESPONSIVE ADICIONALES
   Mejoras para móviles y tablets
   =================================================== */

/* ===================================================
   BOTÓN DE MENÚ MÓVIL (HAMBURGUESA)
   =================================================== */
.menu-toggle-mobile {
    display: none;
    background: var(--gray-100);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    font-size: 1.3rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle-mobile:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.menu-toggle-mobile:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .menu-toggle-mobile {
        display: flex;
    }
}

/* ===================================================
   HEADER RESPONSIVE MEJORADO
   =================================================== */
@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }
    
    .header-content {
        gap: 12px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .search-container {
        flex: 1;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.3rem;
    }
    
    .search-box {
        padding: 8px 14px;
    }
    
    .search-box input {
        font-size: 0.9rem;
        padding: 4px 10px;
    }
}

/* ===================================================
   CARRITO DE COMPRAS RESPONSIVE
   =================================================== */
.cart-icon-desktop,
.cart-icon-mobile {
    position: relative;
    background: var(--gray-100);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-icon-desktop:hover,
.cart-icon-mobile:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-md);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@media (max-width: 768px) {
    .cart-icon-desktop {
        display: none;
    }
    
    .cart-icon-mobile {
        display: flex;
    }
}

/* ===================================================
   GRID DE PRODUCTOS RESPONSIVE
   =================================================== */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================
   TARJETAS DE PRODUCTO MODERNAS
   =================================================== */
.producto-card {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.producto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.producto-card:hover::before {
    transform: scaleX(1);
}

.producto-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
}

.producto-card-imagen {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--gray-50), white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.producto-card-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.3s ease;
}

.producto-card:hover .producto-card-imagen img {
    transform: scale(1.08);
}

.producto-card-info {
    padding: 20px;
}

.producto-card-nombre {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--gray-800);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.producto-card-precio {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.producto-card-descripcion {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 16px;
}

.producto-card-actions {
    display: flex;
    gap: 10px;
}

.btn-agregar-carrito {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn-agregar-carrito:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-agregar-carrito:active {
    transform: translateY(-1px);
}

/* ===================================================
   BOTTOM NAV PARA MÓVIL
   =================================================== */
.bottom-nav-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 12px 20px;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-mobile.active {
    display: flex;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: var(--radius-lg);
}

.bottom-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary);
    background: var(--primary-soft);
}

@media (max-width: 768px) {
    .bottom-nav-mobile {
        display: flex;
    }
    
    /* Espacio para el bottom nav */
    body.has-bottom-nav {
        padding-bottom: var(--bottom-nav-height);
    }
}

/* ===================================================
   ANIMACIONES Y TRANSICIONES
   =================================================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-up {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* ===================================================
   SCROLLBAR PERSONALIZADO
   =================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* ===================================================
   UTILIDADES RESPONSIVE
   =================================================== */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .show-mobile {
        display: block;
    }
}

@media (max-width: 480px) {
    .hide-tablet {
        display: none;
    }
}

/* ===================================================
   LOADING SPINNER
   =================================================== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===================================================
   TOAST NOTIFICATIONS
   =================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.toast-success .toast-icon {
    background: var(--success-light);
    color: var(--success);
}

.toast-error .toast-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.toast-warning .toast-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}
