:root {
    --primary: #ff5722;
    --primary-light: #ff8a50;
    --primary-dark: #c41c00;
    --bg-color: #f8f9fa;
    --surface: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border: #e9ecef;
    --success: #198754;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 100px;
}

/* Glass Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.table-info {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3);
}

/* Categories */
.categories {
    display: flex;
    overflow-x: auto;
    padding: 16px 20px;
    gap: 12px;
    scrollbar-width: none; /* Firefox */
}

.categories::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(255, 87, 34, 0.2);
}

/* Menu Grid */
.menu-section {
    padding: 0 20px 20px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.menu-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.menu-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #eee;
}

.menu-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.menu-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.menu-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.menu-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3);
}

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

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    background: var(--text-main);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cart.hidden {
    transform: translate(-50%, 150%);
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-badge {
    background: var(--primary);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-total {
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-action {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* FAB Cart */
.fab-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
    cursor: pointer;
    z-index: 99;
    transition: transform 0.2s, background 0.2s;
}

.fab-cart:active {
    transform: scale(0.95);
    background: var(--primary-dark);
}

.fab-cart-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: white;
    color: var(--primary);
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modals (Modifiers & Cart) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

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

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    background: #f1f3f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
}

/* Modifier Options */
.modifier-group {
    margin-bottom: 20px;
}

.modifier-title {
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.req-badge {
    font-size: 0.7rem;
    background: #ffebee;
    color: #d32f2f;
    padding: 2px 8px;
    border-radius: 4px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.option-row:last-child {
    border-bottom: none;
}

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

.custom-radio {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    outline: none;
    transition: all 0.2s;
    position: relative;
}

.custom-radio:checked {
    border-color: var(--primary);
}

.custom-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    outline: none;
    transition: all 0.2s;
    position: relative;
}

.custom-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.option-price {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.qty-btn {
    background: #f1f3f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s;
}

.qty-btn:active {
    background: #e9ecef;
}

.qty-value {
    font-size: 1.2rem;
    font-weight: 600;
    width: 30px;
    text-align: center;
}

.notes-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.notes-input:focus {
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Cart Styles inside Drawer */
.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

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

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

.cart-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

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

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-qty-btn {
    background: #f1f3f5;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cart-summary {
    margin-top: 24px;
    background: #f8f9fa;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

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

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .floating-cart {
        right: 20px;
        left: auto;
        transform: none;
        width: 300px;
    }
    .floating-cart.hidden {
        transform: translateY(150%);
    }
}
