/**
 * Estilos modernos para PuntoFit - Tienda Online CORREGIDOS
 * Diseño minimalista, profesional y totalmente responsivo
 * VERSIÓN CORREGIDA: Con banner slider funcional y sistema de imágenes optimizado
 * 
 * @package PuntoFit
 * @version 3.1
 */

/* ==================== VARIABLES CSS ==================== */
:root {
    /* Colores principales */
    --primary-color: #1a1a1a;
    --secondary-color: #2563eb;
    --accent-color: #dc2626;
    --success-color: #059669;
    --warning-color: #d97706;
    
    /* Colores de texto */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    /* Colores de fondo */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #111827;
    
    /* Colores de borde */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;
    
    /* Sombras */
    --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);
    
    /* Tipografía */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    
    /* Tamaños de fuente */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    
    /* Espaciado */
    --space-1: 0.25rem;     /* 4px */
    --space-2: 0.5rem;      /* 8px */
    --space-3: 0.75rem;     /* 12px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-8: 2rem;        /* 32px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-16: 4rem;       /* 64px */
    
    /* Otros */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
    --header-height: 80px;
}

/* ==================== BANNER SLIDER CORREGIDO ==================== */
.banner-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-top: var(--header-height);
    background: var(--bg-dark);
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slide.active {
    display: flex;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
    max-width: 600px;
    padding: var(--space-8);
}

.slide-content h2 {
    font-size: var(--text-4xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.slide:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.slide:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.slide.active {
    display: flex;
}

.slide-content p {
    font-size: var(--text-xl);
    margin-bottom: var(--space-6);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slide-btn {
    background: var(--secondary-color);
    color: var(--text-white);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slide-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: var(--transition);
    font-size: var(--text-lg);
    color: var(--text-primary);
}

.slider-arrow:hover {
    background: var(--text-white);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: var(--space-6);
}

.next {
    right: var(--space-6);
}

.slider-indicators {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--text-white);
    transform: scale(1.2);
}

.indicator:hover {
    background: var(--text-white);
}

/* ==================== ESTILOS OPTIMIZADOS PARA IMÁGENES ==================== */

.product-image {
    position: relative;
    width: 100%;
    height: 180px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.product-image-loading {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.product-image-loading.loaded {
    opacity: 1;
    transform: scale(1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Placeholder animado para imágenes en carga */
.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading 1.5s infinite;
    z-index: 2;
}

.product-image.loaded::before {
    display: none;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Vista de lista - imágenes más grandes */
.products-grid.list-view .product-image {
    height: 100%;
    min-height: 200px;
}

/* Modal de producto - imagen más grande */
.product-detail-image {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Responsive para imágenes */
@media (max-width: 768px) {
    .product-image {
        height: 150px;
    }
    
    .products-grid.list-view .product-image {
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 120px;
    }
}

/* ==================== CHECKOUT MODAL ==================== */
.checkout-modal .modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-light);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: var(--bg-primary);
    padding: 0 var(--space-4);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: var(--space-2);
    border: 2px solid var(--border-light);
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--secondary-color);
    color: var(--text-white);
    border-color: var(--secondary-color);
}

.step-text {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.step.active .step-text {
    color: var(--secondary-color);
    font-weight: 600;
}

.checkout-step-content {
    display: none;
}

.checkout-step-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.checkout-summary {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.checkout-summary h5 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.checkout-items {
    margin-bottom: var(--space-4);
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-light);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-info {
    flex: 1;
}

.checkout-item-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.checkout-item-details {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.checkout-item-price {
    font-weight: 600;
    color: var(--text-primary);
}

.checkout-totals {
    border-top: 2px solid var(--border-light);
    padding-top: var(--space-4);
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
    font-size: var(--text-base);
}

.total-line.grand-total {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-2);
    margin-top: var(--space-2);
}

/* Métodos de Pago */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.payment-method-card {
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.payment-method-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.payment-method-card.selected {
    border-color: var(--secondary-color);
    background: rgba(37, 99, 235, 0.05);
}

.payment-icon {
    font-size: 2rem;
    margin-bottom: var(--space-2);
    color: var(--secondary-color);
}

.payment-info h6 {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: var(--text-primary);
}

.payment-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Formularios de Pago */
.payment-forms {
    margin-top: var(--space-6);
}

.payment-form {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.payment-form.active {
    display: block;
}

.payment-form h6 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: var(--text-base);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.efecty-instructions {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--space-4);
}

.efecty-instructions ol {
    margin: var(--space-4) 0;
    padding-left: var(--space-6);
}

.efecty-instructions li {
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
}

/* Confirmación */
.confirmation-message {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.confirmation-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: var(--space-4);
}

.confirmation-message h5 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.confirmation-message p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.6;
}

.order-details {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    margin: var(--space-6) 0;
    text-align: left;
}

.order-details p {
    margin-bottom: var(--space-2);
    display: flex;
    justify-content: space-between;
}

.order-details strong {
    color: var(--text-primary);
}

/* Botones del Checkout */
.checkout-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-6);
    gap: var(--space-4);
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--text-white);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

/* ==================== RESET Y BASE ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
}

/* ==================== FONDO CON IMAGEN Y OPACIDAD ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/fitness.PNG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.8;
    z-index: -1;
    pointer-events: none;
}

/* Fallback si no hay imagen de fondo */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    opacity: 0.7;
    z-index: -2;
    pointer-events: none;
}

/* Asegurar que el contenido principal tenga fondo sólido para mejor legibilidad */
.header,
.hero,
.main-container,
.footer,
.modal-content,
.categories-dropdown-content,
.search-results,
.toast {
    background-color: var(--bg-primary);
    position: relative;
}

/* Efecto de desenfoque opcional para el header */
.header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Mejorar legibilidad en secciones con contenido */
.hero {
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.95) 0%, rgba(243, 244, 246, 0.95) 100%);
}

.main-container {
    background: rgba(255, 255, 255, 0.92);
}

.footer {
    background: rgba(249, 250, 251, 0.95);
}

/* ==================== CONTENEDORES ==================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* ==================== HEADER MODERNO ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--space-4);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-image:hover {
    opacity: 0.8;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary-color);
}

.logo-text-fallback {
    display: flex;
    flex-direction: column;
}

/* Menú hamburguesa */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: var(--text-xl);
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--bg-secondary);
}

