/* ===== CSS Variables ===== */
:root {
    --primary: #FF6B6B;
    --secondary: #FF8E53;
    --accent: #FFD93D;
    --dark: #2D3436;
    --light: #FAFAFA;
    --gray: #636E72;
    --light-gray: #DFE6E9;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul {
    list-style: none;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.btn-full {
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-menu a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--light);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}

.login-btn:hover {
    background: var(--light-gray);
}

.login-btn.logged-in {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.login-icon {
    font-size: 1.1rem;
}

.admin-link {
    padding: 8px;
    font-size: 1.2rem;
    background: transparent;
    border-radius: 8px;
    transition: var(--transition);
}

.admin-link:hover {
    background: var(--light-gray);
}

.cart-btn {
    position: relative;
    font-size: 1.5rem;
    padding: 8px;
}

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

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    padding: 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 32px;
    opacity: 0.95;
}

/* ===== Menu Section ===== */
.menu {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    margin: 16px auto 0;
    border-radius: 2px;
}

.menu-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    background: white;
    border: 2px solid var(--light-gray);
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ===== Menu Item - Table Row Style ===== */
.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
    gap: 16px;
    animation: none;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: linear-gradient(135deg, #FFF5F5, #FFF8F5);
}

.menu-item-image {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, #FFE5E5, #FFF0E5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border-radius: 8px;
}

.menu-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
}

.menu-item-info {
    flex: 1;
    min-width: 0;
}

.menu-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}

.menu-item-name {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.menu-item-description {
    color: var(--gray);
    font-size: 0.8rem;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-to-cart {
    padding: 8px 16px;
    background: var(--gradient);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    white-space: nowrap;
}

.add-to-cart:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* ===== About Section ===== */
.about {
    padding: 80px 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 16px;
}

.hours {
    background: var(--light);
    padding: 30px;
    border-radius: var(--radius);
}

.hours h3 {
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.hours li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.hours li:last-child {
    border-bottom: none;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.footer-section p {
    color: #B2BEC3;
    margin-bottom: 8px;
}

.social-links {
    display: flex;
    gap: 16px;
    font-size: 1.5rem;
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #B2BEC3;
}

/* ===== Cart Sidebar ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.cart-header h2 {
    font-size: 1.25rem;
}

.cart-close {
    font-size: 2rem;
    color: var(--gray);
    transition: var(--transition);
}

.cart-close:hover {
    color: var(--dark);
}

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

.cart-empty {
    text-align: center;
    color: var(--gray);
    padding: 40px 20px;
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--light-gray);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFE5E5, #FFF0E5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 500;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--light);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--light-gray);
}

.cart-item-qty {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    color: var(--gray);
    font-size: 0.85rem;
    margin-left: auto;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--primary);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--dark);
}

.modal h2 {
    margin-bottom: 24px;
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.radio-group {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.order-summary {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-summary h3 {
    margin-bottom: 16px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-hint {
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 400;
}

.editable-items {
    max-height: 200px;
    overflow-y: auto;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--dark);
    border-bottom: 1px solid var(--light-gray);
}

.summary-item:last-child {
    border-bottom: none;
}

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

.summary-item-name {
    font-weight: 500;
}

.summary-item-price {
    color: var(--gray);
    font-size: 0.85rem;
}

.summary-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--light-gray);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.summary-qty-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.summary-item-qty {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.summary-item-total {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    color: var(--primary);
}

.summary-remove {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    transition: var(--transition);
}

.summary-remove:hover {
    color: #e74c3c;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.summary-line.total {
    border-top: 1px solid var(--light-gray);
    margin-top: 8px;
    padding-top: 16px;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ===== Confirmation Modal ===== */
.confirmation-modal {
    text-align: center;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 24px;
}

.order-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0;
}

/* ===== Login Modal ===== */
.login-subtitle {
    color: var(--gray);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.login-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.logged-in-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.logged-in-icon {
    width: 40px;
    height: 40px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.logged-in-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.logged-in-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--light-gray);
}

.btn-secondary:hover {
    background: var(--light);
    border-color: var(--gray);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        padding: 16px 0;
        border-bottom: 1px solid var(--light-gray);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

}

/* Menu items stay as table rows on mobile */
@media (max-width: 600px) {
    .menu-item {
        padding: 10px 12px;
    }

    .menu-item-image {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.4rem;
    }

    .menu-item-content {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .menu-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .add-to-cart {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .menu-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .modal {
        padding: 20px;
    }
}

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

.menu-item {
    animation: fadeIn 0.5s ease forwards;
}

/* Stagger animation for menu items */
.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.15s; }
.menu-item:nth-child(3) { animation-delay: 0.2s; }
.menu-item:nth-child(4) { animation-delay: 0.25s; }
.menu-item:nth-child(5) { animation-delay: 0.3s; }
.menu-item:nth-child(6) { animation-delay: 0.35s; }
