/* =============================================
   Food Order System - Professional Lieferando-style Design
   Mobile-First Responsive Layout v2.0
   ============================================= */

:root {
    --primary: #e23744;
    --primary-dark: #c62d38;
    --primary-light: #ff5a67;
    --primary-bg: rgba(226, 55, 68, 0.06);
    --secondary: #1c1c1c;
    --success: #60b521;
    --success-light: rgba(96, 181, 33, 0.1);
    --danger: #e23744;
    --warning: #ff9800;
    --info: #2196f3;
    --orange: #ff8000;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #1c1c1c;
    --white: #ffffff;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50px;
    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nav-height: 56px;
    --bottom-bar-height: 60px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--gray-100);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 0;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* Container fix for mobile */
@media (max-width: 575px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* =============================================
   TOP BAR - Mobile hidden, desktop compact
   ============================================= */
.top-bar {
    background: var(--gray-900);
    color: var(--white);
    padding: 5px 0;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    display: none;
}

@media (min-width: 768px) {
    .top-bar { display: block; }
}

.top-bar a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.top-bar a:hover { color: var(--white); }

.top-bar .badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

/* =============================================
   NAVBAR - Clean sticky header
   ============================================= */
.navbar {
    padding: 0;
    background: var(--white) !important;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    z-index: 1050;
    height: var(--nav-height);
}

.navbar > .container {
    height: 100%;
}

.navbar-brand {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    line-height: 1;
}

.navbar-brand i { font-size: 1.25rem; }

.nav-link {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 12px !important;
    color: var(--gray-700) !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-bg);
}

.navbar-toggler {
    border: none !important;
    padding: 6px 8px !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

/* Cart button in navbar */
.cart-btn {
    background: var(--primary);
    color: var(--white) !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}

.cart-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--orange);
    color: var(--white);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 2px solid var(--white);
}

/* Mobile nav adjustments */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        padding: 12px;
        border-top: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        z-index: 1040;
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* =============================================
   HERO SECTION - Compact & Clean
   ============================================= */
.hero-section {
    background: linear-gradient(135deg, #fff5f5 0%, var(--white) 50%, #fff8f0 100%);
    padding: 16px 0 12px;
    border-bottom: 1px solid var(--gray-200);
}

.hero-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 10px;
    line-height: 1.4;
}

.hero-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-info .badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hero-image { display: none; }

@media (min-width: 576px) {
    .hero-section { padding: 20px 0 14px; }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.9rem; }
}

@media (min-width: 768px) {
    .hero-section { padding: 28px 0 18px; }
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.95rem; }
}

@media (min-width: 992px) {
    .hero-section { padding: 32px 0 20px; }
    .hero-title { font-size: 2.1rem; }
    .hero-image { display: block; padding: 10px; }
}

/* =============================================
   DELIVERY METHOD - Inline toggle
   ============================================= */
.delivery-method-section {
    padding: 8px 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.delivery-method-card {
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.delivery-method-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: var(--transition);
}

.delivery-method-card:hover, .delivery-method-card.active {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.delivery-method-card.active::after {
    background: var(--primary);
}

.delivery-method-card .delivery-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.delivery-method-card.active .delivery-icon {
    background: var(--primary);
    color: var(--white);
}

/* =============================================
   CATEGORY TABS - Horizontal scroll
   ============================================= */
.menu-tabs-section {
    padding: 10px 0 16px;
    background: var(--gray-100);
}

.category-tabs-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.category-tabs {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Allow peek for more tabs */
    padding-right: 20px;
}

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

.cat-tab {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.cat-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--primary-bg);
}

.cat-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(226, 55, 68, 0.25);
}

.cat-tab.active i { color: var(--white); }
.cat-tab i { font-size: 0.8rem; color: var(--primary); }

.cat-tab-discount {
    position: absolute;
    top: -7px;
    right: -4px;
    background: var(--success);
    color: var(--white);
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 800;
}

.cat-tab-scroll {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: var(--transition);
    color: var(--gray-700);
    font-size: 0.7rem;
}

.cat-tab-scroll:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.cat-tab-scroll-left { left: -14px; }
.cat-tab-scroll-right { right: -14px; }

@media (min-width: 768px) {
    .cat-tab { padding: 9px 18px; font-size: 0.82rem; }
    .cat-tab-scroll { display: flex; }
}

