/* --- Global Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&display=swap');

:root {
    --primary-brown: #6F4E37;
    --accent-gold: #D4AF37;
    --flour-white: #ffffff;
    --bg-cream: #fdf5e6;
    --orange-main: #e67e22;
    --orange-hover: #d35400;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    /* New Variables for Dark Mode Support */
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --border-color: #eeeeee;
}

/* --- Dark Mode Variables --- */
body.dark-theme {
    --bg-cream: #121212;
    --flour-white: #1a1a1a;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0; /* Fixed: Changed from #333 to light gray for visibility */
    --text-muted: #b0b0b0;
    --border-color: #333333;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* --- Responsive Navbar --- */
.navbar {
    background: var(--flour-white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 2000;
    transition: background 0.3s ease;
}

.nav-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-brown);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-logo span { color: var(--accent-gold); }

/* Theme Toggle Button Styling */
.theme-toggle {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-brown);
    padding: 8px;
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.dark-theme .theme-toggle {
    color: #f1c40f;
}

/* Hamburger Icon */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-brown);
    cursor: pointer;
    z-index: 2001; /* Ensure icon is above the drawer */
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    transition: right 0.4s ease; /* Smooth slide for mobile */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover { color: var(--orange-main); }

.nav-btn {
    background: var(--primary-brown);
    color: white !important;
    padding: 8px 18px;
    border-radius: 50px;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
}

/* Added for Video Hero Support if used */
.video-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

/* --- Menu & Grid --- */
.menu-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

/* --- Product Cards --- */
.bread-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
}

.bread-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.bread-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.bread-info {
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bread-info h3 {
    font-size: 1rem;
    margin: 0;
    color: var(--text-main);
}

.price {
    font-size: 1.1rem;
    color: var(--primary-brown);
    font-weight: 700;
}

.dark-theme .price { color: var(--orange-main); }

.stock {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.buy-btn {
    background-color: var(--orange-main);
    color: #ffffff;
    padding: 10px 5px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    transition: 0.2s;
}

.buy-btn:active {
    transform: scale(0.95);
}

/* --- Profile UI Styling --- */
.profile-card {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.info-item {
    background: var(--flour-white);
    border-left: 4px solid var(--primary-brown);
}

/* --- Mobile Media Queries --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .nav-links {
        position: fixed; /* Fixed for slide-out effect */
        top: 0;
        right: -100%; /* Hidden off-screen */
        width: 75%;
        height: 100vh;
        background: var(--flour-white);
        flex-direction: column;
        justify-content: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        padding: 50px 0;
        gap: 25px;
        z-index: 2000;
    }

    .nav-links.active { right: 0; } /* Slide into view */

    .nav-links li { width: 100%; text-align: center; }

    .nav-links a {
        justify-content: center;
        font-size: 1.1rem;
        padding: 10px 0;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .bread-image img { height: 140px; }
}

@media (min-width: 769px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
    .bread-image img { height: 220px; }
}

/* --- Toast --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--primary-brown);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid var(--accent-gold);
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }