* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #e11d48;
}

[data-theme="dark"] {
    --bg: #0b1120;
    --card: #162033;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #26334d;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #050811;
    color: var(--text);
}

/* Desktop Centering Frame */
.r360-desktop-wrapper {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top, #1e293b 0%, #050811 100%);
}

.r360-app-frame {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 85px;
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

/* Header */
.r360-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}
.r360-brand { display: flex; align-items: center; gap: 10px; }
.r360-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.r360-title { font-size: 17px; margin: 0; font-weight: 700; }
.r360-table-pill {
    font-size: 11px; background: var(--primary); color: #fff;
    padding: 2px 8px; border-radius: 12px; font-weight: 600;
}
.r360-header-actions { display: flex; align-items: center; gap: 8px; }
.r360-lang-box { display: flex; gap: 4px; }
.r360-lang-btn {
    background: transparent; border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 4px 7px; font-size: 12px; cursor: pointer;
}
.r360-lang-btn.active { border-color: var(--primary); background: rgba(225,29,72,0.15); font-weight: 700; }
.r360-icon-btn {
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
    width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* Banner & Install Bar */
.r360-banner {
    background: linear-gradient(90deg, var(--primary), #f43f5e);
    color: #fff; padding: 10px 14px; font-size: 13px; text-align: center; font-weight: 600;
}
.r360-install-bar {
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 13px;
}

/* Views */
.r360-view { display: none; padding: 14px; }
.r360-view.active { display: block; }

/* Search & Filters */
.r360-search-input-wrap {
    display: flex; align-items: center; gap: 8px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 8px 12px;
}
.r360-search-input-wrap input {
    border: none; background: transparent; color: var(--text); width: 100%; font-size: 14px; outline: none;
}
.r360-filter-btn { background: none; border: none; color: var(--muted); cursor: pointer; }
.r360-smart-filters {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.r360-chip {
    background: var(--card); border: 1px solid var(--border); color: var(--text);
    padding: 5px 10px; border-radius: 20px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.r360-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Categories */
.r360-cat-scroll, .r360-subcat-scroll {
    display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 6px; scrollbar-width: none;
}
.r360-cat-scroll::-webkit-scrollbar, .r360-subcat-scroll::-webkit-scrollbar { display: none; }
.r360-cat-pill {
    white-space: nowrap; padding: 8px 14px; border-radius: 20px;
    background: var(--card); border: 1px solid var(--border); color: var(--text);
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.r360-cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.r360-subcat-pill {
    white-space: nowrap; padding: 5px 12px; border-radius: 14px;
    background: transparent; border: 1px solid var(--border); color: var(--muted); font-size: 12px; cursor: pointer;
}
.r360-subcat-pill.active { border-color: var(--primary); color: var(--primary); font-weight: 600; }

/* Dish Cards */
.r360-dishes { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.r360-dish-card {
    display: flex; gap: 12px; background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; padding: 10px; cursor: pointer; position: relative; transition: transform 0.15s;
}
.r360-dish-card:active { transform: scale(0.99); }
.r360-dish-card.sold-out { opacity: 0.52; filter: grayscale(0.85); }
.r360-dish-img {
    width: 88px; height: 88px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #1e293b;
}
.r360-dish-info { flex: 1; min-width: 0; }
.r360-dish-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.r360-dish-desc {
    font-size: 12px; color: var(--muted); margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.r360-dish-meta { display: flex; justify-content: space-between; align-items: center; }
.r360-price-tag { font-weight: 700; font-size: 14px; color: var(--primary); }
.r360-sold-badge {
    background: #ef4444; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 6px; font-weight: 700;
}
.r360-badges-row { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.r360-mini-badge { font-size: 10px; padding: 2px 6px; border-radius: 6px; color: #fff; font-weight: 600; }

/* Menu Footer */
.r360-menu-footer {
    margin-top: 28px; padding: 18px; background: var(--card);
    border: 1px solid var(--border); border-radius: 14px; text-align: center;
}
.r360-footer-msg { font-size: 13px; margin: 0 0 6px; }
.r360-footer-addr { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.r360-review-card {
    display: inline-block; background: #f59e0b; color: #000; font-weight: 700;
    padding: 10px 16px; border-radius: 10px; text-decoration: none; font-size: 13px;
}

/* Bottom Navigation */
.r360-bottom-nav {
    position: fixed; bottom: 0; width: 100%; max-width: 480px;
    background: var(--card); border-top: 1px solid var(--border);
    display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 0; z-index: 40;
}
.r360-nav-item {
    background: none; border: none; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 11px; cursor: pointer; position: relative;
}
.r360-nav-item.active { color: var(--primary); font-weight: 700; }
.r360-nav-badge {
    position: absolute; top: -2px; right: 22%; background: var(--primary); color: #fff;
    font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 10px;
}

/* Buttons & Cards */
.r360-primary-btn {
    width: 100%; background: var(--primary); color: #fff; border: none;
    padding: 13px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 10px;
}
.r360-btn-sm {
    background: var(--primary); color: #fff; border: none; padding: 5px 10px; border-radius: 8px; font-size: 12px; cursor: pointer;
}
.r360-btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--border); background: var(--card); color: var(--text);
    padding: 9px 14px; border-radius: 10px; text-decoration: none; font-size: 13px; cursor: pointer;
}
.r360-action-card {
    width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--text);
    padding: 16px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 15px; font-weight: 700; cursor: pointer; margin-bottom: 12px;
}
.r360-action-card.column { flex-direction: column; cursor: default; }
.r360-bill-btns { display: flex; gap: 10px; width: 100%; margin-top: 8px; }
.r360-bill-btn {
    flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--bg); color: var(--text); font-weight: 600; cursor: pointer;
}

/* Booking & Info */
.r360-booking-card, .r360-info-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px;
}
.r360-quick-contact { display: flex; gap: 10px; margin-bottom: 12px; }
.r360-quick-contact a { flex: 1; }
#r360-booking-form input, #r360-list-notes {
    width: 100%; padding: 10px; margin-bottom: 10px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit;
}
.r360-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.r360-wifi-box {
    background: var(--bg); padding: 12px; border-radius: 10px; margin: 14px 0; border: 1px dashed var(--border);
}
.r360-info-actions { display: flex; gap: 10px; margin-top: 14px; }
.r360-info-actions > * { flex: 1; }

/* List Tab */
.r360-list-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--card); border: 1px solid var(--border); padding: 10px 12px; border-radius: 12px; margin-bottom: 8px;
}
.r360-qty-box { display: flex; align-items: center; gap: 8px; }
.r360-qty-btn {
    width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg); color: var(--text); font-weight: 700; cursor: pointer;
}
.r360-list-total {
    display: flex; justify-content: space-between; font-size: 16px; padding: 12px 0; border-top: 1px solid var(--border);
}

/* Modal */
.r360-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 60;
    display: flex; align-items: flex-end; justify-content: center;
}
.r360-modal-content {
    background: var(--card); width: 100%; max-width: 480px; max-height: 90vh;
    overflow-y: auto; border-radius: 20px 20px 0 0; padding: 18px; position: relative;
}
.r360-modal-close {
    position: absolute; top: 14px; right: 14px; background: var(--bg); border: 1px solid var(--border);
    color: var(--text); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; z-index: 5;
}
.r360-gallery-slider {
    display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 12px;
}
.r360-gallery-slider img {
    width: 100%; height: 220px; object-fit: cover; border-radius: 12px; flex-shrink: 0; scroll-snap-align: start;
}

/* Toast */
.r360-toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
    background: #10b981; color: #fff; padding: 10px 18px; border-radius: 20px;
    font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.25s; z-index: 90;
}
.r360-toast.show { opacity: 1; }
