/* GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #dcc4b0;
    color: #333;
    transition: margin-right 0.3s ease;
}

body.cart-open {
    margin-right: 320px;
}

/* RIGHT SIDEBAR CART */
.cart-sidebar {
    position: fixed;
    right: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: #ffeedb;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    background: #b85c38;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #9c4d2f;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

#cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.cart-summary {
    padding: 20px;
    border-top: 2px solid #e6d3c1;
    background: #f8f1e9;
}

.cart-total h4 {
    color: #5a3921;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #b85c38;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: #9c4d2f;
    transform: translateY(-2px);
}

.clear-cart-btn {
    width: 100%;
    padding: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.clear-cart-btn:hover {
    background: #ff5252;
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.cart-overlay.active {
    display: block;
}

/* HEADER */
header {
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffeedb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.logo img {
    width: 60px;
}

nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

nav a:hover {
    background-color: #b85c38;
    color: white;
}

/* Search Bar Only */
.search-container.inline-search {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.search-container.inline-search .search-bar {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #b85c38;
    color: black;
    outline: none;
    width: 180px;
}

/* HOME */
.home {
    text-align: center;
    padding: 120px 20px;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('background image.jpeg') center/cover no-repeat;
    color: white;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.home h1 {
    font-size: 48px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.home p {
    font-size: 20px;
    margin-top: 10px;
    color: white;
    margin-bottom: 30px;
}

.home button {
    margin-top: 25px;
    padding: 12px 30px;
    background: #b85c38;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.home button:hover {
    background: #9c4d2f;
    transform: scale(1.05);
}

/* ABOUT */
.about {
    padding: 60px 50px;
    background: #fff3e6;
    text-align: center;
}

.about-img img {
    width: 30%;	
    max-height: 350px;        /* LIMIT HEIGHT */
    border-radius: 14px;
}


.about h2 {
    color:  #5a3921;
    text-align: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.about p {
    max-width: 700px;
    margin: auto;
    font-size: 18px;
    margin-bottom: 10px;
}

/* PRODUCTS */
.products {
    padding: 70px 50px;
    text-align: center;
    background-color: #f8f1e9;
}

.products h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #5a3921;
}

.product-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.product-card {
    background: #fff;
    width: 280px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-card h3 {
    margin-bottom: 10px;
    color: #5a3921;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-card .price {
    font-weight: bold;
    color: #b85c38;
    margin-bottom: 15px;
    font-size: 18px;
}

.add-cart {
    padding: 10px 20px;
    background: #b85c38;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
    font-weight: 500;
    transition: 0.3s;
    margin-top: auto;
}

.add-cart:hover {
    background: #9c4d2f;
}

/* CONTACT */
.contact {
    padding: 60px 50px;
    text-align: center;
    background: #fff3e6;
}

.contact-form {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #b85c38;
    border-radius: 6px;
    background: #fffaf4;
}

.contact-form button {
    padding: 12px;
    background: #b85c38;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.contact-form button:hover {
    background: #9c4d2f;
}


/* FOOTER */
footer {
    background: #e6d3c1;
    padding: 25px 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

footer p {
    font-size: 16px;
    color: #5a3921;
    margin-bottom: 10px;
}

/* SOCIAL ICONS */
.social-icons a {
    color: #5a3921;
    font-size: 22px;
    margin: 0 10px;
    text-decoration: none;
}

.social-icons a:hover {
    color: #d18b47; /* bakery hover colour */
}
/* CART ITEMS STYLING */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: bold;
    color: #5a3921;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #b85c38;
    font-size: 14px;
}

.cart-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.cart-quantity-btn {
    width: 25px;
    height: 25px;
    background: #b85c38;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-quantity-btn:hover {
    background: #9c4d2f;
}

.cart-quantity {
    font-weight: bold;
    min-width: 25px;
    text-align: center;
    color: #5a3921;
}

.cart-item-total {
    font-weight: bold;
    color: #5a3921;
    margin-left: 10px;
}

.remove-item {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.remove-item:hover {
    background: #ff5252;
}

.empty-cart {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.empty-cart p {
    font-size: 1.1rem;
    margin: 10px 0;
}

/* MOBILE-RESPONSIVE DESIGN */

/* FOOTER & SOCIAL ICONS RESPONSIVE */
@media (max-width: 768px) {
    footer {
        padding: 20px 10px;
        gap: 10px;
    }

    .social-icons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap; /* stack icons if screen is too small */
        gap: 15px;
    }

    .social-icons a {
        font-size: 20px; /* slightly smaller on mobile */
        margin: 5px;
    }

    footer p {
        font-size: 14px; /* smaller text on mobile */
    }
}

/* GENERAL MOBILE RESPONSIVE DESIGN */
@media (max-width: 768px) {
    /* Header */
    header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    nav ul {
        gap: 15px;
    }

    /* Search bar full width */
    .search-container.inline-search {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
    }

    .search-container.inline-search .search-bar {
        width: 100%;
    }

    /* Section padding and headings */
    section {
        padding: 50px 20px;
    }

    .home h1 {
        font-size: 36px;
    }

    /* Cart sidebar */
    .cart-sidebar {
        width: 280px;
    }

    body.cart-open {
        margin-right: 280px;
    }
}

/* EXTRA SMALL DEVICES (MOBILE PHONES) */
@media (max-width: 480px) {
    /* Headings smaller */
    .home h1 {
        font-size: 30px;
    }

    /* Buttons and links touch-friendly */
    button, a {
        min-height: 44px;
    }

    /* Sections padding smaller */
    section {
        padding: 30px 15px;
    }

    /* Optional: Reduce font size of paragraphs */
    p {
        font-size: 14px;
    }
}