/*
Theme Name: Hello Elementor Child - FotoEnfocada
Description: Tema hijo para FotoEnfocada Marketplace. Basado en Hello Elementor.
Author: Tu Nombre
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* =============================================================================
   TEMA HIJO - FOTOENFOCADA MARKETPLACE
   ============================================================================= */

/* 
 * NOTA IMPORTANTE: 
 * Los estilos del tema padre se cargan automáticamente vía functions.php
 * Aquí solo agregamos personalizaciones específicas
 */

/* =============================================================================
   PERSONALIZACIONES FOTOENFOCADA
   ============================================================================= */

/* Variables CSS personalizadas */
:root {
    --fe-primary: #2196F3;
    --fe-secondary: #FF9800;
    --fe-success: #4CAF50;
    --fe-danger: #F44336;
    --fe-dark: #212121;
    --fe-light: #F5F5F5;
}

/* Estilos base del marketplace */
.fotoenfocada-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Galería de fotos - Grid responsive */
.fe-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Estilos para preview de fotos con watermark */
.fe-photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.fe-photo-item:hover {
    transform: scale(1.02);
}

.fe-photo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 24px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

/* Buscador de dorsales */
.fe-dorsal-search {
    background: var(--fe-light);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
}

.fe-dorsal-input {
    max-width: 300px;
    padding: 12px 20px;
    font-size: 18px;
    border: 2px solid var(--fe-primary);
    border-radius: 25px;
    margin-right: 15px;
}

