/* Enhanced CSS for FoodSave */
:root {
    --primary-color: #059669;
    --success-color: #16a34a;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 10px;
    --box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

/* Feature Cards */
.feature-icon {
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
}

/* Category Cards */
.category-card {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Item Cards */
.item-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: white;
}

.item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2) !important;
}

.item-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.item-card:hover .card-img-top {
    transform: scale(1.05);
}

.item-card .card-body {
    padding: 1.25rem;
}

.item-card .card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.item-card .card-text {
    color: #6c757d;
    line-height: 1.5;
}

/* Image placeholder styling */
.image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    height: 200px;
    border-radius: 10px 10px 0 0;
}

.image-placeholder i {
    opacity: 0.7;
}

/* Navigation */
.navbar {
    background: #01605E !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-bottom: none;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.navbar-brand:hover {
    color: #f8f9fa !important;
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    /* color: rgba(255,255,255,0.9) !important; */
    padding: 0.3rem 0.9rem !important;
    border-radius: 10px;
    margin: 0 0.2rem;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}



.navbar-nav .nav-link:hover::after {
    width: 80%;
    left: 10%;
}

.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.3);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 10px;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    padding: 10px 20px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(45deg, #059669, #047857);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    box-shadow: 0 4px 15px rgba(40,167,69,0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.4);
}

.btn-outline-primary {
    border: 2px solid #059669;
    color: #059669;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #059669;
    color: white;
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-img-top {
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #059669;
}

.pagination .page-item.active .page-link {
    background-color: #059669;
    border-color: #059669;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .category-icon {
        width: 60px !important;
        height: 60px !important;
    }
    
    .feature-icon {
        width: 50px !important;
        height: 50px !important;
    }
}

/* Loading animations */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Utility classes */
.text-primary-custom {
    color: #059669 !important;
}

.bg-primary-custom {
    background-color: #059669 !important;
}

.shadow-custom {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Enhanced Image Styling */
img {
    max-width: 100%;
    height: auto;
}

.vendor-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-icon img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

/* Enhanced Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* Price and Badge Styling */
.price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: #28a745;
}

.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

.discount-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    font-weight: 600;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

/* Search Form Enhancement */
.search-form {
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    padding: 0.25rem;
}

.search-form .form-control {
    border: none;
    background: transparent;
    color: white;
    border-radius: 20px;
}

.search-form .form-control::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-form .form-control:focus {
    background: rgba(255,255,255,0.1);
    color: white;
    box-shadow: none;
}

/* Status Badges */
.status-pending { background: linear-gradient(45deg, #ffc107, #fd7e14); }
.status-confirmed { background: linear-gradient(45deg, #17a2b8, #007bff); }
.status-preparing { background: linear-gradient(45deg, #007bff, #6610f2); }
.status-ready { background: linear-gradient(45deg, #28a745, #20c997); }
.status-delivered { background: linear-gradient(45deg, #28a745, #155724); }
.status-cancelled { background: linear-gradient(45deg, #dc3545, #721c24); }

/* ===== Premium Variant A Overrides (non-breaking) ===== */
:root {
    --premium-primary: #059669;
    --premium-primary-700: #047857;
    --premium-accent: #3B82F6;
    --premium-surface: #FFFFFF;
    --premium-bg: #F8FAFC;
    --premium-text: #111827;
    --premium-muted: #6B7280;
    --premium-radius-sm: 10px;
    --premium-radius-lg: 16px;
    --premium-elev: 0 6px 18px rgba(0,0,0,0.08);
    --premium-elev-hover: 0 10px 28px rgba(0,0,0,0.12);
    --premium-dur: 200ms;
    --premium-ease: cubic-bezier(.4,0,.2,1);
}

/* Page background softened */
body {
    background: var(--premium-bg);
}


/* Search form subtle */
.search-form {
    background: rgba(255,255,255,0.16);
}

/* Buttons */
.btn-primary {
    background: var(--premium-primary);
    box-shadow: 0 4px 12px rgba(5,150,105,0.25);
}

.btn-primary:hover {
    background: var(--premium-primary-700);
}

/* Secondary featured button using accent (used for products card on home) */
.btn-success {
    background: var(--premium-accent);
    box-shadow: 0 4px 12px rgba(59,130,246,0.25);
}

.btn-success:hover {
    filter: brightness(0.95);
}

/* Cards and headers */
.card-header {
    background: var(--premium-surface);
    color: var(--premium-text);
    border-bottom: 1px solid #e5e7eb;
}

/* Forms focus color harmonized */
.form-control:focus, .form-select:focus {
    border-color: var(--premium-primary);
    box-shadow: 0 0 0 0.2rem rgba(5,150,105,0.25);
}


/* Global focus ring for accessibility */
:focus-visible {
    outline: 3px solid rgba(59,130,246,0.45);
    outline-offset: 2px;
}

/* Secondary buttons unify */
.btn-outline-secondary {
    border: 1px solid #d1d5db;
    color: #374151;
    background: #ffffff;
}

.btn-outline-secondary:hover {
    background: #f3f4f6;
    color: #111827;
}



/* Responsive tweaks */
@media (max-width: 768px) {
    .search-form { padding: 0.125rem 0.25rem; }
    .btn { min-height: 44px; }
}

/* Softer hover motion */
.card:hover {
    transform: translateY(-4px);
}

.item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16) !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
