@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Inter:wght@400;600;800&display=swap');

:root {
    --primary: #E31837;
    --primary-gradient: linear-gradient(135deg, #E31837 0%, #B71C1C 100%);
    --secondary: #0F172A;
    --secondary-gradient: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --accent: #FFC107;
    --accent-gradient: linear-gradient(135deg, #FFC107 0%, #FF8F00 100%);
    --charcoal: #0F172A;
    --cream: #FFFFFF;
    --white: #FFFFFF;
    --gray: #F1F5F9;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --prod-radius: 32px;
    --page-bg: #F8FAFC;
    --glass: rgba(255, 255, 255, 0.7);
    --border: rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--page-bg);
    color: var(--text-main);
    margin: 0;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    letter-spacing: -0.2px;
}

h1, h2, h3, .logo, .table-title, .price {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Fly to Cart Animation */
.fly-item {
    position: fixed;
    z-index: 999999;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 600px) {
    .container {
        padding: 0 18px;
    }
}

/* Header */
header {
    background: var(--white);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Banner Slider */
.banner-section { margin: 32px 0; }
.banner-container {
    width: 100%;
    height: 320px;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.banner-track {
    display: flex;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.banner-slide { min-width: 100%; height: 100%; object-fit: cover; }

/* Featured Section */
.featured-section { margin: 40px 0; }
.section-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--charcoal);
}

.section-title span { color: var(--primary); }

.featured-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 30px;
    scrollbar-width: none;
}
.featured-scroll::-webkit-scrollbar { display: none; }

.featured-item {
    min-width: 280px;
    background: white;
    padding: 16px;
    border-radius: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: 0.4s;
    position: relative;
    cursor: pointer;
}

.featured-item:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }

.featured-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 16px;
}

.featured-badge {
    position: absolute;
    top: 28px;
    left: 28px;
    background: var(--primary-gradient);
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    z-index: 5;
}

/* Hot Selling Section */
.hot-selling-section { margin-top: 32px; }

/* Hot Selling - Horizontal Scroll */
.hot-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 0 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.hot-scroll::-webkit-scrollbar { display: none; }

.hot-card {
    min-width: 180px;
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    position: relative;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    cursor: pointer;
}
.hot-card:active { transform: scale(0.96); }
.hot-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    pointer-events: none;
}
.hot-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 900;
    z-index: 5;
    box-shadow: 0 5px 15px rgba(227, 24, 55, 0.3);
}
.hot-card-info { padding: 14px; }
.hot-card-info h3 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hot-card-info .price { font-size: 16px; font-weight: 900; color: var(--primary); }

