/* Mobile-First Recipes Page with Cart */
:root {
    --primary: #8B4513;
    --accent: #800020;
    --gold: #B8860B;
    --text-dark: #2C1810;
    --text-light: #6B4423;
    --white: #FFFFFF;
    --bg-light: #FAF7F5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem;
    margin: 0 auto;
}

/* Navigation - Mobile First */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 40px;
}

.nav-menu {
    position: fixed;
    left: -100%;
    top: 56px;
    flex-direction: column;
    background: var(--white);
    width: 100%;
    text-align: center;
    transition: left 0.3s ease;
    padding: 2rem 0;
    list-style: none;
    z-index: 999;
}

.nav-menu.active {
    left: 0;
}

.nav-menu li {
    margin: 0.5rem 0;
}

.nav-link {
    display: block;
    padding: 1rem;
    color: var(--text-dark);
    font-weight: 500;
    text-decoration: none;
}

.nav-link.active {
    color: var(--accent);
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: 0.3s;
    border-radius: 3px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Floating Cart Button */
.cart-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.4);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    transform: scale(1.1);
    background: var(--gold);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gold);
    color: var(--white);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -100%;
    top: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--bg-light);
}

.cart-header h3 {
    color: var(--primary);
    font-size: 1.5rem;
}

.cart-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-cart svg {
    margin: 0 auto 1rem;
    color: var(--bg-light);
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--bg-light);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.cart-item-price {
    color: var(--accent);
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    margin-left: auto;
}

.cart-footer {
    border-top: 2px solid var(--bg-light);
    padding: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.place-order-btn {
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.place-order-btn:hover {
    background: #20BA5A;
    transform: translateY(-2px);
}

/* Hero */
.recipes-hero {
    position: relative;
    height: 50vh;
    min-height: 300px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    margin-top: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.hero-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1rem;
}

/* Filters */
.filter-section {
    padding: 2rem 0;
    background: var(--white);
    position: sticky;
    top: 56px;
    z-index: 100;
    border-bottom: 1px solid #ddd;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid #ddd;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.search-box {
    max-width: 400px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    border-radius: 25px;
}

/* Recipe Grid */
.recipes-section {
    padding: 3rem 0;
}

.recipes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.recipe-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-price {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.95);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.recipe-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background: var(--gold);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--text-dark), var(--primary));
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Tablet */
@media (min-width: 481px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .recipe-image {
        height: 280px;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
    
    .nav-menu {
        position: static !important;
        flex-direction: row !important;
        width: auto !important;
        padding: 0 !important;
        gap: 2rem;
        display: flex !important;
        left: auto !important;
        background: transparent !important;
    }
    
    .nav-menu li {
        margin: 0 !important;
        display: inline-block !important;
    }
    
    .nav-link {
        padding: 0.5rem 0 !important;
    }
    
    .recipes-hero {
        height: 60vh;
        margin-top: 70px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .recipes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .recipe-image {
        height: 300px;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}