/* Reset y variables CSS - Estilo Premium Footwear */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales - Inspirado en Nike/Adidas */
    --primary-black: #000000;
    --primary-white: #ffffff;
    --accent-red: #ff0000;
    --accent-blue: #0066cc;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    
    /* Colores de estado */
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    
    /* Sombras modernas */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    --shadow-xl: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    
    /* Bordes y transiciones */
    --border-radius: 0px;
    --border-radius-sm: 4px;
    --transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Tipografía moderna */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;
}

body {
    font-family: var(--font-primary);
    background: var(--primary-white);
    color: var(--primary-black);
    line-height: 1.5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-weight: var(--font-weight-regular);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header estilo premium footwear */
.minimal-header {
    background: var(--primary-white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-header h1 {
    font-size: 2rem;
    font-weight: var(--font-weight-black);
    color: var(--primary-black);
    margin: 0;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

/* Estilos para el logo */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    max-height: 80px;
    max-width: 300px;
    height: auto;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.header-logo:hover {
    transform: scale(1.05);
}

.fallback-title {
    font-size: 2rem;
    font-weight: var(--font-weight-black);
    color: var(--primary-black);
    margin: 0;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

/* Banner promocional premium estilo footwear */
.promo-banner {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 25%, #06b6d4 50%, #10b981 75%, #f59e0b 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.promo-banner::after {
    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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.6;
    pointer-events: none;
}

.promo-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 24px;
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.promo-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.3));
    animation: float 3s ease-in-out infinite;
}

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

.promo-text {
    flex: 1;
    color: var(--primary-white);
}

.promo-text strong {
    display: block;
    font-size: 1.4rem;
    font-weight: var(--font-weight-black);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--primary-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-text span {
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    opacity: 0.95;
    color: #cbd5e1;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Estilo para los separadores en el banner */
.promo-text span::before {
    content: '';
}

.promo-text span {
    display: block;
    margin-top: 4px;
}

.promo-whatsapp-btn {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: var(--primary-white);
    text-decoration: none;
    padding: 16px 28px;
    border-radius: 50px;
    font-weight: var(--font-weight-bold);
    font-size: 0.9rem;
    transition: var(--transition);
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    backdrop-filter: blur(10px);
}

.whatsapp-icon {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

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

.promo-whatsapp-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.promo-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.promo-whatsapp-btn:hover::before {
    left: 0;
}

.promo-whatsapp-btn:active {
    transform: translateY(0);
}

/* Búsqueda estilo premium */
.search-minimal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    background: var(--primary-white);
}

.search-input-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: var(--primary-white);
    transition: var(--transition);
    outline: none;
    color: var(--primary-black);
}

#searchInput:focus {
    border-color: var(--primary-black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

#searchInput::placeholder {
    color: var(--gray-500);
    font-weight: var(--font-weight-regular);
}

#clearSearch {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-200);
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#clearSearch:hover {
    background: var(--primary-black);
    color: var(--primary-white);
}

/* Opciones de filtro */
.filter-options {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 12px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-container input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-container input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* Estadísticas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Estados minimalistas mejorados */
.loading-minimal, .message-minimal {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Contenedor principal del loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 200px;
}

/* Spinner principal elegante */
.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #4f46e5;
    border-right: 3px solid #7c3aed;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border: 2px solid transparent;
    border-bottom: 2px solid #06b6d4;
    border-left: 2px solid #10b981;
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Puntos de carga secundarios */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}

.loading-dots div {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out both;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.loading-dots div:nth-child(1) { animation-delay: -0.32s; }
.loading-dots div:nth-child(2) { animation-delay: -0.16s; }
.loading-dots div:nth-child(3) { animation-delay: 0s; }

@keyframes loading-bounce {
    0%, 80%, 100% { 
        transform: scale(0.6) translateY(0);
        opacity: 0.5;
    } 
    40% { 
        transform: scale(1) translateY(-10px);
        opacity: 1;
    }
}

/* Texto de carga elegante */
.loading-text {
    color: var(--gray-700);
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    margin: 16px 0 8px 0;
    animation: pulse-text 1.5s infinite;
    transition: opacity 0.15s ease;
}

.loading-subtext {
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: var(--font-weight-regular);
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Barra de progreso elegante mejorada */
.loading-progress {
    width: 280px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #4f46e5 25%, 
        #7c3aed 50%, 
        #06b6d4 75%, 
        transparent 100%);
    animation: loading-slide 1.5s infinite;
    border-radius: 3px;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 3px;
    transition: width 0.2s ease;
}

/* Progreso determinado */
.loading-progress.determinate::before {
    display: none;
}

.loading-progress.determinate::after {
    animation: none;
}

/* Estados de progreso */
.loading-progress[data-progress="25"]::after { width: 25%; }
.loading-progress[data-progress="50"]::after { width: 50%; }
.loading-progress[data-progress="75"]::after { width: 75%; }
.loading-progress[data-progress="100"]::after { width: 100%; }

@keyframes loading-slide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Indicador de estado de conexión */
.connection-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(10px);
}

.connection-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.connection-indicator.connecting {
    background: #f59e0b;
    animation: pulse-connection 1.5s infinite;
}

.connection-indicator.connected {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.connection-indicator.error {
    background: #ef4444;
    animation: blink-error 1s infinite;
}

@keyframes pulse-connection {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.7;
    }
}

@keyframes blink-error {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.connection-text {
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
}

/* Pasos de carga */
.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
    max-width: 300px;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.loading-step.pending {
    background: rgba(156, 163, 175, 0.1);
    color: var(--gray-500);
}

.loading-step.active {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border-left: 3px solid #4f46e5;
}

.loading-step.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-left: 3px solid #10b981;
}

.step-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    flex-shrink: 0;
}

.loading-step.pending .step-icon {
    background: var(--gray-300);
    color: var(--gray-500);
}

.loading-step.active .step-icon {
    background: #4f46e5;
    color: white;
    animation: spin 1s linear infinite;
}

.loading-step.completed .step-icon {
    background: #10b981;
    color: white;
}

.loading-step.completed .step-icon::after {
    content: '✓';
}

.loading-step.active .step-icon::after {
    content: '⟳';
}

/* Efecto de ondas de fondo */
.loading-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    opacity: 0.1;
    pointer-events: none;
}

