/* --- Global Styles & Variables --- */
:root {
    --primary-color: #4A90E2; /* Calming Blue */
    --secondary-color: #1ABC9C; /* Teal */
    --accent-color: #F1C40F; /* Yellow */
    --accent-color-alt: #FF7F50; /* Coral */
    --text-dark: #333;
    --text-light: #555;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--body-font);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; line-height: 1.2; }
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.4rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    font-family: var(--heading-font);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #3a7bc8; /* Slightly darker blue */
    color: var(--white);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #e0b30e; /* Slightly darker yellow */
    color: var(--text-dark);
}


/* --- Header --- */
header {
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo a:hover {
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--text-dark);
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav ul li a:hover,
nav ul li a.active { /* Add 'active' class with JS if needed */
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.search-bar {
    display: flex;
}

.search-bar input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px 0 0 5px;
    outline: none;
    font-family: var(--body-font);
}

.search-bar button {
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-bar button:hover {
    background-color: #16a085; /* Darker teal */
}


/* --- Hero Section --- */
#hero {
    /* Updated background image filename */
    background: url('hero-background.jpg') no-repeat center center/cover;
    color: var(--text-dark); /* Adjust if background makes text hard to read */
    height: 60vh; /* Adjust height as needed */
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content {
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white overlay */
    padding: 40px;
    border-radius: 10px;
    max-width: 700px; /* Limit width of content */
}

.hero-content h1 {
    color: var(--primary-color); /* Make headline stand out */
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #444; /* Slightly darker than default P */
}

/* --- Categories Section --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.category-item {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.category-item img {
    width: 100px; /* Adjust icon/image size */
    height: 100px;
    margin: 0 auto 15px auto;
    border-radius: 50%; /* Make images circular */
    object-fit: cover; /* Ensure images cover the circle nicely */
    border: 3px solid var(--bg-light);
}

.category-item h3 {
    margin-bottom: 1rem;
}


/* --- Featured Products Section --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Keep image corners rounded */
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
     transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


.product-card img {
    margin-bottom: 15px;
    aspect-ratio: 1 / 1; /* Make image container square */
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-card .price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* --- Delivery Section --- */
#delivery {
    background-color: var(--secondary-color);
    color: var(--white);
}

#delivery h2 {
    color: var(--white);
}

#delivery p {
    color: #f0f0f0; /* Lighter text on dark background */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

#delivery .btn-primary {
    background-color: var(--white);
    color: var(--secondary-color);
}
#delivery .btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

/* --- About Section --- */
.about-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1; /* Takes up available space */
    min-width: 300px; /* Prevents text column from becoming too narrow */
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* --- Contact Section --- */
.contact-details {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 2rem;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info h3, .contact-form h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 0.8rem;
}
.contact-info p strong {
    color: var(--text-dark);
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--body-font);
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
}

/* --- Footer --- */
footer {
    background-color: var(--text-dark);
    color: #ccc;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px; /* Ensure space before footer */
}

footer p {
    color: #ccc;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--white);
    margin: 0 10px;
}

footer a:hover {
    color: var(--accent-color);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.9rem; }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        margin-top: 1rem;
        margin-bottom: 1rem;
        flex-wrap: wrap; /* Allow nav items to wrap */
        justify-content: center;
    }

    nav ul li {
        margin: 5px 10px; /* Adjust spacing for wrapping items */
    }

    .search-bar {
        margin-top: 1rem;
        width: 80%;
        justify-content: center;
    }

    .search-bar input {
        width: 70%; /* Adjust input width */
    }


    #hero {
        height: auto; /* Adjust height for smaller screens */
        padding: 60px 0;
    }
    .hero-content {
        padding: 30px;
    }

    .category-grid, .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .about-content {
       flex-direction: column; /* Stack image and text */
    }
     .about-image {
       margin-top: 2rem;
    }

     .contact-details {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .container {
        padding: 0 15px;
    }

    .category-grid, .product-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }

     .search-bar {
        width: 95%;
    }

     nav ul li {
        margin: 5px;
    }
}
