/* ============================================
   PRICON - Modern Medical E-commerce Styles
   Professional, Animated, Medical Theme
   Tailwind CSS Compatible
   ============================================ */

:root {
    /* PRICON Brand Colors - Blue & Yellow Theme */
    --primary-color: #0066cc; /* Main Blue */
    --primary-dark: #004499;
    --primary-light: #3385d6;
    --primary-blue: #0066cc;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --secondary-color: #00a8cc;
    --accent-color: rgba(255, 215, 0, 0.15); /* Yellow - Very subtle, almost invisible */
    --yellow-400: rgba(250, 204, 21, 0.1);
    --yellow-500: rgba(234, 179, 8, 0.1);
    --medical-blue: #1e88e5;
    --medical-teal: #00acc1;
    --success-color: #00c853;
    --warning-color: #ffa726;
    --danger-color: #e53935;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Shadows - Rich GUI */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(0, 102, 204, 0.4);
    --shadow-blue: 0 10px 30px rgba(37, 99, 235, 0.3);
    --shadow-blue-lg: 0 20px 40px rgba(37, 99, 235, 0.4);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 10px;
}

/* Smooth Transitions */
.smooth-transition {
    transition: all var(--transition-base);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 102, 204, 0); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* ============================================
   CURSOR ANIMATIONS & HOVER EFFECTS
   ============================================ */

/* Custom cursor for desktop - Optional Enhancement */
@media (min-width: 1024px) and (pointer: fine) {
    /* Custom cursor is now optional - default cursor always visible */
    .custom-cursor-active .cursor {
        position: fixed;
        width: 20px;
        height: 20px;
        background: rgba(0, 102, 204, 0.8);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transition: transform 0.1s ease;
        mix-blend-mode: difference;
        opacity: 0.7;
    }
    
    .custom-cursor-active .cursor-follower {
        position: fixed;
        width: 40px;
        height: 40px;
        border: 2px solid rgba(0, 102, 204, 0.3);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transition: transform 0.3s ease;
        opacity: 0.5;
    }
    
    .cursor-hover {
        transform: scale(1.5);
        background: rgba(0, 102, 204, 1);
    }
    
    .cursor-follower-hover {
        transform: scale(1.2);
        border-color: rgba(0, 102, 204, 0.6);
    }
}

/* Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.4);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Magnetic Effect for Cards */
.magnetic-card {
    transition: transform 0.3s ease;
}

.magnetic-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Floating Animation */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Pulse Glow Animation */
.pulse-glow {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(0, 102, 204, 0.5);
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.8), 0 0 30px rgba(0, 102, 204, 0.6);
    }
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Bounce on Click */
.bounce-click:active {
    animation: bounce-click 0.3s ease;
}

