body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #c5baba; /* Light gray background */
    color: #333; /* Dark gray text for readability */
    box-sizing: border-box; /* Applies to all elements for consistent sizing */
}
* {
    box-sizing: inherit; /* Inherits box-sizing from body for all elements */
}
header {
    background-color: #d4e4f7; /* Soft blue for baby theme */
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 20px; /* Space below header */
    transition: transform 0.3s ease; /* Smooth hover effect */
}
header:hover {
    transform: scale(1.02); /* Slight zoom on hover */
}
h1 {
    color: #2b5ea8; /* Darker blue for headings */
    margin: 0;
    padding: 10px 0; /* Vertical padding for breathing room */
}
nav {
    background-color: #f0c9cf; /* Soft pink for nav */
    padding: 10px;
    text-align: center;
    margin: 10px 0;
    border-radius: 5px;
    display: flex; /* Make nav a flex container */
    justify-content: center; /* Center items horizontally */
    gap: 15px; /* Space between nav links */
    flex-wrap: wrap;
}
nav a {
    margin: 0 15px;
    color: #2b5ea8;
    text-decoration: none; /* Remove underline from links */
    transition: color 0.3s ease; /* Smooth color transition */
}
nav a:hover {
    text-decoration: underline; /* Underline on hover */
    color: #1a3d7d; /* Darker blue on hover */
}
/* Grid for Product Catalog */
section#products {
    margin: 20px 0;
    padding: 15px;
    background-color: #b8b2b2; /* White background for sections */
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    display: grid; /* Grid container for product categories */
    grid-template-columns: repeat(2, 1fr); /* Explicitly two columns */
    gap: 15px; /* Space between grid items */
}
section#products h2 {
    grid-column: 1 / -1; /* Span across both columns */
}
section#products p:not(.faq-answer p) {
    grid-column: 1 / -1; /* Span across both columns for intro text */
}
#products ul {
    list-style-type: disc;
    padding-left: 0; /* Remove default padding to control layout */
    background-color: rgb(234, 241, 240);
    display: contents; /* let grid children behave normally */
}
#products ul li {
    display: block; /* Ensure initial display for filtering */
    padding: 10px; /* Add padding for readability */
    background-color: #fff; /* White background for each category */
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}
#products ul ul {
    list-style-type: circle; /* Different bullets for nested lists */
    margin-left: 20px; /* Indent nested lists */
    display: block; /* Ensure nested items are visible */
    padding: 5px 0; /* Space within nested list */
}
#products ul ul li {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between image and text */
}

#products ul ul li img {
    max-width: 100px; /* Fixed image width */
    height: auto;
    border-radius: 5px;
}
/* Other Sections */
section:not(#products) {
    margin: 20px 0;
    padding: 15px;
    background-color: #b8b2b2;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
form {
    background-color: #e8f4e8; /* Light green for form */
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    display: flex; /* Make form a flex container */
    flex-direction: column; /* Stack fields vertically */
    gap: 15px; /* Space between form elements */
    align-items: stretch; /* Stretch to fill width */
}
#category, #product {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}
#product:disabled {
    background-color: #f0f0f0; /* Gray out disabled state */
    color: #666; /* Lighter text for disabled */
}
input, textarea, select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease; /* Smooth focus effect */
}
input:focus, textarea:focus, select:focus {
    border-color: #2b5ea8; /* Highlight on focus */
    outline: none; /* Remove default outline */
}
button {
    background-color: #2b5ea8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px; /* Space above button */
    transition: background-color 0.3s ease; /* Smooth hover effect */
}
button:hover {
    background-color: #1a3d7d; /* Darker blue on hover */
}
#clear-search {
    width: auto; /* Allow natural width */
    padding: 8px 15px; /* Match search input padding */
    margin-left: 10px; /* Space from search input */
    background-color: #2b5ea8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#clear-search:hover {
    background-color: #1a3d7d; /* Darker blue on hover */
}
aside {
    background-color: #fff3cd; /* Light yellow for aside */
    padding: 15px;
    border-left: 4px solid #2b5ea8;
    margin: 20px 0;
    border-radius: 5px;
}

aside h3 {
    margin-top: 0;
    color: #2b5ea8;
}

