@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #ea1d2c;
    --primary-hover: #d11724;
    --primary-light: #fff0f1;
    --bg-main: #f7f9fc;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 36px rgba(234, 29, 44, 0.15);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    padding-bottom: 90px;
}

/* Header & Restaurant Hero */
.hero-banner {
    position: relative;
    width: 100%;
    height: 220px;
    min-height: 180px;
    background-color: #0f172a;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: block;
}

@media (max-width: 768px) {
    .hero-banner {
        height: 180px;
        min-height: 150px;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
}

.restaurant-info-container {
    max-width: 1100px;
    margin: -50px auto 20px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.restaurant-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
}

.restaurant-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

.restaurant-details h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.restaurant-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.badge-status {
    background: #dcfce7;
    color: #15803d;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* Navigation Pills */
.nav-categories {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-pill {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-pill:hover, .nav-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* Main Layout Grid */
.main-wrapper {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}

@media (max-width: 900px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar-cart {
        display: none;
    }
}

/* Category Sections & Product Cards */
.category-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 30px;
    color: var(--text-primary);
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.product-img {
    width: 105px;
    height: 105px;
    min-width: 105px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px;
    border-radius: var(--radius-sm);
    margin-bottom: 0;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.product-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.btn-add {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

/* Sidebar Cart */
.sidebar-cart {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 90px;
    height: fit-content;
}

.cart-header {
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.cart-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-main {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}

.cart-item-comp {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 8px;
}

.cart-summary {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

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

.summary-row.total {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 12px;
}

.btn-checkout {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    box-shadow: var(--shadow-lg);
    transition: background 0.2s ease;
}

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

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.modal-card {
    background: var(--card-bg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    padding: 24px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.product-modal-card {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow: hidden !important;
}

.product-modal-body {
    padding: 24px 24px 16px 24px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 75px);
}

.product-modal-footer {
    padding: 12px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    position: sticky;
    bottom: 0;
    z-index: 15;
}

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

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-group-title {
    font-size: 15px;
    font-weight: 700;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin: 16px 0 10px;
    display: flex;
    justify-content: space-between;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.option-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Floating Mobile Cart Bar */
.mobile-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg, #ffffff);
    padding: 12px 18px;
    box-shadow: 0 -6px 25px rgba(0,0,0,0.18);
    border-top: 1px solid var(--border, #e2e8f0);
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 900px) {
    body {
        padding-bottom: 100px;
    }
    .mobile-cart-bar {
        display: flex;
    }
}

/* Kitchen Printer Monitor Simulator Tab */
.kitchen-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #334155;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.thermal-paper {
    background: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.3;
    padding: 16px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    white-space: pre-wrap;
    color: #000;
}