.loading-waves::before,
.loading-waves::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #4f46e5;
    border-radius: 50%;
    animation: wave 3s infinite;
}

.loading-waves::before {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
}

.loading-waves::after {
    width: 200px;
    height: 200px;
    animation-delay: 1s;
}

@keyframes wave {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Skeleton Loading para productos */
.skeleton-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 40px 0;
    max-width: 1400px;
    margin: 0 auto;
}

.skeleton-card {
    background: var(--primary-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    animation: skeleton-fade 1.5s ease-in-out infinite alternate;
}

.skeleton-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(90deg, 
        var(--gray-200) 0%, 
        var(--gray-100) 50%, 
        var(--gray-200) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s infinite;
}

.skeleton-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-title {
    height: 20px;
    background: linear-gradient(90deg, 
        var(--gray-200) 0%, 
        var(--gray-100) 50%, 
        var(--gray-200) 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 2s infinite;
    animation-delay: 0.1s;
}

.skeleton-subtitle {
    height: 14px;
    width: 60%;
    background: linear-gradient(90deg, 
        var(--gray-200) 0%, 
        var(--gray-100) 50%, 
        var(--gray-200) 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 2s infinite;
    animation-delay: 0.2s;
}

.skeleton-price {
    height: 24px;
    width: 40%;
    background: linear-gradient(90deg, 
        var(--gray-200) 0%, 
        var(--gray-100) 50%, 
        var(--gray-200) 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 2s infinite;
    animation-delay: 0.3s;
    margin-top: 8px;
}

.skeleton-button {
    height: 48px;
    background: linear-gradient(90deg, 
        var(--gray-200) 0%, 
        var(--gray-100) 50%, 
        var(--gray-200) 100%);
    background-size: 200% 100%;
    border-radius: var(--border-radius);
    animation: skeleton-shimmer 2s infinite;
    animation-delay: 0.4s;
    margin-top: 16px;
}

.skeleton-badges {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.skeleton-badge {
    height: 24px;
    width: 60px;
    background: linear-gradient(90deg, 
        var(--gray-200) 0%, 
        var(--gray-100) 50%, 
        var(--gray-200) 100%);
    background-size: 200% 100%;
    border-radius: 12px;
    animation: skeleton-shimmer 2s infinite;
}

.skeleton-badge:nth-child(1) { animation-delay: 0.1s; }
.skeleton-badge:nth-child(2) { animation-delay: 0.2s; }
.skeleton-badge:nth-child(3) { animation-delay: 0.3s; }

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-fade {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

/* Responsive para skeleton */
@media (max-width: 768px) {
    .skeleton-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 24px 16px;
    }
    
    .skeleton-image {
        height: 240px;
    }
}

.message-minimal p {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.btn-minimal {
    background: var(--gray-900);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-minimal:hover {
    background: var(--gray-700);
}

.error-message {
    color: var(--danger-color);
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.retry-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
    transition: var(--transition);
}

.retry-btn:hover {
    background: var(--primary-hover);
}

.no-results i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.no-results small {
    color: var(--gray-500);
}

/* Contenedor de productos estilo premium */
.products-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 80px;
    background: var(--gray-50);
}

.products-grid-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

/* Animación de entrada para las tarjetas optimizada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(n+7) { animation-delay: 0.35s; }

/* Tarjeta de producto estilo premium footwear */
.product-card {
    background: var(--primary-white);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--primary-black);
    transition: var(--transition);
    z-index: 1;
}

.product-card:hover::before {
    height: 3px;
}

.product-card:hover {
    border-color: var(--primary-black);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Efecto de overlay sutil en hover */
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.05) 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 0;
}

.product-card:hover::after {
    opacity: 1;
}

/* Contenedor de imagen premium */
.product-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    background: var(--primary-white);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gray-200);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: var(--transition);
    padding: 20px;
    background: var(--primary-white);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-200);
    color: var(--gray-500);
    font-size: 3rem;
    flex-direction: column;
    gap: 12px;
}

.no-image::after {
    content: "Sin imagen";
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: var(--font-weight-medium);
}

/* Contenido de la tarjeta premium */
.product-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.product-header {
    margin-bottom: 6px;
}

.product-name {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-black);
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover .product-name {
    color: var(--primary-black);
    transform: translateX(2px);
}

.product-code {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: var(--font-weight-medium);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Monaco', 'Menlo', monospace;
}

.product-brand {
    font-size: 0.75rem;
    color: var(--gray-700);
    font-weight: var(--font-weight-black);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.product-brand::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-black);
    transition: var(--transition);
}

