@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700&display=swap');

/* General Styling & Variables */
:root {
    /* NEW PALETTE for Modern Kitchens & Home Decor (from previous interaction) */
    --primary-color: #4A7C59; /* A deep, muted sage green/forest green - sophisticated and natural, often seen in high-end designs */
    --secondary-color: #A9B7B6; /* A soft, calming grey/silver - modern, versatile neutral for accents or less prominent elements */
    --accent-color: #D4AF37; /* A rich, muted gold - for luxury highlights, logo, and important interactive elements */

    --text-dark: #34495E; /* Dark blue-gray - excellent readability, softer than pure black */
    --text-light: #ECF0F1; /* Light gray-blue - for text on dark backgrounds */

    --bg-light: #F9F9F9; /* Very light, almost white background for main content - crisp and clean */
    --bg-dark: whitesmoke; /* Deep, professional dark blue-gray for header/footer - provides strong contrast */

    --border-color: #E0E0E0; /* Light gray for subtle borders */
    --box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06); /* Lighter, diffused shadow for a more airy feel */
    --border-radius: 10px;
    --transition: all 0.4s ease-in-out;
    --font-family: 'Poppins', sans-serif;

    /* Message colors (kept distinct for alerts) */
    --success-message: #28A745; /* Green for success */
    --error-message: #DC3545;   /* Red for error */
    --info-message: #17A2B8;    /* Cyan for info */
}

* {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    border: none;
    text-decoration: none;
}

html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header --- */
header {
    background-color: whitesmoke;
    padding: 18px 0;
    box-shadow: var(--box-shadow);
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}



.navbar .logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: black;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.navbar .search-form {
    flex-grow: 1; 
    max-width: 400px; 
    margin: 0 20px;
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden; /* Contains the border and ensures no bleed */
    border: 1px solid var(--secondary-color); /* Subtle border for search */
    transition: border-color var(--transition);
}

.navbar .search-form:focus-within {
    border-color: var(--primary-color); /* Highlight on focus */
}

.navbar .search-input {
    width: 100%; 
    padding: 10px 15px; 
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 1rem;
    border: none; /* Remove default input border */
}

.navbar .search-input::placeholder {
    color: var(--secondary-color);
}

.navbar .search-input:focus {
    outline: none; /* Remove default focus outline */
}

.navbar .search-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color var(--transition);
}

.navbar .search-button:hover {
    background-color: #3B6647; /* Slightly darker primary on hover */
}


.navbar nav {
    align-items: center;
    gap: 25px;
}

.navbar nav a {
    color: black;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    display:inline-flex;
    align-items: center;
    gap: 5px; /* Space between text and icon */
}

.navbar nav a img {
    filter: invert(1); /* Makes icons white/light for dark background */
}

.navbar nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent-color); /* Muted gold underline */
    transition: width 0.3s ease;
    bottom: -8px; /* Position below text */
    left: 0; /* Ensures it grows from left */
    right: auto; /* Resets right to allow left growth */
}

.navbar nav a:hover::after {
    width: 100%;
    left: 0;
    background: var(--accent-color);
}

.navbar nav a:hover {
    color: var(--accent-color); /* Muted gold on hover */
    transform: translateY(-2px);
}

/* --- Message Box --- */
.message {
    padding: 15px 20px;
    background-color: var(--info-message);
    color: var(--text-light);
    text-align: center;
    box-shadow: var(--box-shadow);
    text-transform: capitalize;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
}
.message.success { background-color: var(--success-message); }
.message.error { background-color: var(--error-message); }


/* --- Buttons --- */
.btn,
.delete-btn,
.option-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
    white-space: nowrap; /* Prevent text wrapping */
}

.btn.primary-btn { /* For hero section CTA */
    background-color: var(--primary-color); 
    color: var(--text-light);
    border-color: var(--primary-color);
}
.btn.primary-btn:hover {
    background-color: #3B6647; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn.secondary-btn { /* For hero section CTA */
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}
.btn.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border-color: var(--accent-color);
}


.btn { /* Default product add to cart button */
    background-color: var(--primary-color); /* Sage green/forest green */
    color: var(--text-light);
    border-color: var(--primary-color);
}

.btn:hover {
    background-color: #3B6647; /* Slightly darker sage */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.delete-btn {
    background-color: var(--error-message); /* Red for delete */
    color: var(--text-light);
    border-color: var(--error-message);
}
.delete-btn:hover {
    background-color: #C62828;
}


