/* --- Global Styles & Variables --- */
:root {
    --font-primary: 'Roboto', sans-serif;
    --font-headings: 'Great Vibes', cursive;
    --color-text: #333333;
    --color-primary-warm: #D4AF37; /* Gold */
    --color-primary-accent: #E91E63; /* Pink */
    --color-primary-cool: #5E8C6A; /* Muted Green from logo */
    --color-background: #FAF7F0; /* Light Cream */
    --color-surface: #FFFFFF; /* For cards, sections */
    --color-button: var(--color-primary-warm);
    --color-button-text: #FFFFFF;
    --shadow-light: 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 6px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
}

body.cart-is-open {
    overflow: hidden;
}

/* --- Header --- */
.custom-header {
    background-color: var(--color-surface);
    padding: 15px 20px;
    text-align: center;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-header .header-logo {
    height: 60px;
    width: auto;
    vertical-align: middle;
}

.custom-header .header-title-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

.custom-header h1 {
    font-family: var(--font-headings);
    font-size: 2.8rem;
    color: var(--color-text);
    margin: 0;
}

.custom-header .tagline {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--color-primary-cool);
    margin-top: 0px;
    font-weight: 300;
}

.cart-button {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-primary-warm);
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cart-button:hover {
    background-color: var(--color-primary-warm);
    color: var(--color-button-text);
}

#cart-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

#cart-count {
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- Hero Section --- */
.hero {
    padding: 0;
    text-align: center;
    background-color: var(--color-surface);
}

.hero img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.hero .hero-logo-banner {
    max-height: 350px;
    width: auto;
    display: block;
    margin: 30px auto;
    padding: 20px;
}

/* --- General Section Styling --- */
main section {
    padding: 60px 20px; /* UPDATED */
    text-align: center;
}

main section:nth-child(even) {
    background-color: var(--color-surface);
}

h2 {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    color: var(--color-primary-cool);
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-primary-warm);
}

h3 {
    font-family: var(--font-primary);
    font-size: 1.4rem; /* Product titles on cards */
    color: var(--color-text);
    margin-top: 15px;   /* Space above product title */
    margin-bottom: 10px; /* Space below product title */
    font-weight: 700;
    line-height: 1.3; /* Adjust if titles wrap */
    min-height: 2.6em; /* Try to reserve space for two lines of title */
}

p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555555;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
}
    .product-item p { /* Paragraphs within product cards (description) */
        font-size: 0.9rem; /* Slightly smaller for description */
        color: #666;
        margin-bottom: 15px; /* Space before price */
        min-height: 3.6em; /* Try to reserve space for a few lines of description */
        overflow: hidden; /* Optional: hide overflow if description is too long */
    }


    /* --- About Us Section --- */
    .about-us {
        background-color: var(--color-background);
    }
    .about-us .about-us-content {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        text-align: left;
        max-width: 900px;
        margin: 0 auto;
    }
    .about-us img {
        max-width: 200px;
        height: auto;
        margin-right: 25px;
        border-radius: 50%;
        border: 5px solid var(--color-surface);
        box-shadow: var(--shadow-medium);
    }
    .about-us .about-us-text p {
        text-align: left;
        font-size: 1.1rem;
        max-width: 600px;
    }

    /* --- Highlight/Specialties Section --- */
    .highlight {
        background-color: var(--color-surface);
    }
    .highlight img {
        width: 70%;
        max-width: 500px;
        margin-top: 20px;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-light);
    }

    /* --- Products Section --- */
    .products {
        background-color: var(--color-background);
    }

    .product-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Creates responsive columns */
        gap: 40px; /* UPDATED */
        padding: 20px;
        max-width: 1200px; /* Max width of the product grid */
        margin: 0 auto; /* Center the grid */
    }

    .product-item {
        background-color: var(--color-surface);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow-light); /* Changed from medium */
        padding: 20px;
        text-align: center;
        display: flex; /* Use flexbox for internal alignment */
        flex-direction: column; /* Stack items vertically */
        justify-content: space-between; /* Pushes button to bottom */
        border: 1px solid #f0f0f0; /* UPDATED */
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; /* UPDATED */
    }

    .product-item:hover { /* UPDATED */
        transform: translateY(-8px);
        box-shadow: var(--shadow-medium);
        border-color: #e0e0e0;
    }

    .product-item img {
        width: 100%;
        height: 200px; /* Fixed height for all product images */
        object-fit: cover; /* Will cover the area, cropping if necessary to maintain aspect ratio */
        border-radius: var(--border-radius); /* Rounded corners for the image */
        margin-bottom: 15px; /* Space below image */
    }

    .product-item .price {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--color-primary-accent); /* Pink for price */
        margin-top: 10px;  /* Space above price */
        margin-bottom: 15px; /* Space below price, before button */
    }

    .add-to-cart {
        background-color: var(--color-button);
        color: var(--color-button-text);
        border: none;
        padding: 12px 20px;
        cursor: pointer;
        font-size: 1rem;
        border-radius: var(--border-radius);
        transition: background-color 0.3s ease, transform 0.2s ease; /* UPDATED */
        text-transform: uppercase;
        font-weight: bold;
        letter-spacing: 0.5px;
        margin-top: auto; /* Pushes button to the bottom of the card */
    }

    .add-to-cart:hover { /* UPDATED */
        background-color: #c79c2b; /* Darken gold */
        transform: scale(1.05);
    }