.product-card:hover .product-brand::after {
    width: 100%;
}

.product-price {
    font-size: 1.25rem;
    font-weight: var(--font-weight-black);
    color: var(--primary-black);
    margin: 12px 0 6px 0;
    position: relative;
}

.product-price::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-red);
    transition: var(--transition);
}

.product-card:hover .product-price::before {
    height: 100%;
}

/* Atributos de variante premium */
.product-attributes {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.attribute-badge {
    background: var(--gray-100);
    color: var(--primary-black);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.attribute-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-black);
    transition: var(--transition);
    z-index: -1;
}

.product-card:hover .attribute-badge {
    color: var(--primary-white);
    border-color: var(--primary-black);
}

.product-card:hover .attribute-badge::before {
    left: 0;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
}

.price-currency {
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

/* Sección de stock rediseñada */
.stock-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stock-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stock-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stock-text {
    font-size: 0.8rem;
    opacity: 0.9;
}

.stock-status-text {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stock-badge.available {
    background: rgb(16 185 129 / 0.1);
    color: var(--success-color);
}

.stock-badge.out-of-stock {
    background: rgb(239 68 68 / 0.1);
    color: var(--danger-color);
}

.stock-badge.low-stock {
    background: rgb(245 158 11 / 0.1);
    color: var(--warning-color);
}

.stock-quantity {
    font-weight: 600;
}

.stock-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-icon.available {
    background: var(--success-color);
}

.stock-icon.out-of-stock {
    background: var(--danger-color);
}

.stock-icon.low-stock {
    background: var(--warning-color);
}

/* Responsive estilo premium */
@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
        height: 80px;
    }
    
    .minimal-header h1 {
        font-size: 1.5rem;
    }
    
    .header-logo {
        max-height: 60px;
        max-width: 250px;
    }
    
    .fallback-title {
        font-size: 1.5rem;
    }
    
    .promo-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px 16px;
    }
    
    .promo-text strong {
        font-size: 1.125rem;
    }
    
    .promo-whatsapp-btn {
        padding: 16px 24px;
        font-size: 0.875rem;
        width: 100%;
        max-width: 280px;
    }
    
    .search-minimal {
        padding: 24px 16px;
    }
    
    .products-container {
        padding: 0 16px 60px;
    }
    
    .products-grid-minimal {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 24px 0;
    }
    
    .product-card {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }
    
    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    }
    
    .product-image-container {
        height: 280px;
    }
    
    .product-content {
        padding: 20px;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    .add-to-cart-btn,
    .add-selected-variant-btn {
        padding: 16px 20px;
        font-size: 0.8rem;
    }
    
    .cart-floating-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .cart-icon {
        font-size: 1.3rem;
    }
    
    .cart-counter {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        top: -8px;
        right: -8px;
        border: 2px solid var(--primary-white);
    }
    
    /* Banner promocional responsive */
    .promo-content {
        padding: 20px 16px;
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .promo-icon {
        font-size: 2.5rem;
    }
    
    .promo-text strong {
        font-size: 1.2rem;
    }
    
    .promo-text span {
        font-size: 0.9rem;
    }
    
    .promo-whatsapp-btn {
        padding: 14px 24px;
        font-size: 0.85rem;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .minimal-header h1 {
        font-size: 1.25rem;
    }
    
    .header-logo {
        max-height: 50px;
        max-width: 200px;
    }
    
    .fallback-title {
        font-size: 1.25rem;
    }
    
    .stats-inline {
        font-size: 0.8rem;
    }
    
    .search-input-container {
        max-width: 100%;
    }
    
    .product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .products-grid-minimal {
        gap: 1rem;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    .product-image {
        padding: 0.25rem;
    }
}

/* Estilos para vista agrupada */
.grouped-card {
    border-left: 4px solid var(--primary-color);
}

.variants-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    min-width: 20px;
    text-align: center;
}

.product-price-range {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 8px 0;
}

/* Contenedor de variantes premium */
.variants-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.variant-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 10px 12px;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 0.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.variant-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-black);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.variant-badge:hover {
    background: var(--gray-50);
    border-color: var(--primary-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.variant-badge:hover::before {
    transform: scaleX(1);
}

.variant-badge:hover .variant-attributes,
.variant-badge:hover .variant-price-small {
    color: var(--primary-white);
    z-index: 1;
    position: relative;
}

.variant-badge.selected {
    background: var(--primary-black);
    color: var(--primary-white);
    border-color: var(--primary-black);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: relative;
}

.variant-badge.selected::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.variant-badge.selected::before {
    transform: scaleX(1);
}

.variant-attributes {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.variant-price-small {
    font-size: 0.65rem;
    opacity: 0.8;
    margin-top: 4px;
    font-weight: var(--font-weight-medium);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.variant-badge.selected .variant-price-small {
    opacity: 1;
    color: var(--primary-white);
}

.variant-badge.selected .variant-attributes {
    color: var(--primary-white);
}

/* Info de variante seleccionada */
.selected-variant-info {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.variant-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.variant-name-selected {
    font-weight: 500;
    color: var(--gray-900);
}

.variant-stock-selected.available {
    color: var(--success-color);
    font-weight: 500;
}

.variant-stock-selected.out-of-stock {
    color: var(--danger-color);
    font-weight: 500;
}

/* Estilos de toggles eliminados - ya no se necesitan */

/* Responsividad para vista agrupada */
@media (max-width: 768px) {
    .variants-container {
        gap: 4px;
    }
    
    .variant-badge {
        min-width: 40px;
        padding: 5px 6px;
        font-size: 0.7rem;
    }
    
    .variant-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ============================================================================ */
/* ESTILOS DEL CARRITO DE COMPRAS - MOBILE FIRST */
/* ============================================================================ */

/* Botón flotante del carrito - Estilo premium */
.cart-floating-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
    border: 3px solid var(--primary-white);
}

.cart-floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.cart-icon {
    font-size: 1.5rem;
    color: var(--primary-white);
}

.cart-counter {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--primary-white);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: var(--font-weight-black);
    display: none;
    border: 3px solid var(--primary-white);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: pulse-counter 2s infinite;
    z-index: 1001;
}

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

@keyframes bounce-counter {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Botones estilo premium footwear */
.add-to-cart-btn {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: var(--primary-white);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-black);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.add-to-cart-btn:hover::before {
    left: 0;
}

.add-to-cart-btn:hover:not(:disabled) {
    color: var(--primary-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    border-color: transparent;
}

.add-to-cart-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.5);
}

.add-to-cart-btn:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    border-color: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.add-to-cart-btn.disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    border-color: var(--gray-300);
}

/* Acciones de productos agrupados */
.grouped-product-actions {
    margin-top: 20px;
}

.add-selected-variant-btn {
    width: 100%;
    padding: 18px 24px;
    background: var(--accent-red);
    color: var(--primary-white);
    border: 2px solid var(--accent-red);
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-black);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    overflow: hidden;
}

.add-selected-variant-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-white);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.add-selected-variant-btn:hover::before {
    left: 0;
}

.add-selected-variant-btn:hover {
    color: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.15);
}

/* Mensajes del carrito */
.cart-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    max-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.cart-message.show {
    opacity: 1;
    transform: translateX(0);
}

.cart-message-success {
    background: var(--success-color);
}

.cart-message-error {
    background: var(--danger-color);
}

.cart-message-warning {
    background: var(--warning-color);
}

.cart-message-info {
    background: var(--primary-color);
}

/* Modal del carrito */
.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    display: none;
    backdrop-filter: blur(4px);
}