/* =============================================
   PRODUCT GRID - Mobile list, Tablet+ grid
   ============================================= */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.product-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: var(--transition-fast);
    position: relative;
    border: 1px solid var(--gray-200);
}

.product-item:active {
    transform: scale(0.99);
}

@media (hover: hover) {
    .product-item:hover {
        box-shadow: var(--shadow-sm);
        border-color: var(--gray-300);
    }
}

/* Mobile: horizontal card layout */
.product-item-inner {
    display: flex;
    flex-direction: row;
    min-height: 88px;
}

.product-item-image {
    width: 100px;
    min-height: 88px;
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--gray-200);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-item-placeholder {
    width: 100%;
    height: 100%;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f4f4, #ede8e8);
    color: var(--gray-400);
}

.discount-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary);
    color: var(--white);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-size: 0.65rem;
    font-weight: 800;
    z-index: 2;
}

.product-item-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.product-item-name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2px;
    cursor: pointer;
    color: var(--gray-900);
    transition: var(--transition-fast);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-item-name:hover { color: var(--primary); }

.product-item-desc {
    color: var(--gray-500);
    font-size: 0.72rem;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-item-time {
    font-size: 0.68rem;
    margin-bottom: 4px;
    color: var(--gray-500);
    display: none;
}

.product-item-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid var(--gray-100);
}

.product-item-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.old-price {
    text-decoration: line-through;
    color: var(--gray-400);
    font-size: 0.68rem;
}

.current-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.92rem;
}

.btn-add-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

.btn-add-cart:active {
    transform: scale(0.93);
}

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

/* Tablet+: 2 column grid with vertical cards */
@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-item-inner {
        flex-direction: column;
    }

    .product-item-image {
        width: 100%;
        height: 120px;
        min-height: unset;
    }

    .product-item-placeholder {
        height: 120px;
        min-height: unset;
    }

    .product-item-name {
        -webkit-line-clamp: 2;
        white-space: normal;
    }

    .product-item-desc {
        -webkit-line-clamp: 2;
    }

    .product-item-time {
        display: block;
    }

    .current-price { font-size: 0.95rem; }

    .btn-add-cart {
        width: auto;
        height: auto;
        padding: 6px 12px;
        font-size: 0.75rem;
        gap: 4px;
    }
}

@media (min-width: 768px) {
    .product-grid { gap: 12px; }
    .product-item-image { height: 130px; }
    .product-item-placeholder { height: 130px; }
}

@media (min-width: 992px) {
    .product-grid { gap: 14px; }
    .product-item-image { height: 140px; }
    .product-item-placeholder { height: 140px; }
    .product-item-info { padding: 10px 12px; }

    .floating-cart-btn { display: none !important; }
}

@media (min-width: 1200px) {
    .product-item-image { height: 150px; }
    .product-item-placeholder { height: 150px; }
    .product-item-name { font-size: 0.9rem; }
    .current-price { font-size: 1rem; }
}

/* =============================================
   PRODUCT POPUP MODAL - Bottom sheet on mobile
   ============================================= */
.product-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.product-popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.product-popup {
    background: var(--white);
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

/* Drag handle */
.product-popup::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 4px;
    z-index: 11;
}

.product-popup-close {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 0.85rem;
    color: var(--gray-700);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.product-popup-close:hover {
    background: var(--primary);
    color: var(--white);
}

.product-popup-loading {
    padding: 50px 20px;
    text-align: center;
    color: var(--gray-500);
}

.product-popup-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-popup-header {
    position: relative;
    flex-shrink: 0;
}

.product-popup-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-popup-placeholder {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0f0, #e8e0e0);
}

.product-popup-title {
    padding: 12px 14px 8px;
}

.product-popup-title h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--gray-900);
}

.product-popup-title p {
    font-size: 0.78rem;
    margin-bottom: 0;
    color: var(--gray-500);
}

.product-popup-body {
    padding: 0 14px 14px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Variant Groups in Popup */
.popup-variant-group {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--gray-200);
}

.popup-variant-group-name {
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
}

.popup-variant-option { margin-bottom: 1px; }

.popup-variant-label {
    display: flex;
    align-items: center;
    padding: 7px 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 8px;
}

.popup-variant-label:hover {
    background: var(--white);
}

.popup-variant-label input { display: none; }

.popup-variant-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-400);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: var(--transition-fast);
}