/* --- Cart Styling --- */
.cart {
    position: fixed;
    top: 0;
    right: -370px;
    width: 350px;
    height: 100vh;
    background-color: var(--color-surface);
    border-left: 1px solid #ddd;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
    z-index: 1010;
    transition: right 0.4s ease-in-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cart.cart-open {
    right: 0;
}

.cart-close-btn { /* NEW */
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: 300;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}
.cart-close-btn:hover { /* NEW */
    color: var(--color-text);
}


.cart h2 {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    color: var(--color-text);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    padding-right: 30px; /* NEW */
}
.cart h2::after {
    display: none;
}

.cart-content {
    flex-grow: 1;
}

#cart-content p { /* "No items in cart" message */
    text-align: center;
    font-style: italic;
    color: #777;
    margin-top: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    min-width: 70px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-right: 15px;
}

.cart-item-details {
    flex-grow: 1;
    font-size: 0.9rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.cart-item-details .product-info {
    margin-bottom: 5px;
}

.cart-item-details .product-info .product-name {
    font-weight: bold;
    color: var(--color-text);
    display: block;
    margin-bottom: 3px;
}

.cart-item-details .product-info .product-price-details {
    font-size: 0.85rem;
    color: #666;
}

.cart-item-details button {
    background-color: transparent;
    color: var(--color-primary-accent);
    border: 1px solid var(--color-primary-accent);
    padding: 3px 8px;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    margin-top: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: flex-start;
}
.cart-item-details button:hover {
    background-color: var(--color-primary-accent);
    color: white;
}

.cart .cart-summary {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid var(--color-primary-warm);
    background-color: var(--color-surface);
}

.cart .cart-summary p {
    font-size: 1rem;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    color: var(--color-text);
}

.cart .cart-summary p span.label {
    color: #555;
}
.cart .cart-summary p span.value {
    font-weight: bold;
    color: var(--color-text);
}

.cart .cart-summary #final-price {
    font-weight: bold;
    font-size: 1.15rem;
    color: var(--color-primary-cool);
    margin-top: 15px;
}
.cart .cart-summary #final-price span.value {
    color: var(--color-primary-cool);
}

.cart button.checkout-button {
    background-color: var(--color-primary-cool);
    color: var(--color-button-text);
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 1.05rem;
    border-radius: var(--border-radius);
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s ease;
    letter-spacing: 0.5px;
}
.cart button.checkout-button:hover {
    background-color: #4a7555; /* Darken green */
}

/* --- Footer --- */
footer { /* UPDATED */
    background-color: #2c2c2c;
    color: #f0f0f0;
    padding: 40px 20px 20px 20px;
    text-align: center;
}

.footer-content { /* NEW */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 900px;
    margin: 0 auto 30px auto;
    gap: 20px;
}

.footer-content > div { /* NEW */
    flex: 1;
    min-width: 200px;
}

.footer-title { /* NEW */
    font-family: var(--font-headings);
    font-size: 2rem;
    color: var(--color-primary-warm);
    margin: 0;
}

footer h4 { /* NEW */
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--color-primary-warm);
    padding-bottom: 8px;
    display: inline-block;
}

footer p { /* UPDATED */
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: none;
}

