/* ==========================================================================
   ShopMaster 2026 - Global Theme & Pinterest Micro-Design System
   ========================================================================== */

:root {
    --theme-primary: #4f46e5;
    --theme-secondary: #06b6d4;
    --theme-accent: #f59e0b;
    --theme-cta: #4f46e5;
    --theme-discount: #e11d48;
    --theme-price: #059669;
    --theme-btn-bg: #4f46e5;
    --theme-btn-text: #ffffff;
    --theme-btn-radius: 0.75rem;
    --theme-card-radius: 1.25rem;
    --theme-card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --theme-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-sans: 'Vazirmatn', system-ui, -apple-system, sans-serif;
}

/* Base Body Stability & Anti-Overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body.drawer-open {
    overflow: hidden !important;
    touch-action: none;
}

/* GPU Accelerated Transitions */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Pinterest Minimal Card Base */
.pinterest-card {
    border-radius: var(--theme-card-radius);
    box-shadow: var(--theme-card-shadow);
    transition: transform 0.28s var(--theme-spring), box-shadow 0.28s ease, border-color 0.2s ease;
    border: 1px solid rgba(241, 245, 249, 0.9);
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
    .pinterest-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
        border-color: rgba(99, 102, 241, 0.25);
    }
}

/* Tactile Spring Buttons */
.btn-spring {
    transition: transform 0.2s var(--theme-spring), filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-spring:hover {
    transform: translateY(-2px);
}

.btn-spring:active {
    transform: scale(0.96) translateY(0);
}

/* Touch Ripple Effect */
.touch-ripple {
    position: relative;
    overflow: hidden;
}

.touch-ripple .ripple-wave {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnimation 0.6s linear;
    background-color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Shimmer Loading Effect for Zero-CLS Skeleton */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scroll-triggered reveal animations via IntersectionObserver */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease-out, transform 0.45s var(--theme-spring);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Badge Pulse Animation */
@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.35); }
}

.badge-bounce {
    animation: badgeBounce 0.35s var(--theme-spring);
}
