﻿/* --- 1. Global & Layout Reset --- */
:root {
    --metro-orange: #fa6800;
    --brand-green: #198754;
    --dark-green: #1a7442;
    --bg-gray: #f8f9fa;
}

html, body {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    background-color: var(--bg-gray);
    color: #333;
    touch-action: manipulation !important;
    overflow-x: hidden !important;
}

.app-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* --- 2. Fixed Elements & Scrollable Area --- */
header {
    z-index: 1030;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: var(--bg-gray);
    padding-bottom: 20px;
}

.cart-footer {
    z-index: 1030;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    background-color: #ffffff;
}

/* --- 3. Section Dividers & Containers --- */
.section-container {
    background-color: #ffffff;
    padding: 4px 12px;
    margin-bottom: 0 !important;
}

.border-bottom-thin {
    border-bottom: 1px solid #f1f1f1;
}

.border-top-thin {
    border-top: 1px solid #f1f1f1;
}

.section-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
}

/* --- 4. Category Menu --- */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 5px 0 !important;
}

.category-card {
    background: #ffffff;
    color: #444;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: inline-flex;
    align-items: center;
}

    .category-card.active {
        background-color: var(--brand-green) !important;
        color: #ffffff !important;
        border-color: var(--brand-green) !important;
        box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3) !important;
    }

/* --- 5. Menu Items --- */
.menu-list-vertical {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.item-row-card {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #ffffff;
    width: 100%;
}

.item-clickable-area {
    display: flex;
    cursor: pointer;
    transition: opacity 0.2s;
}

    .item-clickable-area:active {
        opacity: 0.7;
    }

.item-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

.item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.item-shortdescription {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 10px;
    padding-left: 12px;
}

.item-price {
    display: inline-flex !important;
    align-items: flex-start !important;
    font-weight: 800 !important;
    color: #2D3436 !important;
}

.item-cents {
    font-size: 0.6em !important;
    margin-top: 2px;
}

.add-btn {
    width: 50px !important;
    height: 32px !important;
    border-radius: 16px !important;
    background-color: #108a4c !important;
    color: #ffffff !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8rem !important;
    font-weight: bold !important;
    line-height: 0 !important;
    padding-bottom: 4px !important;
    transition: background 0.2s ease;
}

    .add-btn:active {
        background-color: #0d733f !important;
        transform: scale(0.95);
    }

/* --- 6. View Cart Bar --- */
.view-cart-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: white;
    padding: 10px;
}

.view-cart-main-btn {
    width: 100% !important;
    background-color: #108a4c !important;
    color: white !important;
    display: flex !important;
    justify-content: space-between !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    border: none !important;
}

.add-btn, .category-card, .view-cart-main-btn {
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* --- 7. Cart Modal --- */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: flex-end;
}

.cart-content {
    background-color: white;
    width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.clear-cart-btn {
    background-color: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

    .clear-cart-btn:hover {
        background-color: #dc3545;
        color: white;
    }

.close-modal {
    background-color: #333 !important;
    color: #ffffff !important;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-left {
    flex: 1;
    min-width: 0;
}

.cart-item-center {
    width: 130px;
    display: flex;
    justify-content: center;
}

.cart-item-right {
    width: 90px;
    text-align: right;
    font-weight: bold;
}

.quantity-controls {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: #f8f8f8;
    cursor: pointer;
}

.qty-input {
    width: 40px;
    border: none;
    text-align: center;
    font-weight: bold;
}

.cart-total-section {
    padding-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.checkout-btn {
    width: 100%;
    background-color: #108a4c;
    color: white;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
}

/* --- 8. Modals (Detail & Confirm) --- */
#confirmClearModal {
    z-index: 9999 !important;
}

#cartModal {
    z-index: 9000 !important;
}

#itemDetailModal {
    z-index: 10000 !important;
}

.modal-backdrop {
    z-index: 9998 !important;
}

#itemDetailModal .modal-content {
    pointer-events: auto !important;
}

.modal-dialog {
    max-width: 450px;
    margin: 1.75rem auto;
}

#modalDetailImg {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    transition: transform 0.3s;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* --- 9. Fancy Detail Popup Footer --- */
.modal-footer-custom {
    padding: 20px;
    border-top: 1px solid #eee;
}

.detail-price-box {
    font-size: 1.4rem;
    font-weight: 700;
    color: #28a745;
    min-width: 80px;
}

.detail-qty-container-large {
    display: flex;
    align-items: center;
    background-color: #f1f3f5;
    border-radius: 50px;
    padding: 5px 10px;
    flex-grow: 0.5;
    justify-content: space-between;
    border: 1px solid #e9ecef;
}

.qty-btn-extra {
    border: none;
    background: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-green);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-display-large {
    font-size: 1.4rem;
    font-weight: 800;
    padding: 0 20px;
    color: #333;
}

.add-btn-circle {
    background-color: var(--dark-green);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
    box-shadow: 0 4px 6px rgba(26, 116, 66, 0.2);
}

    .add-btn-circle:active {
        transform: scale(0.9);
        background-color: #145a33;
    }