@keyframes bounce-click {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

/* Gradient Animation */
.animate-gradient {
    background-size: 200% auto;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Blob Animation */
.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes blob {
    0%, 100% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Slow Animations */
.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.animate-bounce-slow {
    animation: bounce-slow 6s ease-in-out infinite;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rotate-360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes scale-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-slide-down { animation: slideDown 0.6s ease-out forwards; }
.animate-slide-up { animation: slideUp 0.6s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s infinite; }
.animate-bounce-subtle { animation: bounce-subtle 2s ease-in-out infinite; }
.animate-rotate { animation: rotate-360 20s linear infinite; }
.animate-scale-pulse { animation: scale-pulse 2s ease-in-out infinite; }

/* ============================================
   GLOBAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-color);
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   COMPONENTS
   ============================================ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc, #2563eb, #1d4ed8) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4), 0 0 10px rgba(37, 99, 235, 0.2) !important;
    border: none !important;
    font-weight: 700 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af, #1e3a8a) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5), 0 0 25px rgba(37, 99, 235, 0.4) !important;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.15);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(0, 102, 204, 0.2);
}

/* Product Card Specifics */
.product-card {
    position: relative;
    background: var(--white);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Remove grid lines - keep borders minimal */
.grid {
    border: none !important;
    outline: none !important;
}

.grid > * {
    border: none !important;
    outline: none !important;
}

/* Remove visible grid borders but keep functionality */
.product-card,
.card {
    border: 1px solid rgba(0,0,0,0.05) !important;
}

/* Hide decorative arrows only, not functional ones */
.product-card .fa-chevron-right:not(.functional),
.product-card .fa-arrow-right:not(.functional) {
    display: none !important;
}

/* ============================================
   MOBILE RESPONSIVE DESIGN - APP-LIKE EXPERIENCE
   ============================================ */

/* Mobile-first approach with app-like design */
@media (max-width: 768px) {
    /* Container improvements */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Product Grid - 2 columns with better spacing */
    .grid.grid-cols-2,
    .grid.grid-cols-4,
    .grid.grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* Product Card - App-like design */
    .product-card {
        min-height: auto !important;
        max-height: none !important;
        border-radius: 1rem !important;
        padding: 0.75rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        background: white !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    .product-card:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Product Image Container */
    .product-card .aspect-square,
    .product-card .image-container {
        aspect-ratio: 1 / 1 !important;
        min-height: 140px !important;
        max-height: 160px !important;
        border-radius: 0.75rem !important;
        background: #f8fafc !important;
        overflow: hidden !important;
        margin-bottom: 0.75rem !important;
    }
    
    .product-card img {
        object-fit: contain !important;
        padding: 0.5rem !important;
        width: 100% !important;
        height: 100% !important;
        transition: transform 0.3s ease !important;
    }
    
    .product-card:hover img {
        transform: scale(1.05) !important;
    }
    
    /* Product Title */
    .product-card h3 {
        font-size: 0.875rem !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        margin-bottom: 0.5rem !important;
        min-height: auto !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    /* Price Display */
    .product-card .text-lg,
    .product-card .text-xl {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #0066cc !important;
    }
    
    .product-card .text-xs {
        font-size: 0.75rem !important;
    }
    
    /* Add to Cart Button - Touch Optimized */
    .product-card .btn,
    .product-card .add-to-cart-btn {
        width: 100% !important;
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        border-radius: 0.75rem !important;
        background: linear-gradient(135deg, #0066cc, #3385d6) !important;
        color: white !important;
        border: none !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .product-card .btn:hover,
    .product-card .add-to-cart-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3) !important;
    }
    
    .product-card .btn:disabled {
        background: #94a3b8 !important;
        cursor: not-allowed !important;
        transform: none !important;
    }
    
    /* Action Buttons (Wishlist, Quick View) */
    .product-card .product-actions {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: flex !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .product-card .product-actions button {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        color: #64748b !important;
        font-size: 0.875rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        touch-action: manipulation !important;
    }
    
    .product-card .product-actions button:hover {
        background: #f1f5f9 !important;
        color: #0066cc !important;
        transform: scale(1.1) !important;
    }
    
    /* Category and SKU */
    .product-card .text-gray-500 {
        font-size: 0.75rem !important;
        color: #64748b !important;
    }
    
    /* Out of Stock styling */
    .product-card button[disabled] {
        background: #f1f5f9 !important;
        color: #64748b !important;
        font-size: 0.75rem !important;
        cursor: not-allowed !important;
    }
    
    /* Better spacing and layout */
    .product-card .p-3,
    .product-card .p-4 {
        padding: 0.75rem !important;
    }
    
    .product-card .flex-col {
        gap: 0.5rem !important;
    }
    
    /* Section spacing */
    .py-16,
    .py-20,
    .py-28 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .py-12 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Hero section mobile */
    .hero-section h1,
    .text-5xl,
    .text-6xl,
    .text-7xl,
    .text-8xl {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-section p,
    .text-xl,
    .text-2xl {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    /* Section titles */
    .text-4xl {
        font-size: 1.75rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    /* Better form inputs */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px !important;
        padding: 0.75rem !important;
        border-radius: 0.5rem !important;
    }
    
    /* Touch-friendly buttons */
    button,
    .btn,
    a.btn {
        min-height: 44px !important;
        min-width: 44px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    /* Cart page improvements */
    .cart-item {
        padding: 1rem !important;
        border-radius: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .quantity-control button {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 1rem !important;
    }
    
    .quantity-control input {
        font-size: 16px !important;
        min-width: 60px !important;
        text-align: center !important;
    }
    
    /* Navigation improvements */
    .navbar {
        padding: 0.75rem 0 !important;
    }
    
    /* Logo sizing */
    .preloader-logo {
        width: 4rem !important;
        height: 4rem !important;
        max-width: 80px !important;
    }
    
    /* Loading animation width fix */
    #preloader {
        width: 100vw !important;
        max-width: 100% !important;
    }
    
    .preloader-content {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        padding: 2rem !important;
    }
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-light);
}

@media (max-width: 768px) {
    .product-card:hover {
        transform: translateY(-2px);
    }
}

.product-card .image-container {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 Aspect Ratio for better card appearance */
    background: var(--white);
}

.product-card .image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.5s ease;
}

.product-card:hover .image-container img {
    transform: scale(1.1);
}

/* Glassmorphism Header */
.sticky-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Section Titles */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color); /* Changed from accent-color to primary blue */
    border-radius: 2px;
}

/* Mobile Bottom Nav */
.bottom-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    padding: 0.5rem 0;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--primary-color);
    position: relative;
}

.bottom-nav-item.active::after,
.bottom-nav-item:hover::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px 1px 0 0;
}

.bottom-nav-item i {
    transition: transform 0.2s ease;
}

.bottom-nav-item:hover i {
    transform: translateY(-2px);
}

/* Mobile Menu Enhancements */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.mobile-menu-overlay.show {
    display: block;
}

#mainNav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%; /* Wider for better mobile experience */
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 1050;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Bounce effect */
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.15);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

#mainNav.show {
    left: 0;
}

/* Mobile menu header */
#mainNav .px-4.py-4 {
    background: var(--primary-color);
    color: white;
}

#mainNav .px-4.py-4 h3 {
    color: white;
    font-weight: 600;
}