/* BOTÓN DE BÚSQUEDA MÓVIL */
.mobile-search-btn {
    display: none;
    background: var(--secondary-color);
    border: none;
    color: var(--text-white);
    padding: var(--space-2);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--text-lg);
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.mobile-search-btn:hover {
    background: #1d4ed8;
}

.mobile-search-btn.active {
    background: var(--accent-color);
}

/* DROPDOWN DE CATEGORÍAS - NUEVO */
.categories-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.categories-dropdown-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: var(--text-sm);
    white-space: nowrap;
}

.categories-dropdown-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

.categories-dropdown-btn.active {
    background: var(--secondary-color);
    color: var(--text-white);
    border-color: var(--secondary-color);
}

.categories-text {
    margin-right: var(--space-1);
}

.categories-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: var(--space-2);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 280px;
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.categories-dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.dropdown-header h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.dropdown-body {
    padding: var(--space-2);
}

.categories-dropdown-list {
    max-height: 400px;
    overflow-y: auto;
}

.category-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    font-weight: 500;
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
}

.category-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--secondary-color);
}

.category-dropdown-item.active {
    background: var(--secondary-color);
    color: var(--text-white);
}

.category-dropdown-count {
    font-size: var(--text-xs);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: var(--space-1) var(--space-2);
    border-radius: 20px;
    font-weight: 600;
}

.category-dropdown-item.active .category-dropdown-count {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

/* Barra de búsqueda mejorada */
.search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 var(--space-4);
}

.search-form {
    display: flex;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    color: var(--text-light);
    margin-right: var(--space-2);
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    color: var(--text-primary);
    outline: none;
    padding: var(--space-3) 0;
}

.search-input-wrapper input::placeholder {
    color: var(--text-light);
}

.clear-search {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: 50%;
    transition: var(--transition);
    margin-left: var(--space-2);
}

.clear-search:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.search-btn {
    background: var(--secondary-color);
    border: none;
    color: var(--text-white);
    padding: 0 var(--space-4);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--text-sm);
}

.search-btn:hover {
    background: #1d4ed8;
}

/* Resultados de búsqueda */
.search-results {
    position: absolute;
    top: calc(100% + var(--space-1));
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
}