.popup-variant-label input[type="checkbox"] + .popup-variant-check {
    border-radius: 4px;
}

.popup-variant-label input:checked + .popup-variant-check {
    border-color: var(--primary);
    background: var(--primary);
}

.popup-variant-label input:checked + .popup-variant-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.popup-variant-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
}

.popup-variant-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

/* Quantity in Popup */
.popup-quantity { margin-bottom: 10px; }

.quantity-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
}

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

.qty-input {
    width: 44px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.popup-notes { margin-bottom: 10px; }

/* Popup Footer */
.product-popup-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
}

.popup-total { text-align: center; min-width: 80px; }

.popup-total-label {
    display: block;
    font-size: 0.68rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.popup-total-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
}

.btn-popup-add-cart {
    flex: 1;
    padding: 10px 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-popup-add-cart:hover {
    background: var(--primary-dark);
}

.btn-popup-add-cart:active {
    transform: scale(0.98);
}

.btn-popup-add-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (min-width: 768px) {
    .product-popup {
        max-height: 80vh;
        border-radius: var(--radius-lg);
        margin-bottom: 16px;
    }
    .product-popup-overlay { align-items: center; }
    .product-popup-image { height: 180px; }
    .product-popup-placeholder { height: 180px; }
    .product-popup-title h3 { font-size: 1.15rem; }
}

/* =============================================
   FLOATING CART BUTTON (Mobile)
   ============================================= */
.floating-cart-btn {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    z-index: 9990;
    box-shadow: 0 4px 16px rgba(226, 55, 68, 0.35);
    display: none;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    max-width: calc(100% - 24px);
    text-decoration: none;
}

.floating-cart-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateX(-50%) scale(1.02);
}

.floating-cart-btn .cart-total {
    font-weight: 800;
}

.floating-cart-btn.visible {
    display: flex;
}

/* =============================================
   MENU CARD (Menus Section)
   ============================================= */
.menu-card {
    background: var(--white);
    border: 2px solid rgba(226, 55, 68, 0.12);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.menu-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.menu-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.78rem;
}

/* =============================================
   CART & CHECKOUT
   ============================================= */
.cart-summary {
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
}

.cart-item {
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition-fast);
}

.cart-item:hover { box-shadow: var(--shadow-xs); }

.delivery-option-card, .payment-option-card {
    display: block;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.delivery-option-card:hover, .payment-option-card:hover,
.delivery-option-card.selected, .payment-option-card.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.delivery-option-card input, .payment-option-card input { display: none; }

/* =============================================
   ORDER TIMELINE
   ============================================= */
.timeline-step { position: relative; }

.timeline-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.timeline-step.active .timeline-icon {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(226, 55, 68, 0.15);
}

/* =============================================
   FOOTER - Compact
   ============================================= */
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.7);
    padding: 24px 0 12px;
    margin-top: 20px;
}

.footer h5 {
    color: var(--white);
    font-weight: 800;
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.footer a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.82rem;
}

.footer a:hover {
    color: var(--primary-light);
}

.footer .social-links a {
    font-size: 1.1rem;
    margin-right: 10px;
}

.footer hr { border-color: rgba(255,255,255,0.08); }

@media (max-width: 575px) {
    .footer { padding: 18px 0 10px; }
    .footer h5 { font-size: 0.82rem; margin-bottom: 6px; }
    .footer a { font-size: 0.78rem; }
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.toast-container {
    position: fixed;
    top: 65px;
    right: 12px;
    z-index: 99999;
    left: 12px;
    pointer-events: none;
}

.toast-notification {
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 10px 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.25s ease;
    max-width: 400px;
    pointer-events: auto;
    font-size: 0.82rem;
}

.toast-notification.success { border-left: 4px solid var(--success); }
.toast-notification.error { border-left: 4px solid var(--danger); }
.toast-notification.warning { border-left: 4px solid var(--warning); }

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-10px); opacity: 0; }
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header h2 {
    font-weight: 900;
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

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

/* =============================================
   CATEGORY SIDEBAR (menu page)
   ============================================= */
.category-sidebar {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 12px;
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: calc(var(--nav-height) + 10px);
    border: 1px solid var(--gray-200);
}

.sidebar-title {
    font-weight: 800;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.85rem;
}

.category-nav li a {
    display: block;
    padding: 6px 8px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-xs);
    transition: var(--transition-fast);
    font-size: 0.82rem;
    font-weight: 500;
}

