:root {
    --primary: #E31837; /* McDonald's Red / Burger King Red */
    --secondary: #FFC72C; /* McDonald's Yellow / Golden Yellow */
    --dark: #1A1A1A;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    position: relative;
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logo span {
    color: var(--dark);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.4rem;
    transition: var(--transition);
    padding: 8px;
    border-radius: 50%;
    background: #f8f9fa;
}

.cart-icon:hover {
    background: #eee;
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Category Filters */
.categories {
    display: flex;
    justify-content: flex-start; /* Better for horizontal scroll */
    gap: 0.75rem;
    padding: 1.5rem 5%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Momentum scroll for iOS */
    scrollbar-width: none; /* Hide for Firefox */
    -ms-overflow-style: none; /* Hide for IE */
}

/* Hide scrollbar for Chrome/Safari */
.categories::-webkit-scrollbar {
    display: none;
}

@media (min-width: 991px) {
    .categories {
        justify-content: center;
    }
}

.category-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 50px;
    background: var(--white);
    color: var(--dark);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    white-space: nowrap;
    flex-shrink: 0;
}

.category-btn.active, .category-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(227, 24, 55, 0.25);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 5% 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.menu-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.menu-item:hover {
    transform: translateY(-10px);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.item-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary);
    color: var(--dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.item-content {
    padding: 1.5rem;
}

.item-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.item-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    height: 48px;
    overflow: hidden;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.add-btn:hover {
    background: var(--dark);
    transform: scale(1.05);
}

/* Cart Side Panel */
.cart-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-overlay.open {
    transform: translateX(0);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.cart-item-info {
    flex: 1;
}

.cart-footer {
    padding: 1.5rem;
    background: #fdfdfd;
    border-top: 1px solid #eee;
}

.checkout-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    padding: 1rem; /* Acts as buffer from screen edges */
}

.modal-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: calc(100% - 2rem); /* Dynamic safe area */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-body {
    margin-bottom: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
}

.modal-body h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark);
    border-left: 4px solid var(--secondary);
    padding-left: 10px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.option-row:last-child {
    border-bottom: none;
}

.option-row label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.option-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.modal-footer {
    text-align: center;
}

/* Responsive Layouts */
@media (max-width: 991px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        width: 80%;
        max-width: 300px;
        height: 100%;
        background: white;
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 2000;
        transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), visibility 0.4s;
        visibility: hidden;
    }
    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
    }
    .mobile-toggle {
        display: block;
        z-index: 2100;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .modal-content {
        width: 100%;
        max-width: none;
        padding: 1.25rem;
        border-radius: 12px;
        margin: 0;
    }
    .modal-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    .modal-header h2 {
        font-size: 1.15rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .modal-body {
        max-height: none;
        padding: 0 5px;
    }
    .option-row {
        padding: 0.85rem 5px;
        font-size: 0.95rem;
    }
    #dot1, #dot2 {
        width: 8px !important;
        height: 8px !important;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .menu-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 4rem;
    }
    .cart-overlay {
        width: 100%;
    }
    .logo {
        font-size: 1.25rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    padding: 1.2rem;
    border-radius: 20px;
    display: none; /* Initially hidden, but controlled by .show */
    align-items: center;
    justify-content: space-between;
    z-index: 10001;
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.pwa-install-banner.show {
    display: flex !important;
    transform: translateY(0);
}

.pwa-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(227, 24, 55, 0.3);
}

.pwa-text h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.pwa-text p {
    font-size: 0.8rem;
    color: #666;
}

.pwa-actions {
    display: flex;
    gap: 10px;
}

.pwa-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.pwa-btn.install {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227, 24, 55, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(227, 24, 55, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227, 24, 55, 0); }
}

.pwa-btn.dismiss {
    background: rgba(0,0,0,0.05);
    color: #666;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .pwa-install-banner {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 1rem;
    }
    .pwa-text p {
        display: none;
    }
}

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding: 4rem 5% 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 3rem;
}

.footer-col h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
}

.social-links a {
    background: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 600px) {
    .footer-container {
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.1);
    z-index: 10002;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    border-top: 3px solid var(--primary);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 800px;
    font-size: 0.9rem;
    color: #444;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
}

.btn-accept {
    background: var(--primary);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-settings {
    background: #f0f0f0;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

