/* ================================================================
   DASHBOARD-STYLE ANIMATIONS FOR THE CUSTOMER SITE
   Loaded after style.css. Adds the "live data panel" feel from the
   admin dashboard to the marketing page: glowing stat tiles, animated
   borders, and soft ambient motion.
   ================================================================ */

/* ---------- Hero stat tiles ---------- */
.hero-stats {
    gap: 14px;
}

.hero-stats .stat-item {
    position: relative;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(0, 240, 255, 0.07), rgba(0, 60, 160, 0.03));
    border: 1px solid rgba(0, 240, 255, 0.16);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.hero-stats .stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120px 60px at 50% 0%, rgba(0, 240, 255, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.hero-stats .stat-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 240, 255, 0.38);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 28px rgba(0, 240, 255, 0.1);
}

.hero-stats .stat-item:hover::before {
    opacity: 1;
}

/* Thin animated accent line along the top edge */
.hero-stats .stat-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 40%;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    animation: statScan 3.6s linear infinite;
}

@keyframes statScan {
    0%   { transform: translateX(-120%); opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { transform: translateX(320%); opacity: 0; }
}

/* Number gets the dashboard gradient treatment */
.hero-stats .stat-number {
    background: linear-gradient(135deg, #ffffff 20%, #00f0ff 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}

/* ---------- Product cards: lift + glow on hover ---------- */
.product-card {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease,
                box-shadow 0.35s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 240, 255, 0.32);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45), 0 0 32px rgba(0, 240, 255, 0.08);
}

/* Price pulses subtly so the eye lands on the rate */
.product-case-price {
    animation: priceGlow 4s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% { text-shadow: 0 0 0 rgba(0, 240, 255, 0); }
    50%      { text-shadow: 0 0 18px rgba(0, 240, 255, 0.35); }
}

/* ---------- Stock badge live pulse ---------- */
.stock-badge.in {
    position: relative;
    animation: stockPulse 2.4s ease-in-out infinite;
}

@keyframes stockPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

/* ---------- Section headings: gradient sweep on reveal ---------- */
.section-title {
    background-size: 200% auto;
    transition: background-position 0.8s ease;
}

.visible .section-title {
    background-position: 0% center;
}

/* ---------- Feature / process cards: staggered glow ---------- */
.feature-card,
.process-card,
.cert-badge {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.feature-card:hover,
.process-card:hover,
.cert-badge:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 240, 255, 0.07);
}

/* ---------- Floating cart bar: entering slide ---------- */
.mobile-cart-bar.show {
    animation: cartBarRise 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cartBarRise {
    from { transform: translateY(120%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ---------- Toast: slide + scale ---------- */
.toast {
    animation: toastIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes toastIn {
    from { transform: translateY(-12px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- Buttons: shine sweep on hover (dashboard feel) ---------- */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.btn-primary:hover::after {
    left: 130%;
}

/* ---------- Scroll progress bar gets a glow ---------- */
#scroll-progress-bar {
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero-stats .stat-item::after,
    .product-case-price,
    .stock-badge.in,
    .btn-primary::after,
    .mobile-cart-bar.show,
    .toast {
        animation: none;
    }

    .hero-stats .stat-item:hover,
    .product-card:hover,
    .feature-card:hover,
    .process-card:hover,
    .cert-badge:hover {
        transform: none;
    }
}
