/* Modern Professional Flavour Library Styles */
:root {
    --primary-color: #1a472a;
    --secondary-color: #2d5a3d;
    --accent-color: #f4a261;
    --accent-secondary: #e76f51;
    --success-color: #52b788;
    --warning-color: #f4a261;
    --error-color: #e76f51;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #495057;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --gradient-primary: linear-gradient(135deg, #1a472a 0%, #2d5a3d 100%);
    --gradient-secondary: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
    --gradient-accent: linear-gradient(135deg, #52b788 0%, #40916c 100%);
    --shadow-light: 0 2px 10px rgba(26, 71, 42, 0.1);
    --shadow-medium: 0 4px 20px rgba(26, 71, 42, 0.15);
    --shadow-heavy: 0 8px 30px rgba(26, 71, 42, 0.2);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #fefefe;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    border-bottom: 3px solid var(--accent-color);
}

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

.navbar-brand i {
    color: var(--accent-color);
    margin-right: 8px;
}

.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    backdrop-filter: blur(10px);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(244, 162, 97, 0.1) 70%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Search Card */
.search-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-heavy);
    margin-top: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-card .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control, .form-select {
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 71, 42, 0.15);
    outline: none;
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.form-select-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

.input-group-text {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    color: white;
    font-weight: 500;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.btn-primary {
    background: var(--gradient-secondary);
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    background: linear-gradient(135deg, #e76f51 0%, #d64933 100%);
}

/* Results Section */
.result-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--medium-gray);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-accent);
    opacity: 0.8;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.result-card .card-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    line-height: 1.3;
}

.result-card .product-code {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-card .category-badge {
    background: var(--light-gray);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
    border: 1px solid var(--medium-gray);
}

.result-card .form-badge {
    background: var(--gradient-accent);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.result-card .natural-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.result-card .flavour-notes {
    background: #f8fffe;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    margin: 1.25rem 0;
    font-style: italic;
    color: var(--text-secondary);
    border-left: 4px solid var(--accent-color);
    line-height: 1.6;
}

.result-card .relevance-score {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--gradient-secondary);
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    min-width: 45px;
    text-align: center;
    box-shadow: var(--shadow-light);
}

.result-card .match-reason {
    background: #f0f9f4;
    color: var(--success-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(82, 183, 136, 0.2);
    line-height: 1.5;
}

.result-card .match-reason i {
    color: var(--success-color);
    margin-right: 0.5rem;
}

/* Loading Spinner */
.spinner-border-lg {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--primary-color);
}

/* Error Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    margin: 1.5rem 0;
}

.alert-danger {
    background: linear-gradient(135deg, #e76f51 0%, #d64933 100%);
    color: white;
}

/* Footer */
footer {
    background: var(--light-gray) !important;
    border-top: 1px solid var(--medium-gray);
    margin-top: 4rem;
    padding: 2rem 0;
}

footer .text-muted {
    color: var(--text-secondary) !important;
}

/* Enhanced responsiveness */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .search-card {
        padding: 1.5rem;
        margin-top: 1rem;
    }
    
    .result-card {
        margin-bottom: 1rem;
        padding: 1.5rem;
    }
    
    .result-card .relevance-score {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-bottom: 0.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.result-card {
    animation: fadeInUp 0.6s ease-out;
}

.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }
.result-card:nth-child(5) { animation-delay: 0.5s; }
.result-card:nth-child(6) { animation-delay: 0.6s; }

.btn-primary:active {
    animation: pulse 0.3s ease-in-out;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Focus states for accessibility */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Additional professional touches */
/* .search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
} */

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    z-index: 3;
} 