/* Custom CSS for Desi Fresh Website */

/* Root Variables */
:root {
    --primary-color: #db6e54;
    --secondary-color: #70bee8;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Typography - Updated to Avenir-like fonts */
    --font-family-sans-serif: 'Avenir', 'Avenir Next', 'Segoe UI', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --font-family-heading: 'Avenir', 'Avenir Next', 'Segoe UI', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 0 1rem;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Border Radius */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 1rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

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

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--gray-800);
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography - Updated with Avenir-like styling */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-family-heading);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.7;
}

/* Custom Button Styles */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    text-transform: none;
    transition: var(--transition);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: var(--font-family-sans-serif);
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #c55a42;
    border-color: #c55a42;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-family-sans-serif);
}

.navbar-brand img {
    transition: var(--transition);
    max-height: 50px;
    width: auto;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    position: relative;
    font-family: var(--font-family-sans-serif);
    letter-spacing: 0.01em;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Dropdown Menu Styling - Enhanced */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg);
    padding: 0.5rem 0;
    font-family: var(--font-family-sans-serif);
    margin-top: 0.5rem;
    min-width: 200px;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 400;
    transition: var(--transition);
    color: var(--gray-700);
    text-decoration: none;
    display: block;
    width: 100%;
    clear: both;
    background: none;
    border: 0;
    text-align: inherit;
    white-space: nowrap;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateX(5px);
    outline: none;
}

/* Active/Selected dropdown item styling - Golden color */
.dropdown-item.active {
    background-color: #ffd700;
    color: #333;
    font-weight: 600;
    transform: translateX(5px);
}

/* Fallback dropdown styles for when JavaScript fails */
.dropdown-menu.show {
    display: block !important;
}

/* Ensure dropdown works on hover for better UX */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Hero Section - Fixed for proper banner rendering */
.hero-section {
    margin-top: 76px; /* Account for fixed navbar */
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.hero-slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 100%;
    background-color: var(--gray-800); /* Fallback color while images load */
}

/* Ensure banner images load properly - Simplified */
.hero-slide {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Additional fixes for banner image rendering */
.carousel-item {
    position: relative;
    overflow: hidden;
}

/* Ensure proper image scaling on all devices */
@media (max-width: 767.98px) {
    .hero-slide {
        background-position: center center !important;
        background-size: cover !important;
    }
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-indicators {
    bottom: 2rem;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.carousel-indicators button.active {
    background-color: var(--white);
    transform: scale(1.2);
}

/* Sections */
section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--gray-100) !important;
}

/* Cards */
.card {
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card {
    transition: var(--transition);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* Responsive Image Styling - FIXED */
.card-img-top {
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    position: relative;
    overflow: hidden;
    background-color: var(--gray-200);
}

.card-img-top img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Alternative responsive image approach */
.responsive-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* About section image */
.about-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Features Section */
.features-section .card {
    border: none;
    background: var(--white);
    transition: var(--transition);
    height: 100%;
}

.features-section .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.features-section .fas {
    color: var(--primary-color);
    transition: var(--transition);
}

.features-section .card:hover .fas {
    transform: scale(1.1);
}

/* Contact Form */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid var(--gray-300);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-family: var(--font-family-sans-serif);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(219, 110, 84, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    font-family: var(--font-family-sans-serif);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--gray-900) !important;
    font-family: var(--font-family-sans-serif);
}

.social-links a {
    transition: var(--transition);
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-color) !important;
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--gray-800);
    color: var(--white);
    padding: 1rem 0;
    z-index: 1050;
    transform: translateY(100%);
    transition: var(--transition-slow);
    font-family: var(--font-family-sans-serif);
}

.cookie-consent.show {
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #c55a42;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Responsive Design - Enhanced */
@media (max-width: 1199.98px) {
    .hero-slide {
        min-height: 80vh;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card-img-top {
        padding-bottom: 70%; /* Slightly taller on medium screens */
    }
}

@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .hero-slide {
        min-height: 70vh;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-img-top {
        padding-bottom: 65%; /* Even taller on tablets */
    }
    
    /* Mobile dropdown adjustments */
    .dropdown-menu {
        text-align: center;
        border: none;
        box-shadow: none;
        background-color: transparent;
    }
    
    .dropdown-item {
        color: var(--gray-300);
        padding: 0.5rem 1rem;
    }
    
    .dropdown-item:hover {
        background-color: transparent;
        color: var(--primary-color);
        transform: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --section-padding: 3rem 0;
    }
    
    .hero-slide {
        min-height: 60vh;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .card-img-top {
        padding-bottom: 80%; /* Much taller on mobile for better visibility */
    }
    
    .about-img {
        margin-bottom: 2rem;
    }
}

@media (max-width: 575.98px) {
    .hero-slide {
        min-height: 50vh;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-img-top {
        padding-bottom: 100%; /* Square aspect ratio on small mobile */
    }
    
    .navbar-brand img {
        max-height: 40px;
    }
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

/* Force .text-primary to always use the Desi Fresh orange */
.text-primary {
    color: #db6e54 !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.navbar-toggler:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .navbar,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    .cookie-consent,
    .back-to-top {
        display: none !important;
    }
    
    .hero-section {
        margin-top: 0;
    }
    
    .hero-slide {
        min-height: auto;
        padding: 2rem 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #000;
        --gray-800: #000;
        --gray-900: #000;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide {
        background-attachment: scroll;
    }
}

/* Font Loading Optimization */
@font-face {
    font-family: 'Avenir';
    src: local('Avenir Next'), local('Avenir'), local('Segoe UI');
    font-display: swap;
}

/* Enhanced Typography */
.navbar-brand {
    font-family: var(--font-family-heading);
    font-weight: 600;
}

.card-title {
    font-family: var(--font-family-heading);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.form-control::placeholder {
    font-family: var(--font-family-sans-serif);
    color: var(--gray-500);
}

/* Our Story Page Styles */
.story-timeline {
    position: relative;
}

.story-card {
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.story-card:hover::before {
    transform: scaleX(1);
}

.story-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
}

.story-image img {
    transition: var(--transition);
    width: 100%;
    height: auto;
    object-fit: cover;
}

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

.story-content h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--font-family-heading);
    letter-spacing: -0.01em;
}

.story-content h3 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.story-content .lead {
    color: var(--gray-700);
    font-weight: 500;
    margin-bottom: 1rem;
}

.story-content p {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Hero Section for Our Story - Separate styling */
.story-hero-section {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.story-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.story-hero-section .container {
    position: relative;
    z-index: 2;
}

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

.story-hero-section .lead {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Values Section */
.values-section .card {
    border: none;
    border-radius: var(--border-radius-xl);
    transition: var(--transition);
    background: var(--white);
    overflow: hidden;
}

.values-section .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.values-section .card-body {
    padding: 2.5rem 1.5rem;
}

.values-section .bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

/* Responsive adjustments for Our Story */
@media (max-width: 991.98px) {
    .story-card {
        padding: 1.5rem;
    }
    
    .story-hero-section h1 {
        font-size: 2.5rem;
    }
    
    .story-hero-section .lead {
        font-size: 1.1rem;
    }
}

@media (max-width: 767.98px) {
    .story-card {
        padding: 1rem;
    }
    
    .story-hero-section h1 {
        font-size: 2rem;
    }
    
    .story-hero-section .lead {
        font-size: 1rem;
    }
    
    .story-content h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .story-hero-section h1 {
        font-size: 1.75rem;
    }
    
    .story-card {
        padding: 0.75rem;
    }
    
    .values-section .card-body {
        padding: 1.5rem 1rem;
    }
} 