.option-btn {
    background-color: transparent; /* Changed to transparent for a cleaner look */
    color: var(--primary-color); /* Text color from primary */
    border: 1px solid var(--primary-color); /* Border in primary color */
}
.option-btn:hover {
    background-color: var(--primary-color); /* Fill on hover */
    color: var(--text-light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


/* --- Form Container (Login/Register/Admin) --- */
.form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 25px;
    background-color: var(--bg-light);
}

.form-container form {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 550px;
    border: 1px solid var(--border-color);
}

.form-container form h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-dark); /* Dark blue-gray */
    text-align: center;
}

.form-container form .box {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 16px;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-container form .box:focus {
    border-color: var(--primary-color); /* Sage green/forest green focus */
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}


/* --- Section Headings --- */
.heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark); /* Dark blue-gray */
    margin-bottom: 40px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 20px; /* Add some padding above heading */
}

/* --- Global Container for Sections --- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 25px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-dark); /* Fallback background */
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7); /* Slightly darken image for text readability */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4.5rem; /* Larger, impactful heading */
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 40px;
    line-height: 1.5;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn {
    margin: 0 10px;
    padding: 15px 40px;
    font-size: 1.1rem;
    text-transform: none; /* Keep original casing for CTA */
}


/* --- Product Grid Styling (used by Featured, Recently Added) --- */
.products-section .box-container,
.product-carousel-section .box-container { /* Applies to both */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.products-section .box,
.product-carousel-section .box {
    padding: 25px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    position: relative; /* For the new button layout */
    overflow: hidden; /* For image hover effect */
}

.products-section .box:hover,
.product-carousel-section .box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.products-section .box img,
.product-carousel-section .box img {
    height: 180px;
    object-fit: cover;
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    transition: transform var(--transition);
}

.products-section .box:hover img,
.product-carousel-section .box:hover img {
    transform: scale(1.05);
}

.products-section .box .name,
.product-carousel-section .box .name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 10px 0;
    line-height: 1.3;
}

.products-section .box .price,
.product-carousel-section .box .price {
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 20px;
}

.products-section .box .btn,
.product-carousel-section .box .btn {
    width: 90%;
    padding: 10px 20px;
    margin-bottom: 10px; /* Space between buttons */
}
.products-section .box .option-btn,
.product-carousel-section .box .option-btn {
    width: 90%;
    padding: 10px 20px;
}


/* --- Carousel Specific Styles --- */
#productCarousel .carousel-inner {
    padding: 30px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
}

#productCarousel .carousel-item {
    padding: 0 50px;
}

#productCarousel .carousel-control-prev,
#productCarousel .carousel-control-next {
    width: 5%;
    background: none;
    opacity: 0.8;
    transition: opacity var(--transition);
}

#productCarousel .carousel-control-prev:hover,
#productCarousel .carousel-control-next:hover {
    opacity: 1;
}

#productCarousel .carousel-control-prev-icon,
#productCarousel .carousel-control-next-icon {
    background-color: var(--primary-color); 
    padding: 15px;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
    background-size: 50%;
}

#productCarousel .carousel-control-prev-icon {
    transform: translateX(5px);
}

#productCarousel .carousel-control-next-icon {
    transform: translateX(-5px);
}

#productCarousel .carousel-indicators button {
    background-color: var(--secondary-color); 
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    opacity: 0.7;
    transition: opacity var(--transition), background-color var(--transition);
}

#productCarousel .carousel-indicators button.active {
    background-color: var(--accent-color); 
    opacity: 1;
    width: 15px;
    height: 15px;
}

/* --- Categories Section --- */
.categories-section .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    justify-content: center;
}

.category-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden; /* For image transition */
}

.category-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.category-image-wrapper {
    width: 100%; /* Make image wrapper take full width of box */
    height: 150px; /* Fixed height for consistency */
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.category-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, cropping if necessary */
    transition: transform var(--transition);
}

.category-box:hover img {
    transform: scale(1.1); /* Zoom effect on hover */
}

.category-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    transition: color var(--transition);
}

.category-box:hover .category-name {
    color: var(--primary-color);
}


/* --- Shopping Cart Table (Existing, ensure consistency) --- */
.container .shopping-cart {
    padding: 25px 0;
}

.container .shopping-cart table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-light);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 30px;
}

