/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-color: #2c5530;
    --primary-dark: #1e3a22;
    --primary-light: #3d7043;

    /* Secondary Colors */
    --secondary-color: #f5a623;
    --secondary-dark: #d18a0e;
    --secondary-light: #ffc15c;

    /* Status Colors */
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;

    /* Neutral Colors */
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;

    /* Semantic Colors */
    --text-color: #333333;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 4px var(--shadow-color);
    --shadow-md: 0 4px 8px var(--shadow-color);
    --shadow-lg: 0 8px 16px var(--shadow-color);
    --shadow-xl: 0 12px 24px var(--shadow-color);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Georgia', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.display-1 {
    font-size: 4rem;
}

.display-2 {
    font-size: 3.5rem;
}

.display-3 {
    font-size: 3rem;
}

.display-4 {
    font-size: 2.5rem;
}

h1,
.h1 {
    font-size: 2.5rem;
}

h2,
.h2 {
    font-size: 2rem;
}

h3,
.h3 {
    font-size: 1.75rem;
}

h4,
.h4 {
    font-size: 1.5rem;
}

h5,
.h5 {
    font-size: 1.25rem;
}

h6,
.h6 {
    font-size: 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: var(--space-sm);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: var(--space-2xl);
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

/* ===== LAYOUT & UTILITIES ===== */
.container-fluid {
    width: 100%;
    padding-right: var(--space-md);
    padding-left: var(--space-md);
    margin-right: auto;
    margin-left: auto;
}

.min-vh-90 {
    min-height: 90vh;
}

.min-vh-80 {
    min-height: 80vh;
}

.min-vh-70 {
    min-height: 70vh;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    user-select: none;
    gap: 8px;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c2a 50%, #6ba13e 100%);
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(45, 80, 22, 0.9) 0%, rgba(45, 80, 22, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    line-height: 1.6;
    opacity: 0.9;
}

.hero-image {
    max-height: 600px;
    object-fit: cover;
    border: 8px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

/* Floating Elements */
.floating-badge,
.floating-stats {
    position: absolute;
    animation: float 3s ease-in-out infinite;
}

.floating-badge {
    top: 20px;
    left: 20px;
    background: white;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: var(--radius-round);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 3;
}

.floating-stats {
    bottom: 20px;
    right: 20px;
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 3;
}

/* ===== CARDS ===== */
.card-base {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
}

.card-base:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-base:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 5%;
    width: 90%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(4px);
}

/* Product Cards */
.product-card {
    height: 100%;
}

.product-image {
    position: relative;
    overflow: hidden;
    background: var(--light-color);
}

.aspect-ratio {
    position: relative;
    width: 100%;
    padding-bottom: calc(100% / var(--aspect-ratio, 1));
}

.aspect-ratio>* {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .aspect-ratio img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    border: 1px solid;
}

.product-badge.organic {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
    border-color: rgba(40, 167, 69, 0.3);
}

.product-badge.featured {
    background: rgba(255, 193, 7, 0.15);
    color: var(--warning-color);
    border-color: rgba(255, 193, 7, 0.3);
}

.product-badge.discount {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
    border-color: rgba(220, 53, 69, 0.3);
}

.product-info {
    padding: var(--space-lg);
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--dark-color);
}

.product-category {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: var(--space-sm);
}

.product-price {
    margin-bottom: var(--space-md);
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.compare-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-stock {
    margin-bottom: var(--space-md);
}

.product-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-info {
    padding: 20px;
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.service-type {
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #666;
}

.service-price {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: center;
}

/* Farm Cards */
.farm-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.farm-image {
    height: 250px;
}

.farm-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.farm-info {
    padding: 25px;
}

.farm-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.farm-location {
    color: #666;
    margin-bottom: 15px;
}

.farm-contact {
    background: var(--light-color);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

/* Farm Cards */
.farm-card {
    height: 100%;
}

.farm-info {
    padding: var(--space-xl);
}

.farm-contact {
    background: var(--light-color);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    padding: var(--space-xl);
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    height: 100%;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: var(--light-color);
}

.stat-item {
    padding: var(--space-xl);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--space-xs);
}

.stat-label {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* ===== NEWSLETTER ===== */
.newsletter-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
}

.newsletter-form .input-group {
    max-width: 500px;
    margin: 0 auto;
}

/* ===== FILTERS ===== */
.product-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.btn-filter {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    padding: 8px 20px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-filter.active,
.btn-filter:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer h5 {
    color: var(--secondary-light);
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-round);
    color: white;
    text-decoration: none;
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 400px;
    z-index: 9999;
    border-left: 4px solid;
    transform: translateX(400px);
    animation: slideInRight 0.3s ease forwards;
}

.toast-success {
    border-left-color: var(--success-color);
}

.toast-error {
    border-left-color: var(--danger-color);
}

.toast-warning {
    border-left-color: var(--warning-color);
}

.toast-info {
    border-left-color: var(--info-color);
}

.toast-content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--space-sm);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    opacity: 0.6;
    transition: opacity var(--transition-base);
}

.toast-close:hover {
    opacity: 1;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ===== EMPTY STATES ===== */
.empty-state {
    padding: var(--space-2xl);
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-color);
    opacity: 0.5;
    margin-bottom: var(--space-lg);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation Utility Classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ===== LOADING STATES ===== */
.loading-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid currentColor;
    border-radius: var(--radius-round);
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-dark), var(--primary-color));
}

/* ===== ACCESSIBILITY ===== */
.skip-links {
    position: absolute;
    top: -40px;
    left: 0;
    z-index: 9999;
}

.skip-links a:focus {
    top: 0;
    background: var(--dark-color);
    color: white;
    padding: var(--space-sm);
    text-decoration: none;
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.navbar-toggler:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(44, 85, 48, 0.25);
}

/* ===== PRINT STYLES ===== */
@media print {

    .no-print,
    .hero-section,
    .back-to-top,
    .newsletter-section,
    .footer {
        display: none !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .card-base {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
}