:root {
    --primary-font: 'Helvetica Neue', Arial, sans-serif;
    --base-text-color: #333;
    --background-color: #f4f4f4;
    --container-bg-color: #ffffff;
    --pepper-accent: #A0522D; /* 赭红色 */
    --kiwi-accent: #6B8E23; /* 草绿色 */
    --persimmon-accent: #E9967A; /* 柔和橙色 */
    --navbar-bg: #ffffff;
    --footer-bg: #333;
    --footer-text-color: #ffffff;
    --btn-bg: #333;
    --btn-text-color: #ffffff;
    --btn-hover-bg: #555;
}

body {
    font-family: var(--primary-font);
    line-height: 1.6;
    margin: 0;
    color: var(--base-text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 2rem;
}

/* Header and Navbar */
.navbar {
    background: var(--navbar-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--base-text-color);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--base-text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--kiwi-accent);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--base-text-color);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://source.unsplash.com/random/1600x900/?farm') no-repeat center center/cover;
    color: #fff;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 60px; /* Offset for fixed navbar */
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Products Section */
#products {
    padding: 4rem 0;
    display: grid;
    gap: 2rem;
}

.product-card {
    background: var(--container-bg-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-image {
    height: 250px;
    width: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
    object-position: center; /* Centers the image within the frame */
}

#pepper .product-image { border-left: 5px solid var(--pepper-accent); }
#kiwi .product-image { border-left: 5px solid var(--kiwi-accent); }
#persimmon .product-image { border-left: 5px solid var(--persimmon-accent); }

.product-info {
    padding: 1.5rem;
}

.product-info h2 {
    margin-top: 0;
}

#pepper .product-info h2 { color: var(--pepper-accent); }
#kiwi .product-info h2 { color: var(--kiwi-accent); }
#persimmon .product-info h2 { color: var(--persimmon-accent); }


/* Contact Section */
#contact {
    padding: 4rem 2rem;
    background: var(--background-color);
}

#contact h2 {
    text-align: center;
    margin-bottom: 2rem;
}

#contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--container-bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right .9em top 50%;
    background-size: .65em auto;
    padding-right: 2.5em;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--kiwi-accent);
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-group-inline .form-group {
    flex-grow: 1;
}


button.btn-secondary{
    margin-top: 0.5rem;
}

.btn-secondary {
    padding: 0.8rem 1rem;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-secondary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn {
    display: block;
    width: 100%;
    background: var(--btn-bg);
    color: var(--btn-text-color);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background: var(--btn-hover-bg);
}

#form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text-color);
    text-align: center;
    padding: 2rem 0;
}

/* Responsive */
@media (min-width: 768px) {
    .product-card {
        flex-direction: row;
    }
    .product-card:nth-child(even) {
        flex-direction: row-reverse;
    }
    .product-image {
        width: 40%;
        height: auto;
    }
    .product-info {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: var(--navbar-bg);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        margin: 0;
    }

    .nav-links a {
        padding: 1rem;
        display: block;
        border-bottom: 1px solid var(--background-color);
    }

    .hamburger {
        display: block;
    }

    #hero h1 {
        font-size: 2.5rem;
    }
}

.product-detail-container {
    padding-top: 4rem;
    padding-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 60px;
}

@media (min-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr 1fr;
    }
}

.product-gallery .main-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.thumbnail-images {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail-images .thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.thumbnail-images .thumbnail:hover,
.thumbnail-images .thumbnail.active {
    border-color: var(--pepper-accent);
}

.product-description h1 {
    margin-top: 0;
    color: var(--pepper-accent);
}

.product-description .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--base-text-color);
    margin-bottom: 1.5rem;
}

.product-description ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.product-description ul li {
    margin-bottom: 0.5rem;
}

/* Comments Section */
.comments-section {
    padding-bottom: 4rem;
}

.comments-section h2 {
    border-bottom: 2px solid var(--background-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.comment {
    background: var(--container-bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.comment-author {
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

.comment-text {
    margin: 0;
}

.comment-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.comment-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.comment-carousel .comment {
    min-width: 100%;
    box-sizing: border-box;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Utility for product card link */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.details-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: bold;
    color: var(--pepper-accent);
}