/* Botones del marketplace */
.fe-btn {
    background: var(--fe-primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fe-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.fe-btn-secondary {
    background: var(--fe-secondary);
}

.fe-btn-secondary:hover {
    background: #F57C00;
}

/* Carrito flotante */
.fe-cart-summary {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--fe-dark);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
}

/* Responsive design */
@media (max-width: 768px) {
    .fe-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .fe-dorsal-input {
        width: 100%;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .fe-cart-summary {
        bottom: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* Estilos para páginas WooCommerce */
.woocommerce .fe-product-gallery img {
    border-radius: 8px;
    max-height: 400px;
    object-fit: cover;
}

/* Portal de fotógrafos - Dashboard */
.fe-vendor-dashboard {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Estadísticas del vendor */
.fe-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fe-stat-card {
    background: var(--fe-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.fe-stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--fe-primary);
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fe-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Placeholder para cuando no hay fotos */
.fe-no-photos {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.fe-no-photos img {
    max-width: 200px;
    opacity: 0.5;
    margin-bottom: 20px;
}

/* Loading spinner */
.fe-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--fe-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/**
 * ============================================================================
 * ESTILOS MEJORADOS PARA INCENTIVOS DE MARKETING
 * Sistema de Precios Dinámicos - FotoEnfocada
 * Versión: 2.1 Optimizada
 * ============================================================================
 * 
 * INSTRUCCIONES:
 * Agregar este código al archivo style.css de tu tema hijo
 * Ubicación: /wp-content/themes/hello-elementor-child/style.css
 * ============================================================================
 */

/* ============================================================================
   BANNER PRINCIPAL - INCENTIVO DE 4 FOTOS (Banner Verde)
   ============================================================================ */

.fe-marketing-incentive {
    animation: pulse-glow 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Animación de pulso con brillo mejorado */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
        transform: scale(1.02);
    }
}

/* Efecto de brillo que cruza el banner (opcional pero llamativo) */
.fe-marketing-incentive::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Efecto hover para aumentar la interacción */
.fe-marketing-incentive:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.3s ease;
}


/* ============================================================================
   CUADRO ESPECIAL EN SIDEBAR (Cuadro Amarillo)
   ============================================================================ */

.fe-special-offer {
    animation: gentle-bounce 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Animación de rebote suave mejorada */
@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Efecto de parpadeo sutil en el borde */
.fe-special-offer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    animation: border-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes border-pulse {
    0%, 100% {
        opacity: 1;
        border-color: #f59e0b;
    }
    50% {
        opacity: 0.6;
        border-color: #fbbf24;
    }
}

/* Efecto hover */
.fe-special-offer:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
}


/* ============================================================================
   BADGE DEL EMOJI (🎁) - Animación especial
   ============================================================================ */

.fe-marketing-incentive span[style*="font-size: 32px"],
.fe-special-offer div[style*="font-size: 24px"] {
    display: inline-block;
    animation: emoji-bounce 1s ease-in-out infinite;
}

@keyframes emoji-bounce {
    0%, 100% {
        transform: rotate(-5deg) scale(1);
    }
    50% {
        transform: rotate(5deg) scale(1.1);
    }
}


/* ============================================================================
   BARRA DE PROGRESO - Animación del llenado
   ============================================================================ */

.fe-progress-bar-fill {
    animation: progress-fill 1s ease-out;
    transition: width 0.6s ease;
}

@keyframes progress-fill {
    0% {
        width: 0;
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Efecto de brillo en la barra cuando está llena */
.fe-progress-bar-fill[style*="100%"] {
    animation: progress-complete 2s ease-in-out infinite;
}

@keyframes progress-complete {
    0%, 100% {
        box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(52, 211, 153, 0.8);
    }
}


/* ============================================================================
   MENSAJE DE AHORRO (Cuadro Verde de Ahorros)
   ============================================================================ */

.fe-savings-compare {
    animation: savings-appear 0.5s ease-out;
    transition: all 0.3s ease;
}

@keyframes savings-appear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fe-savings-compare:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Animación del emoji de dinero */
.fe-savings-amount::before {
    content: '💰';
    display: inline-block;
    margin-right: 8px;
    animation: money-wiggle 1.5s ease-in-out infinite;
}

@keyframes money-wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}


/* ============================================================================
   BOTÓN "VER MÁS FOTOS DEL EVENTO"
   ============================================================================ */

.fe-upsell-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Efecto de deslizamiento al hacer hover */
.fe-upsell-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.fe-upsell-btn:hover::before {
    left: 100%;
}

.fe-upsell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(78, 84, 255, 0.3);
}

/* Animación de la flecha → */
.fe-upsell-btn:hover {
    padding-right: 38px;
}


/* ============================================================================
   BOTÓN DE CHECKOUT PRINCIPAL
   ============================================================================ */

.fe-checkout-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Efecto de pulso sutil constante */
.fe-checkout-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.fe-checkout-btn:hover::after {
    width: 300px;
    height: 300px;
}

.fe-checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(78, 84, 255, 0.5);
}

/* Animación de pulso continuo para llamar la atención */
@keyframes checkout-pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(78, 84, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 28px rgba(78, 84, 255, 0.6);
    }
}

.fe-checkout-btn {
    animation: checkout-pulse 2s ease-in-out infinite;
}


/* ============================================================================
   CONTADOR DE TIEMPO (Timer)
   ============================================================================ */

.fe-timer-display {
    animation: timer-pulse 1s ease-in-out infinite;
}

@keyframes timer-pulse {
    0%, 100% {
        transform: scale(1);
        color: inherit;
    }
    50% {
        transform: scale(1.05);
        color: #ef4444; /* Rojo de urgencia */
    }
}

/* Cuando quedan menos de 5 minutos, aumentar la urgencia */
.fe-timer-urgent {
    animation: timer-urgent 0.5s ease-in-out infinite;
    color: #dc2626 !important;
    font-weight: 900 !important;
}

@keyframes timer-urgent {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}


/* ============================================================================
   EFECTOS DE ENTRADA PARA ELEMENTOS DEL CARRITO
   ============================================================================ */

/* Fade in suave al cargar la página */
.fe-cart-wrapper {
    animation: fade-in-up 0.6s ease-out;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cada widget del sidebar aparece con un delay */
.fe-cart-sidebar > div:nth-child(1) {
    animation: fade-in-up 0.6s ease-out 0.1s both;
}

.fe-cart-sidebar > div:nth-child(2) {
    animation: fade-in-up 0.6s ease-out 0.2s both;
}

.fe-cart-sidebar > div:nth-child(3) {
    animation: fade-in-up 0.6s ease-out 0.3s both;
}

.fe-cart-sidebar > div:nth-child(4) {
    animation: fade-in-up 0.6s ease-out 0.4s both;
}


/* ============================================================================
   EFECTOS DE MICROINTERACCIONES
   ============================================================================ */

/* Efecto al agregar items al carrito */
.fe-cart-products .cart-item {
    animation: item-added 0.5s ease-out;
}

@keyframes item-added {
    0% {
        opacity: 0;
        transform: scale(0.8) translateX(-20px);
    }
    50% {
        transform: scale(1.05) translateX(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

/* Efecto hover en las miniaturas de fotos */
.fe-cart-products img {
    transition: all 0.3s ease;
}

.fe-cart-products img:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}


/* ============================================================================
   RESPONSIVE - AJUSTES MÓVILES
   ============================================================================ */

@media (max-width: 768px) {
    /* Reducir intensidad de animaciones en móvil para mejor performance */
    .fe-marketing-incentive,
    .fe-special-offer,
    .fe-checkout-btn {
        animation-duration: 3s; /* Más lento en móvil */
    }
    
    /* Desactivar animaciones muy complejas en móvil */
    .fe-marketing-incentive::before,
    .fe-checkout-btn::after {
        display: none;
    }
    
    /* Ajustar transforms en móvil */
    .fe-marketing-incentive:hover,
    .fe-special-offer:hover {
        transform: scale(1.01); /* Menos agresivo en móvil */
    }
}

/* Para dispositivos con preferencia de movimiento reducido (accesibilidad) */
@media (prefers-reduced-motion: reduce) {
    .fe-marketing-incentive,
    .fe-special-offer,
    .fe-checkout-btn,
    .fe-progress-bar-fill,
    .fe-savings-compare,
    .fe-upsell-btn {
        animation: none !important;
        transition: none !important;
    }
    
    .fe-marketing-incentive::before,
    .fe-special-offer::after,
    .fe-checkout-btn::after {
        display: none !important;
    }
}


/* ============================================================================
   MEJORAS DE ACCESIBILIDAD
   ============================================================================ */

/* Mejorar el contraste al hacer foco con teclado */
.fe-upsell-btn:focus,
.fe-checkout-btn:focus,
.fe-back-event-btn:focus {
    outline: 3px solid #4E54FF;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(78, 84, 255, 0.2);
}

/* Asegurar que los textos sean legibles */
.fe-marketing-incentive *,
.fe-special-offer * {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}


/* ============================================================================
   NOTAS DE IMPLEMENTACIÓN
   ============================================================================
   
   1. PERFORMANCE:
      - Todas las animaciones usan transform y opacity (aceleradas por GPU)
      - Evitan layouts y repaints costosos
      - Optimizadas para 60fps
   
   2. ACCESIBILIDAD:
      - Respeta prefers-reduced-motion
      - Focus states claros para navegación por teclado
      - Alto contraste en todos los elementos
   
   3. RESPONSIVE:
      - Animaciones reducidas en móvil para mejor batería
      - Efectos más sutiles en pantallas pequeñas
      - Performance optimizado para dispositivos lentos
   
   4. BROWSER SUPPORT:
      - Chrome 43+
      - Firefox 16+
      - Safari 9+
      - Edge 12+
      - Opera 30+
   
   ============================================================================
 */
