/* --- Basic Reset & Setup --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: var(--text-color); /* Earthy green */
    --secondary-color: #e4d5b7; /* Beige/Cream */
    --accent-color: #d9534f; /* Barn red accent */
    --text-color: #333;
    --heading-font: 'Merriweather', serif;
    --body-font: 'Lato', sans-serif;
    --container-width: 1140px;
    --border-radius: 5px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9; /* Light background */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    margin-bottom: 0.8em;
    line-height: 1.3;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3a5a2d; /* Darker green */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button, .button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--body-font);
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none; /* For link styled as button */
}

button:hover, .button:hover {
    background-color: var(--accent-color); /* Slightly darker green */
}
button:active, .button:active {
     transform: scale(0.98);
}

button:disabled, .button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Add-to-cart specific styles */
.add-to-cart-button.added {
    background-color: #5cb85c; /* Success green */
    cursor: default;
}

.add-to-cart-button.added:hover {
    background-color: #5cb85c;
}


/* --- Header --- */
.site-header {
    background-color: #fff;
    box-shadow: var(--box-shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo .logo-text {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}
.logo img {
    max-height: 50px; /* Adjust as needed */
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 700;
    padding: 5px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after { /* Add 'active' class via JS/PHP for current page */
    width: 100%;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-icon img {
    width: 28px;
    height: 28px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* --- Footer --- */
.site-footer {
    background-color: #333;
    color: #f4f4f4;
    padding: 40px 0 20px;
    margin-top: auto; /* Pushes footer to bottom */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a, .footer-section p {
    color: #ccc;
    font-size: 0.95rem;
}
.footer-section a:hover {
    color: #fff;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links img {
    width: 24px;
    height: 24px;
    filter: none; /* Make icons light */
    transition: opacity 0.3s;
}
.social-links a:hover img {
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #aaa;
}


/* --- General Page Styles --- */
.site-content {
    padding: 40px 0;
    flex-grow: 1; /* Ensures content area fills space */
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../images/web-bg.png') no-repeat center center/cover; /* Example background */
    color: #fff;
    border-radius: var(--border-radius);
}
.page-header h1 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 10px;
}
.page-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}


/* --- Section Styles --- */
.section {
    padding: 60px 0;
}
.section-alt {
    background-color: var(--secondary-color);
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    position: relative;
}
/* Optional underline for title */
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

/* --- Home Page Specific --- */
.hero-section { /* Welcome section */
    text-align: center;
    padding: 80px 20px;
     background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/web-bg.png') no-repeat center center/cover;
     color: #fff;
}
.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff;
}
.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.hero-section .button {
     background-color: var(--accent-color);
     font-size: 1.1rem;
     padding: 15px 35px;
}
.hero-section .button:hover {
     background-color: #c9302c;
}

.featured-products-grid, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}
.product-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Crop images nicely */
}
.product-info {
    padding: 20px;
    flex-grow: 1; /* Make info area fill remaining space */
    display: flex;
    flex-direction: column;
}
.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333; /* Product names maybe not primary green */
}
.product-description {
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1; /* Push price/button down */
}
.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.product-info .button {
    width: 100%;
}

.about-brief {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.about-brief h2 { font-size: 1.8rem; }

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background-color: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-left: 5px solid var(--primary-color);
}
.testimonial-text {
    font-style: italic;
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px; /* Space for quote */
}
.testimonial-text::before {
    content: '“';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
}
.testimonial-author {
    font-weight: bold;
    text-align: right;
    color: var(--primary-color);
}

.get-started {
    text-align: center;
}

/* --- Products Page Specific --- */
/* Uses .products-grid, .product-card from Home Page styles */

/* --- About Us Page Specific --- */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}
.about-section {
    margin-bottom: 40px;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}
.team-member {
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 4px solid var(--secondary-color);
}
.team-member h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: #333;
}
.team-member p {
    font-size: 0.95rem;
    color: #666;
}

