/* ============================================================
   FOODA — Custom API-Powered Styles
   ============================================================ */

:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fff7ed;
    --secondary: #1e293b;
    --text: #374151;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(249,115,22,0.2);
}

/* ── Global ─────────────────────────────────────────────── */
* { box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--text); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.btn-primary-fooda {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary-fooda:hover { background: var(--primary-dark); transform: translateY(-1px); }
.section-title { font-size: 22px; font-weight: 700; color: var(--secondary); margin-bottom: 20px; }
.section-title span { color: var(--primary); }
.view-all { color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer; }
.view-all:hover { text-decoration: underline; }

/* ── Navbar ─────────────────────────────────────────────── */
.fooda-nav {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
}
.fooda-nav .logo img { height: 40px; }
.fooda-nav .logo span { font-size: 22px; font-weight: 800; color: var(--primary); }
.nav-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}
.nav-search input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 10px 20px 10px 44px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.nav-search input:focus { border-color: var(--primary); }
.nav-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}
.nav-actions { display: flex; align-items: center; gap: 16px; }
.cart-btn {
    position: relative;
    background: var(--primary-light);
    border: none;
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.cart-count {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.nav-user-btn {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
}
.nav-user-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Hero / Search Banner ───────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('img/hero-bg-pattern.png') center/cover;
    opacity: 0.05;
}
.hero-title { font-size: 36px; font-weight: 800; color: var(--secondary); margin-bottom: 8px; }
.hero-subtitle { color: var(--text-light); margin-bottom: 28px; font-size: 16px; }
.hero-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.hero-search input {
    width: 100%;
    border: 2px solid var(--primary);
    border-radius: 50px;
    padding: 16px 60px 16px 24px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 4px 20px rgba(249,115,22,0.15);
}
.hero-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

/* ── Category Circles ───────────────────────────────────── */
.categories-section { padding: 30px 0; background: #fff; }
.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.category-item:hover { transform: translateY(-4px); }
.category-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 3px solid var(--border);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.category-item:hover .category-circle {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(249,115,22,0.25);
}
.category-circle img { width: 100%; height: 100%; object-fit: cover; }
.category-name { font-size: 12px; font-weight: 600; color: var(--text); }

/* ── Food Card ──────────────────────────────────────────── */
.food-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
    height: 100%;
}
.food-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.food-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    position: relative;
}
.food-card-img img { width: 100%; height: 100%; object-fit: cover; }
.food-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}
.food-card-body { padding: 14px; }
.food-card-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; color: var(--secondary); }
.food-card-rest { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.food-card-footer { display: flex; align-items: center; justify-content: space-between; }
.food-price { font-weight: 700; color: var(--primary); font-size: 16px; }
.food-price-old { text-decoration: line-through; color: var(--text-light); font-size: 13px; margin-left: 4px; }
.add-to-cart-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.add-to-cart-btn:hover { background: var(--primary-dark); }
.food-rating { font-size: 12px; color: #f59e0b; }

/* ── Restaurant Card ────────────────────────────────────── */
.rest-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}
.rest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.rest-card-cover { width: 100%; height: 160px; object-fit: cover; }
.rest-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.rest-card-body { padding: 14px; }
.rest-card-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: -30px;
    margin-bottom: 8px;
    background: #fff;
}
.rest-card-logo img { width: 100%; height: 100%; object-fit: cover; }
.rest-card-name { font-weight: 700; font-size: 15px; color: var(--secondary); }
.rest-card-meta { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.rest-badge {
    display: inline-block;
    background: #dcfce7;
    color: #16a34a;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.rest-badge.closed { background: #fee2e2; color: #dc2626; }

/* ── Banner Slider ──────────────────────────────────────── */
.banner-section { padding: 20px 0; }
.banner-slide { border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.banner-slide img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); }

/* ── Section Wrapper ────────────────────────────────────── */
.fooda-section { padding: 40px 0; }
.fooda-section-alt { padding: 40px 0; background: var(--bg); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }

/* ── Cuisine Card ───────────────────────────────────────── */
.cuisine-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.cuisine-card:hover { transform: translateY(-4px); }
.cuisine-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cuisine-card:hover .cuisine-img {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(249,115,22,0.25);
}
.cuisine-img img { width: 100%; height: 100%; object-fit: cover; }
.cuisine-name { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Cart Sidebar ───────────────────────────────────────── */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
}
.cart-overlay.open { display: block; }
.cart-sidebar {
    position: fixed;
    right: -420px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 2001;
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-sidebar.open { right: 0; }
.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-header h3 { font-weight: 700; font-size: 18px; }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-light); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 14px; }
.cart-item-price { color: var(--primary); font-weight: 700; font-size: 14px; }
.cart-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cart-footer { padding: 20px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.checkout-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.checkout-btn:hover { background: var(--primary-dark); }
.cart-empty { text-align: center; padding: 40px 20px; color: var(--text-light); }
.cart-empty i { font-size: 48px; margin-bottom: 12px; display: block; }

/* ── Auth Modal ─────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.auth-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.15);
    position: relative;
}
.auth-modal h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-modal p { color: var(--text-light); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input {
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--primary); }
.auth-submit {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}
.auth-submit:hover { background: var(--primary-dark); }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-light); }
.auth-switch a { color: var(--primary); font-weight: 600; cursor: pointer; }
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Food Detail Modal ──────────────────────────────────── */
.food-modal { max-width: 600px; padding: 0; overflow: hidden; }
.food-modal-img { width: 100%; height: 260px; object-fit: cover; }
.food-modal-body { padding: 24px; }
.food-modal-name { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.food-modal-desc { color: var(--text-light); font-size: 14px; margin-bottom: 16px; }
.food-modal-price { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 20px; }
.qty-control { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.qty-control .qty-btn { width: 36px; height: 36px; font-size: 18px; }
.qty-display { font-size: 18px; font-weight: 700; min-width: 30px; text-align: center; }

/* ── Location Bar ───────────────────────────────────────── */
.location-bar {
    background: var(--primary-light);
    padding: 10px 0;
    border-bottom: 1px solid #fed7aa;
}
.location-bar .location-text { font-size: 14px; color: var(--text); }
.location-bar .location-text i { color: var(--primary); margin-right: 6px; }
.location-bar .change-location { color: var(--primary); font-weight: 600; cursor: pointer; font-size: 13px; }

/* ── Footer ─────────────────────────────────────────────── */
.fooda-footer {
    background: var(--secondary);
    color: #cbd5e1;
    padding: 60px 0 30px;
}
.footer-logo { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--primary); }
.footer-desc { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.footer-heading { color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #94a3b8; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
    cursor: pointer;
}
.social-btn:hover { background: var(--primary); }
.footer-newsletter { display: flex; gap: 8px; margin-top: 12px; }
.footer-newsletter input {
    flex: 1;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 14px;
    outline: none;
}
.footer-newsletter input::placeholder { color: #94a3b8; }
.footer-newsletter button {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}
.app-badges { display: flex; gap: 10px; margin-top: 16px; }
.app-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 8px 14px;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.app-badge:hover { background: var(--primary); }

/* ── Loading Skeleton ───────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton-card { height: 280px; border-radius: var(--radius); }
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-circle { border-radius: 50%; }

/* ── Toast ──────────────────────────────────────────────── */
.fooda-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--secondary);
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.fooda-toast.show { transform: translateY(0); opacity: 1; }
.fooda-toast.success { border-left: 4px solid #22c55e; }
.fooda-toast.error { border-left: 4px solid #ef4444; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-title { font-size: 26px; }
    .cart-sidebar { width: 100%; right: -100%; }
    .nav-search { display: none; }
    .fooda-section, .fooda-section-alt { padding: 28px 0; }
    .category-circle { width: 64px; height: 64px; }
    .cuisine-img { width: 70px; height: 70px; }
}

/* ── Swiper overrides ───────────────────────────────────── */
.swiper-pagination-bullet-active { background: var(--primary) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--primary) !important; }

/* ── Filter Tags ────────────────────────────────────────── */
.filter-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-tag {
    padding: 8px 18px;
    border-radius: 50px;
    border: 2px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: var(--text);
}
.filter-tag.active, .filter-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ── Search Results ─────────────────────────────────────── */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 500;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}
.search-results-dropdown.open { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
}
.search-result-item:hover { background: var(--primary-light); }
.search-result-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.search-result-name { font-weight: 600; font-size: 14px; }
.search-result-sub { font-size: 12px; color: var(--text-light); }

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
    --bg: #0f172a;
    --bg2: #1e293b;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --border: #334155;
    --white: #1e293b;
    --card-bg: #1e293b;
}
[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .fooda-nav,
[data-theme="dark"] .categories-section,
[data-theme="dark"] .food-card,
[data-theme="dark"] .rest-card,
[data-theme="dark"] .auth-modal,
[data-theme="dark"] .cart-sidebar { background: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .fooda-section-alt { background: #0f172a; }
[data-theme="dark"] .nav-search input,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select { background: #0f172a; color: #e2e8f0; border-color: #334155; }
[data-theme="dark"] .filter-tag { background: #1e293b; color: #e2e8f0; border-color: #334155; }
[data-theme="dark"] .filter-tag.active { background: var(--primary); color: #fff; }
[data-theme="dark"] .footer-links a { color: #64748b; }
[data-theme="dark"] .section-title { color: #e2e8f0; }
[data-theme="dark"] .food-card-name,
[data-theme="dark"] .rest-card-name { color: #e2e8f0; }

/* ============================================================
   RTL SUPPORT
   ============================================================ */
[dir="rtl"] .nav-search .search-icon { left: auto; right: 14px; }
[dir="rtl"] .nav-search input { padding: 10px 44px 10px 20px; }
[dir="rtl"] .cart-sidebar { right: auto; left: -420px; }
[dir="rtl"] .cart-sidebar.open { left: 0; right: auto; }
[dir="rtl"] .fooda-toast { right: auto; left: 24px; }
[dir="rtl"] .food-card-badge { left: auto; right: 10px; }
[dir="rtl"] .modal-close { right: auto; left: 16px; }

/* ============================================================
   FLOATING CART
   ============================================================ */
.floating-cart {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary, #f97316);
    color: #fff;
    border-radius: 50px;
    padding: 14px 22px;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(249,115,22,0.4);
    cursor: pointer;
    z-index: 900;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: bounceIn 0.4s ease;
}
.floating-cart:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(249,115,22,0.5); }
.floating-cart .fc-badge {
    background: #fff;
    color: var(--primary, #f97316);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}
[dir="rtl"] .floating-cart { right: auto; left: 24px; }
@keyframes bounceIn { 0%{transform:scale(0.5);opacity:0} 70%{transform:scale(1.05)} 100%{transform:scale(1);opacity:1} }

/* ============================================================
   LOCATION MODAL
   ============================================================ */
.location-modal { max-width: 520px; }
.location-search-results { max-height: 260px; overflow-y: auto; margin-top: 8px; }
.location-result-item {
    padding: 12px 14px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.location-result-item:hover { background: #fff7ed; color: var(--primary, #f97316); }

/* ============================================================
   TRACK ORDER
   ============================================================ */
.track-steps { display: flex; flex-direction: column; gap: 0; }
.track-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
    position: relative;
}
.track-step::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    width: 2px;
    height: calc(100% - 16px);
    background: #e5e7eb;
}
.track-step:last-child::before { display: none; }
.track-step.done::before { background: var(--primary, #f97316); }
.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    z-index: 1;
}
.track-step.done .step-icon { background: var(--primary, #f97316); }
.track-step.active .step-icon { background: var(--primary, #f97316); box-shadow: 0 0 0 4px rgba(249,115,22,0.2); }

/* ============================================================
   CHAT
   ============================================================ */
.chat-container { display: flex; height: 70vh; border-radius: 12px; overflow: hidden; }
.chat-sidebar { width: 280px; border-right: 1px solid var(--border, #e5e7eb); overflow-y: auto; flex-shrink: 0; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 70%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.chat-msg.sent { background: var(--primary, #f97316); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.recv { background: #f3f4f6; color: #374151; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-input-area { padding: 12px; border-top: 1px solid var(--border, #e5e7eb); display: flex; gap: 8px; }
.chat-input-area input { flex: 1; border: 2px solid var(--border, #e5e7eb); border-radius: 50px; padding: 10px 16px; font-size: 14px; outline: none; }
.chat-input-area input:focus { border-color: var(--primary, #f97316); }
.chat-send-btn { background: var(--primary, #f97316); border: none; border-radius: 50%; width: 40px; height: 40px; color: #fff; cursor: pointer; font-size: 16px; }
.conv-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--border, #e5e7eb); transition: background 0.15s; }
.conv-item:hover, .conv-item.active { background: #fff7ed; }
.conv-item-name { font-weight: 600; font-size: 14px; }
.conv-item-last { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* ============================================================
   ADVANCED FILTER PANEL
   ============================================================ */
.filter-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
[data-theme="dark"] .filter-panel { background: #1e293b; }
.filter-panel h6 { font-weight: 700; margin-bottom: 12px; font-size: 14px; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input[type="range"] { flex: 1; accent-color: var(--primary, #f97316); }
.rating-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.rating-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid var(--border, #e5e7eb);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.rating-btn.active, .rating-btn:hover { background: var(--primary, #f97316); border-color: var(--primary, #f97316); color: #fff; }

/* ============================================================
   LOYALTY / WALLET
   ============================================================ */
.wallet-card {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.wallet-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.wallet-balance { font-size: 36px; font-weight: 800; margin: 8px 0; }
.loyalty-card {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border-radius: 16px;
    padding: 24px;
    color: #fff;
}
.points-display { font-size: 36px; font-weight: 800; }

/* ============================================================
   COUPON
   ============================================================ */
.coupon-card {
    border: 2px dashed var(--primary, #f97316);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.coupon-card:hover { background: #fff7ed; }
.coupon-code {
    background: var(--primary, #f97316);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
}
.coupon-applied {
    background: #dcfce7;
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 10px 16px;
    color: #16a34a;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   SOCIAL SHARE
   ============================================================ */
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; }
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }
.share-copy { background: #6b7280; }

/* ============================================================
   LANGUAGE SELECTOR
   ============================================================ */
.lang-dropdown { position: relative; }
.lang-btn {
    background: none;
    border: 2px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text, #374151);
    transition: border-color 0.2s;
}
.lang-btn:hover { border-color: var(--primary, #f97316); }
.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 160px;
    z-index: 500;
    display: none;
    overflow: hidden;
}
[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-menu.open { display: block; }
.lang-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-option:hover { background: #fff7ed; color: var(--primary, #f97316); }
.lang-option.active { font-weight: 700; color: var(--primary, #f97316); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: sticky;
    top: 80px;
}
[data-theme="dark"] .profile-sidebar { background: #1e293b; }
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff7ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 12px;
    border: 3px solid var(--primary, #f97316);
    overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text, #374151);
    transition: all 0.2s;
    text-decoration: none;
    margin-bottom: 4px;
}
.profile-nav-item:hover, .profile-nav-item.active { background: #fff7ed; color: var(--primary, #f97316); }
.profile-nav-item.danger:hover { background: #fef2f2; color: #ef4444; }

/* ============================================================
   ORDER STATUS BADGE
   ============================================================ */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}
.status-pending    { background: #fef3c7; color: #d97706; }
.status-confirmed  { background: #dbeafe; color: #2563eb; }
.status-processing { background: #ede9fe; color: #7c3aed; }
.status-handover   { background: #cffafe; color: #0891b2; }
.status-picked_up  { background: #ffedd5; color: #ea580c; }
.status-delivered  { background: #dcfce7; color: #16a34a; }
.status-canceled   { background: #fee2e2; color: #dc2626; }
.status-failed     { background: #f3f4f6; color: #6b7280; }

/* ============================================================
   REVIEW STARS INPUT
   ============================================================ */
.star-input { display: flex; gap: 4px; }
.star-input span { font-size: 28px; cursor: pointer; color: #d1d5db; transition: color 0.15s; }
.star-input span.active, .star-input span:hover { color: #f59e0b; }

/* ============================================================
   NOTIFICATION BADGE
   ============================================================ */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============================================================
   RESPONSIVE FIXES
   ============================================================ */
@media (max-width: 576px) {
    .floating-cart { bottom: 16px; right: 16px; padding: 12px 16px; font-size: 13px; }
    .chat-container { flex-direction: column; height: 90vh; }
    .chat-sidebar { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border, #e5e7eb); }
    .profile-sidebar { position: static; }
    .wallet-balance, .points-display { font-size: 28px; }
}

/* ── DARK MODE ──────────────────────────────────────────── */
[data-theme="dark"] {
    --primary-light: #431407;
    --bg: #0f172a;
    --white: #1e293b;
    --border: #334155;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --secondary: #f1f5f9;
}
[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .fooda-nav { background: #1e293b; border-bottom: 1px solid #334155; }
[data-theme="dark"] .food-card,
[data-theme="dark"] .rest-card,
[data-theme="dark"] .auth-modal,
[data-theme="dark"] .cart-sidebar { background: #1e293b; }
[data-theme="dark"] .fooda-section-alt { background: #0f172a; }
[data-theme="dark"] .categories-section { background: #1e293b; }
[data-theme="dark"] .nav-search input { background: #334155; color: #e2e8f0; border-color: #475569; }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea { background: #334155; color: #e2e8f0; border-color: #475569; }
[data-theme="dark"] .filter-tag { background: #1e293b; color: #94a3b8; border-color: #334155; }
[data-theme="dark"] .filter-tag.active { background: var(--primary); color: #fff; }
[data-theme="dark"] .fooda-footer { background: #020617; }

/* ── LANGUAGE DROPDOWN ──────────────────────────────────── */
.lang-dropdown { position: relative; }
.lang-btn {
    background: none;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 160px;
    z-index: 500;
    display: none;
    overflow: hidden;
}
.lang-menu.open { display: block; }
.lang-option {
    padding: 11px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}
.lang-option:hover { background: var(--primary-light); }
.lang-option.active { color: var(--primary); font-weight: 600; }
[data-theme="dark"] .lang-menu { background: #1e293b; }
[data-theme="dark"] .lang-btn { color: #e2e8f0; }

/* RTL support */
[dir="rtl"] .fooda-nav .d-flex { flex-direction: row-reverse; }
[dir="rtl"] .nav-search .search-icon { left: auto; right: 14px; }
[dir="rtl"] .nav-search input { padding: 10px 44px 10px 20px; }
[dir="rtl"] .cart-sidebar { right: auto; left: -420px; }
[dir="rtl"] .cart-sidebar.open { left: 0; }
[dir="rtl"] .food-card-badge { left: auto; right: 10px; }
[dir="rtl"] .section-header { flex-direction: row-reverse; }

/* ── COUPON ──────────────────────────────────────────────── */
.coupon-box {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.coupon-input-row { display: flex; gap: 8px; }
.coupon-input-row input {
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.coupon-input-row input:focus { border-color: var(--primary); }
.coupon-apply-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #dcfce7;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 10px;
}
.coupon-applied span { color: #16a34a; font-weight: 600; font-size: 14px; }
.coupon-remove { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 16px; }

/* ── CHAT WIDGET ─────────────────────────────────────────── */
.chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(249,115,22,0.4);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.chat-fab:hover { transform: scale(1.1); }
.chat-widget {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 340px;
    height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    z-index: 1500;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.chat-widget.open { display: flex; }
.chat-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chat-header h5 { margin: 0; font-size: 15px; font-weight: 700; }
.chat-close-btn { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg); }
.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: #fff;
}
.chat-input-row input {
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}
.chat-input-row input:focus { border-color: var(--primary); }
.chat-send-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-theme="dark"] .chat-widget { background: #1e293b; }
[data-theme="dark"] .chat-messages { background: #0f172a; }
[data-theme="dark"] .chat-input-row { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .chat-input-row input { background: #334155; color: #e2e8f0; border-color: #475569; }

/* ── SOCIAL SHARE MODAL ──────────────────────────────────── */
.share-modal { max-width: 380px; }
.share-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; }
.share-btn.fb { background: #1877f2; color: #fff; }
.share-btn.tw { background: #1da1f2; color: #fff; }
.share-btn.wa { background: #25d366; color: #fff; }
.share-btn.tg { background: #0088cc; color: #fff; }
.share-copy-row { display: flex; gap: 8px; }
.share-copy-row input {
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    outline: none;
    color: var(--text-light);
}
.share-copy-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* ── JOIN PAGES ──────────────────────────────────────────── */
.join-hero {
    background: linear-gradient(135deg, #f97316, #ea580c);
    padding: 60px 0;
    color: #fff;
    text-align: center;
}
.join-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.join-hero p { font-size: 18px; opacity: 0.9; }
.join-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: -40px auto 0;
    position: relative;
}
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.step-dot.active { background: var(--primary); color: #fff; }
.step-dot.done { background: #22c55e; color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); max-width: 60px; }
.step-line.done { background: #22c55e; }