/* Digital Receipt Styles */
.receipt-section-title {
    font-size: 11px;
    font-weight: 900;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 24px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.receipt-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,0.05);
}
.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.05);
}
.receipt-item:last-child { border: none; }
.receipt-item-info { display: flex; flex-direction: column; }
.receipt-item-name { font-weight: 800; color: #1a1a1a; font-size: 15px; }
.receipt-item-meta { font-size: 12px; color: #888; margin-top: 2px; }

.featured-item img, .banner-slide, .category-item img, .modal-media img {
    pointer-events: none;
    -webkit-touch-callout: none;
    user-select: none;
}

/* My Orders Glassmorphism Modal */
.orders-modal-content {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border-radius: 32px 32px 0 0 !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.15) !important;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.status-new { background: #E3F2FD; color: #1565C0; }
.status-kitchen { background: #FFF3E0; color: #E65100; }
.status-served { background: #E8F5E9; color: #2E7D32; }

/* Voice UI - Premium Wave */
.voice-panel {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: 32px;
    padding: 32px 24px;
    color: white;
    text-align: center;
}

.mic-orb {
    width: 88px;
    height: 88px;
    background: white;
    color: #4338ca;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 0 40px rgba(255,255,255,0.2);
    animation: orbPulse 2s infinite;
}

@keyframes orbPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(255,255,255,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FF385C;
    color: white;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.hot-info { flex: 1; min-width: 0; padding-right: 12px; }
.hot-info h3 { 
    font-size: 16px; 
    font-weight: 800; 
    color: #1A1A1A; 
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hot-info .price { font-size: 18px; font-weight: 900; color: var(--primary); }

.hot-item .ph-caret-right { 
    color: #ccc; 
    font-size: 24px;
}

/* Category & Meal Nav */
.category-nav, .meal-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
@media (max-width: 600px) {
    .category-nav, .meal-nav {
        justify-content: flex-start;
        padding-left: 2px;
    }
}

.category-chip, .meal-chip {
    white-space: nowrap;
    padding: 14px 28px;
    background: white;
    border-radius: 24px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
    transition: 0.3s;
}

.category-chip.active, .meal-chip.active {
    background: var(--charcoal);
    color: white;
    transform: scale(1.05);
}

.meal-chip.suggested { border: 2px solid var(--primary); }

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    justify-content: center;
    gap: 32px;
    margin: 40px 0;
}

.product-card {
    background: white;
    padding: 20px;
    border-radius: var(--prod-radius);
    box-shadow: 0 12px 35px rgba(0,0,0,0.03), 0 4px 10px rgba(0,0,0,0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
}

.product-card:active {
    transform: translateY(2px) scale(0.97);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 18px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-to-cart-btn {
    width: 44px; height: 44px;
    border-radius: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* FAB */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
}

.fab-btn {
    width: 60px; height: 60px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: 0.3s;
    position: relative;
}

.fab-waiter { background: var(--secondary-gradient); color: white; }
.fab-order { background: var(--primary-gradient); color: white; }
.fab-badge {
    position: absolute; top: -5px; right: -5px;
    width: 24px; height: 24px; background: white;
    color: var(--primary); border-radius: 50%;
    font-size: 12px; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.badge-pop {
    animation: badgePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Order Panel */
.order-panel-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000;
    display: none; align-items: flex-end;
}

.order-panel {
    width: 100%; background: white;
    border-radius: 40px 40px 0 0;
    padding: 32px 24px;
    max-height: 90vh;
    display: flex; flex-direction: column;
}

.order-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px;
}

.cart-item {
    display: flex; gap: 16px; align-items: center;
    padding: 16px; background: #F8F9FA;
    border-radius: 24px; margin-bottom: 12px;
}

.cart-item img { width: 60px; height: 60px; border-radius: 16px; object-fit: cover; }

.cart-item-controls {
    display: flex; gap: 10px; align-items: center;
    background: white; padding: 6px 12px; border-radius: 12px;
}

.cart-item-controls button {
    border: none; background: none; font-size: 18px; font-weight: 800;
    color: var(--primary); cursor: pointer;
}

#kitchenMessage {
    width: 100%; height: 80px; padding: 16px;
    border-radius: 16px; border: 1px solid #eee;
    margin: 20px 0; font-family: inherit;
}

.order-summary-card {
    background: var(--charcoal); color: white;
    padding: 24px; border-radius: 28px;
}

.summary-line.total {
    border-top: 1px dashed #444; padding-top: 14px; margin-top: 14px;
    font-size: 20px; font-weight: 900;
}

.confirm-order-btn {
    width: 100%; padding: 20px; border-radius: 24px;
    background: var(--primary-gradient); color: white;
    border: none; font-weight: 900; font-size: 18px;
    cursor: pointer; margin-top: 20px;
}

/* Modal Premium 3D */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1100;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white; border-radius: 40px;
    max-width: 500px; width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(15, 23, 42, 0.15);
    scrollbar-width: none;
    animation: modalPop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border);
}

@keyframes modalPop {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute; top: 15px; right: 15px;
    width: 36px; height: 36px; background: rgba(0,0,0,0.3);
    color: white; border: none; border-radius: 50%;
    font-size: 24px; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-image { 
    width: 100%; 
    height: 350px; 
    object-fit: cover;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.modal-body { padding: 28px; }
.modal-body h2 { font-size: 26px; font-weight: 800; color: #1A1A1A; margin-bottom: 8px; }
.modal-body p { line-height: 1.6; }

@media (max-width: 767px) {
    .modal { padding: 16px; display: flex; align-items: center; justify-content: center; }
    .modal-content { 
        max-width: 360px; /* Force compact width */
        width: 100%;
        border-radius: 28px; 
        max-height: 80vh; 
        animation: modalPop 0.3s ease-out;
    }
    .modal-image { height: 180px; }
    .modal-body { padding: 20px; }
    .modal-body h2 { font-size: 20px; }
    .modal-body p { font-size: 14px; margin-bottom: 12px !important; }
    
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { padding: 12px; border-radius: 24px; }
    .product-image { border-radius: 18px; margin-bottom: 12px; }
    .product-info h3 { font-size: 14px; margin-bottom: 8px; }
    .product-footer .price { font-size: 15px; }
    .add-to-cart-btn { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
    
    .section-title { font-size: 18px; }
    .banner-container { height: 200px; border-radius: 24px; }
    
    .category-chip { padding: 10px 20px; font-size: 12px; border-radius: 16px; }
}

/* Animations */
.order-card { animation: fadeInUp 0.4s ease-out; }
/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--charcoal);
    color: white;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
}

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

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* Announcement Hub - Premium Glassmorphism */
.announcement-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(8px);
    z-index: 1000000; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.announcement-modal-content {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border-radius: 40px !important;
    padding: 40px 32px !important;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.5) !important;
    box-shadow: 0 30px 100px rgba(0,0,0,0.2) !important;
    max-width: 400px; width: 100%;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.announcement-text {
    font-size: 20px; font-weight: 800; line-height: 1.6; color: #1a1a1a; margin-bottom: 24px;
}
.announcement-banner {
    width: 100%; border-radius: 24px; margin-bottom: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); pointer-events: none;
}
.announcement-close {
    background: var(--charcoal); color: white; padding: 16px 40px; border-radius: 50px;
    font-weight: 800; font-size: 14px; border: none; cursor: pointer; transition: 0.3s;
}
.announcement-close:active { transform: scale(0.95); }

/* My Orders Overhaul (Premium Match) */
.orders-modal-content {
    background: #FDFCF9 !important;
    border-radius: 40px 40px 0 0 !important;
    padding: 0 !important; /* Changed to allow internal padding control */
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
.cart-item-v2 {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: white;
    border-radius: 32px;
    margin-bottom: 20px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.03);
    position: relative;
    align-items: center;
}
.cart-item-v2 img {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    object-fit: cover;
    background: #FFF9F0;
    flex-shrink: 0;
}
.cart-item-v2 .info { flex: 1; }
.cart-item-v2 .info h4 { margin: 0 0 6px 0; font-size: 17px; font-weight: 800; color: #1a1a1a; }
.cart-item-v2 .info .meta { font-size: 12px; color: #999; margin-bottom: 12px; font-weight: 600; }
.cart-item-v2 .controls { display: flex; align-items: center; gap: 12px; }
.cart-item-v2 .controls button {
    width: 32px; height: 32px;
    border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-item-v2 .controls .btn-minus { background: #F5F5F5; color: #BBB; }
.cart-item-v2 .controls .btn-plus { background: #0D474F; color: white; }
.cart-item-v2 .price-tag { font-weight: 900; font-size: 16px; color: #1a1a1a; }
.cart-item-v2 .btn-delete {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; color: #DDD; cursor: pointer; font-size: 18px;
}
.cart-item-v2.lockout .btn-minus { opacity: 0.3; cursor: not-allowed; }

.note-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.note-chip {
    padding: 10px 16px; border-radius: 12px;
    background: #F3F0E9; color: #665C4F; font-size: 12px; font-weight: 800;
    cursor: pointer; transition: 0.3s;
    border: 1px solid rgba(0,0,0,0.02);
}
.note-chip:active { transform: scale(0.92); background: #0D474F; color: white; }

.checkout-summary {
    background: #FFF9F0; border-radius: 32px; padding: 24px; margin-top: 32px;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: 800; color: #888; font-size: 14px; }
.summary-row.total { color: #1a1a1a; font-size: 20px; font-weight: 900; border-top: 2px dashed #E2DFD8; padding-top: 16px; margin-top: 8px; }

.btn-confirm-send {
    width: 100%; padding: 20px; border-radius: 24px; border: none;
    background: #0D474F; color: white; font-weight: 900; font-size: 18px;
    box-shadow: 0 15px 35px rgba(13, 71, 79, 0.25); margin-top: 24px; cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase; letter-spacing: 1px;
}
.btn-confirm-send:active { transform: scale(0.97); }
