/* GLOBAL STYLES */
*{box-sizing: border-box;
scroll-behavior: smooth;}

body{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: #792828;
    background-color: #feefdd;
    
}

 main{
    padding-top: 20px;
}

/* NAV BAR */

header{
    background: #faaa8d;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #50b2c0;
    margin: 0;
}

header {
    background: #faaa8d;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

    /* --- STICKY RULES --- */
    position: sticky;   /* Keeps the bar at the top */
    top: 0;            /* Sticks it exactly at the top edge */
    z-index: 1000;     /* Ensures it stays above the product images */
}

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

nav ul li a {
    text-decoration: none;
    color: #201e1f;
    font-weight: bold;
}

nav ul li a:hover{
    color: #50b2c0;
}
#Products {
    padding: 40px 5%;
    display: grid;
    /* This creates the columns */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

#Products h3 {
    /* This forces the title to center across all columns */
    grid-column: 1 / -1; 
    text-align: center;
    font-size: 2.5rem;
    color: #ff4000;
    margin-bottom: 20px;
}

.Products-card {
    background: #ff4000;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white; /* Makes text readable on orange */
}

.Products-card img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Keeps images uniform */
    border-radius: 5px;
}

.Products-card:hover{
    transform: translatey(-10px);
}

.Products-card img {
    max-width: 100%;
    border-radius: 5px;
}

#Products h3{
    text-align: center;
    grid-column: 1/ -1;
    font-size: 2rem;
    margin-bottom: 30px;
    width: 100%;


}

button{
    background: #50b2c0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* FOOTER */

footer{
    background: #2c3e50;
    color: #50b2c0;
    padding: 40px 5% 20px;
    margin-top: 50px;
}

.footer-container{
    max-width: 600px;
    margin: 0 auto;
}

#contact-us h3{
    color: #ff4000;
}

form input, form textarea {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border-radius: 4px;
    border: none;
    box-sizing: border-box;
}

form button {
    width: 100%;
    margin-top: 15px;
    background: #ff4000;
    font-size: 1rem;
    font-weight: bold;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-bottom a{
    color: #50b2c0;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #ff4000;

}

.stars {
    color: #f1c40f; /* A nice golden yellow */
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.stars small {
    color: #ffffff; /* White text for the numerical rating */
    margin-left: 5px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Optional: Make the empty star slightly transparent */
.stars span:last-child {
    opacity: 0.5;
}

/* When you hover over the CARD, change the STARS color */
.Products-card:hover .stars {
    color: #ffffff; /* Turns stars white to contrast with the orange card */
    transform: scale(1.1); /* Makes the stars slightly bigger */
    transition: all 0.3s ease;
}

/* Optional: Make the star rating text (4.0) pop out too */
.Products-card:hover .stars small {
    opacity: 1;
    font-weight: bold;
}

/* MOBILE STYLES (For screens smaller than 768px) */

@media (max-width: 768px) {
    
    /* 1. Stack the Header */
    header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    nav ul {
        padding: 0;
        margin-top: 15px;
        gap: 10px;
        flex-wrap: wrap; /* Allows menu to wrap if too long */
        justify-content: center;
    }

    /* 2. Adjust the Product Grid */
    #Products {
        grid-template-columns: 1fr; /* Only one product per row on phones */
        padding: 20px;
    }

    /* 3. Make Hero text smaller */
    #hero h2 {
        font-size: 1.8rem;
    }

    /* 4. Make Form full width */
    .footer-container {
        width: 95%;
    }
}

/* --- CART SIDEBAR STYLES --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%; /* Hides it off-screen to the right */
    width: 350px;
    height: 100vh;
    background: #feefdd; /* Matches your body background */
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    transition: right 0.4s ease; /* The sliding animation */
    z-index: 2000;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Class added by JS to slide it in */
.cart-sidebar.open {
    right: 0; 
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #faaa8d;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.cart-header h2 {
    color: #ff4000;
    margin: 0;
}

.close-btn {
    background: none;
    color: #201e1f;
    font-size: 2rem;
    padding: 0;
    margin: 0;
}

.cart-items {
    flex-grow: 1; /* Pushes checkout button to the bottom */
}

.checkout-btn {
    background: #ff4000;
    width: 100%;
}

/* The dark background behind the cart */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none; /* Hidden by default */
}

.cart-overlay.show {
    display: block;
}

/* --- INDIVIDUAL CART ITEM STYLES --- */
.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #faaa8d;
    padding-bottom: 10px;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
}

.cart-item-details p {
    margin: 5px 0 0;
    color: #ff4000;
    font-weight: bold;
}

/* --- CART TOTAL & REMOVE BUTTON --- */
.cart-total {
    border-top: 2px solid #faaa8d;
    padding-top: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
    text-align: right;
}

.cart-total h3 {
    color: #201e1f;
    margin: 0;
    font-size: 1.3rem;
}

#total-price {
    color: #ff4000; /* Uses your signature orange */
}

.remove-btn {
    background: #ffe6e6; /* Light red background */
    color: #d9534f; /* Red text */
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: auto; /* Pushes the button to the far right */
    transition: background 0.2s ease;
}

.remove-btn:hover {
    background: #d9534f;
    color: white;
}

/* --- MOBILE MENU STYLES --- */
.hamburger {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 2rem;
    color: #201e1f;
    cursor: pointer;
}

/* Kicks in on screens smaller than 768px */
@media (max-width: 768px) {
    .hamburger {
        display: block; 
        padding-bottom: 20px;
    }

    #main-nav {
        display: none; /* Hide standard nav on mobile */
        width: 100%;
        background: #faaa8d;
        position: absolute;
        top: 70px; /* Sits right below the header */
        left: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
        
    }

    #main-nav.active {
        display: block; /* Class added by JS to show the menu */
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        margin: 0;
    }

    nav ul li {
        margin-bottom: 15px;
    }
}

/* --- TOAST NOTIFICATION STYLES --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #50b2c0; /* Uses your teal accent color */
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-weight: bold;
    transform: translateX(120%); /* Starts off-screen to the right */
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0); /* Slides onto the screen */
}