/* --- Contact Us Page Specific --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.contact-form label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--body-font);
    font-size: 1rem;
}
.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}
.contact-form button {
    align-self: flex-start; /* Don't stretch button */
}
.form-message { /* For success/error messages */
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-weight: bold;
}
.form-message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}
.form-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.contact-info h3, .map-section h3, .social-media-section h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.contact-info p {
    margin-bottom: 10px;
}
.map-section iframe {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.social-media-section .social-links img { /* Adjust size for this section if needed */
     width: 32px;
     height: 32px;
     filter: none; /* Use original color icons */
     opacity: 0.9;
}
.social-media-section .social-links a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* --- Cart Page Specific --- */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden; /* For border radius */
}
.cart-table th, .cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.cart-table th {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-right: 15px;
    vertical-align: middle;
}
.cart-item-details {
     display: flex;
     align-items: center;
}
.cart-item-details span {
     display: block; /* Make name wrap if needed */
}
.quantity-input {
    width: 60px;
    padding: 8px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    margin-right: 10px;
}
.update-quantity-form {
    display: inline-flex; /* Align input and button */
    align-items: center;
}
.update-quantity-form button,
.remove-item-button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1; /* Prevent extra space */
}
.remove-item-button {
    font-size: 1.2rem; /* Make remove icon slightly larger */
    margin-left: 5px;
}
.update-quantity-form button:hover,
.remove-item-button:hover {
    color: #a94442; /* Darker red */
}

.cart-summary {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: var(--border-radius);
    float: right; /* Align to the right */
    width: 100%;
    max-width: 350px; /* Limit width */
    margin-top: 30px; /* Add space if needed after table */
    clear: both; /* Clear float if table is floated */
}
.cart-summary h2 {
    text-align: center;
    margin-bottom: 20px;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 25px;
    border-top: 2px solid var(--primary-color);
    padding-top: 15px;
}
.cart-summary .button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    background-color: var(--accent-color);
}
 .cart-summary .button:hover {
     background-color: #c9302c;
 }

.cart-empty {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.cart-empty p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* --- Checkout Page Specific --- */
.checkout-form {
     background: #fff;
     padding: 30px;
     border-radius: var(--border-radius);
     box-shadow: var(--box-shadow);
     max-width: 700px;
     margin: 20px auto; /* Center the form */
}

.checkout-form h2 {
    text-align: center;
    margin-bottom: 30px;
}

.form-section {
    margin-bottom: 30px;
}
.form-section h3 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to 1 column */
    gap: 20px;
}
/* Example for 2 columns */
/* .form-grid-2-col {
    grid-template-columns: 1fr 1fr;
} */

.form-group label {
     display: block;
     margin-bottom: 8px;
     font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
     width: 100%;
     padding: 12px;
     border: 1px solid #ccc;
     border-radius: var(--border-radius);
     font-family: var(--body-font);
     font-size: 1rem;
}

.form-group textarea {
     min-height: 100px;
     resize: vertical;
}

.payment-info p { /* Disclaimer about not processing real payments */
     font-size: 0.9rem;
     color: #666;
     margin-top: 10px;
     background: #f0f0f0;
     padding: 10px;
     border-radius: var(--border-radius);
     border-left: 3px solid var(--accent-color);
}

.checkout-form .button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* --- Order Status Page Specific --- */
.order-lookup-form, .order-details {
     background: #fff;
     padding: 30px;
     border-radius: var(--border-radius);
     box-shadow: var(--box-shadow);
     max-width: 600px;
     margin: 20px auto;
}
.order-lookup-form h2, .order-details h2 {
    text-align: center;
    margin-bottom: 25px;
}
.order-lookup-form form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.order-lookup-form label {
     font-weight: bold;
     margin-right: 5px; /* Space between label and input */
     white-space: nowrap; /* Prevent label wrapping */
}
.order-lookup-form input[type="text"] {
     flex-grow: 1; /* Input takes available space */
     padding: 12px;
     border: 1px solid #ccc;
     border-radius: var(--border-radius);
     font-size: 1rem;
}
.order-lookup-form button {
    padding: 12px 20px; /* Match input height */
}

.order-details { margin-top: 40px; }
.order-details p { margin-bottom: 10px; }
.order-details strong { color: var(--primary-color); }
.order-details .status { font-weight: bold; padding: 5px 10px; border-radius: var(--border-radius); display: inline-block; }
.order-details .status.pending { background-color: #f0ad4e; color: #fff; }
.order-details .status.shipped { background-color: #5bc0de; color: #fff; }
.order-details .status.delivered { background-color: #5cb85c; color: #fff; }
.order-details .status.cancelled { background-color: #d9534f; color: #fff; }

.order-items-table { /* Reuse cart table styles */
     width: 100%;
     border-collapse: collapse;
     margin-top: 20px;
     font-size: 0.95rem;
}
.order-items-table th, .order-items-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.order-items-table th {
    background-color: var(--secondary-color);
    font-weight: bold;
}

/* --- Utility & Messages --- */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    .contact-container {
        grid-template-columns: 1fr; /* Stack contact form and info */
    }
    .cart-summary {
        float: none;
        max-width: none;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .header-container {
        position: relative; /* Needed for absolute positioning of nav */
    }
    .menu-toggle {
        display: block; /* Show hamburger menu */
        order: 3; /* Move toggle to the right */
    }
    .main-nav {
        order: 4; /* Move nav below logo/cart */
        width: 100%;
    }
    .main-nav .nav-links {
        display: none; /* Hide links by default */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        background-color: #fff;
        width: 100%;
        padding: 15px 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        gap: 0; /* Remove gap for column layout */
        border-top: 1px solid #eee;
    }
    .main-nav .nav-links.active { /* Class added by JS */
        display: flex;
    }
    .main-nav ul li {
        width: 100%;
    }
    .main-nav ul li a {
        display: block;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }
     .main-nav a::after { display: none; /* Remove underline on mobile nav */ }

    .hero-section h1 { font-size: 2.5rem; }
    .hero-section p { font-size: 1.1rem; }
    .section-title { font-size: 1.8rem; }

    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .social-links { justify-content: center; }

    .cart-table { font-size: 0.9rem; }
    .cart-table th, .cart-table td { padding: 10px; }
    .cart-item-details { flex-direction: column; align-items: flex-start; }
    .cart-item-image { margin-right: 0; margin-bottom: 5px; }
    .quantity-input { width: 50px; padding: 5px; }
}

@media (max-width: 576px) {
    .hero-section h1 { font-size: 2rem; }
    .hero-section p { font-size: 1rem; }
    .page-header h1 { font-size: 2.2rem; }

    .featured-products-grid, .products-grid, .testimonials-grid, .team-grid {
        grid-template-columns: 1fr; /* Single column */
    }
    .product-image { height: 180px; }

    .cart-table thead { display: none; /* Hide table headers */}
    .cart-table tr { display: block; margin-bottom: 20px; border-bottom: 2px solid var(--primary-color); padding-bottom: 15px; }
    .cart-table td { display: block; text-align: right; border-bottom: 1px dotted #ccc; padding-left: 50%; position: relative; }
    .cart-table td::before { content: attr(data-label); position: absolute; left: 10px; top: 10px; font-weight: bold; text-align: left; text-transform: uppercase; font-size: 0.8rem; color: var(--primary-color); }
    .cart-table td:last-child { border-bottom: 0; }
    .cart-item-details { text-align: right; width: 100%; } /* Adjust alignment */
    .update-quantity-form { justify-content: flex-end; } /* Align quantity controls right */

     .order-lookup-form form { flex-direction: column; align-items: stretch;}
     .order-lookup-form label { margin-bottom: 5px; margin-right: 0; }
}

/* --- Canada Day Launch Banner Styling --- */
.canada-day-banner {
    background-color: #ffffff;
    color: #333;
    text-align: center;
    padding: 25px 20px;
    border-bottom: 3px solid #e63946; /* Canadian Red */
    margin-bottom: 20px; /* Space between banner and next section */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.canada-day-banner h2 {
    color: #e63946; /* Canadian Red */
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.canada-day-banner p {
    font-size: 1.1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Make it look good on mobile */
@media (max-width: 768px) {
    .canada-day-banner h2 {
        font-size: 1.5rem;
    }
    .canada-day-banner p {
        font-size: 1rem;
    }
}

/* --- Category Filter Styling --- */
.category-filters {
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-button {
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    padding: 8px 18px;
    cursor: pointer;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: #e0e0e0;
}

.filter-button.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Hide product cards for filtering */
.product-card.hidden {
    display: none;
}

/* --- Product Modal Styling --- */
.product-card {
    cursor: pointer; /* Change cursor to indicate it's clickable */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    position: relative;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    display: flex;
    gap: 30px;
}

.modal-image {
    flex: 1 1 40%;
}
.modal-image img {
    width: 100%;
    border-radius: 5px;
}

.modal-details {
    flex: 1 1 60%;
}

.modal-details h2 {
    margin-top: 0;
    color: #333;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-actions input[type="number"] {
    width: 60px;
    padding: 10px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }
    .modal-content {
        padding: 20px;
    }
}