/* ==========================================================================
   Luxury Bistro Light Theme (Warm Cream & Almond • NOT Stark White)
   Customer Digital QR Menu & POS Stylesheet • 100% Mobile Responsive
   ========================================================================== */

:root {
    --primary: #b45309;
    --primary-hover: #92400e;
    --primary-light: #fef3c7;
    --accent: #d97706;
    
    --bg-main: #f5efe6;
    --bg-card: #fdfbf7;
    --bg-surface-alt: #eae1d3;
    --text-main: #241e17;
    --text-muted: #6e6355;
    --border: #dfd3c3;
    
    --veg-color: #16a34a;
    --nonveg-color: #dc2626;
    
    --shadow-sm: 0 2px 6px rgba(80, 65, 45, 0.06);
    --shadow-md: 0 6px 18px rgba(80, 65, 45, 0.08);
    --shadow-lg: 0 12px 28px rgba(80, 65, 45, 0.12);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.menu-body, body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 50% 12%, rgba(217, 119, 6, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, rgba(245, 239, 230, 0.92) 0%, rgba(238, 230, 218, 0.98) 100%),
        url('/assets/images/restaurant-light-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    line-height: 1.5;
    padding-bottom: 96px;
    min-height: 100vh;
}

/* App Container (Warm Sand / Ivory Container) */
.menu-container {
    max-width: 680px;
    margin: 0 auto;
    background: rgba(253, 251, 247, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-height: 100vh;
    position: relative;
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    box-shadow: 0 0 35px rgba(60, 48, 32, 0.08);
}

/* ==========================================================================
   Header (Sticky Warm Linen Banner)
   ========================================================================== */
.menu-header {
    background: linear-gradient(180deg, #ede4d5 0%, #e6dbc9 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1.5px solid var(--border);
    color: var(--text-main);
    padding: 20px 18px 14px;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 4px 15px rgba(60, 48, 32, 0.06);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 12px;
}

.rest-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
    color: var(--text-main);
}

.rest-sub {
    font-size: 12px;
    color: var(--primary);
    margin-top: 3px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.table-badge {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(180, 83, 9, 0.3);
    white-space: nowrap;
    animation: pulseBadge 3s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Search Bar */
.search-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.search-input::placeholder {
    color: #9c8f80;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8c7e6d;
    font-size: 16px;
    pointer-events: none;
}

/* Veg / Filter Switcher */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    border: 1.5px solid var(--border);
    background: rgba(253, 251, 247, 0.8);
    color: #574c3f;
    padding: 7px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #ffffff;
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}

/* Category Navigation Bar (Horizontal Sticky Scroll) */
.category-nav {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    background: #f5efe6;
    border-bottom: 1.5px solid var(--border);
    position: sticky;
    top: 128px;
    z-index: 30;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    padding: 8px 16px;
    border-radius: 9999px;
    background: #eae1d3;
    color: #574c3f;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.cat-pill:hover {
    background: #dfd3c3;
    color: var(--text-main);
}

.cat-pill.active {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}

/* ==========================================================================
   Menu Sections & Dish Cards
   ========================================================================== */
.menu-section {
    padding: 20px 18px 8px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1.5px solid var(--border);
    padding-bottom: 8px;
}

.section-title span.count {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Food Item Card (Warm Ivory on Sand) */
.food-card {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 18px;
    border: 1.5px solid var(--border);
    margin-bottom: 14px;
    box-shadow: 0 3px 10px rgba(60, 48, 32, 0.04);
    transition: transform 0.2s, border-color 0.2s;
}

.food-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(60, 48, 32, 0.08);
}

.food-info {
    flex: 1;
}

.diet-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-bottom: 6px;
    border: 1.5px solid;
}

.diet-icon.veg {
    border-color: var(--veg-color);
}
.diet-icon.veg::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--veg-color);
}

.diet-icon.non-veg {
    border-color: var(--nonveg-color);
}
.diet-icon.non-veg::after {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nonveg-color);
}

.food-name {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
}

.bestseller-badge {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.food-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin: 6px 0;
}

.food-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Food Action / Add Button */
.food-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

.add-btn {
    background: #fdfbf7;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 20px;
    font-size: 13.5px;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(180, 83, 9, 0.12);
    transition: all 0.2s ease;
    font-family: inherit;
}

.add-btn:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}

.qty-stepper {
    display: none;
    align-items: center;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(180, 83, 9, 0.25);
}

.qty-stepper.active {
    display: flex;
}

.qty-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    width: 32px;
    height: 36px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:active {
    background: rgba(0,0,0,0.15);
}

.qty-count {
    font-size: 14px;
    font-weight: 800;
    min-width: 26px;
    text-align: center;
}

/* ==========================================================================
   Floating Bottom Cart Bar (Warm Sand Glass Bar)
   ========================================================================== */
