/* ============================================
   Phonesoncredit — Custom CSS & Animations
   ============================================ */

/* Base */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

/* ---- Product Cards ---- */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(30, 107, 255, 0.15);
}
.img-zoom-container { overflow: hidden; }
.img-zoom { transition: transform 0.5s ease; }
.product-card:hover .img-zoom { transform: scale(1.07); }

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #1E6BFF; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #0A1F44; }

/* ---- Fade In (scroll-triggered) ---- */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Stagger delays for grid items ---- */
.fade-up:nth-child(1) { transition-delay: 0s; }
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }
.fade-up:nth-child(6) { transition-delay: 0.40s; }
.fade-up:nth-child(n+7) { transition-delay: 0.48s; }

/* ---- Shimmer skeleton loader ---- */
@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
    background-size: 936px 104px;
    animation: shimmer 1.4s linear infinite;
    border-radius: 8px;
}

/* ---- WhatsApp FAB pulse ---- */
@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    50% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
}
.whatsapp-fab {
    animation: wa-pulse 2s ease-in-out infinite;
}

/* ---- Bounce badge (discount) ---- */
@keyframes badge-bounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-4px) rotate(-5deg); }
}
.discount-badge {
    animation: badge-bounce 1.8s ease-in-out infinite;
}

/* ---- Hero section gentle float ---- */
@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.hero-float { animation: gentle-float 4s ease-in-out infinite; }

/* ---- Button press effect ---- */
.btn-press { transition: transform 0.1s ease, box-shadow 0.1s ease; }
.btn-press:active { transform: scale(0.97); box-shadow: none; }

/* ---- Slide in from right (for success alerts) ---- */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.slide-in-right { animation: slideInRight 0.4s ease-out forwards; }

/* ---- Viewing counter badge ---- */
.viewing-badge {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ---- Mobile grid override ---- */
@media (max-width: 640px) {
    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* ---- Fade in (legacy compat) ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }

/* ---- Modern Animations ---- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

