/* --- Base & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary-color: #b48d5a;
    --secondary-color: #1a1a1a;
    --text-color: #e0e0e0;
    --nav-bg: #111;
    --card-bg: #282828;
    --nav-width-desktop: 100px; /* Renamed for clarity */
    --nav-width-mobile: 280px; /* Width of mobile slide-out */
    --base-font: 'Montserrat', sans-serif;
    --heading-font: 'Playfair Display', serif;
    --mobile-breakpoint: 992px; /* Breakpoint for switching to mobile nav */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--base-font);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative; /* Needed for overlay positioning */
}

/* Helper class for screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    margin-bottom: 0.8em;
    font-weight: 700;
    line-height: 1.2; /* Better heading spacing */
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); } /* Responsive font size */
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); text-align: center; margin-bottom: 1.5em; }
h3 { font-size: 1.4rem; color: #f0f0f0; margin-bottom: 0.5em; }

p {
    margin-bottom: 1em;
    font-size: 1rem;
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- DESKTOP Navigation Bar (>= mobile-breakpoint) --- */
.main-nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--nav-width-desktop);
    background-color: var(--nav-bg);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); /* Smooth slide for mobile */
    box-shadow: 5px 0px 15px rgba(0,0,0,0.3);
    transform: translateX(0); /* Default position */
}

.nav-logo {
    margin-bottom: 30px;
    flex-shrink: 0; /* Prevent shrinking */
}

.main-nav ul {
    list-style: none;
    width: 100%;
    overflow-y: auto; /* Allow scrolling if many categories */
}

.nav-item {
    width: 100%;
    margin-bottom: 10px;
}

.nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 5px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

.nav-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 8px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 3px;
    flex-shrink: 0; /* Prevent shrinking */
}

.nav-item span {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
    /* Ensure text doesn't wrap weirdly on desktop */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%; /* Limit width inside the small nav */
}

/* Hover & Active States (Desktop) */
.nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.nav-item a:hover span {
    opacity: 1;
    color: var(--primary-color);
}
.nav-item.active a {
    background-color: rgba(180, 141, 90, 0.1);
}
.nav-item.active img {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(180, 141, 90, 0.5);
}
.nav-item.active span {
    opacity: 1;
    font-weight: 600;
    color: var(--primary-color);
}

/* --- Main Content Area --- */
.content-area {
    margin-left: var(--nav-width-desktop); /* Default margin for desktop */
    padding: 0;
    width: calc(100% - var(--nav-width-desktop)); /* Default width for desktop */
    transition: margin-left 0.4s ease; /* Smooth transition if needed */
}

/* --- Hero Section --- */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    background: url('../images/hero-bg.webp') no-repeat center center/cover;
    background-attachment: fixed;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px; /* Slightly wider */
    padding: 40px 20px; /* Add padding */
}
.hero-content h1 {
    margin-bottom: 0.3em;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    color: #fff;
}
.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.3rem); /* Responsive font size */
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    max-width: 600px; /* Limit paragraph width */
    margin-left: auto;
    margin-right: auto;
}

/* --- Menu Sections --- */
.menu-section {
    padding: clamp(40px, 8vh, 80px) clamp(20px, 5vw, 40px); /* Responsive padding */
    min-height: auto; /* Remove fixed min-height, let content decide */
    border-bottom: 1px solid #333;
}
.menu-section:last-of-type {
    border-bottom: none;
}

/* --- Product Grid & Cards --- */
.product-grid {
    display: grid;
    /* Responsive columns: min 280px width, max 1fr */
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: clamp(20px, 4vw, 30px); /* Responsive gap */
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(180, 141, 90, 0.2);
}

/* --- DEFAULT Product Image Style --- */
.product-card img {
    width: 100%;
    height: 220px; /* Default fixed height for multiple items */
    object-fit: cover;
    display: block; /* Ensure block behavior */
}

/* --- Style for image when it's the ONLY product in the grid --- */
.product-grid .product-card:only-child img {
    aspect-ratio: 5 / 3; /* Enforce 5:3 aspect ratio */
    height: auto;        /* Override the fixed height, let aspect-ratio dictate */
    width: 100%;         /* Ensure it spans the card width */
    object-fit: cover;   /* Keep covering behavior */
}
/* --- END OF SINGLE PRODUCT IMAGE STYLE --- */


.product-card-content { /* Added wrapper */
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Make content area fill space */
}
.product-card h3 {
    margin-top: 0; /* Removed top margin */
}
.product-card p {
    font-size: 0.9rem;
    color: #aaa;
    flex-grow: 1; /* Pushes price down */
    margin-bottom: 15px;
}
.product-card .price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
    margin-top: auto; /* Pushes price to bottom */
    padding-top: 10px; /* Space above price */
}

/* --- Footer --- */
.site-footer {
    background-color: var(--nav-bg);
    color: #777;
    text-align: center;
    padding: 25px 20px;
    margin-left: var(--nav-width-desktop); /* Default margin */
    font-size: 0.9rem;
    transition: margin-left 0.4s ease;
}