.cart-modal {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
}

.cart-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.close-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    color: white;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cart-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Carrito vacío */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
}

.empty-cart-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-cart p {
    color: var(--gray-600);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

/* Items del carrito */
.cart-items {
    padding: 0;
}

.cart-item {
    display: flex;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    gap: 12px;
    align-items: flex-start;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-100);
}

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

.cart-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gray-400);
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-details h4 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
}

.item-code, .item-attributes {
    margin: 2px 0;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.item-price {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-100);
    border-radius: 6px;
    padding: 4px;
}

.quantity-controls button {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.quantity-controls button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.quantity-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.item-subtotal {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.9rem;
    margin: 0;
}

.remove-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--danger-color);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-item:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Footer del carrito */
.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.cart-total {
    margin-bottom: 16px;
    text-align: center;
}

.cart-total h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--gray-900);
}

.cart-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0 0 12px 12px;
}

.cart-actions .btn-primary, .cart-actions .btn-secondary {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.cart-actions .btn-primary {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    border: 2px solid transparent;
}

.cart-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
    transition: all 0.4s ease;
    z-index: -1;
}

.cart-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.cart-actions .btn-primary:hover::before {
    left: 0;
}

.cart-actions .btn-secondary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    border: 2px solid transparent;
}

.cart-actions .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transition: all 0.4s ease;
    z-index: -1;
}

