/* Ultra-Fast Optimized CSS for NutriNexas */

/* Critical CSS - Above the fold */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Optimized button styles - no transitions for instant feedback */
.btn-wishlist {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    position: relative;
    z-index: 10;
}

.btn-wishlist:focus {
    outline: none !important;
    box-shadow: none !important;
    border: 1px solid #e5e7eb !important;
}

.wishlist-active {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: #ef4444 !important;
}

.wishlist-active i {
    color: #ef4444 !important;
    font-weight: 900;
}

/* Product card optimizations */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    transition: none; /* Remove transitions for instant feedback */
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f8f9fa;
}

/* Loading states */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Optimized grid layouts */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Critical responsive design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .btn-wishlist {
        width: 28px;
        height: 28px;
    }
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Remove all unnecessary animations and transitions */
* {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* Critical utility classes */
.hidden { display: none !important; }
.visible { display: block !important; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Optimized typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Button optimizations */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    outline: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

/* Form optimizations */
input, select, textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none !important;
    box-shadow: none !important;
}

input:focus, select:focus, textarea:focus {
    border-color: #3b82f6;
    outline: none !important;
    box-shadow: none !important;
}

/* Container optimizations */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header optimizations */
.header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Footer optimizations */
.footer {
    background: #1f2937;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

/* Performance critical styles */
.hero-section {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 60px 0;
    text-align: center;
}

/* Optimized spacing */
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Critical 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; }
}

/* Ultra-fast responsive breakpoints */
@media (max-width: 640px) {
    .container { padding: 0 15px; }
    .product-grid { grid-template-columns: 1fr; }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1025px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}



