/* --- Global Styles & Color Palette --- */
:root {
    --bg-color: #f9f9f9;
    /* Light background */
    --card-bg: #ffffff;
    /* White cards */
    --text-color: #333333;
    --primary-red: #e53935;
    --secondary-text: #666666;
    --border-color: #e0e0e0;
    --success-green: #25D366;
    /* WhatsApp Green */

    --font-headings: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

/* --- Utilities --- */
.hidden {
    display: none !important;
}

/* --- Landing Page --- */
#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.landing-content {
    text-align: center;
    padding: 20px;
}

.landing-logo {
    width: 180px;
    margin-bottom: 20px;
}

#landing-page h1 {
    font-family: var(--font-headings);
    margin-bottom: 10px;
    color: var(--text-color);
}

#landing-page p {
    margin-bottom: 30px;
    color: var(--secondary-text);
}

.landing-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.landing-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid var(--primary-red);
    background-color: var(--primary-red);
    color: white;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.landing-btn:hover {
    background-color: #c62828;
    border-color: #c62828;
}

.landing-btn.outline {
    background-color: transparent;
    color: var(--primary-red);
}

.landing-btn.outline:hover {
    background-color: var(--primary-red);
    color: white;
}

/* --- Header (Logo Left, Menu Right) --- */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#nav-logo {
    width: 100px;
    height: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-red);
}

/* --- Banner --- */
#banner {
    width: 100%;
    height: 150px;
    background-image: url('https://images.unsplash.com/photo-1579871494447-9811cf80d66c?q=80&w=2070&auto=format&fit=crop');
    /* Sushi Placeholder */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-overlay {
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#banner-title {
    color: white;
    font-family: var(--font-headings);
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- Menu Container --- */
main {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    padding-bottom: 100px;
}

.menu-category-title {
    font-family: var(--font-headings);
    font-size: 2rem;
    color: var(--text-color);
    margin: 40px 0 20px 0;
    padding-left: 10px;
    border-left: 4px solid var(--primary-red);
}

/* --- Card Design --- */
.category-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.menu-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    /* Side by side layout */
    padding: 15px;
    gap: 15px;
    position: relative;
    border: 1px solid #eee;
    height: 160px;
    /* Fixed height for consistency */
}

.card-image {
    width: 120px;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.card-content p {
    font-size: 0.8rem;
    color: var(--secondary-text);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-red);
}

.add-btn {
    background-color: var(--text-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    /* Bottom Right positioning handled by flex footer */
}

.add-btn:hover {
    background-color: var(--primary-red);
    transform: scale(1.1);
}

/* --- Footer --- */
footer {
    background-color: #fff;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

/* --- Cart/Order Button (High Visibility) --- */
#order-indicator {
    position: fixed;
    bottom: 30px;
    right: 20px;
    /* Right aligned on mobile */
    z-index: 1001;
    background-color: var(--primary-red);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
    cursor: pointer;
    transition: transform 0.2s;
}

#order-indicator:hover {
    transform: scale(1.05);
}

.cart-icon-wrapper {
    position: relative;
    width: 24px;
}

#order-indicator svg {
    width: 24px;
    height: 24px;
}

#order-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: white;
    color: var(--primary-red);
    font-size: 12px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-text {
    font-weight: 600;
    font-size: 1rem;
}

/* --- Order Popup --- */
/* --- FIXED: Order Popup (Must be fixed position) --- */
#order-popup {
    position: fixed; /* This ensures it floats above everything */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0,0,0,0.6); /* Dark backdrop */
    z-index: 2000; /* Higher than header and banner */
    display: flex;
    justify-content: flex-end; /* Aligns the white panel to the right */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

#order-popup:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

#order-content {
    width: 100%;
    max-width: 400px;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

#order-popup:not(.hidden) #order-content {
    transform: translateX(0);
}

/* --- NEW: Onboarding Tooltip --- */
.onboarding-tooltip {
    position: absolute;
    bottom: 50px; /* Positioned above the button */
    right: 0;
    background-color: var(--text-color);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 200px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
    pointer-events: none; /* Let clicks pass through if it gets in the way */
    animation: bounce 2s infinite;
}

/* Little arrow pointing down */
.onboarding-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 15px; /* Aligns with the + button */
    width: 0; 
    height: 0; 
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--text-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#close-popup-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.order-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

#confirm-order-btn {
    background-color: var(--success-green);
    color: white;
    padding: 15px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    font-size: 1rem;
    width: 100%;
    margin-top: 20px;
    cursor: pointer;
}

/* --- Image Modal --- */
#image-modal {
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
    }

    #landing-page h1 {
        font-size: 2rem;
    }

    .menu-card {
        height: auto;
    }

    /* Allow height to grow if desc is long on mobile */
    #order-indicator {
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        width: 90%;
        justify-content: center;
    }

    /* Bottom Center on Mobile */
    #order-indicator:hover {
        transform: translateX(50%) scale(1.05);
    }
}