.cart-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

.cart-actions .btn-secondary:hover::before {
    left: 0;
}

/* Modal de checkout mejorado */
.checkout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1003;
    display: none;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

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

.checkout-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 550px;
    max-height: 90%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    animation: slideInScale 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.checkout-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 20px 20px 0 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.checkout-header::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.checkout-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
    font-weight: var(--font-weight-black);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.checkout-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Formulario de checkout */
.customer-info h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--gray-900);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Resumen del pedido en checkout */
.order-summary {
    margin: 24px 0;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
}

.order-summary h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--gray-900);
    font-weight: 700;
}

.checkout-items {
    margin-bottom: 16px;
}

.checkout-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--gradient-secondary);
}

.checkout-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--white);
}

.no-image-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 1.2rem;
    background: var(--gradient-secondary);
}

.checkout-item-info {
    flex: 1;
    min-width: 0;
}

.checkout-item-info h5 {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
}

.checkout-attributes,
.checkout-quantity {
    margin: 2px 0;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.checkout-item-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-align: right;
}

.checkout-total {
    padding-top: 16px;
    border-top: 2px solid var(--gray-300);
    text-align: right;
}

.checkout-total h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.checkout-actions {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    padding: 20px 28px 28px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 0 0 20px 20px;
}

.checkout-actions .btn-primary {
    flex: 2;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: var(--font-weight-bold);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.checkout-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
}