/* FAQ Toggle Styles */
.faq-section {
    grid-column: 1 / -1; /* Ensure FAQ section spans both columns */
}
.faq-item {
    position: relative; /* For stacking context */
}
.faq-toggle {
    position: absolute;
    opacity: 0; /* Hide checkbox */
    cursor: pointer;
    height: 0;
    width: 0;
}
.faq-question {
    display: block; /* Ensure label is block-level */
    font-weight: bold;
    padding: 10px;
    cursor: pointer;
    background-color: #f9f9f9; /* Light background for question */
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background-color 0.3s ease; /* Smooth hover effect */
}
.faq-question:hover {
    background-color: #e0e0e0; /* Lighter on hover */
}
.faq-icon {
    float: right; /* Position +/-. */
}
.faq-answer {
    display: none; /* Hide answer by default */
    padding: 10px;
    background-color: #fff; /* White background for answer */
    border-radius: 5px;
    margin-top: -5px; /* Overlap slightly with question */
    border-left: 2px solid #2b5ea8; /* Visual cue for open answer */
}
.faq-answer p {
    margin: 0; /* Remove default margin for clean look */
}
/* Remove conflicting CSS icon toggle (rely on JavaScript) */
.faq-toggle:checked ~ .faq-question .faq-icon:after {
    content: ""; /* Clear the CSS rule */
}

footer {
    background-color: #d4e4f7;
    padding: 10px;
    text-align: center;
    margin-top: 20px;
    border-radius: 5px;
}
.hidden {
    display: none; /* Hide accessibility text visually */
}
img {
    max-width: 100%;
    display: block;
    height: auto;
    border-radius: 5px; /* Rounded corners for brand consistency */
}

/* Cart Styles */
#cart {
    margin: 20px 0;
    padding: 15px;
    background-color: #e8f4e8; /* Light green for cart */
    border-radius: 5px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#cart-items {
    list-style-type: none;
    padding: 0;
}
#cart-items li {
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.quantity-update {
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.remove-item {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.remove-item:hover {
    background-color: #cc0000;
}
#clear-cart, #checkout {
    width: auto;
    padding: 8px 15px;
    margin-top: 10px;
    background-color: #2b5ea8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#clear-cart:hover, #checkout:hover {
    background-color: #1a3d7d;
}
#add-to-cart {
    background-color: #2b5ea8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}
#add-to-cart:hover {
    background-color: #1a3d7d;
}
#quantity {
    padding: 8px;
    margin-left: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
/* payment method */
#payment-options {
    margin: 20px 0;
    padding: 15px;
    background-color: #e8f4e8; /* Light green for payment */
    border-radius: 5px;
    border: 1px solid #ddd;
    display: none; /* Hidden by default */
}
#payment-method {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
#pay-now {
    background-color: #2b5ea8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}
#pay-now:hover {
    background-color: #1a3d7d;
}
#payment-instructions {
    margin-top: 10px;
    color: #333;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px; /* Reduce padding on smaller screens */
    }
    nav {
        flex-direction: column; /* Stack nav links vertically */
        gap: 10px; /* Adjust gap for vertical layout */
    }
    nav a {
        margin: 5px 0; /* Reduce margin for stacked links */
    }
    section#products {
        grid-template-columns: 1fr 1fr; /* Maintain two columns on tablets */
        padding: 10px; /* Reduce padding for smaller screens */
    }
    #products ul {
        grid-template-columns: 1fr; /* Single column per category */
    }
    aside#about {
        grid-template-columns: 1fr; /* Single column on tablets */
    }
    ul {
        gap: 5px; /* Tighter spacing for product categories */
    }
    form {
        padding: 10px; /* Reduce padding for smaller screens */
        gap: 10px; /* Adjust gap for form fields */
    }
    button {
        width: 100%; /* Full-width button on mobile */
        margin-top: 5px; /* Adjust margin */
    }
    aside#about {
        margin: 10px 0; /* Reduce margin for aside */
    }
    .faq-question {
        font-size: 0.9em; /* Smaller text on tablets */
    }
    .faq-answer {
        font-size: 0.9em; /* Match question size */
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.5em; /* Smaller heading for very small screens */
    }
    ul ul {
        margin-left: 10px; /* Less indent for nested lists */
    }
    input, textarea, select {
        font-size: 0.9em; /* Smaller text for form fields */
    }
    section#products {
        grid-template-columns: 1fr; /* Single column on small phones */
        padding: 5px; /* Even tighter */
    }
    #products ul {
        grid-template-columns: 1fr; /* Single column */
    }
    .faq-question {
        font-size: 0.85em; /* Even smaller on phones */
    }
    .faq-answer {
        font-size: 0.85em; /* Match question size */
    }
}
#product-search {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}