/* Hero Section Moderno - Basado en la muestra */
.hero-section-modern {
    position: relative;
    min-height: 100vh;
    width: 100% !important;
    margin: 0 !important;
    padding-top: 100px; /* Espacio suficiente desde el header */
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    max-width: 100vw !important;
}

/* Patrón de fondo sutil */
.hero-section-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    z-index: 1;
}

/* Elementos flotantes - mínimos */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.floating-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    animation: float-dot 6s ease-in-out infinite;
}

.dot-1 { top: 15%; left: 12%; animation-delay: 0s; opacity: 0.6; }
.dot-2 { top: 25%; right: 18%; animation-delay: 2s; opacity: 0.4; }
.dot-3 { bottom: 35%; left: 20%; animation-delay: 4s; opacity: 0.5; }

@keyframes float-dot {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Contenedor principal - ANCHO COMPLETO */
.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 60px;
    align-items: center;
    box-sizing: border-box;
}

/* Sección de contenido */
.hero-main-content {
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34D399;
    border-radius: 50px;
    padding: 8px 16px;
    margin-bottom: 20px; /* Reducir margin para optimizar espacio */
    font-size: 13px;
    font-weight: 600;
    animation: slideUp 0.8s ease-out;
}

.hero-badge::before {
    content: "✨";
    margin-right: 8px;
    font-size: 14px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px; /* Reducir margin para optimizar espacio */
    animation: slideUp 0.8s ease-out 0.1s both;
}

.title-main {
    color: #FFFFFF;
    display: block;
    margin-bottom: 6px;
}

.title-accent {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.7;
    margin-bottom: 24px; /* Reducir margin para optimizar espacio */
    color: #E2E8F0;
    font-weight: 400;
    animation: slideUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    margin-bottom: 32px; /* Reducir margin para optimizar espacio */
    animation: slideUp 0.8s ease-out 0.3s both;
}


/* ========================================================================
   HERO BUTTONS - .btn-icon es CONTENEDOR de icono (no el botón)
   IMPORTANTE: Específico solo para hero-section-modern
   NO conflictúa con product-cards donde .btn-icon es el botón completo
   ======================================================================== */
.hero-section-modern .btn .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-block;
}

.hero-section-modern .btn .btn-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

/* Grid de estadísticas - SOLO EN ESCRITORIO */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 0; /* Eliminar margin inferior para optimizar espacio */
    animation: slideUp 0.8s ease-out 0.4s both;
}

/* OCULTAR STATS EN TABLET Y MÓVIL */
@media (max-width: 1024px) {
    .hero-stats {
        display: none !important;
    }
}

.hero-section-modern .stat-item {
    text-align: left;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    /* Override reglas de woo-product-cards.css */
    display: block !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    border: none !important;
    min-height: auto !important;
    line-height: 1.4 !important;
    text-shadow: none !important;
    transition: all 0.3s ease;
}

.hero-section-modern .stat-item:hover {
    transform: translateY(-2px);
    border-top-color: rgba(255, 255, 255, 0.3);
}


.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-section-modern .stat-item:nth-child(1) .stat-number { animation-delay: 0.2s; }
.hero-section-modern .stat-item:nth-child(2) .stat-number { animation-delay: 0.4s; }
.hero-section-modern .stat-item:nth-child(3) .stat-number { animation-delay: 0.6s; }
.hero-section-modern .stat-item:nth-child(4) .stat-number { animation-delay: 0.8s; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* IMPORTANTE: Hacer específico SOLO para hero, no global */
.hero-section-modern .stat-label,
.hero-stats .stat-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    position: relative;
    opacity: 0;
    animation: fadeInLabel 1s ease-out forwards;
}

.hero-section-modern .stat-item:nth-child(1) .stat-label { animation-delay: 0.5s; }
.hero-section-modern .stat-item:nth-child(2) .stat-label { animation-delay: 0.7s; }
.hero-section-modern .stat-item:nth-child(3) .stat-label { animation-delay: 0.9s; }
.hero-section-modern .stat-item:nth-child(4) .stat-label { animation-delay: 1.1s; }

@keyframes fadeInLabel {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Agregar iconos decorativos para cada estadística */
.hero-section-modern .stat-item::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: pulseDot 2s ease-in-out infinite;
}

.hero-section-modern .stat-item:nth-child(1)::after { animation-delay: 0s; }
.hero-section-modern .stat-item:nth-child(2)::after { animation-delay: 0.5s; }
.hero-section-modern .stat-item:nth-child(3)::after { animation-delay: 1s; }
.hero-section-modern .stat-item:nth-child(4)::after { animation-delay: 1.5s; }