/* Container Spacing */
.payment-methods-container {
    padding: 10px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Pay Now Buttons (Standardizing Height & Radius) */
#payment-request-button {
    min-height: 55px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Enhanced Pay at Counter Button */
/* Ensure the icon has that premium green color you used earlier */
.pay-later-btn i {
    font-size: 1.5rem;
    color: #198754; /* Café Lumière Brand Green */
    vertical-align: middle;
}

.pay-later-btn span {
    margin-left: 10px;
    font-size: 1.1rem;
}

.pay-later-btn:hover {
    background-color: #fcfcfc;
    border-color: #198754; /* Café Lumière Green */
    color: #198754;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.15);
}

/* Fancy 'OR' Separator */
.fancy-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 10px 0;
    color: #adb5bd;
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 700;
}

    .fancy-separator::before, .fancy-separator::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #eee;
    }

    .fancy-separator:not(:empty)::before {
        margin-right: 15px;
    }

    .fancy-separator:not(:empty)::after {
        margin-left: 15px;
    }

/* Back Link Styling */
.back-to-order-link {
    color: #888;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
    transition: color 0.2s;
}

    .back-to-order-link:hover {
        color: #333;
    }
.back-to-order-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 25px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    /* Icon specific styling */
    .back-to-order-link i {
        font-size: 0.8rem; /* Chevrons look better slightly smaller */
        transition: transform 0.2s ease;
    }

    /* Hover animation: the icon "nudges" left */
    .back-to-order-link:hover {
        color: #198754; /* Matches your Green */
    }

.back-to-order-link:hover i {
    transform: translateX(-3px);
}
/* Target the Table badge specifically */
.table-badge {
    background-color: #198754 !important; /* The Cafe Lumiere Green */
    color: white !important;
    font-size: 11px; /* Smaller text */
    font-weight: 700;
    padding: 2px 8px; /* Thinner padding */
    border-radius: 4px; /* Slightly sharper corners for a small look */
    display: inline-block;
    line-height: 1.2;
    vertical-align: middle;
}
/* Top Promo Banner */
.promo-banner {
    background-color: #198754;
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 8px;
    margin: 10px 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Price Styling */
.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
    margin-right: 5px;
}

.current-price-green {
    color: #198754; /* Matches your theme green */
    font-weight: bold;
    font-size: 16px;
}

.current-price {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}
.carousel-item {
    border-radius: 0; /* Keeps it edge-to-edge as per your previous code */
}

/* Force white text inside the promo box specifically */
.carousel-caption-custom h3,
.carousel-caption-custom p {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Extra safety for readability */
}
/* Reduce the gap between the Header and the Categories */
.menu-section {
    margin-top: -20px !important; /* Negative margin pulls it up */
    padding-top: 5px !important; /* Reduces internal top spacing */
    background-color: #ffffff;
    position: relative;
    z-index: 1025;
}
/* --- Surgical Fix for Image Gaps --- */

/* Remove the header's bottom padding that causes the top gap */
header, .app-header-container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

/* Remove top padding from the main container */
.main-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ensure the Carousel is flush against the top */
#promoCarousel {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

    /* Force the image to strictly obey the 200px height */
    #promoCarousel .carousel-item img {
        height: 200px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
/* This forces the image to fill the box without stretching */
.promo-image {
    width: 100%; /* Makes the image responsive */
    height: 250px; /* Set your desired height */
    object-fit: cover; /* This crops the image to fill the box without stretching */
    background-color: #f0f0f0; /* Optional: placeholder color if image is empty */
}
.menu-image {
    width: 100%; /* Or a specific width */
    height: 150px; /* Set a fixed height */
    object-fit: cover; /* This is the secret to preventing distortion */
    border-radius: 8px;
}

/* For thumbnails */
.menu-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center;
}
/* Change the list to a grid */
.menu-list-vertical {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columns */
    gap: 4px; /* spacing between cards */
    padding: 1px;
    align-items: stretch;
}

/* Ensure images don't break the layout */
.menu-card img {
    max-width: 100%;
}
/* Container: Remove horizontal padding to push cards to the edges */
.kiosk-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px; /* Slightly tighter gap for more card width */
    padding: 10px 8px 120px 8px; /* Reduced side padding (8px) */
    background-color: #f8f5f0;
}

/* Card: Increased height and rounded corners */
.kiosk-menu-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures all cards in a row are same height */
    border: 1px solid #eee;
}

/* Image section: Larger height */
.kiosk-card-img-top {
    width: 100%;
    height: 165px; /* Increased from 150px */
    position: relative;
}

    .kiosk-card-img-top img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Body: Added more padding for a "bigger" feel */
.kiosk-card-body {
    padding: 15px 12px; /* Increased top/bottom padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kiosk-card-title {
    font-size: 1.1rem; /* Slightly larger text */
    font-weight: 800;
    margin-bottom: 6px;
}