/* ===================================
   GOLDEN VALLEY HAY - MAIN STYLES
   =================================== */

/* CSS Variables - Design System */
:root {
    /* Primary Colors - Earthy Farm Palette */
    --primary-green: #4a7c59;
    --primary-green-dark: #3a6347;
    --primary-green-light: #5d9970;

    /* Secondary Colors - Warm Harvest */
    --secondary-gold: #d4a84b;
    --secondary-gold-dark: #b8923f;
    --secondary-gold-light: #e5c273;

    /* Neutral Colors */
    --brown-dark: #3d2914;
    --brown-medium: #5c4033;
    --brown-light: #8b6914;

    /* Background Colors */
    --bg-cream: #faf6f0;
    --bg-light: #ffffff;
    --bg-warm: #f5efe6;
    --bg-dark: #2c1810;

    /* Text Colors */
    --text-dark: #2c1810;
    --text-medium: #5c4033;
    --text-light: #8b7355;
    --text-white: #ffffff;

    /* Accent Colors */
    --accent-red: #c0392b;
    --accent-blue: #2980b9;
    --success: #27ae60;
    --warning: #f39c12;
    --error: #e74c3c;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(44, 24, 16, 0.08);
    --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.12);
    --shadow-lg: 0 8px 24px rgba(44, 24, 16, 0.16);
    --shadow-xl: 0 12px 40px rgba(44, 24, 16, 0.2);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 80px;
    --section-padding-mobile: 50px;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-green-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-green);
    color: var(--text-white);
    border-color: var(--primary-green);
}

.btn-primary:hover {
    background: var(--primary-green-dark);
    border-color: var(--primary-green-dark);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-gold);
    color: var(--text-dark);
    border-color: var(--secondary-gold);
}

.btn-secondary:hover {
    background: var(--secondary-gold-dark);
    border-color: var(--secondary-gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
}

.btn-outline:hover {
    background: var(--text-white);
    color: var(--primary-green);
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-outline-dark:hover {
    background: var(--primary-green);
    color: var(--text-white);
}

.btn-light {
    background: var(--text-white);
    color: var(--primary-green);
    border-color: var(--text-white);
}

.btn-light:hover {
    background: var(--bg-cream);
    border-color: var(--bg-cream);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    background: transparent;
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
    color: var(--text-white);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 20px 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: var(--bg-light);
    box-shadow: var(--shadow-md);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
}

.navbar.scrolled .logo {
    color: var(--primary-green);
}

.logo i {
    font-size: 1.8rem;
    color: var(--secondary-gold);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-white);
    text-decoration: none;
    position: relative;
    padding: 8px 0;
}

.navbar.scrolled .nav-menu a {
    color: var(--text-dark);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-gold);
    transition: var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-cart {
    position: relative;
}

.cart-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: var(--text-white);
    font-size: 1.1rem;
}

.navbar.scrolled .cart-link {
    background: var(--bg-warm);
    color: var(--primary-green);
}

.cart-link:hover {
    background: var(--secondary-gold);
    color: var(--text-dark);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: var(--accent-red);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-white);
    border-radius: 2px;
    transition: var(--transition-base);
}

.navbar.scrolled .nav-toggle span {
    background: var(--text-dark);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--secondary-gold-light), var(--secondary-gold));
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-medium);
    font-size: 1.1rem;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* Product Card */
.product-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background: var(--primary-green);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

.product-badge.sale {
    background: var(--accent-red);
}

.product-badge.new {
    background: var(--secondary-gold);
    color: var(--text-dark);
}

.product-content {
    padding: 20px;
}

.product-category {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--primary-green);
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.product-rating {
    display: flex;
    gap: 2px;
    color: var(--secondary-gold);
    font-size: 0.85rem;
}

.product-rating-count {
    font-size: 0.85rem;
    color: var(--text-light);
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-green);
}

.product-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-light);
}

.product-price .old-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1rem;
    margin-right: 8px;
}

.btn-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary-green);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-add-cart:hover {
    background: var(--primary-green-dark);
    transform: scale(1.1);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-logo i {
    color: var(--secondary-gold);
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

.footer-social a:hover {
    background: var(--secondary-gold);
    color: var(--text-dark);
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--secondary-gold);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact li i {
    color: var(--secondary-gold);
    margin-top: 4px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact a:hover {
    color: var(--secondary-gold);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-legal a:hover {
    color: var(--secondary-gold);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-white);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary-green);
}

.text-secondary {
    color: var(--secondary-gold);
}

.text-light {
    color: var(--text-light);
}

.text-white {
    color: var(--text-white);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-light);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        gap: 0;
        box-shadow: var(--shadow-xl);
        transition: var(--transition-base);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 16px 0;
        color: var(--text-dark);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-cart {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .cart-link {
        background: var(--bg-warm);
        color: var(--primary-green);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}