@keyframes pulseDot {
    0%, 100% {
        opacity: 0.6;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

/* PRODUCTO DESTACADO - DISEÑO SIMPLE Y LIMPIO */
.hero-product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    animation: slideRight 0.8s ease-out 0.2s both;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.15);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.hero-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Badge como cinta diagonal en esquina superior derecha - SOLO PARA HERO */
.hero-section-modern .hero-product-card .product-badge {
    position: absolute !important;
    top: 15px !important;
    right: -35px !important;
    width: auto !important;
    height: auto !important;
    color: white !important;
    padding: 5px 45px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    transform: rotate(45deg) !important;
    transform-origin: center !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3) !important;
    z-index: 100 !important;
    text-align: center !important;
    line-height: 1.2 !important;
    border: none !important;
    border-radius: 0 !important;
    display: block !important;
}

/* Badge NUEVO - Azul brillante */
.hero-section-modern .hero-product-card .product-badge.new {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
}

/* Badge POPULAR - Morado vibrante */
.hero-section-modern .hero-product-card .product-badge.popular {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

/* Badge DESTACADO/FEATURED - Verde esmeralda */
.hero-section-modern .hero-product-card .product-badge.featured {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
}

/* Badge OFERTA/SALE - Rojo/Naranja llamativo con animación */
.hero-section-modern .hero-product-card .product-badge.sale {
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%) !important;
    animation: pulse-badge 2s ease-in-out infinite !important;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }
    50% {
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    }
}

/* IMPORTANTE: Aplicar solo al hero para evitar conflictos con las cards minimalist */
.hero-product-card .product-icon {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #8B5CF6 0%, #10B981 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    position: relative;
    overflow: hidden;
}

/* Estilos específicos para imágenes reales de productos */
.hero-product-card .product-icon .product-image-real {
    width: 100% !important;
    height: 120px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease !important;
}

.hero-product-card .product-icon:hover .product-image-real {
    transform: scale(1.05) !important;
}