.footer-social a { /* NEW */
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-social a:hover { /* NEW */
    color: var(--color-primary-warm);
}

.footer-bottom { /* NEW */
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #aaa;
}

.footer-bottom p { /* NEW */
    color: #aaa;
    font-size: 0.8rem;
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) { /* Tablet and below */
    .custom-header {
        flex-direction: column;
        padding: 10px;
    }
    .custom-header .header-title-section {
        margin: 10px auto;
    }
    .custom-header h1 {
        font-size: 2rem;
    }
    .custom-header .tagline {
        font-size: 0.9rem;
    }
    .cart-button {
        margin-top: 10px;
    }

    h2 {
        font-size: 1.8rem;
    }
    h3 { /* Product titles on cards */
        font-size: 1.2rem;
        min-height: 2.4em; /* Adjust for smaller font */
    }
    .product-item p { /* Product descriptions on cards */
        min-height: 3em; /* Adjust for smaller font */
    }


    .about-us .about-us-content {
        flex-direction: column;
        text-align: center;
    }
    .about-us img {
        margin-right: 0;
        margin-bottom: 20px;
    }
     .about-us .about-us-text p {
        text-align: center;
    }

    .product-container { /* Products become single column */
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .product-item img {
        height: 180px; /* Adjust image height for single column layout */
    }

    .cart {
        width: 300px; /* Make cart slightly narrower on mobile */
        right: -320px; /* Adjust initial off-screen position if width changes */
    }
    .cart.cart-open {
        right: 0;
    }

    .checkout-section, .delivery-section {
        padding: 20px 15px;
        margin: 20px auto;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group textarea {
        padding: 10px;
        font-size: 0.95rem;
    }

    .checkout-section button, .delivery-section button[type="submit"] {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .checkout-section #checkout-subtotal,
    .checkout-section #delivery-fee,
    .checkout-section #final-price {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .checkout-section #checkout-subtotal span:last-child,
    .checkout-section #delivery-fee span:last-child,
    .checkout-section #final-price span:last-child {
       padding-left: 0;
       margin-top: 4px;
    }
}

@media (max-width: 480px) { /* Additional adjustments for very small phone screens */
    h3 { /* Product titles on cards for very small screens */
        font-size: 1.1rem;
        min-height: 0; /* Allow title height to be natural */
    }
    .product-item p { /* Product descriptions for very small screens */
        min-height: 0; /* Allow description height to be natural */
        font-size: 0.85rem;
    }
    .product-item img {
        height: 160px;
    }
    .add-to-cart {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    .cart {
        width: 90%; /* Cart takes more width */
        right: -100%; /* Adjust for percentage width */
    }
}


/* Styles for Checkout and Delivery Pages (already somewhat covered by responsive form/section styles) */
.checkout-section, .delivery-section {
    padding: 40px 20px;
    background-color: var(--color-surface); /* Changed from background */
    max-width: 700px;
    margin: 40px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.checkout-section h2, .delivery-section h2 {
    font-family: var(--font-primary);
    color: var(--color-primary-cool);
    text-align: center;
}

.checkout-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

.checkout-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-details {
    flex-grow: 1;
}
.checkout-item-details p {
    text-align: left;
    max-width: none;
    margin: 3px 0;
    line-height: 1.5;
}
.checkout-item-details p:first-child {
    font-weight: bold;
}

.checkout-section #checkout-subtotal,
.checkout-section #delivery-fee,
.checkout-section #final-price {
    font-size: 1.1rem;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
}

.checkout-section #checkout-subtotal span:last-child,
.checkout-section #delivery-fee span:last-child,
.checkout-section #final-price span:last-child {
    font-weight: bold;
}

.checkout-section #final-price span:last-child {
    color: var(--color-primary-accent);
}

.checkout-section button, .delivery-section button[type="submit"] {
    background-color: var(--color-primary-cool);
    color: var(--color-button-text);
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: var(--border-radius);
    display: block;
    width: 100%;
    margin-top: 30px;
    text-transform: uppercase;
    font-weight: bold;
}
.checkout-section button:hover, .delivery-section button[type="submit"]:hover {
    background-color: #4a7555; /* Darken green */
}

/* Form Styling for Delivery Page */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s; /* Added transition */
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* NEW: Form focus styles */
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-cool);
    box-shadow: 0 0 0 3px rgba(94, 140, 106, 0.2);
}

/* --- Features Section --- */
.features-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 60px 20px;
    background-color: var(--color-surface); /* Changed */
}
.feature-item {
    text-align: center;
    flex-grow: 1;
    flex-basis: 280px;
    max-width: 320px;
    margin: 15px;
    padding: 30px;
    background-color: var(--color-background); /* Swapped */
    border: 1px solid #eee; /* Changed */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light); /* Changed */
}
.feature-item img { /* Changed from .feature-item */
    height: 50px;
    margin-bottom: 10px;
}
.feature-item h3 {
    font-family: var(--font-primary); /* Changed */
    font-size: 1.3rem;
    margin: 0 0 10px 0;
}
.feature-item p {
    font-size: 0.95rem;
    color: #616d78;
    margin: 0;
}