.checkout-actions .btn-secondary {
    flex: 1;
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-actions .btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-1px);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .cart-modal {
        max-width: 100%;
        width: 100%;
    }
    
    .checkout-modal {
        width: 95%;
        max-height: 95%;
    }
    
    .cart-floating-button {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    .cart-icon {
        font-size: 1.3rem;
    }
    
    .cart-counter {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    .cart-message {
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .cart-item {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    /* Banner promocional responsive */
    .promo-content {
        padding: 16px 1rem;
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .promo-icon {
        font-size: 2.2rem;
    }
    
    .promo-text strong {
        font-size: 1.1rem;
    }
    
    .promo-text span {
        font-size: 0.85rem;
    }
    
    .promo-whatsapp-btn {
        padding: 12px 20px;
        font-size: 0.8rem;
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .checkout-modal {
        width: 98%;
        max-height: 98%;
    }
    
    .checkout-header,
    .checkout-content,
    .cart-header,
    .cart-footer {
        padding: 16px;
    }
    
    .cart-item {
        padding: 10px 16px;
    }
}

/* ============================================================================ */
/* ESTILOS PARA SECCIÓN DE PLANES DE FINANCIACIÓN DESPLEGABLE */
/* ============================================================================ */

/* Sección de planes de financiación mejorada y desplegable */
.product-credit-section {
    margin: 16px 0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--primary-white);
}

.product-credit-section.expanded {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

/* Botón toggle para planes */
.credit-toggle-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: #475569;
    transition: all 0.3s ease;
    position: relative;
}

.credit-toggle-btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #4f46e5;
}

.product-credit-section.expanded .credit-toggle-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: var(--primary-white);
}

.product-credit-section.expanded .credit-toggle-btn:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* Elementos del botón toggle */
.credit-toggle-icon {
    font-size: 1rem;
    margin-right: 8px;
}

.credit-toggle-text {
    flex: 1;
    text-align: left;
    font-weight: var(--font-weight-semibold);
}

.credit-toggle-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.product-credit-section.expanded .credit-toggle-arrow {
    transform: rotate(180deg);
}

/* Contenido desplegable */
.credit-content {
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 0;
    opacity: 0;
}

.credit-content[style*="block"] {
    max-height: 300px;
    opacity: 1;
}

.product-credit-price {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #475569;
    font-weight: var(--font-weight-medium);
    background: rgba(248, 250, 252, 0.8);
    padding: 16px;
    margin: 0;
    border-top: 1px solid #e2e8f0;
    white-space: pre-line;
}

.product-credit-price br {
    margin-bottom: 4px;
}

/* Animación suave para el contenido - versión simplificada */
.product-credit-section:not(.expanded) .credit-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.product-credit-section.expanded .credit-content {
    max-height: 300px;
    opacity: 1;
    padding-top: 0;
    padding-bottom: 0;
}

/* Efecto hover para toda la sección */
.product-card:hover .product-credit-section:not(.expanded) {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .credit-toggle-btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    
    .credit-toggle-text {
        font-size: 0.8rem;
    }
    
    .product-credit-price {
        padding: 14px;
        font-size: 0.75rem;
    }
}