/* Fallback para cuando no hay imagen */
.hero-product-card .product-icon:not(:has(img)) {
    background: linear-gradient(135deg, #8B5CF6 0%, #10B981 100%);
}

/* Títulos de productos SOLO para hero-product-card */
.hero-product-card .product-title {
    font-size: var(--esaico-product-title-font-size, 1.2rem);
    font-weight: var(--esaico-product-title-font-weight);
    color: var(--esaico-product-title-color) !important;
    font-family: var(--esaico-product-title-font-family);
    margin-bottom: 8px;
    line-height: var(--esaico-product-title-line-height);
}

/* Enlaces en títulos del hero - usar sistema global */
.hero-product-card .product-title a {
    color: inherit !important;
    text-decoration: none !important;
    font-family: inherit !important;
    font-weight: inherit !important;
}

.hero-product-card .product-title a:hover {
    color: var(--esaico-product-title-color-hover) !important;
}

/* Descripción de producto SOLO para hero-product-card */
.hero-product-card .product-description {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 14px;
    color: #4a5568;
    font-weight: 400;
}

/* CHECKLIST MEJORADO - ALTO CONTRASTE - SOLO hero-product-card */
.hero-product-card .product-features {
    list-style: none;
    margin-bottom: 16px;
    padding: 0;
}

.hero-product-card .product-features li {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: #2d3748;
    font-weight: 500;
}

.hero-product-card .product-features li::before {
    content: '✓';
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 9px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.hero-product-card .product-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.hero-product-card .current-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: #34D399;
}

/* Estilos especiales para texto GRATIS */
.hero-product-card .current-price span[style*="color: #10B981"] {
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    color: #10B981 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-product-card .original-price {
    font-size: 0.9rem;
    color: #64748B;
    text-decoration: line-through;
    font-weight: 500;
}

.hero-product-card .discount-badge {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* BOTÓN SIMPLE Y LIMPIO - SOLO hero-product-card */
.hero-product-card .btn-product {
    width: 100%;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white !important;
    border: none !important;
    padding: 12px 0px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.hero-product-card .btn-product:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.hero-product-card .btn-product:focus {
    outline: 2px solid rgba(16, 185, 129, 0.5);
    outline-offset: 2px;
}

/* Animaciones */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* EFECTO LIMPIO Y ELEGANTE */
.hero-product-card {
    animation: slideRight 0.8s ease-out 0.2s both;
}

/* RESPONSIVE - ANCHO COMPLETO */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 900px;
        margin: 0 auto;
        padding: 0 30px;
    }

    .hero-main-content {
        text-align: center;
    }

    .hero-product-card {
        max-width: 400px;
        margin: 0 auto;
    }

    /* hero-stats oculto en tablet */
}

/* TABLET - Mantener card del producto visible */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-product-card {
        display: block !important;
    }

    .hero-container {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

/* MÓVIL - ANCHO COMPLETO */
@media (max-width: 768px) {
    .hero-section-modern {
        padding: 40px 0 60px; /* Reducir padding vertical */
        width: 100%;
        margin: 0;
        padding-top: 80px; /* Reducir espacio desde header */
        overflow-x: hidden;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%) !important; /* Fondo claro en móvil */
    }

    /* Ajustar colores de texto para fondo claro en móvil */
    .hero-main-content {
        color: #1a1a1a !important;
    }

    .hero-title .title-main,
    .hero-description {
        color: #1a1a1a !important;
    }

    .hero-badge {
        background: rgba(16, 185, 129, 0.1);
        border-color: rgba(16, 185, 129, 0.3);
        color: #0f766e;
    }

    .hero-stats .stat-number,
    .hero-stats .stat-label {
        color: #1a1a1a !important;
    }

    .hero-container {
        padding: 0 20px;
        gap: 24px; /* Reducir gap entre elementos */
        max-width: 100%;
        width: 100%;
        /* CAMBIO: Solo una columna en móvil, sin card del producto */
        grid-template-columns: 1fr !important;
        justify-items: center;
    }

    .hero-main-content {
        text-align: center;
        width: 100%;
        max-width: 600px;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: row !important; /* BOTONES HORIZONTALES */
        flex-wrap: nowrap !important; /* Sin wrap */
        gap: 12px !important; /* Gap reducido entre botones */
        margin-bottom: 24px !important; /* Reducir margin inferior */
    }

    .btn {
        min-width: 140px; /* Reducir ancho mínimo */
        flex: 1; /* Los botones se reparten el espacio */
        max-width: 160px; /* Máximo ancho */
    }

    /* hero-stats oculto en móvil */

    /* OCULTAR CARD DEL PRODUCTO EN MÓVIL */
    .hero-product-card {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hero-section-modern {
        width: 100%;
        margin: 0;
        padding: 30px 0 40px; /* Espaciado aún más reducido */
        padding-top: 60px; /* Espacio mínimo desde header */
        overflow-x: hidden;
    }

    .hero-container {
        padding: 0 16px;
        gap: 20px; /* Gap aún más reducido */
        max-width: 100%;
        width: 100%;
        /* Mantener layout de una columna */
        grid-template-columns: 1fr !important;
    }

    .hero-main-content {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .hero-badge {
        font-size: 11px;
        padding: 6px 12px;
        margin-bottom: 16px; /* Reducir margin */
    }

    .hero-title {
        margin-bottom: 12px; /* Reducir margin */
    }

    .hero-description {
        margin-bottom: 20px; /* Reducir margin */
    }

    .hero-buttons {
        flex-direction: row !important; /* MANTENER HORIZONTALES */
        gap: 8px !important; /* Gap mínimo entre botones */
        max-width: 320px; /* Ancho máximo para botones */
        margin: 0 auto 20px !important; /* Centrar y reducir margin */
        justify-content: center;
    }

    .btn {
        flex: 1; /* Los botones se reparten el espacio */
        min-width: 120px; /* Ancho mínimo reducido */
        max-width: 140px; /* Ancho máximo reducido */
        padding: 12px 16px; /* Padding reducido */
        font-size: 14px; /* Fuente más pequeña */
    }

    /* hero-stats oculto en móviles pequeños */

    /* MANTENER OCULTO EL CARD DEL PRODUCTO */
    .hero-product-card {
        display: none !important;
    }

    .hero-product-card .current-price {
        font-size: 1.4rem;
    }

    .hero-product-card .current-price span[style*="color: #10B981"] {
        font-size: 1.2rem !important;
    }
}

/* Ocultar elementos flotantes en móvil */
@media (max-width: 768px) {
    .floating-dot {
        display: none;
    }
    
    .hero-section-modern::before {
        opacity: 0.5;
    }
}

/* Soporte para alto contraste */
@media (prefers-contrast: high) {
    .hero-description, .hero-product-card .product-description {
        color: #FFFFFF;
    }

    .hero-product-card .product-features li {
        color: #FFFFFF;
    }
}

/* Soporte para movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-product-card {
        animation: slideRight 0.8s ease-out 0.2s both !important;
    }

    .hero-product-card:hover {
        transform: translateY(-4px) scale(1.01) !important;
    }
}


/* Iconos SVG - estilos manejados por .btn-icon */