/* Complete Enhanced Health-Themed Styles for VitalCare */

:root {
    --primary-color: #10b981;
    --secondary-color: #059669;
    --accent-color: #34d399;
    --dark-green: #064e3b;
    --light-green: #a7f3d0;
    --mint: #6ee7b7;
    --forest: #065f46;
    --sage: #d1fae5;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background-primary: #f0fdf4;
    --background-secondary: #ecfdf5;
    --background-card: #f7fee7;
    --gradient-primary: linear-gradient(135deg, #10b981, #059669);
    --gradient-accent: linear-gradient(135deg, #34d399, #10b981);
    --gradient-dark: linear-gradient(135deg, #064e3b, #065f46);
    --shadow-soft: 0 4px 20px rgba(16, 185, 129, 0.15);
    --shadow-medium: 0 8px 30px rgba(16, 185, 129, 0.2);
    --shadow-strong: 0 12px 40px rgba(16, 185, 129, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-primary);
    margin: 0;
    padding: 0;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
}

/* Navigation with health gradient */
nav {
    background: var(--gradient-primary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

/* Enhanced Logo styling */
.logo-container {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-right: 16px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-container:hover .logo-icon {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.25);
}

.logo-container h1 {
    color: white;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-container p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.9rem;
}

/* Hero section with organic animations */
.hero-gradient {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(52, 211, 153, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.3) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

/* Floating animation */
.float-animation {
    animation: gentleFloat 4s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

/* Enhanced category cards */
.category-card {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5);
    border: 2px solid transparent;
    border-radius: 24px;
    padding: 32px 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 22px;
}

.category-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-strong);
    border-color: var(--primary-color);
}

.category-card:hover::before {
    opacity: 0.1;
}

.category-card:hover * {
    position: relative;
    z-index: 1;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--shadow-strong);
    background: var(--gradient-accent);
}

/* Enhanced product cards */
.product-card {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5);
    border: 2px solid rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-strong);
    border-color: var(--primary-color);
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-card * {
    position: relative;
    z-index: 1;
}

/* Enhanced buttons */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    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 ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-medium);
    background: var(--gradient-accent);
}

.btn-secondary {
    background: var(--background-card);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 14px 30px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Enhanced form inputs */
.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: var(--background-card);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(16, 185, 129, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), inset 0 2px 4px rgba(16, 185, 129, 0.05);
    background: #ffffff;
}

/* Enhanced cards and containers */
.bg-white, .stat-card, .admin-table {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5) !important;
    border: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: var(--shadow-soft);
}

/* Enhanced toast notifications */
.toast {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(145deg, #fef2f2, #fee2e2);
}

.toast.success {
    border-left-color: var(--primary-color);
    background: linear-gradient(145deg, #f0fdf4, #d1fae5);
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(145deg, #fffbeb, #fef3c7);
}

/* Enhanced status badges */
.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-soft);
}

.status-en-attente {
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    color: #92400e;
}

.status-confirmée {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.status-préparée {
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.status-expédiée {
    background: linear-gradient(145deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
}

.status-livrée {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.status-annulée {
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    color: #991b1b;
}

/* Badge enhancements */
.badge-promotion {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.badge-stock, .badge-out-of-stock {
    border-radius: 6px;
    box-shadow: var(--shadow-soft);
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.badge-stock {
    background: #f59e0b;
    color: white;
}

.badge-out-of-stock {
    background: #ef4444;
    color: white;
}

/* Cart sidebar enhancement */
#cartSidebar {
    background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
    box-shadow: -8px 0 32px rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(10px);
}

.cart-item {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-soft);
}

/* Enhanced quantity selector */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    background: var(--background-card);
    overflow: hidden;
}

.quantity-selector button {
    background: linear-gradient(145deg, #f0fdf4, #ecfdf5);
    color: var(--primary-color);
    font-weight: 600;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-selector button:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-selector input {
    border: none;
    text-align: center;
    width: 60px;
    padding: 8px 4px;
    background: white;
}

/* Enhanced dropdown */
.dropdown-content {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5);
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-content a:hover {
    background: #f0fdf4;
    color: var(--primary-color);
}

/* Pulse animation for health theme */
.pulse-slow {
    animation: pulseHealthy 3s ease-in-out infinite;
}

@keyframes pulseHealthy {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* Pulse for notifications */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Section decorations */
.section-with-decoration {
    position: relative;
    overflow: hidden;
}

.section-with-decoration::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    transform: rotate(15deg);
    pointer-events: none;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(16, 185, 129, 0.1) 25%, 
        rgba(52, 211, 153, 0.2) 37%, 
        rgba(16, 185, 129, 0.1) 63%);
    background-size: 400% 100%;
    animation: healthyShimmer 1.4s ease infinite;
}

@keyframes healthyShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Text utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Text selections */
::selection {
    background: var(--light-green);
    color: var(--forest);
}

/* Focus indicators */
button:focus, input:focus, select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Statistics cards */
.stat-card {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.stat-card:hover {
    transform: translateY(-2px);
}

/* Admin table styles */
.admin-table {
    background: linear-gradient(145deg, #f7fee7, #ecfdf5);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.admin-table th {
    background: #f0fdf4;
    padding: 16px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.admin-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.admin-table tbody tr:hover {
    background: #f0fdf4;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .category-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }
    
    .category-card {
        padding: 24px 16px;
    }
    
    .hero-gradient h1 {
        font-size: 3rem;
    }
    
    .hero-gradient h2 {
        font-size: 1.5rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}