/* --- MOBILE Navigation & Responsiveness --- */

/* Hamburger Button Styles */
.mobile-nav-toggle {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001; /* Above nav */
    background: var(--primary-color);
    border: none;
    padding: 0; /* Remove padding, use width/height */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hamburger-box {
    width: 24px; /* Size of the box containing lines */
    height: 20px;
    display: inline-block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--secondary-color); /* Dark lines */
    border-radius: 3px;
    transition: transform 0.2s ease-in-out, top 0.1s ease-in-out 0.1s, background-color 0.2s ease;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%); /* Center line */
}

.hamburger-inner::before {
    top: -8px; /* Position top line */
}

.hamburger-inner::after {
    top: 8px; /* Position bottom line */
}

/* Hamburger Active State (X) */
.mobile-nav-toggle[aria-expanded="true"] .hamburger-inner {
    transform: rotate(45deg);
    background-color: var(--secondary-color); /* Keep color */
    transition-delay: 0.1s; /* Delay rotation */
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger-inner::before {
    top: 0;
    transform: rotate(-90deg);
    transition: top 0.1s ease-in-out, transform 0.2s ease-in-out 0.1s; /* Adjust timing */
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger-inner::after {
    top: 0;
    /* transform: rotate(90deg); (Already handled by inner rotation) */
    opacity: 0; /* Hide bottom line */
     transition: top 0.1s ease-in-out, opacity 0.1s ease-in-out;
}


/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999; /* Below nav, above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

body.mobile-nav-active .overlay {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}


/* --- Media Query for Mobile (< mobile-breakpoint) --- */
@media (max-width: /* var(--mobile-breakpoint) */ 992px) {
    /* Show Hamburger */
    .mobile-nav-toggle {
        display: block;
    }

    /* Hide Desktop Nav Off-Screen */
    .main-nav {
        transform: translateX(-100%);
        width: var(--nav-width-mobile); /* Set mobile width */
        box-shadow: 5px 0 15px rgba(0,0,0,0.5); /* Stronger shadow for mobile */
        padding-top: 80px; /* Make space for potential top elements or just padding */
    }

    /* Style Nav Items for Vertical Mobile Layout */
    .nav-item a {
        flex-direction: row; /* Align icon and text horizontally */
        justify-content: flex-start;
        align-items: center;
        padding: 15px 25px; /* More padding */
        text-align: left;
    }
    .nav-item img {
        margin-right: 20px; /* Space between icon and text */
        margin-bottom: 0;
        width: 35px; /* Adjust size for mobile nav */
        height: 35px;
        transform: scale(1); /* Reset desktop zoom */
        box-shadow: none; /* Reset desktop shadow */
    }
    .nav-item span {
        font-size: 1rem; /* Larger text for mobile nav */
        opacity: 0.9;
        white-space: normal; /* Allow text wrap */
        overflow: visible;
        text-overflow: clip;
        max-width: none;
    }
     /* Active state for mobile */
    .nav-item.active a {
        background-color: rgba(180, 141, 90, 0.15); /* Slightly stronger active bg */
    }
     .nav-item.active img {
        /* Optional: keep a subtle zoom or different style for mobile active */
         transform: scale(1.1);
         /* background-color: var(--primary-color); */
     }
     .nav-item.active span {
        color: var(--primary-color);
        font-weight: 600;
     }


    /* Show Mobile Nav When Active */
    body.mobile-nav-active .main-nav {
        transform: translateX(0);
    }

    /* Adjust Content Area and Footer for Mobile */
    .content-area,
    .site-footer {
        margin-left: 0;
        width: 100%;
    }

    /* Responsive Adjustments for Content */
    .hero-content {
        padding: 20px; /* Less padding on mobile */
    }

    .menu-section {
        padding: 50px 15px; /* Less padding */
    }

    h1 { font-size: clamp(2rem, 8vw, 2.5rem); } /* Adjust mobile heading sizes */
    h2 { font-size: clamp(1.5rem, 6vw, 2rem); }

    /* Product Card Adjustments */
    /* --- DEFAULT mobile image height --- */
    .product-card img {
         height: 180px; /* Adjusted default height for mobile */
    }

    /* The :only-child rule will still apply and override this height */
    .product-grid .product-card:only-child img {
        /* No change needed here, aspect-ratio still applies */
         height: auto; /* Ensure override still happens */
    }

} /* End Media Query 992px */

/* Optional: Smaller mobile adjustments */
@media (max-width: 480px) {
    html {
        font-size: 15px; /* Slightly smaller base font */
    }
    .product-grid {
        /* Ensure single column on very small screens if auto-fit isn't enough */
         grid-template-columns: 1fr;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .nav-item span {
        font-size: 0.9rem;
    }
    .product-card img {
         height: 160px; /* Even smaller default image height */
    }
     /* :only-child rule continues to override */
}