.search-result-item {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-category {
    font-size: var(--text-xs);
    color: var(--secondary-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

/* Acciones del header */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--text-white);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ==================== HERO SECTION ==================== */
.hero {
    margin-top: var(--header-height);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: var(--space-16) 0 var(--space-12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e5e7eb" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') center/100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.hero-content p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

.db-warning {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning-color);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--border-radius);
    border: 1px solid rgba(234, 179, 8, 0.2);
    font-size: var(--text-sm);
    font-weight: 500;
}

/* ==================== LAYOUT PRINCIPAL ==================== */
.main-container {
    padding: var(--space-8) 0;
    min-height: calc(100vh - var(--header-height) - 400px);
}

/* Overlay móvil */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==================== SECCIÓN PRODUCTOS ==================== */
.products-section {
    width: 100%;
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-light);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.products-title-section h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.products-count {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.products-controls {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.view-controls {
    display: flex;
    gap: var(--space-1);
}

.view-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: var(--space-2);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: var(--text-sm);
}

.view-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.view-toggle.active {
    background: var(--secondary-color);
    color: var(--text-white);
    border-color: var(--secondary-color);
}

.layout-controls {
    display: flex;
    gap: var(--space-2);
}

.columns-select,
.per-page-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition);
}

.columns-select:hover,
.per-page-select:hover {
    border-color: var(--border-medium);
}

.columns-select:focus,
.per-page-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Loading de productos */
.loading-products {
    text-align: center;
    padding: var(--space-16);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--text-secondary);
}

/* ==================== GRID DE PRODUCTOS MEJORADO ==================== */
.products-grid {
    display: grid;
    gap: var(--space-6);
    transition: grid-template-columns 0.3s ease;
}

/* Sistema de columnas responsivo */
.products-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