.category-nav li a:hover, .category-nav li a.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

/* =============================================
   PRODUCT DETAIL (product page)
   ============================================= */
.product-detail-image {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-200);
}

.product-image-placeholder-lg {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f0f0, #e8e0e0);
    border-radius: var(--radius-sm);
}

.discount-badge-lg {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.9rem;
}

.product-detail-name {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 6px;
}

.product-detail-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-600);
}

.product-detail-price { margin-bottom: 14px; }

.old-price-lg {
    text-decoration: line-through;
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-right: 8px;
}

.current-price-lg {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
}

/* Variant Groups (product page) */
.variant-group {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--gray-200);
}

.variant-group-name {
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
}

.variant-option {
    padding: 5px 8px;
    border-radius: var(--radius-xs);
    transition: var(--transition-fast);
}

.variant-option:hover { background: var(--white); }

.product-total-price { text-align: center; }

.total-label {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-500);
}

.total-value {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary);
}

/* =============================================
   CATEGORY CARD (legacy)
   ============================================= */
.category-card {
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    display: block;
    border: 1px solid var(--gray-200);
}

.category-card:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.category-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
}

.category-image img { width: 100%; height: 100%; object-fit: cover; }

.category-image-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    margin: 0 auto;
    color: var(--primary);
}

/* =============================================
   PRODUCT CARD (menu page)
   ============================================= */
.product-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-200);
}

.product-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--gray-300);
}

.product-card-image {
    height: 130px;
    overflow: hidden;
    background: var(--gray-200);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 3px;
    color: var(--gray-900);
    line-height: 1.25;
}

.product-card-desc {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

.product-card-price {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--primary);
}

/* =============================================
   OPEN STATUS BAR (Mobile only)
   ============================================= */
.mobile-status-bar {
    background: var(--gray-900);
    color: var(--white);
    padding: 4px 0;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mobile-status-bar .badge {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

@media (min-width: 768px) {
    .mobile-status-bar { display: none; }
}

/* =============================================
   FORM STYLES
   ============================================= */
.form-control {
    border-radius: var(--radius-xs);
    border-color: var(--gray-300);
    font-size: 0.88rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(226, 55, 68, 0.1);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: var(--radius-sm);
}

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

/* =============================================
   RTL SUPPORT
   ============================================= */
.rtl .product-item-inner { flex-direction: row-reverse; }
.rtl .discount-badge { left: auto; right: 4px; }
.rtl .menu-discount-badge { right: auto; left: 10px; }
.rtl .discount-badge-lg { left: auto; right: 10px; }
.rtl .cat-tab-discount { right: auto; left: -4px; }
.rtl .product-popup-close { right: auto; left: 12px; }

@media (max-width: 575px) {
    .rtl .product-item-inner { flex-direction: row-reverse; }
}

@media (min-width: 576px) {
    .rtl .product-item-inner { flex-direction: column-reverse; }
}

/* =============================================
   MISC & ANIMATIONS
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-up {
    animation: slideUp 0.3s ease;
}

/* Scrollbar styling for desktop */
@media (min-width: 768px) {
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: var(--gray-100); }
    ::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }
}

/* Card styles consistency */
.card {
    border-radius: var(--radius-sm);
    border-color: var(--gray-200);
}

/* Prevent text selection on interactive elements */
.cat-tab, .btn-add-cart, .delivery-method-card {
    -webkit-user-select: none;
    user-select: none;
}

/* Safe area for mobile with notch */
@supports (padding: env(safe-area-inset-bottom)) {
    .floating-cart-btn.visible {
        bottom: calc(16px + env(safe-area-inset-bottom));
    }
    .footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Category section header on menu page */
.category-header h3 {
    font-weight: 800;
    font-size: 1.1rem;
}

@media (max-width: 575px) {
    .category-sidebar {
        position: static;
        margin-bottom: 12px;
    }

    .product-detail-name { font-size: 1.15rem; }
    .current-price-lg { font-size: 1.2rem; }

    .toast-notification {
        max-width: 100%;
        font-size: 0.78rem;
        padding: 8px 12px;
    }

    /* Cart page adjustments */
    .cart-summary {
        position: static !important;
        margin-top: 16px;
    }
}
