/**
 * Mejoras Visuales para hacer la página más llamativa
 * Animaciones, efectos modernos y microinteracciones
 */

/* ============================================
   VARIABLES Y CONFIGURACIÓN
   ============================================ */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #fa709a 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #5ee7df 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 50%, #f6d365 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.1);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.20), 0 8px 24px rgba(0,0,0,0.12);
    --shadow-2xl: 0 24px 64px rgba(0,0,0,0.25), 0 12px 32px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 20px rgba(102,126,234,0.4), 0 0 40px rgba(102,126,234,0.2);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   ANIMACIONES GLOBALES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.6); }
}

/* ============================================
   EFECTOS DE ENTRADA
   ============================================ */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

/* ============================================
   CARDS DE PRODUCTOS MEJORADAS
   ============================================ */
.product-card-enhanced {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    transition: none !important;
    background: #fff;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}

.product-card-enhanced::before {
    display: none !important;
}

.product-card-enhanced:hover::before {
    display: none !important;
}

.product-card-enhanced:hover {
    transform: none !important;
    box-shadow: var(--shadow-2xl);
    border-color: var(--color-primary, #667eea);
}

.product-card-enhanced .product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f8f9fa;
}

.product-card-enhanced .product-image-wrapper img {
    transition: none !important;
    width: 100%;
    height: auto;
}

.product-card-enhanced:hover .product-image-wrapper img {
    transform: scale(1.1);
}

.product-card-enhanced .badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-md);
    animation: none !important;
}

.product-card-enhanced .badge-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--warning-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.product-card-enhanced .quick-view-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 2;
}

.product-card-enhanced:hover .quick-view-btn {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============================================
   BOTONES MEJORADOS
   ============================================ */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all var(--transition-normal);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-enhanced:hover::before {
    width: 300px;
    height: 300px;
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
}

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

.btn-gradient-success {
    background: var(--success-gradient);
    color: white;
}

/* Botón con efecto de brillo */
.btn-glow {
    animation: glow 2s infinite;
}

/* ============================================
   HERO SECTION MEJORADA
   ============================================ */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    overflow: hidden;
    padding: 80px 20px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeIn 1.2s ease-out;
}

.hero-cta {
    animation: fadeIn 1.4s ease-out;
}

/* Partículas flotantes */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 60px; height: 60px; left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { width: 100px; height: 100px; left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { width: 70px; height: 70px; left: 50%; animation-delay: 0.5s; }
.particle:nth-child(5) { width: 90px; height: 90px; left: 70%; animation-delay: 1.5s; }
.particle:nth-child(6) { width: 50px; height: 50px; left: 80%; animation-delay: 2.5s; }

/* ============================================
   GLASSMORPHISM (Efecto de vidrio)
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-card-dark {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
}

/* ============================================
   LOADING STATES ANIMADOS
   ============================================ */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   BADGES Y ETIQUETAS MEJORADAS
   ============================================ */
.badge-modern {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.badge-modern:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.badge-hot {
    background: var(--warning-gradient);
    color: white;
}

.badge-trending {
    background: var(--secondary-gradient);
    color: white;
}

.badge-limited {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    animation: pulse 2s infinite;
}

/* ============================================
   NAVBAR MEJORADO
   ============================================ */
.navbar-enhanced {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.navbar-enhanced.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link-enhanced {
    position: relative;
    padding: 8px 16px;
    transition: color var(--transition-fast);
}

.nav-link-enhanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link-enhanced:hover::after,
.nav-link-enhanced.active::after {
    width: 80%;
}

/* ============================================
   FORMULARIOS MEJORADOS
   ============================================ */
.form-control-enhanced {
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    padding: 12px 16px;
    transition: all var(--transition-normal);
    background: #fff;
}

.form-control-enhanced:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.input-group-enhanced {
    position: relative;
}

.input-group-enhanced .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 3;
}

.input-group-enhanced .form-control-enhanced {
    padding-left: 45px;
}

/* ============================================
   CAROUSEL/SLIDER MEJORADO
   ============================================ */
.carousel-enhanced {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.carousel-enhanced .carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-enhanced .carousel-control-prev,
.carousel-enhanced .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.carousel-enhanced:hover .carousel-control-prev,
.carousel-enhanced:hover .carousel-control-next {
    opacity: 1;
}

.carousel-enhanced .carousel-control-prev {
    left: 20px;
}

.carousel-enhanced .carousel-control-next {
    right: 20px;
}

/* ============================================
   MODAL MEJORADO
   ============================================ */
.modal-enhanced .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-enhanced .modal-header {
    background: var(--primary-gradient);
    color: white;
    border-bottom: none;
    padding: 24px;
}

.modal-enhanced .modal-body {
    padding: 32px;
}

.modal-enhanced .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.modal-enhanced .btn-close:hover {
    opacity: 1;
}

/* ============================================
   CARD DE PRECIO MEJORADA
   ============================================ */
.price-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.price-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.price-card .price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 10px 0;
}

.price-card .price-label {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ============================================
   EFECTOS DE HOVER EN IMÁGENES
   ============================================ */
.image-hover-effect {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.image-hover-effect img {
    transition: transform var(--transition-slow);
}

.image-hover-effect:hover img {
    transform: scale(1.1);
}

.image-hover-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.image-hover-effect:hover::after {
    opacity: 1;
}

/* ============================================
   SCROLL SUAVE
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .product-card-enhanced:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-enhanced {
    box-shadow: var(--shadow-lg);
}

.border-gradient {
    border: 2px solid;
    border-image: var(--primary-gradient) 1;
}

.rounded-enhanced {
    border-radius: 16px;
}

.rounded-xl {
    border-radius: 24px;
}

/* ============================================
   EFECTOS DE SCROLL REVELADOS
   ============================================ */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   EFECTOS DE HOVER MEJORADOS
   ============================================ */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

/* ============================================
   BADGES Y ETIQUETAS ANIMADAS
   ============================================ */
.badge-bounce {
    animation: bounce 2s infinite;
}

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

.badge-pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }
    50% { 
        box-shadow: 0 0 25px rgba(102, 126, 234, 0.8), 0 0 40px rgba(102, 126, 234, 0.6);
    }
}

/* ============================================
   EFECTOS DE TEXTO
   ============================================ */
.text-shimmer {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* ============================================
   CARDS CON EFECTO NEOMORFISMO
   ============================================ */
.neomorphic-card {
    background: #f0f0f0;
    border-radius: 20px;
    box-shadow: 
        20px 20px 60px #bebebe,
        -20px -20px 60px #ffffff;
    transition: all 0.3s ease;
}

.neomorphic-card:hover {
    box-shadow: 
        10px 10px 30px #bebebe,
        -10px -10px 30px #ffffff;
    transform: translateY(-5px);
}

/* ============================================
   BOTONES CON EFECTO NEÓN
   ============================================ */
.btn-neon {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #667eea;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-neon:hover {
    color: white;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}

.btn-neon:hover::before {
    left: 0;
}

/* ============================================
   EFECTOS DE PARTÍCULAS
   ============================================ */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* ============================================
   EFECTOS DE GRADIENTE ANIMADO
   ============================================ */
.gradient-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   EFECTOS DE TARJETA FLIP
   ============================================ */
.flip-card {
    perspective: 1000px;
    width: 100%;
    height: 100%;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

