/*
 * Impact Promos Inc Store Custom Styles
 * Firecrawl Analysis Reference: Based on https://Impact Promos Inc.com.in/ design system
 */

/* Custom Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary: #FF6B6B;
    --primary-dark: #E63946;
    --primary-light: #FF8787;
    --secondary: #2B7A78;
    --dark: #1A1A1A;
    --light: #F5F5F5;
    --transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Text Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Card Hover Effects - Enhanced */
.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-6px);
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Enhanced link hover states */
a:hover {
    transform: translateY(-1px);
}

/* Button Animations */
button,
.btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

button::before,
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before,
.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Overlay Animations */
.overlay-enter {
    animation: overlayEnter 0.3s ease-out;
}

@keyframes overlayEnter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Image Hover Zoom */
.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.hover-zoom:hover img {
    transform: scale(1.1);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-secondary {
    background: var(--secondary);
    color: white;
}

.badge-outline {
    border: 2px solid currentColor;
    background: transparent;
}

/* Card Shadows - Enhanced */
.shadow-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.shadow-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

/* Button Shadows */
.shadow-button {
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.4);
}

.shadow-button:hover {
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.5);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: toast-enter 0.3s ease-out;
}

@keyframes toast-enter {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Menu Slide */
@media (max-width: 1023px) {
    .mobile-menu-enter {
        animation: slideInRight 0.3s ease-out;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }
        to {
            transform: translateX(0);
        }
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
}

/* Print Styles */
@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary: #CC0000;
        --primary-dark: #990000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    body {
        background: #1a1a1a;
        color: #ffffff;
    }
    */
}

/* Custom Utilities */
.object-fit-cover {
    object-fit: cover;
}

.object-fit-contain {
    object-fit: contain;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Container Queries (Modern Browsers) */
@supports (container-type: inline-size) {
    .card-container {
        container-type: inline-size;
    }

    @container (min-width: 400px) {
        .card-content {
            display: flex;
            flex-direction: row;
        }
    }
}

/* Performance Optimizations */
/* GPU Acceleration for transforms */
.product-card,
.hero-buttons a,
button {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Optimize images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Better typography rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhance hover effects */
.btn-hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.btn-hover-scale:hover {
    transform: scale(1.05);
}

.btn-hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 0.3s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}