/* ComerPlus · efectos visuales (cargar DESPUÉS de style.css) */

/* Barra de progreso de scroll */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    z-index: 1100;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #34d399);
    box-shadow: 0 0 14px rgba(56, 189, 248, .6);
}

/* Header que se compacta al bajar */
.site-header { transition: background .3s ease, box-shadow .3s ease; }
.site-header .header-inner { transition: min-height .3s ease; }
.site-header.is-scrolled { background: rgba(6, 16, 29, .92); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.site-header.is-scrolled .header-inner { min-height: 62px; }
.main-nav a:not(.nav-cta) { position: relative; padding: 4px 0; }
.main-nav a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 0; bottom: -2px;
    width: 100%; height: 2px; border-radius: 2px;
    background: var(--blue-light);
    transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.main-nav a.is-active, .main-nav a:hover { color: #fff; }
.main-nav a.is-active::after, .main-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }

/* Fondo del hero: grilla sutil + brillos que respiran */
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(96, 165, 250, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, .06) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}
.hero-glow-one { animation: glowDrift 14s ease-in-out infinite alternate; }
.hero-glow-two { animation: glowDrift 17s ease-in-out infinite alternate-reverse; }
@keyframes glowDrift {
    from { transform: translate(0, 0) scale(1); opacity: .16; }
    to   { transform: translate(60px, 40px) scale(1.15); opacity: .26; }
}

/* Texto animado con degradé */
.hero h1 span {
    background: linear-gradient(90deg, #60a5fa, #38bdf8, #34d399, #60a5fa);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 6s linear infinite;
}
@keyframes shimmerText { to { background-position: 250% 0; } }

/* Punto de estado latiendo */
.status-dot { animation: pulseDot 2s ease-in-out infinite; }
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); }
    50%      { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}

/* Botones con brillo que cruza */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
    content: ""; position: absolute; top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: skewX(-20deg);
    animation: btnShine 4.5s ease-in-out infinite;
}
@keyframes btnShine { 0%, 55% { left: -80%; } 100% { left: 160%; } }
.btn-arrow { transition: transform .25s ease; }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn-secondary:hover { border-color: rgba(96, 165, 250, .45); background: rgba(59, 130, 246, .08); }

/* Producto: tarjetas flotantes y barras que crecen */
.product-window { transition: transform .2s ease-out; will-change: transform; }
.floating-card-stock { animation: floaty 6s ease-in-out infinite; }
.floating-card-sale  { animation: floaty 7s ease-in-out -2s infinite; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.chart-bars i { transform-origin: bottom; animation: barGrow .9s cubic-bezier(.2, .8, .2, 1) both; }
.chart-bars i:nth-child(2) { animation-delay: .08s; }
.chart-bars i:nth-child(3) { animation-delay: .16s; }
.chart-bars i:nth-child(4) { animation-delay: .24s; }
.chart-bars i:nth-child(5) { animation-delay: .32s; }
.chart-bars i:nth-child(6) { animation-delay: .40s; }
.chart-bars i:nth-child(7) { animation-delay: .48s; }
@keyframes barGrow { from { transform: scaleY(0); } }

/* Aparición al hacer scroll */
.reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Tarjetas con luz que sigue al mouse */
.benefit-card, .testimonial-card { position: relative; overflow: hidden; }
.benefit-card::before, .testimonial-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    opacity: 0; transition: opacity .3s ease;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 165, 250, .16), transparent 60%);
}
.benefit-card:hover::before, .testimonial-card:hover::before { opacity: 1; }
.benefit-card > *, .testimonial-card > * { position: relative; }
.card-icon { transition: transform .3s ease, background .3s ease; }
.benefit-card:hover .card-icon { transform: scale(1.1) rotate(-6deg); background: rgba(59, 130, 246, .22); }
.testimonial-card { transition: transform .25s ease, border-color .25s ease; }
.testimonial-card:hover { transform: translateY(-5px); border-color: rgba(96, 165, 250, .28); }
.stars { color: #fbbf24; letter-spacing: 2px; text-shadow: 0 0 14px rgba(251, 191, 36, .35); }
.testimonial-top { display: flex; justify-content: space-between; align-items: center; }
.testimonial-location { color: #71859a; font-size: 11px; }
.testimonial-card blockquote { margin: 22px 0; color: #bdcbd9; font-size: 14px; line-height: 1.75; min-height: 100px; }
.person-info strong, .person-info span { display: block; }

/* Lista de funciones */
.feature-list > div { transition: background .25s ease; }
.feature-list > div:hover { background: rgba(59, 130, 246, .05); }
.feature-list > div:hover span { color: var(--blue-light); }

/* Capturas y video */
.screen-img:hover { box-shadow: 0 20px 50px rgba(37, 99, 235, .22); }
.video-container { transition: box-shadow .3s ease, border-color .3s ease; }
.video-container:hover { border-color: rgba(96, 165, 250, .3); box-shadow: 0 30px 90px rgba(37, 99, 235, .25); }

/* Sección de seguridad y descarga */
.security-icon { animation: pulseDot 3s ease-in-out infinite; }
.download-section { position: relative; overflow: hidden; }
.download-section::before {
    content: ""; position: absolute; left: 50%; bottom: -260px;
    width: 700px; height: 700px; translate: -50% 0; border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, .28), transparent 65%);
    animation: glowDrift 12s ease-in-out infinite alternate; pointer-events: none;
}
.download-box { position: relative; }
.download-indicator, .download-status { animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* FAQ */
.faq-question { transition: color .2s ease; }
.faq-question:hover { color: var(--blue-light); }
.faq-item.active .faq-question { color: var(--blue-light); }

/* WhatsApp con onda */
.whatsapp-btn::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid #20bd67; animation: ripple 2.6s ease-out infinite;
}
@keyframes ripple { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }

/* Foco accesible */
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; border-radius: 6px; }