.bottom-cart-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 680px;
    background: rgba(245, 239, 230, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1.5px solid var(--border);
    color: var(--text-main);
    padding: 14px 20px;
    box-shadow: 0 -10px 30px rgba(60, 48, 32, 0.15);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: space-between;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, 0); }
}

.cart-bar-info {
    display: flex;
    flex-direction: column;
}

.cart-items-count {
    font-size: 11.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cart-total-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.btn-view-cart {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.3);
    transition: transform 0.15s;
    font-family: inherit;
}

.btn-view-cart:active {
    transform: scale(0.97);
}

/* ==========================================================================
   Cart Modal Drawer (Warm Sand)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 36, 26, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 60;
    display: none;
    opacity: 0;
    transition: opacity 0.25s;
}

.modal-overlay.active {
    display: flex;
    align-items: flex-end;
    opacity: 1;
}

.cart-drawer {
    background: #fdfbf7;
    border-top: 2.5px solid var(--primary);
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px 20px;
    box-shadow: 0 -20px 50px rgba(60, 48, 32, 0.25);
    animation: drawerUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-main);
}

@keyframes drawerUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.drawer-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.close-btn {
    background: #eae1d3;
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0e8dc;
}

.cart-item-name {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-main);
}

.cart-item-price {
    font-size: 13px;
    color: var(--primary);
    margin-top: 2px;
}

.bill-breakdown {
    background: #f5efe6;
    border-radius: 16px;
    padding: 16px;
    margin: 20px 0;
    border: 1.5px solid var(--border);
}

.bill-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.bill-row.total {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    border-top: 1.5px dashed var(--border);
    padding-top: 10px;
    margin-top: 10px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #4a4034;
    margin-bottom: 6px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15);
}

.btn-place-order {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s;
    font-family: inherit;
}

.btn-place-order:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-1px);
}

.btn-place-order:disabled {
    background: #c7bcac;
    color: #ffffff;
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================================
   Order Live Status Card & Step Nodes (Warm Light)
   ========================================================================== */
.status-card {
    background: #fdfbf7;
    border-radius: 22px;
    padding: 28px 22px;
    text-align: center;
    margin: 20px auto;
    border: 1.5px solid var(--border);
    box-shadow: 0 10px 30px rgba(60, 48, 32, 0.08);
    color: var(--text-main);
}

.status-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #fef3c7;
    border: 2px solid #fde68a;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 0 auto 16px;
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.15);
}

.status-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.status-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.status-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 13px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ==========================================================================
   📱 100% Mobile Responsive Styles (<768px & Ultra-Mobile <480px)
   ========================================================================== */
@media (max-width: 768px) {
    .menu-container {
        padding: 0 10px;
        width: 100%;
    }

    .menu-header {
        padding: 16px 12px;
        border-radius: 18px;
        margin-bottom: 12px;
    }

    .rest-name {
        font-size: 22px;
    }

    .table-badge {
        padding: 6px 12px;
        font-size: 12px;
    }

    .search-wrapper {
        margin: 12px 0 10px;
    }

    .search-input {
        height: 44px;
        font-size: 16px; /* Prevents auto zoom */
    }

    .filter-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding-bottom: 4px;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 12.5px;
    }

    .category-nav {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding: 10px 10px;
        top: 0;
    }

    .category-nav::-webkit-scrollbar {
        display: none;
    }

    .cat-pill {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 7px 14px;
        font-size: 12.5px;
    }

    .food-card {
        padding: 14px 12px;
        gap: 12px;
        border-radius: 16px;
    }

    .food-name {
        font-size: 15px;
    }

    .food-price {
        font-size: 15px;
    }

    .food-desc {
        font-size: 12px;
        line-height: 1.4;
    }

    .add-btn {
        min-width: 76px;
        height: 38px;
        font-size: 13px;
    }

    .qty-stepper {
        height: 38px;
    }

    .qty-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .floating-cart-bar {
        left: 10px;
        right: 10px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        padding: 12px 16px;
        border-radius: 18px;
    }

    .cart-drawer {
        border-radius: 24px 24px 0 0;
        padding: 20px 16px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        max-height: 90vh;
    }

    .btn-place-order {
        height: 50px;
        font-size: 15px;
    }

    .form-input, .form-textarea {
        font-size: 16px; /* Prevents auto zoom */
    }
}

@media (max-width: 480px) {
    .tracker-steps {
        margin: 22px 0;
        padding: 0 4px;
    }

    .step-node {
        width: auto;
        flex: 1;
    }

    .node-circle {
        width: 36px;
        height: 36px;
        font-size: 15px;
        margin-bottom: 6px;
    }

    .node-label {
        font-size: 10px;
    }

    .tracker-steps::before {
        top: 18px;
        left: 16px;
        right: 16px;
    }

    .status-card {
        padding: 22px 14px;
        border-radius: 18px;
    }

    .status-title {
        font-size: 20px;
    }
}