.products-grid-8 {
    grid-template-columns: repeat(8, 1fr);
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.products-grid.list-view .product-card {
    flex-direction: row;
    max-height: 200px;
}

.product-image {
    position: relative;
    width: 100%;
    height: 180px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.products-grid.list-view .product-image {
    width: 200px;
    height: 100%;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image span {
    font-size: 2.5rem;
    opacity: 0.3;
    color: var(--text-light);
}

.product-info {
    padding: var(--space-4);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
    flex: 1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products-grid.list-view .product-description {
    -webkit-line-clamp: 3;
}

.product-price {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: var(--space-2);
}

.product-stock {
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.product-stock.in-stock {
    color: var(--success-color);
}

.product-stock.out-of-stock {
    color: var(--accent-color);
}

.product-stock.low-stock {
    color: var(--warning-color);
}

.add-to-cart-btn {
    width: 100%;
    background: var(--secondary-color);
    color: var(--text-white);
    border: none;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.add-to-cart-btn:hover {
    background: #1d4ed8;
}

.add-to-cart-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==================== PAGINACIÓN ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-12);
    flex-wrap: wrap;
}

.pagination button {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: var(--text-sm);
    min-width: 40px;
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

.pagination button.active {
    background: var(--secondary-color);
    color: var(--text-white);
    border-color: var(--secondary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== MODALES ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    padding: var(--space-4);
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 600px;
    margin: var(--space-8) auto;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--space-16));
}

.product-modal .modal-content {
    max-width: 900px;
}

.modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h4 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.close-btn {
    background: var(--bg-secondary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

/* ==================== CARRITO ==================== */
.cart-empty {
    text-align: center;
    padding: var(--space-16) var(--space-8);
    color: var(--text-secondary);
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-4);
    opacity: 0.3;
}

.cart-empty h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.cart-items {
    /* Sin estilos adicionales */
}

.cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image span {
    font-size: var(--text-lg);
    opacity: 0.5;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
    line-height: 1.4;
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: 600;
    font-size: var(--text-sm);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.quantity-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-primary);
}

.quantity-btn:hover {
    background: var(--bg-tertiary);
}

.remove-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.remove-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

.cart-total {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-lg);
}

.total-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.total-amount {
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--text-xl);
}

.checkout-btn {
    background: var(--accent-color);
    color: var(--text-white);
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.checkout-btn:hover {
    background: #b91c1c;
}

/* ==================== MODAL PRODUCTO ==================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: start;
}

.product-detail-image {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-image span {
    font-size: 4rem;
    opacity: 0.3;
}

.product-detail-info h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    line-height: 1.3;
}

.product-detail-price {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--accent-color);
    margin: var(--space-4) 0;
}

.product-detail-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.product-detail-meta {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-sm);
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-item span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-item strong,
.meta-item span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.meta-item .in-stock {
    color: var(--success-color);
}

.meta-item .out-of-stock {
    color: var(--accent-color);
}

.meta-item .low-stock {
    color: var(--warning-color);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-4));
    right: var(--space-4);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.toast {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--accent-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.info {
    border-left: 4px solid var(--secondary-color);
}

.toast-icon {
    font-size: var(--text-lg);
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--accent-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--secondary-color);
}

.toast-message {
    flex: 1;
    font-weight: 500;
    font-size: var(--text-sm);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: var(--text-sm);
    padding: var(--space-1);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    padding: var(--space-8) 0 var(--space-6);
    margin-top: var(--space-16);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-brand h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.footer-links {
    display: flex;
    gap: var(--space-6);
    align-items: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.debug-info {
    font-size: var(--text-xs);
    color: var(--text-light);
    font-family: var(--font-mono);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .products-grid-8 {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .products-grid-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .banner-slider {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: var(--text-2xl);
    }
    
    .slide-content p {
        font-size: var(--text-base);
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
    
    .prev {
        left: var(--space-2);
    }
    
    .next {
        right: var(--space-2);
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .checkout-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        gap: var(--space-3);
        width: 100%;
    }
    
    .step-number {
        margin-bottom: 0;
    }
    
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .banner-slider {
        height: 300px;
    }
    
    .slide-content {
        padding: var(--space-4);
    }
    
    .slide-content h2 {
        font-size: var(--text-xl);
    }
    
    .checkout-modal .modal-content {
        margin: var(--space-2);
    }
}

/* Móvil */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
        --space-4: 1rem;
    }
    
    /* Ajustar fondo para móviles */
    body::before {
        background-attachment: scroll;
        background-position: center center;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* BOTÓN DE BÚSQUEDA MÓVIL - MOSTRAR */
    .mobile-search-btn {
        display: flex;
    }
    
    .header-content {
        position: relative;
    }
    
    /* DROPDOWN CATEGORÍAS MÓVIL */
    .categories-dropdown {
        order: -1;
    }
    
    .categories-text {
        display: none;
    }
    
    .categories-dropdown-btn {
        padding: var(--space-2);
    }
    
    .categories-dropdown-content {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        max-width: none;
        max-height: 60vh;
    }
    
    /* BÚSQUEDA MÓVIL CORREGIDA */
    .search-container {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        margin: 0;
        max-width: none;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-light);
        padding: var(--space-4);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        z-index: 1100;
        box-shadow: var(--shadow-md);
    }
    
    .search-container.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    /* Ajustar z-index para overlay cuando búsqueda está activa */
    .search-container.active ~ .mobile-overlay {
        z-index: 1050;
    }
    
    .hero {
        padding: var(--space-12) 0 var(--space-8);
    }
    
    .hero-content h2 {
        font-size: var(--text-3xl);
    }
    
    .hero-content p {
        font-size: var(--text-base);
    }
    
    .main-container {
        padding: var(--space-6) 0;
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .products-controls {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .view-controls {
        justify-content: center;
    }
    
    .layout-controls {
        justify-content: center;
    }
    
    /* SISTEMA DE COLUMNAS MÓVIL */
    .products-grid-2,
    .products-grid-4,
    .products-grid-6,
    .products-grid-8 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .modal {
        padding: var(--space-2);
    }
    
    .modal-content {
        margin: var(--space-4) auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-4);
    }
    
    .cart-item {
        flex-wrap: wrap;
        gap: var(--space-3);
    }
    
    .cart-item-quantity {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .toast-container {
        left: var(--space-2);
        right: var(--space-2);
        top: calc(var(--header-height) + var(--space-2));
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-3);
    }
    
    .hero {
        padding: var(--space-8) 0 var(--space-6);
    }
    
    .hero-content h2 {
        font-size: var(--text-2xl);
    }
    
    .products-grid-2,
    .products-grid-4,
    .products-grid-6,
    .products-grid-8 {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .product-card {
        border-radius: var(--border-radius);
    }
    
    .action-btn .cart-text,
    .action-btn span:not(.cart-count) {
        display: none;
    }
    
    /* Ocultar texto del login en móviles muy pequeños */
    .login-btn span {
        display: none;
    }
    
    .layout-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .columns-select,
    .per-page-select {
        width: 100%;
    }
}

/* ==================== ANIMACIONES ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, to { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0, -8px, 0); }
    70% { transform: translate3d(0, -4px, 0); }
    90% { transform: translate3d(0, -2px, 0); }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-in-right { animation: slideInFromRight 0.3s ease-out; }
.animate-slide-in-left { animation: slideInFromLeft 0.3s ease-out; }
.animate-bounce { animation: bounce 1s; }

/* ==================== UTILIDADES ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.block { display: block !important; }
.inline { display: inline !important; }
.inline-block { display: inline-block !important; }
.flex { display: flex !important; }

/* ==================== RESPONSIVE LOGO ==================== */
@media (max-width: 768px) {
    .logo-image {
        height: 35px;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 30px;
        max-width: 85px;
    }
}