#mainNav .px-4.py-4 button {
    color: white;
}

#mainNav .px-4.py-4 button:hover {
    color: rgba(255,255,255,0.8);
}

/* Mobile menu items */
#mainNav .space-y-1 a {
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 0;
    padding: 12px 16px !important;
}

#mainNav .space-y-1 a:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateX(5px);
}

/* Mobile submenu */
.mobile-submenu {
    animation: slideDown 0.3s ease;
    border-left: 2px solid var(--primary-color);
    margin-left: 16px;
    padding-left: 8px;
}

.mobile-submenu a {
    padding: 8px 12px !important;
    font-size: 0.9rem;
    border-radius: 6px;
    margin: 1px 0;
}

.mobile-submenu a:hover {
    background: var(--primary-light);
    color: white !important;
}

/* Ensure main content has padding to account for bottom nav */
@media (max-width: 768px) {
    main {
        padding-bottom: 70px;
    }
    
    /* Adjust for pages that might have special padding */
    .page-content {
        padding-bottom: 70px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Custom Scrollbar for sidebar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Rich GUI Elements */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    border-radius: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: all var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    transition: all var(--transition-base);
}

.search-input-wrapper:focus-within {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

/* Enhanced Mega Menu with Animations */
.mega-menu-wrapper {
    position: static !important;
}

.mega-menu-wrapper .dropdown-menu {
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px) !important;
    margin-top: 0 !important;
}

.mega-menu-wrapper .dropdown-menu.show {
    transform: translateX(-50%) translateY(0) !important;
}

.mega-menu-dropdown {
    animation: megaMenuSlideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    border-top: 3px solid var(--primary-color);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    left: auto !important;
    right: auto !important;
    margin-left: auto;
    margin-right: auto;
}

.mega-menu-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    display: block !important;
}

@keyframes megaMenuSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.mega-menu-column {
    position: relative;
}