.container .shopping-cart table thead {
    background-color: var(--primary-color);
}

.container .shopping-cart table thead th {
    padding: 18px;
    color: var(--text-light);
    font-size: 1.1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
}

.container .shopping-cart table tbody td {
    padding: 15px 18px;
    font-size: 16px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.container .shopping-cart table tbody td:last-child {
    border-bottom: none;
}

.container .shopping-cart table tbody td img {
    height: 80px;
    width: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.container .shopping-cart table tbody td input[type="number"] {
    width: 70px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    text-align: center;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.container .shopping-cart .total-price {
    text-align: right;
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.container .shopping-cart .total-price span {
    color: var(--primary-color);
    font-size: 1.7rem;
}


/* --- Purchase Button (WhatsApp, from mycart.php) --- */
.purchase-btn { /* For mycart.php */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding-bottom: 30px;
}

.purchase-btn input[type="submit"] {
    background-color: #25D366; /* WhatsApp green remains */
    color: var(--text-light);
    border: none;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.purchase-btn input[type="submit"]::before {
    content: '💬';
    font-size: 1.3em;
}


.purchase-btn input[type="submit"]:hover {
    background-color: #128C7E;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.purchase-btn input[type="submit"]:active {
    transform: translateY(0);
}

.purchase-btn input[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.3);
}

.purchase-btn input[type="submit"]:disabled {
    background-color: #b5b5b5;
    cursor: not-allowed;
    box-shadow: none;
}

footer {
    background-color:#e9e8e8;
    box-shadow: var(--box-shadow);
    color: black;
    padding: 40px 0;
    margin-top: 80px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 25px;
}

.footer-section {
    flex: 1 1 300px;
    padding: 15px;
}

.footer-section h3 {
    color: black;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p,
.footer-section ul li {
  
    font-size: 0.95rem;
    line-height: 1.8;
    color: black;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li a {
    color: rgba(0, 0, 0, 0.8);
    transition: var(--transition);
    padding: 5px 0;
    display: block;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

footer .copyright {
    text-align: center;
    padding: 25px 0 0;
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}



/* --- Main content area - pushes sidebar to the right --- */
.main-content {
    flex-grow: 1; /* Allows main content to take up available space */
    padding: 20px; /* Add some padding to your main content */
    /* Adjust padding to not be under the fixed header */
    padding-top: 0; 
}

/* Sidebar styling */
.side-section {
  
    width: 280px; /* Adjust width as needed for your sidebar */
    background-color: var(--bg-light); /* Use your light background variable */
    border-left: 1px solid var(--border-color); /* Subtle left border */
    padding: 20px 15px; /* Padding inside the sidebar */
    box-shadow: var(--box-shadow); /* Use your shadow variable */
    display: flex; /* Use flexbox for internal layout if desired (e.g., column) */
    flex-direction: column; /* Stack items vertically */
    height: calc(100vh - 80px); /* Make it span the remaining viewport height (100vh - header height) */
    position: sticky; /* Makes it stick when scrolling */
    top: 80px; /* Aligns it to the top, below the fixed header */
    overflow-y: auto; /* Adds scroll if content exceeds height */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

.side-section-heading {
    font-size: 1.3em;
    color: var(--text-dark); /* Use your dark text variable */
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color); /* Use your border color */
}

.side-product-list {
    list-style: none; /* Remove bullet points if it's a list */
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Allows product list to take available height */
}

.side-product-item {
    margin-bottom: 15px;
    background-color: #fff; /* White background for individual items */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out;
}

.side-product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Slightly more prominent shadow on hover */
}

.side-product-item a {
    display: flex; /* Use flexbox for image and details */
    align-items: center; /* Vertically align items */
    text-decoration: none;
    color: inherit;
    padding: 10px;
}

.side-product-item img {
    width: 70px; /* Fixed width for product images */
    height: 70px; /* Fixed height to keep aspect ratio */
    object-fit: cover; /* Crop images to fit */
    margin-right: 15px;
    border-radius: 3px;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.side-product-details {
    flex-grow: 1; /* Allow details to take remaining space */
}

.side-product-name {
    font-weight: bold;
    color: var(--text-dark); /* Use your dark text variable */
    margin-bottom: 5px;
    font-size: 0.95em;
}

.side-product-price {
    color: var(--primary-color); /* Use your primary color for prices */
    font-size: 0.9em;
    font-weight: 600;
}

.btn.view-all-side-btn {
    display: block; /* Make the button take full width */
    text-align: center;
    background-color: var(--primary-color); /* Use your primary color */
    color: var(--text-light);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    text-decoration: none;
    margin-top: 20px;
    transition: var(--transition);
}

.btn.view-all-side-btn:hover {
    background-color: #3B6647; /* Slightly darker primary on hover */
}

.side-section p { /* Styling for "No products found" message */
    text-align: center;
    color: var(--secondary-color); /* A softer color for info messages */
    font-style: italic;
}


/* --- Responsiveness --- */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3.8rem;
    }
    .hero-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 992px) {
    .navbar nav {
        gap: 15px;
    }
    .navbar nav a {
        font-size: 1rem;
    }
    .hero-section {
        height: 500px;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .hero-content p {
        font-size: 1.1rem;
        max-width: 500px;
    }
    .hero-content .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .products-section .box-container,
    .product-carousel-section .box-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .categories-section .box-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }
    .category-box img {
        height: 120px;
    }
    /* Hide sidebar on smaller screens or adjust layout */
    .side-section {
        display: none; /* Hide sidebar by default on smaller screens */
    }
    body {
        flex-direction: column; /* Stack header and main content vertically */
    }
    .main-content {
        padding: 20px; /* Restore padding if sidebar is hidden */
        padding-top: 0; /* Maintain original padding top for main content */
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .navbar .search-form {
        max-width: 100%;
        margin: 0;
    }
    .navbar nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .navbar nav a {
        margin: 5px 10px;
    }
    .hero-section {
        height: 400px; /* Shorter hero on mobile */
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    .hero-content .btn {
        display: block; /* Stack buttons */
        margin: 10px auto;
        width: 80%;
    }
    .products-section .box-container,
    .product-carousel-section .box-container,
    .categories-section .box-container {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
    .products-section .box,
    .product-carousel-section .box,
    .category-box {
        width: 100%;
        max-width: 400px; /* Constrain width even in single column */
        margin: 0 auto;
    }
    .heading {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    footer .container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .footer-section {
        flex: none;
        width: 100%;
        padding: 10px;
    }
    .footer-section ul li a:hover {
        transform: none;
    }
    /* Carousel adjustments for smaller screens */
    #productCarousel .carousel-item {
        padding: 0 15px; 
    }
    #productCarousel .carousel-control-prev,
    #productCarousel .carousel-control-next {
        width: 8%; 
    }
    #productCarousel .carousel-control-prev-icon,
    #productCarousel .carousel-control-next-icon {
        padding: 10px; 
        background-size: 40%;
    }
    #productCarousel .carousel-indicators {
        bottom: 10px; 
    }
    /* Specific overrides for carousel when only one item is displayed per slide */
    #productCarousel .carousel-item .col-md-4 {
        flex: 0 0 100%; /* Take full width */
        max-width: 100%;
    }
    /* Ensure body adapts to no sidebar */
    body {
        display: block; /* Remove flex on smaller screens if sidebar is hidden */
        padding-top: 80px; /* Keep padding for fixed header */
        min-height: auto; /* Allow content to dictate height */
    }
    .main-content {
        width: 100%; /* Main content takes full width */
        padding: 25px; /* Adjust as needed for smaller screens */
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .navbar .logo {
        font-size: 1.8rem;
    }
    .navbar nav a {
        font-size: 0.9rem;
    }
    .btn, .delete-btn, .option-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .products-section .box img,
    .product-carousel-section .box img {
        height: 150px;
    }
    .products-section .box .name,
    .product-carousel-section .box .name {
        font-size: 1.1rem;
    }
    .products-section .box .price,
    .product-carousel-section .box .price {
        font-size: 1.4rem;
    }
    .category-box img {
        height: 100px;
    }
    .category-name {
        font-size: 1rem;
    }
}
/* style.css */

/* --- General Body and Layout Reset (Important for full-width layout) --- */
body {
    margin: 0;
    padding: 0;
    display: flex; /* If using flexbox for overall page layout */
    flex-direction: column; /* Stacks header, main, footer vertically */
    min-height: 100vh; /* Ensures body takes at least full viewport height */
}

main {
    flex-grow: 1; /* Allows main content to expand and push footer down */
    /* Add padding if needed to prevent content from touching header/footer */
    padding-bottom: 20px; /* Example padding */
}

