/* Modern Styles for Fruits Shop */

:root {
    --primary-color: #2e7d32;
    --primary-dark: #1b5e20;
    --secondary-color: #6c757d;
    --success-color: #2e7d32;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --forest: #0f3d2e;
    --leaf: #3e9b4f;
    --citrus: #f4801f;
    --cream: #fbf8f1;
    --ink: #17251f;
    --muted: #5d6b64;
    --border-radius: 8px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Karla', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 18px 50px rgba(15, 61, 46, 0.09);
    --shadow-lift: 0 26px 60px rgba(15, 61, 46, 0.16);
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-color);
    padding-top: 76px; /* Account for fixed navbar */
    -webkit-font-smoothing: antialiased;
}

/* Navigation Styles */
.modern-nav {
    padding: 0.85rem 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border-bottom: 1px solid rgba(15, 61, 46, 0.07);
    box-shadow: 0 1px 0 rgba(15, 61, 46, 0.04);
    transition: padding 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.modern-nav.is-scrolled {
    padding: 0.4rem 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 34px rgba(15, 61, 46, 0.1);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-brand .fa-leaf {
    color: var(--leaf) !important;
}

.brand-text {
    background: linear-gradient(100deg, var(--forest), var(--leaf) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modern-nav .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.25s ease;
    position: relative;
}

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

.modern-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 2px;
    background: var(--citrus);
    border-radius: 2px;
}

.modern-nav .navbar-toggler {
    border: 1px solid rgba(15, 61, 46, 0.15);
    border-radius: 12px;
    padding: 0.35rem 0.6rem;
}

.modern-nav .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.18);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-nav .btn {
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.92rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

/* Search Section */
.search-section {
    border-bottom: 1px solid #dee2e6;
}

.search-container .input-group {
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-container .form-control {
    border: none;
    padding: 12px 16px;
    font-size: 1rem;
}

.search-container .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.filter-container .form-select {
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 1rem;
    box-shadow: var(--box-shadow);
}

/* Products Section */
.products-section {
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Product Cards */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 2rem;
    height: 100%;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

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

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-badge.badge-discount {
    top: 10px;
    right: 10px;
    left: auto;
    background: var(--danger-color);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.quantity-btn {
    background: var(--light-color);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.quantity-input {
    border: none;
    text-align: center;
    width: 50px;
    padding: 8px 4px;
    font-weight: 600;
}

/* Cart Modal */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-right: 1rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.cart-item-remove:hover {
    background: var(--danger-color);
    color: var(--white);
}

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

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

.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
}

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

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

/* Footer */
.footer {
    background: var(--dark-color) !important;
    margin-top: 3rem;
    font-family: var(--font-body);
}

.footer h5 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Shared page shell: section rhythm used by every page */
.page-hero {
    background: radial-gradient(120% 120% at 12% 0%, #eaf5ec 0%, var(--cream) 55%);
    padding: 84px 0 56px;
    border-bottom: 1px solid rgba(15, 61, 46, 0.07);
}

.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    color: var(--ink);
}

.page-hero p {
    color: var(--muted);
    max-width: 46ch;
    margin-bottom: 0;
}

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

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quantity-selector {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-image {
        margin: 0 0 1rem 0;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-hover {
    transition: var(--transition);
}

.shadow-hover:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1050;
}

.toast {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}