.mega-menu-parent {
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.mega-menu-column:hover .mega-menu-parent {
    border-left-color: var(--primary-color);
    padding-left: 12px;
}

.mega-menu-child {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

.mega-menu-child:hover::before {
    width: 8px;
}

.mega-menu-subsubcategory {
    animation: fadeInUp 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mega-menu-trigger:hover i {
    transform: rotate(180deg);
}

/* Desktop only - hide animations on mobile */
@media (max-width: 1023px) {
    .mega-menu-dropdown {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .mega-menu-child::before {
        display: none;
    }
    
    .mega-menu-subsubcategory {
        display: block !important;
    }
}

/* Mega Menu */
.mega-menu-content {
    animation: slideDown 0.3s ease-out forwards;
    border-top: 3px solid var(--primary-color);
}

/* Mega Menu Column Hover Effect */
.mega-menu-column:hover {
    background: linear-gradient(to right, rgba(0, 102, 204, 0.03), transparent);
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
}

/* Mega Menu Stagger Animation */
.mega-menu-column {
    animation: fadeInStagger 0.4s ease-out forwards;
    opacity: 0;
}

.mega-menu-column:nth-child(1) { animation-delay: 0.05s; }
.mega-menu-column:nth-child(2) { animation-delay: 0.1s; }
.mega-menu-column:nth-child(3) { animation-delay: 0.15s; }
.mega-menu-column:nth-child(4) { animation-delay: 0.2s; }

.mega-menu-dropdown.show .mega-menu-column {
    opacity: 1;
}

@keyframes fadeInStagger {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Utilities */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better product grid on mobile */
    .product-card .image-container {
        padding-top: 100%; /* Square aspect ratio for better mobile display */
        min-height: 200px;
    }
    
    .product-card {
        font-size: 0.875rem; /* Smaller text on mobile */
        border-radius: 0.75rem;
    }
    
    .product-card h3 {
        font-size: 0.875rem !important; /* 14px */
        line-height: 1.4;
        min-height: 2.8rem;
        margin-bottom: 0.5rem;
    }
    
    .product-card .btn {
        padding: 0.75rem 1rem !important; /* Touch-friendly button */
        font-size: 0.875rem !important; /* 14px */
        min-height: 44px; /* iOS touch target */
        width: 100%;
    }
    
    /* Price display on mobile */
    .product-card .text-lg {
        font-size: 1.125rem !important; /* Larger prices for visibility */
        font-weight: 700;
    }
    
    /* Product images - ensure visibility */
    .product-card img {
        object-fit: contain !important;
        padding: 0.75rem !important;
        max-height: 100%;
        width: 100%;
    }
    
    /* Mobile product page adjustments */
    .product-images img {
        min-height: 250px;
    }
    
    .product-details h1 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    .product-details .grid.grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .add-to-cart-btn {
        min-height: 48px;
        padding: 1rem !important;
        font-size: 1rem !important;
    }
    
    /* Mobile quantity controls */
    .add-to-cart-form .flex.items-center.bg-white {
        width: 100%;
        justify-content: center;
    }
    
    .add-to-cart-form .flex.items-center.bg-white button {
        min-width: 48px;
        min-height: 48px;
        padding: 0.5rem;
    }
    
    .add-to-cart-form .flex.items-center.bg-white input {
        min-width: 60px;
        font-size: 1rem;
        text-align: center;
    }
    
    /* Adjust text sizes */
    h1 {
        font-size: 1.875rem !important; /* 30px */
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem !important; /* 24px */
        line-height: 1.3;
    }
    
    /* Better spacing on mobile */
    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .py-12 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Grid adjustments for mobile - 2 columns */
    .grid.grid-cols-2 {
        gap: 0.75rem !important;
    }
    
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* Make "Out of Stock" button smaller */
    .product-card button[disabled] {
        font-size: 0.75rem !important;
        padding: 0.75rem !important;
        min-height: 44px;
    }
    
    /* Better touch targets */
    button, a.btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Product card actions */
    .product-card .product-actions {
        bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    .product-card .product-actions button {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    /* Hero section mobile */
    .hero-section h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }
    
    /* Section titles mobile */
    .section-title {
        font-size: 1.5rem !important;
    }
    
    /* Better form inputs on mobile */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px;
    }
    
    /* Checkout form improvements for mobile */
    .checkout-form .form-group {
        margin-bottom: 1rem;
    }
    
    .checkout-form input,
    .checkout-form select,
    .checkout-form textarea {
        font-size: 16px;
        padding: 0.75rem;
    }
    
    .order-summary {
        margin-top: 1.5rem;
    }
    
    /* Ensure wishlist buttons are visible on mobile */
    .product-card .md\:flex {
        display: flex !important;
        position: absolute;
        bottom: 4rem;
        left: 0;
        right: 0;
        justify-content: center;
        gap: 0.5rem;
        transform: translateY(0);
        opacity: 1;
        transition: none;
        z-index: 20;
    }
    
    .product-card .md\:flex button {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.875rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .product-card .image-container {
        padding-top: 100%;
        min-height: 180px;
    }
    
    .product-card h3 {
        font-size: 0.8125rem !important; /* 13px */
        min-height: 2.6rem;
    }
    
    .product-card .text-lg {
        font-size: 1rem !important;
    }
    
    .grid.grid-cols-2 {
        gap: 0.5rem !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-card .image-container {
        padding-top: 80%;
    }
    
    .grid.grid-cols-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ============================================
   ADD TO CART ANIMATIONS
   ============================================ */

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cart-bounce {
    animation: cartBounce 0.6s ease;
}

.adding-to-cart {
    position: relative;
    overflow: hidden;
}

.adding-to-cart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

.cart-success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.cart-animation-element {
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

/* Toast Notifications */
.toast-container {
    z-index: 10000;
}

.toast {
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   MODERN DESIGN ENHANCEMENTS
   ============================================ */

/* Touch-friendly interactions */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Better image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Professional card shadows */
.product-card {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

/* Modern button styles */
.btn {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Professional gradients */
.gradient-text {
    background: linear-gradient(135deg, #0066cc 0%, #00a8cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern section spacing */
section {
    scroll-margin-top: 100px;
}

/* Better focus states for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Professional typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Better form inputs */
input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Professional badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Modern animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Professional spacing utilities */
.space-y-section > * + * {
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .space-y-section > * + * {
        margin-top: 2rem;
    }
}

/* ============================================
   ADVANCED UI COMPONENTS
   ============================================ */

/* Neon glow effect */
.neon-glow {
    animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color); }
    50% { box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 30px var(--primary-light); }
}

/* Gradient background animations */
.gradient-bg-animated {
    background: linear-gradient(270deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 600% 600%;
    animation: gradient-shift 15s ease infinite;
}

/* Modern card hover effects */
.card-modern {
    position: relative;
    overflow: hidden;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.card-modern:hover::before {
    left: 100%;
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* Parallax scroll effect helper */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Frosted glass effect */
.frosted-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Shimmer loading effect */
.shimmer-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Text gradient */
.text-gradient-blue {
    background: linear-gradient(135deg, #0066cc, #00a8cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #0066cc, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 3D Transform hover */
.transform-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.transform-3d:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
}

/* Notification badge pulse */
.badge-pulse {
    animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   LOADING STATES & FALLBACKS
   ============================================ */

/* CSS Loading Fallback */
@supports not (display: grid) {
    .grid {
        display: flex;
        flex-wrap: wrap;
    }
}

/* Ensure critical styles load even if Tailwind fails */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

/* Fallback for Tailwind utilities */
.flex { display: flex; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.transition { transition: all 0.3s ease; }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Additional Tailwind-like utilities for better layout control */
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-6 { gap: 1.5rem; }
.mb-12 { margin-bottom: 3rem; }
.min-w-0 { min-width: 0; }

@media (min-width: 640px) {
    .sm\:px-4 { padding-left: 1rem; padding-right: 1rem; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================
   ADDITIONAL FEATURES & ENHANCEMENTS
   ============================================ */

/* Smooth scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Image zoom on hover */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Pulse animation for notifications */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Badge animations */
.badge {
    animation: fadeIn 0.3s ease;
}

/* Product image lazy loading placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

img[loading="lazy"].loaded {
    animation: none;
    background: transparent;
}

/* Enhanced focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print,
    .bottom-nav,
    header nav,
    .btn,
    button {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* ============================================
   ADMIN DASHBOARD STYLES
   ============================================ */

.admin-main {
    min-height: calc(100vh - 60px);
}

.admin-main .card {
    border: none;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--gray-600);
}

.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    animation: slideDown 0.3s ease;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Admin button hover effects */
.admin-main .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Chart containers */
canvas {
    max-height: 400px;
}

/* Stats cards opacity utilities */
.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

/* Navbar dropdown hover for desktop */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Sticky table header */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Admin card transitions */
.admin-main .hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-main .hover-lift:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
   ============================================ */

/* Mobile-first approach for checkout form */
@media (max-width: 768px) {
    /* Improve touch targets for mobile */
    input, select, textarea, button {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Adjust padding for better mobile experience */
    .container {
        padding: 0 1rem;
    }
    
    /* Make form fields more touch-friendly */
    .form-control, .btn {
        padding: 12px 16px;
    }
    
    /* Adjust grid for mobile */
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Make buttons full width on mobile */
    .btn-mobile-full {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Adjust spacing for mobile */
    .space-y-mobile > * + * {
        margin-top: 1rem;
    }
    
    /* Improve readability on small screens */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
    }
    
    /* Mobile cart adjustments */
    .cart-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Mobile cart image adjustments */
    .cart-item .w-full.md\:w-32 {
        width: 100%;
        height: 120px;
        max-width: 120px;
    }
    
    /* Mobile cart button adjustments */
    .cart-item .flex.items-center.bg-gray-50.rounded-lg {
        width: 100%;
        justify-content: center;
    }
    
    .cart-item .flex.items-center.bg-gray-50.rounded-lg button {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
    
    .cart-item .flex.items-center.bg-gray-50.rounded-lg input {
        min-width: 60px;
        text-align: center;
    }
    
    /* Mobile checkout improvements */
    .checkout-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .checkout-steps {
        margin-bottom: 1.5rem;
    }
    
    .checkout-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Mobile wishlist improvements */
    .wishlist-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .wishlist-item-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
    
    /* Mobile product grid */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .product-card {
        padding: 0.75rem;
    }
    
    .product-title {
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    .product-price {
        font-size: 0.875rem;
    }
    
    /* Mobile navigation improvements */
    .mobile-nav {
        padding: 0.5rem 1rem;
    }
    
    .nav-item {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Tablet improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .checkout-form {
        max-width: 100%;
    }
}

/* Large screen optimizations */
@media (min-width: 1025px) {
    .container {
        padding: 0 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* Touch device enhancements */
@media (pointer: coarse) {
    /* Increase touch targets */
    .touch-target {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Add extra padding for touch devices */
    .touch-padding {
        padding: 12px 16px;
    }
    
    /* Improve button feedback */
    .touch-button {
        transition: all 0.2s ease;
    }
    
    .touch-button:active {
        transform: scale(0.98);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #004499;
    }
    
    .form-control {
        border: 2px solid #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-in,
    .animate-slide-down {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --card-bg: #2d2d2d;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .card {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* ============================================
   END OF MOBILE RESPONSIVENESS IMPROVEMENTS
   ============================================ */

/* Wishlist button improvements for mobile */
.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.wishlist-btn:hover {
    background: #0066cc;
    color: white;
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: #0066cc;
    color: white;
}

/* Ensure wishlist buttons are visible on mobile */
@media (max-width: 768px) {
    .wishlist-btn {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
        font-size: 18px;
    }
    
    .product-card {
        position: relative;
    }
}

/* Touch-friendly adjustments */
@media (pointer: coarse) {
    .wishlist-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Reset for preloader to ensure consistent appearance */
#preloader,
#preloader *,
.loading-overlay,
.loading-overlay * {
    all: unset;
    box-sizing: border-box;
}

#preloader,
.loading-overlay {
    all: initial;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff !important;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #000000 !important;
}

/* Critical CSS - Load immediately */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', 'Inter', system-ui, sans-serif; line-height: 1.6; color: #1e293b; background: #f8fafc; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border-radius: 0.5rem; font-weight: 600; transition: all 0.3s; cursor: pointer; border: none; }
.btn-primary { background: linear-gradient(135deg, #0066cc, #3385d6); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0, 102, 204, 0.3); }