/* Modal con zoom suave */
.image-modal.open .modal-content { animation: zoomIn .3s ease; }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
    position: fixed;
    z-index: 1500;
    left: 20px;
    bottom: 20px;
    width: min(460px, calc(100% - 40px));
    display: grid;
    gap: 14px;
    padding: 20px 22px;
    border: 1px solid rgba(96, 165, 250, .25);
    border-radius: 16px;
    background: rgba(9, 22, 37, .96);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .4s ease, transform .4s ease;
}
.cookie-banner.show { opacity: 1; transform: none; }
.cookie-banner p { margin: 0; color: #b7c7d9; font-size: 13px; line-height: 1.6; }
.cookie-banner a { color: var(--blue-light); }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-btn {
    min-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn-primary { color: #fff; border: 0; background: linear-gradient(135deg, #3b82f6, #2563eb); }
.cookie-btn-ghost { color: #dbeafe; background: transparent; border: 1px solid var(--line); }
.cookie-btn-ghost:hover { border-color: rgba(96, 165, 250, .45); }

/* Links legales del footer */
.footer-legal a, .footer-link-btn { color: #7f93a9; text-decoration: none; }
.footer-legal a:hover, .footer-link-btn:hover { color: #fff; }
.footer-link-btn { padding: 0; border: 0; background: none; font-size: inherit; cursor: pointer; }

/* Página de privacidad */
.legal-page { padding: 90px 0 110px; }
.legal-page .container { max-width: 800px; }
.legal-page h1 { margin: 10px 0 8px; font-size: clamp(32px, 5vw, 46px); letter-spacing: -.035em; line-height: 1.1; }
.legal-page h2 { margin: 42px 0 10px; font-size: 21px; letter-spacing: -.02em; }
.legal-page p, .legal-page li { color: var(--muted); font-size: 15px; line-height: 1.8; }
.legal-page ul { padding-left: 20px; }
.legal-page .legal-date { color: #71859a; font-size: 12px; }
.legal-page table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 13px; }
.legal-page th, .legal-page td { padding: 12px 14px; text-align: left; border: 1px solid var(--line); color: #b7c7d9; }
.legal-page th { background: rgba(59, 130, 246, .08); color: #fff; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--blue-light); text-decoration: none; font-weight: 700; font-size: 14px; }

@media (max-width: 640px) {
    .cookie-banner { left: 14px; bottom: 14px; width: calc(100% - 28px); }
    .cookie-actions { justify-content: stretch; }
    .cookie-btn { flex: 1; }
    .legal-page table { display: block; overflow-x: auto; }
}
