/* Custom CSS for Stralinks India Techauto */

/* Font Family */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Product Card Animations */
.product-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image Zoom Container */
.image-zoom-container {
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
}

.image-zoom-container img {
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.image-zoom-container.zoomed {
    cursor: zoom-out;
}

.image-zoom-container.zoomed img {
    transform: scale(2);
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.zoom-controls button {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.zoom-controls button:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.zoom-controls button:first-child {
    border-radius: 6px 6px 0 0;
}

.zoom-controls button:last-child {
    border-radius: 0 0 6px 6px;
}

.zoom-controls button:only-child {
    border-radius: 6px;
}

/* Product Modal Enhancements */
#product-modal {
    backdrop-filter: blur(4px);
}

#product-modal .bg-white {
    max-height: 90vh;
    overflow-y: auto;
}

/* WhatsApp Button Animation */
#whatsapp-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Price Styling */
.price-current {
    color: #059669;
    font-weight: 600;
    font-size: 1.25rem;
}

.price-old {
    color: #6b7280;
    text-decoration: line-through;
    font-size: 1rem;
}

/* Badge Styling */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Navigation Enhancements */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #93c5fd;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Search Input Focus Enhancement */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button Hover Effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Category Filter Active State */
.filter-btn.active {
    background-color: #2563eb !important;
    color: white !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .search-section {
        padding: 1rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile Navigation */
    #mobile-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    #mobile-nav.show {
        max-height: 400px;
    }
    
    /* Product Modal Mobile */
    #product-modal .bg-white {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    /* Zoom controls mobile positioning */
    .zoom-controls {
        top: 1rem;
        right: 1rem;
        position: absolute;
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    .grid-cols-md-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-md-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Screen Optimizations */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-section {
        min-height: 600px;
        display: flex;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    header, footer, #whatsapp-btn, .zoom-controls {
        display: none !important;
    }
    
    .product-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible for Better Accessibility */
.focus\:ring:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

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

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

/* Error States */
.error-message {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.success-message {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #16a34a;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Custom Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-brand {
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
}

/* Image Lazy Loading */
img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s;
}

img[data-loaded="true"] {
    filter: blur(0px);
}

/* Product Grid Masonry Effect (Optional) */
.masonry {
    column-count: 1;
    column-gap: 1rem;
}

@media (min-width: 640px) {
    .masonry {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry {
        column-count: 3;
    }
}

@media (min-width: 1280px) {
    .masonry {
        column-count: 4;
    }
}

.masonry .product-card {
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
    }
}