/* ========================================
   GLOBAL STYLES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Day Mode Colors - Yellow Palette */
    --primary-yellow: #f59e0b;
    --secondary-yellow: #fbbf24;
    --light-yellow: #fef3c7;
    --dark-yellow: #d97706;
    
    --primary-red: #ef4444;
    --dark-red: #dc2626;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #1f2937;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Night Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-dark: #374151;
        
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        
        --border-color: #374151;
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow-x: hidden;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.75) 0%, rgba(217, 119, 6, 0.75) 50%, rgba(146, 64, 14, 0.75) 100%),
                url('herobg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--text-light);
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

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

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    background: var(--primary-red);
    color: var(--text-light);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-yellow);
    border-radius: 2px;
}

.section p {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 1.5rem auto;
    line-height: 1.8;
}

/* ========================================
   MENU SECTION
   ======================================== */
#menu {
    background: var(--bg-secondary);
}

#menu .container {
    max-width: 1400px;
}

#menu .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    text-align: center;
    max-width: 350px;
    margin: 0 auto;
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.menu-item:hover img {
    transform: scale(1.1);
}

.menu-item h3 {
    font-size: 1.25rem;
    margin: 0.75rem 0 0.5rem;
    color: var(--text-primary);
    padding: 0 1rem;
    text-align: center;
}

.menu-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0;
    padding: 0 1rem;
    text-align: center;
}

.menu-item .price {
    color: var(--primary-red);
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0 1rem;
    text-align: center;
}

.menu-item button {
    background: var(--primary-yellow);
    color: var(--text-light);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem;
    box-shadow: var(--shadow-sm);
}

.menu-item button:hover {
    background: var(--dark-yellow);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* View More Button Section */
#menu .text-center.mt-10,
.text-center.mt-10 {
    margin-top: 3rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

#view-more-btn {
    background: var(--primary-red);
    color: var(--text-light);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

#view-more-btn:hover {
    background: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

#view-more-btn:active {
    transform: translateY(-1px);
}

/* ========================================
   CART SIDEBAR
   ======================================== */
#cart-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-yellow);
    color: var(--text-light);
    border: none;
    padding: 1rem;
    border-radius: 50px 0 0 50px;
    cursor: pointer;
    z-index: 1100;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

#cart-toggle:hover {
    background: var(--dark-yellow);
    padding-right: 1.5rem;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-red);
    color: var(--text-light);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

#cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    padding: 1.5rem;
    padding-top: 1rem;
    transition: right 0.3s ease;
    z-index: 1099;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#cart-sidebar.open {
    right: 0 !important;
}

#cart-sidebar h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

#cart-items {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

#cart-items::-webkit-scrollbar {
    width: 8px;
}

#cart-items::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

#cart-items::-webkit-scrollbar-thumb {
    background: var(--primary-yellow);
    border-radius: 4px;
}

#cart-items::-webkit-scrollbar-thumb:hover {
    background: var(--dark-yellow);
}

.border-t {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.border-t p {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.border-t p.font-bold {
    font-size: 1.4rem;
    color: var(--primary-yellow);
    font-weight: 700;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 2px solid var(--primary-yellow);
}

#place-order {
    width: 100%;
    background: var(--primary-red);
    color: var(--text-light);
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

#cart-items > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

#cart-items img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

#cart-items .flex-1 {
    flex: 1;
    min-width: 0;
}

#cart-items .flex-1 p:first-child {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

#cart-items .flex-1 p:last-child {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#cart-items button {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 28px;
    height: 28px;
}

#cart-items button:hover {
    background: var(--primary-yellow);
    color: var(--text-light);
}

#cart-items button.text-red-600 {
    background: transparent;
    border: none;
    color: var(--primary-red);
}

#cart-items button.text-red-600:hover {
    background: rgba(239, 68, 68, 0.1);
}

#place-order {
    width: 100%;
    background: var(--primary-red);
    color: var(--text-light);
    border: none;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

#place-order:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
/* ========================================
   ORDER SUMMARY (FIXED + SCROLLABLE + VISIBLE)
   ======================================== */

#order-popup {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--bg-primary);
    box-shadow: var(--shadow-2xl);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 450px;
    max-width: 90vw;

    /* FIX: Allow too many items to scroll */
    max-height: 85vh; 
    overflow-y: auto;

    z-index: 1000;
    border: 3px solid var(--primary-yellow);
    animation: slideInUp 0.4s ease-out;

    display: flex;
    flex-direction: column;
}

#order-popup.hidden {
    display: none;
}

/* Scrollbar style */
#order-popup::-webkit-scrollbar {
    width: 8px;
}

#order-popup::-webkit-scrollbar-thumb {
    background: var(--primary-yellow);
    border-radius: 4px;
}

#order-popup::-webkit-scrollbar-thumb:hover {
    background: var(--dark-yellow);
}

/* Sticky header of Order Summary */
#order-popup h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    padding: 0.5rem 0;
    z-index: 20;
    border-bottom: 2px solid var(--primary-yellow);
}

/* Order table */
#order-popup table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

#order-popup th,
#order-popup td {
    padding: 0.6rem 0.4rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#order-popup th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

/* Download button */
#download-pdf {
    width: 100%;
    background: var(--primary-red);
    color: var(--text-light);
    border: none;
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-top: auto; /* Makes button stay at bottom */
}

#download-pdf:hover {
    background: var(--dark-red);
    transform: scale(1.02);
}

/* Close button */
#order-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

#order-popup-close:hover {
    color: var(--primary-red);
}

/* Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile fix */
@media (max-width: 768px) {
    #order-popup {
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        bottom: 0;
        border-radius: 1rem 1rem 0 0;
        max-height: 90vh;
    }
}


/* ========================================
   FOOTER
   ======================================== */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: var(--text-light);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-left{
    text-align: left;
}
.footer-center{
    text-align: center;
}
.footer-right{
    text-align: right;
}

.footer-left h3,
.footer-center h3,
.footer-right h3 {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-left a {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    margin: 0.5rem 0;
    transition: color 0.3s ease;
}

.footer-left a:hover {
    color: var(--primary-yellow);
    padding-left: 5px;
}

.footer-center p {
    color: var(--text-secondary);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-yellow);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--dark-yellow);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section h2 {
        font-size: 2rem;
    }

    #menu .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }

    .menu-item {
        max-width: 100%;
    }

    #cart-sidebar {
        width: 100%;
        right: -100%;
    }

    #order-popup {
        width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
        bottom: 0;
        border-radius: 1rem 1rem 0 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    #menu .grid {
        grid-template-columns: 1fr;
    }

    .menu-item {
        max-width: 100%;
    }

    .menu-item h3 {
        font-size: 1.15rem;
    }

    .menu-item img {
        height: 180px;
    }

    #view-more-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}