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

:root {
  --primary: #FF4500;
  --primary-dark: #cc3700;
  --secondary: #FF8C00;
  --accent: #FFD700;
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --card: #1e1e35;
  --card2: #252545;
  --text: #ffffff;
  --text2: #b0b0cc;
  --text3: #7070a0;
  --success: #00e676;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 18px;
  --radius-sm: 10px;
}

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

html, body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
html[lang="en"], html[lang="en"] body {
  font-family: 'Inter', 'Cairo', sans-serif;
}

/* ===== SPLASH ===== */
/*.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a0a00 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 30px;
}
.splash-icon { font-size: 80px; animation: pulse 1s infinite; }
.splash-title { font-size: 32px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.splash-sub { color: var(--text2); font-size: 15px; }
*/

/* ===== SPLASH ===== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a0a00 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.splash-logo {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers items horizontally */
    justify-content: center; /* Centers items vertically if given height */
    text-align: center;
}

.splash-icon {
    margin-bottom: 15px; /* Adds space between the logo image and the text */
    animation: pulse 1s infinite;
}

.splash-title {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.splash-sub {
    color: var(--text2);
    font-size: 15px;
}

.loader-bar { width: 200px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.loader-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 4px; animation: load 2s ease-in-out forwards; }
@keyframes load { to { width: 100%; } }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }

/* ===== APP CONTAINER ===== */
.app-container {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.location-info { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.loc-icon { font-size: 20px; }
.loc-label { display: block; font-size: 11px; color: var(--text3); }
.loc-name { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.loc-arrow { color: var(--primary); font-size: 18px; }
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative; width: 42px; height: 42px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.icon-btn:active { transform: scale(0.9); }
/* Language toggle - wider to fit text */
.lang-toggle {
  width: auto !important;
  padding: 0 10px;
  font-size: 12px !important;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  gap: 4px;
  white-space: nowrap;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255,69,0,0.15), rgba(255,140,0,0.1)) !important;
  border-color: rgba(255,69,0,0.3) !important;
}
.lang-toggle:hover { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff; }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--primary); color: white;
  font-size: 10px; font-weight: 700; font-family: 'Cairo', sans-serif;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.search-wrap { padding-bottom: 12px; }
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 14px;
}
.search-icon { font-size: 18px; flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: 'Cairo', sans-serif; font-size: 14px;
}
.search-bar input::placeholder { color: var(--text3); }
.filter-btn { background: none; border: none; font-size: 20px; cursor: pointer; }

/* ===== PROMO SLIDER ===== */
.promo-slider { padding: 14px 16px 0; flex-shrink: 0; overflow: hidden; position: relative; }
.promo-track { display: flex; transition: transform 0.4s ease; }
.promo-slide {
  min-width: 100%; height: 130px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; position: relative; overflow: hidden;
}
.slide-1 { background: linear-gradient(135deg, #FF4500, #FF8C00); }
.slide-2 { background: linear-gradient(135deg, #6C3CE1, #3CC8FF); }
.slide-3 { background: linear-gradient(135deg, #00B09B, #96C93D); }
.promo-content { z-index: 1; }
.promo-tag { background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.promo-content h3 { font-size: 17px; font-weight: 900; margin: 6px 0 4px; }
.promo-content p { font-size: 12px; opacity: 0.9; }
.promo-btn { margin-top: 8px; background: white; color: #333; border: none; border-radius: 20px; padding: 6px 16px; font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 12px; cursor: pointer; }
.promo-emoji { font-size: 60px; opacity: 0.3; position: absolute; top: 50%; transform: translateY(-50%); }
html[dir="rtl"] .promo-emoji { left: 20px; right: auto; }
html[dir="ltr"] .promo-emoji { right: 20px; left: auto; }
.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.promo-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--border); transition: all 0.3s; }
.promo-dot.active { width: 20px; background: var(--primary); }

/* ===== CATEGORIES ===== */
.category-section { flex-shrink: 0; padding: 14px 0 0; }
.category-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.category-scroll::-webkit-scrollbar { display: none; }
.cat-btn {
  flex-shrink: 0; padding: 8px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 30px; color: var(--text2);
  font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.3s; white-space: nowrap;
}
.cat-btn.active, .cat-btn:hover {
  background: var(--primary); border-color: var(--primary);
  color: white; transform: scale(1.05);
}

/* ===== MAIN SCROLL ===== */
.main-scroll { flex: 1; overflow-y: auto; padding: 0 16px 80px; scrollbar-width: none; }
.main-scroll::-webkit-scrollbar { display: none; }

/* ===== SECTIONS ===== */
.section { margin-top: 20px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 16px; font-weight: 800; }
.see-all { color: var(--primary); font-size: 13px; font-weight: 600; text-decoration: none; }

/* ===== STORE CARDS (GRID) ===== */
.stores-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.store-card-grid {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.store-card-grid:active { transform: scale(0.97); }
.card-img { height: 100px; width: 100%; object-fit: cover; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.card-body { padding: 10px; }
.card-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.card-tag { font-size: 10px; color: var(--text3); }
.card-rating { font-size: 11px; color: var(--accent); }
.fav-btn-card {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; background: rgba(0,0,0,0.5);
  border: none; border-radius: 50%; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.fav-btn-card.active { color: red; }
.discount-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--primary); color: white;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px;
}

/* ===== STORE CARDS (LIST) ===== */
.stores-list { display: flex; flex-direction: column; gap: 12px; }
.store-card-list {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  cursor: pointer; transition: transform 0.2s;
}
.store-card-list:active { transform: scale(0.98); }
.list-emoji { font-size: 40px; width: 60px; height: 60px; background: var(--card2); border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-info { flex: 1; }
.list-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.list-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list-tag { font-size: 11px; color: var(--text2); }
.list-badge { background: var(--success); color: var(--bg); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.open-badge { background: var(--success); color: var(--bg); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.closed-badge { background: var(--text3); color: white; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg2); border-top: 1px solid var(--border);
  display: flex; padding: 8px 0 env(safe-area-inset-bottom);
  z-index: 100;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  padding: 6px 0; transition: all 0.2s;
}
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; color: var(--text3); font-family: 'Cairo', sans-serif; }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 6px var(--primary)); }
.nav-item.active .nav-label { color: var(--primary); font-weight: 700; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 500; backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
}
.store-sheet, .cart-sheet {
  width: 100%; background: var(--bg2);
  border-radius: 24px 24px 0 0;
  max-height: 90vh; overflow-y: auto;
  position: relative; scrollbar-width: none;
  animation: slideUp 0.35s ease;
}
.store-sheet::-webkit-scrollbar, .cart-sheet::-webkit-scrollbar { display: none; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 12px auto; }
.close-sheet {
  position: absolute; top: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card2); border: none; font-size: 16px;
  cursor: pointer; color: var(--text); z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
html[dir="rtl"] .close-sheet { left: 16px; right: auto; }
html[dir="ltr"] .close-sheet { right: 16px; left: auto; }

/* STORE SHEET */
.store-header-img { height: 180px; width: 100%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; font-size: 80px; }
.store-sheet-content { padding: 0 16px 30px; }
.store-meta { display: flex; align-items: flex-start; gap: 14px; margin-top: 16px; margin-bottom: 20px; }
.store-logo-wrap { width: 65px; height: 65px; background: var(--card2); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 36px; border: 2px solid var(--border); flex-shrink: 0; }
.store-info-main h2 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.store-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { font-size: 12px; color: var(--text2); }
.menu-categories { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.menu-categories::-webkit-scrollbar { display: none; }
.menu-cat-btn { flex-shrink: 0; padding: 6px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; font-family: 'Cairo', sans-serif; font-size: 12px; color: var(--text2); cursor: pointer; transition: all 0.2s; }
.menu-cat-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.menu-items { display: flex; flex-direction: column; gap: 12px; }
.menu-item {
  display: flex; gap: 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; align-items: center;
}
.item-emoji { font-size: 36px; width: 55px; height: 55px; background: var(--card2); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.item-info { flex: 1; }
.item-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.item-desc { font-size: 11px; color: var(--text3); margin-bottom: 6px; }
.item-price { font-size: 14px; font-weight: 800; color: var(--primary); }
.add-item-btn {
  width: 34px; height: 34px; background: var(--primary);
  border: none; border-radius: 10px; font-size: 20px; color: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s; flex-shrink: 0;
}
.add-item-btn:active { transform: scale(0.85); }

/* Inline quantity controls shown on menu card when item is in cart */
.item-qty-ctrl {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.item-qty-ctrl .qty-btn {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary); border: none; color: white;
  font-size: 18px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.item-qty-ctrl .qty-btn:active { transform: scale(0.85); }
.qty-input {
  width: 36px; height: 30px; text-align: center;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 14px;
  font-weight: 700; padding: 0;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* CART SHEET */
.cart-sheet { padding-bottom: 20px; }
.cart-title { font-size: 18px; font-weight: 800; padding: 0 16px 16px; border-bottom: 1px solid var(--border); }
.cart-items { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; max-height: 40vh; overflow-y: auto; }
.cart-item { display: flex; align-items: center; gap: 12px; }
.cart-item-emoji { font-size: 30px; width: 48px; height: 48px; background: var(--card2); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: 700; }
.cart-item-price { font-size: 12px; color: var(--primary); font-weight: 600; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 28px; height: 28px; border-radius: 8px; background: var(--card2); border: 1px solid var(--border); color: var(--text); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-num { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-footer { padding: 12px 16px 0; border-top: 1px solid var(--border); }
.cart-summary { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); }
.total-row { font-size: 16px; font-weight: 800; color: var(--text); padding-top: 8px; border-top: 1px solid var(--border); }
.checkout-btn {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none; border-radius: var(--radius); color: white;
  font-family: 'Cairo', sans-serif; font-size: 16px; font-weight: 800;
  cursor: pointer; transition: opacity 0.2s;
}
.checkout-btn:active { opacity: 0.85; }

/* SUCCESS OVERLAY */
.success-overlay {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 999; display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.success-box { text-align: center; padding: 30px; max-width: 360px; width: 100%; }
.success-anim { font-size: 80px; animation: bounceIn 0.6s ease; margin-bottom: 16px; }
@keyframes bounceIn { 0%{transform:scale(0)} 70%{transform:scale(1.2)} 100%{transform:scale(1)} }
.success-box h2 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.success-box p { color: var(--text2); margin-bottom: 16px; }
.eta-display { font-size: 40px; font-weight: 900; color: var(--primary); margin-bottom: 24px; }
.order-tracker { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.track-step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.track-step span { font-size: 24px; }
.track-step small { font-size: 10px; color: var(--text3); }
.track-step.active small { color: var(--primary); font-weight: 700; }
.track-line { flex: 1; height: 2px; background: var(--border); margin: 0 6px; min-width: 24px; }
.back-home-btn {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none; border-radius: var(--radius); color: white;
  font-family: 'Cairo', sans-serif; font-size: 16px; font-weight: 800;
  cursor: pointer;
}

/* ===== PAGES ===== */
.page-view {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 200; overflow-y: auto; padding-bottom: 80px;
  animation: slideIn 0.3s ease;
  display: none;
}
.page-view.active { display: block; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.page-header { padding: 50px 16px 20px; background: var(--bg2); border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 22px; font-weight: 900; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-sub { font-size: 14px; color: var(--text3); }

/* ORDERS PAGE */
.orders-list { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.order-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-store { font-size: 14px; font-weight: 700; }
.order-status { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 12px; }
.status-delivered { background: rgba(0,230,118,0.15); color: var(--success); }
.status-on-way { background: rgba(255,140,0,0.15); color: var(--secondary); }
.status-preparing { background: rgba(255,69,0,0.15); color: var(--primary); }
.order-items-text { font-size: 12px; color: var(--text3); margin-bottom: 8px; }
.order-bottom { display: flex; justify-content: space-between; align-items: center; }
.order-total { font-size: 14px; font-weight: 800; color: var(--primary); }
.order-date { font-size: 11px; color: var(--text3); }
.reorder-btn { background: var(--primary); color: white; border: none; border-radius: 10px; padding: 6px 14px; font-family: 'Cairo', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; }

/* PROFILE PAGE */
.profile-hero { background: linear-gradient(135deg, var(--primary), var(--secondary)); padding: 50px 16px 24px; text-align: center; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,0.2); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 40px; border: 3px solid rgba(255,255,255,0.3); }
.profile-name { font-size: 20px; font-weight: 800; }
.profile-phone { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.profile-menu { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.profile-menu-item { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: opacity 0.2s; }
.profile-menu-item:active { opacity: 0.7; }
.menu-item-icon { font-size: 22px; width: 36px; text-align: center; }
.menu-item-label { flex: 1; font-size: 14px; font-weight: 600; }
.menu-item-arrow { color: var(--text3); font-size: 14px; }

/* TOAST */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--card2); color: white; padding: 12px 24px;
  border-radius: 30px; font-size: 13px; font-weight: 600;
  z-index: 9999; animation: toastIn 0.3s ease;
  border: 1px solid var(--border); white-space: nowrap;
}
@keyframes toastIn { from{opacity:0;transform:translate(-50%,20px)} to{opacity:1;transform:translate(-50%,0)} }
@keyframes shakeX { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }

/* ===== ONBOARDING ===== */
.onboarding-screen {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--bg); display: flex; flex-direction: column;
  overflow: hidden;
}
.ob-slides { flex: 1; display: flex; overflow: hidden; position: relative; }
.ob-slide {
  min-width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 32px; text-align: center;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}
.ob-slide-1 { background: linear-gradient(160deg,#0f0f1a 60%,#1a0800); }
.ob-slide-2 { background: linear-gradient(160deg,#0f0f1a 60%,#0a001a); }
.ob-slide-3 { background: linear-gradient(160deg,#0f0f1a 60%,#001a10); }
.ob-illus {
  font-size: 110px; margin-bottom: 24px;
  animation: floatBob 3s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(255,69,0,0.3));
}
@keyframes floatBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.ob-title { font-size: 26px; font-weight: 900; margin-bottom: 12px; line-height: 1.2; }
.ob-sub { font-size: 15px; color: var(--text2); line-height: 1.6; max-width: 280px; }
.ob-footer { padding: 24px 24px 40px; flex-shrink: 0; }
.ob-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 24px; }
.ob-dot { width: 7px; height: 7px; border-radius: 4px; background: var(--border); transition: all 0.35s; }
.ob-dot.active { width: 24px; background: var(--primary); }
.ob-btn {
  width: 100%; padding: 17px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-family: 'Cairo',sans-serif; font-size: 17px;
  font-weight: 800; cursor: pointer; transition: opacity 0.2s;
  box-shadow: 0 8px 24px rgba(255,69,0,0.35);
}
.ob-btn:active { opacity: 0.85; }
.ob-skip {
  display: block; text-align: center; margin-top: 14px;
  font-size: 13px; color: var(--text3); cursor: pointer; padding: 6px;
}
.ob-skip:hover { color: var(--primary); }

/* ===== LOGIN / OTP ===== */
.auth-screen {
  position: fixed; inset: 0; z-index: 9997;
  background: var(--bg); display: flex; flex-direction: column;
  overflow-y: auto;
}
/*.auth-hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 60px 24px 40px; text-align: center; position: relative;
}*/
.auth-hero {
    /*background: linear-gradient(135deg, var(--primary), var(--secondary));*/
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 0; /* Adjust spacing as needed */
}
.auth-hero-icon { font-size: 70px; margin-bottom: 12px; }
.auth-hero h1 { font-size: 26px; font-weight: 900; }
.auth-hero p { font-size: 14px; opacity: 0.9; margin-top: 6px; }
.auth-body { padding: 30px 24px; flex: 1; }
.auth-label { font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 8px; display: block; }
.auth-input-wrap { position: relative; margin-bottom: 20px; }
.auth-prefix {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--text2); font-weight: 700;
  padding: 0 14px;
}
html[dir="rtl"] .auth-prefix { right: 0; left: auto; }
html[dir="ltr"] .auth-prefix { left: 0; right: auto; }
.auth-input {
  width: 100%; padding: 15px 14px; /*background: var(--card);*/
  border: 1.5px solid var(--border); border-radius: 14px;
  /*color: var(--text);*/
  font-family: 'Cairo',sans-serif; font-size: 16px;
  transition: border-color 0.2s; outline: none;
}
.auth-input.has-prefix { padding-right: 56px; }
html[dir="ltr"] .auth-input.has-prefix { padding-left: 56px; padding-right: 14px; }
.auth-input:focus { border-color: var(--primary); }
.auth-btn {
  width: 100%; padding: 16px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-family: 'Cairo',sans-serif; font-size: 16px;
  font-weight: 800; cursor: pointer; margin-top: 8px;
  box-shadow: 0 6px 20px rgba(255,69,0,0.3);
}
.auth-divider { text-align: center; color: var(--text3); font-size: 13px; margin: 20px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content:''; position: absolute; top: 50%; width: 38%; height: 1px;
  background: var(--border);
}
html[dir="rtl"] .auth-divider::before { right: 0; }
html[dir="rtl"] .auth-divider::after { left: 0; }
html[dir="ltr"] .auth-divider::before { left: 0; }
html[dir="ltr"] .auth-divider::after { right: 0; }
.social-btns { display: flex; gap: 12px; }
.social-btn {
  flex: 1; padding: 13px; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 14px; font-family: 'Cairo',sans-serif; font-size: 14px;
  font-weight: 700; color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
/* OTP boxes */
.otp-boxes { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.otp-box {
  width: 52px; height: 58px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: 14px;
  font-size: 24px; font-weight: 900; text-align: center; color: var(--text);
  font-family: 'Cairo',sans-serif; transition: border-color 0.2s; outline: none;
}
.otp-box:focus { border-color: var(--primary); }
.otp-resend { text-align: center; font-size: 13px; color: var(--text3); margin-top: 14px; }
.otp-resend span { color: var(--primary); font-weight: 700; cursor: pointer; }
.auth-back {
  position: absolute; top: 18px; background: rgba(255,255,255,0.2);
  border: none; border-radius: 10px; padding: 6px 12px;
  color: white; font-size: 14px; cursor: pointer;
}
html[dir="rtl"] .auth-back { right: 16px; }
html[dir="ltr"] .auth-back { left: 16px; }

/* ===== NOTIFICATIONS PANEL ===== */
.notif-panel {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: flex-end;
}
.notif-sheet {
  width: min(340px, 95vw); height: 100%;
  background: var(--bg2); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  animation: slideFromRight 0.3s ease;
  overflow: hidden;
}
html[dir="rtl"] .notif-sheet { border-left: none; border-right: 1px solid var(--border); animation: slideFromLeft 0.3s ease; }
@keyframes slideFromRight { from{transform:translateX(100%)} to{transform:translateX(0)} }
@keyframes slideFromLeft { from{transform:translateX(-100%)} to{transform:translateX(0)} }
.notif-header {
  padding: 50px 16px 16px; background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: space-between;
}
.notif-header h2 { font-size: 18px; font-weight: 800; }
.notif-close { background: rgba(255,255,255,0.2); border: none; border-radius: 10px; width: 32px; height: 32px; color: white; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.notif-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  display: flex; gap: 12px; padding: 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: opacity 0.2s; position: relative;
}
.notif-item.unread { border-color: rgba(255,69,0,0.3); background: rgba(255,69,0,0.05); }
.notif-icon-wrap { font-size: 26px; width: 44px; height: 44px; background: var(--card2); border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-text { flex: 1; }
.notif-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.notif-body { font-size: 12px; color: var(--text2); line-height: 1.4; }
.notif-time { font-size: 10px; color: var(--text3); margin-top: 4px; }
.notif-dot-new { position: absolute; top: 10px; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }
html[dir="rtl"] .notif-dot-new { left: 10px; }
html[dir="ltr"] .notif-dot-new { right: 10px; }

/* ===== LOCATION PICKER ===== */
.location-modal {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
}
.location-sheet {
  width: 100%; background: var(--bg2);
  border-radius: 24px 24px 0 0;
  animation: slideUp 0.35s ease;
  padding-bottom: 30px;
  max-height: 75vh; overflow-y: auto;
}
.location-map-preview {
  height: 160px; background: linear-gradient(135deg, #0d1b2a, #1a2d4a);
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; position: relative; border-radius: 24px 24px 0 0;
}
.location-map-preview::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.05)' stroke-width='1'%3E%3Cpath d='M0 30h60M30 0v60'/%3E%3C/g%3E%3C/svg%3E");
}
.location-pin { position: absolute; font-size: 48px; animation: pinBounce 1s ease-in-out infinite; z-index: 1; }
@keyframes pinBounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.location-body { padding: 20px 16px; }
.location-body h2 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.location-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.zone-btn {
  padding: 14px 10px; background: var(--card); border: 1.5px solid var(--border);
  border-radius: 14px; text-align: center; cursor: pointer; transition: all 0.2s;
  font-family: 'Cairo',sans-serif;
}
.zone-btn:hover, .zone-btn.selected { border-color: var(--primary); background: rgba(255,69,0,0.1); }
.zone-icon { font-size: 28px; margin-bottom: 6px; }
.zone-name { font-size: 13px; font-weight: 700; color: var(--text); }
.zone-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }
.location-confirm-btn {
  width: 100%; padding: 15px; background: linear-gradient(135deg,var(--primary),var(--secondary));
  border: none; border-radius: var(--radius); color: white;
  font-family: 'Cairo',sans-serif; font-size: 15px; font-weight: 800; cursor: pointer;
}

/* ===== CHECKOUT FLOW ===== */
.checkout-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: var(--bg); display: flex; flex-direction: column;
  animation: slideUp 0.3s ease;
}
.checkout-header {
  background: var(--bg2); padding: 50px 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
}
.checkout-back { background: var(--card); border: none; border-radius: 10px; width: 36px; height: 36px; color: var(--text); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.checkout-title { font-size: 18px; font-weight: 800; flex: 1; }
.checkout-steps { display: flex; gap: 6px; align-items: center; padding: 14px 16px 0; }
.c-step { flex: 1; height: 4px; background: var(--border); border-radius: 2px; transition: background 0.3s; }
.c-step.done { background: var(--success); }
.c-step.active { background: var(--primary); }
.checkout-body { flex: 1; overflow-y: auto; padding: 20px 16px 100px; }
.c-section-title { font-size: 14px; font-weight: 800; color: var(--text2); margin: 20px 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }
/* Address step */
.address-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.address-opt {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.address-opt.selected { border-color: var(--primary); background: rgba(255,69,0,0.08); }
.addr-icon { font-size: 28px; }
.addr-info { flex: 1; }
.addr-label { font-size: 14px; font-weight: 700; }
.addr-detail { font-size: 12px; color: var(--text3); margin-top: 2px; }
.addr-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.address-opt.selected .addr-radio { border-color: var(--primary); background: var(--primary); }
.address-opt.selected .addr-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: white; }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%; padding: 12px 14px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: 12px;
  color: var(--text); font-family: 'Cairo',sans-serif; font-size: 14px; outline: none;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--primary); }
/* Payment step */
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-opt {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
}
.payment-opt.selected { border-color: var(--primary); background: rgba(255,69,0,0.08); }
.pay-icon { font-size: 30px; }
.pay-info { flex: 1; }
.pay-label { font-size: 14px; font-weight: 700; }
.pay-sub { font-size: 12px; color: var(--text3); }
/* Promo code */
.promo-input-wrap { display: flex; gap: 8px; margin-top: 16px; }
.promo-code-input {
  flex: 1; padding: 12px 14px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: 12px;
  color: var(--text); font-family: 'Cairo',sans-serif; font-size: 14px;
  outline: none; letter-spacing: 2px; text-transform: uppercase;
}
.promo-code-input:focus { border-color: var(--primary); }
.promo-apply-btn {
  padding: 12px 18px; background: var(--primary); border: none;
  border-radius: 12px; color: white; font-family: 'Cairo',sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.promo-result { margin-top: 10px; padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; display: none; }
.promo-result.success { background: rgba(0,230,118,0.1); color: var(--success); border: 1px solid rgba(0,230,118,0.2); }
.promo-result.error { background: rgba(255,69,0,0.1); color: var(--primary); border: 1px solid rgba(255,69,0,0.2); }
/* Order review step */
.review-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.review-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.review-item-left { display: flex; align-items: center; gap: 10px; }
.review-item-emoji { font-size: 26px; }
.review-item-name { font-size: 13px; font-weight: 700; }
.review-item-qty { font-size: 11px; color: var(--text3); }
.review-item-price { font-size: 14px; font-weight: 800; color: var(--primary); }
.review-totals { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.review-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.review-row.final { font-size: 16px; font-weight: 800; color: var(--text); padding-top: 10px; border-top: 1px solid var(--border); margin-bottom: 0; }
.review-row .discount-val { color: var(--success); }
.checkout-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 14px 16px 30px; background: var(--bg2);
  border-top: 1px solid var(--border);
}
.checkout-next-btn {
  width: 100%; padding: 16px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-family: 'Cairo',sans-serif; font-size: 16px;
  font-weight: 800; cursor: pointer; transition: opacity 0.2s;
  box-shadow: 0 6px 20px rgba(255,69,0,0.3);
}

/* ===== RATING MODAL ===== */
.rating-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.rating-box {
  background: var(--bg2); border-radius: 24px;
  padding: 28px 24px; width: 100%; max-width: 360px;
  border: 1px solid var(--border);
  animation: bounceIn 0.4s ease;
}
.rating-store { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.rating-store-icon { font-size: 40px; width: 60px; height: 60px; background: var(--card); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.rating-store-name { font-size: 16px; font-weight: 800; }
.rating-store-sub { font-size: 12px; color: var(--text3); }
.rating-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.stars-row { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.star-btn { font-size: 38px; cursor: pointer; transition: transform 0.2s; filter: grayscale(1) opacity(0.4); }
.star-btn.active { filter: none; transform: scale(1.15); }
.rating-comment {
  width: 100%; padding: 12px; background: var(--card);
  border: 1.5px solid var(--border); border-radius: 12px;
  color: var(--text); font-family: 'Cairo',sans-serif; font-size: 14px;
  resize: none; outline: none; margin-bottom: 16px;
}
.rating-comment:focus { border-color: var(--primary); }
.rating-submit {
  width: 100%; padding: 15px; background: linear-gradient(135deg,var(--primary),var(--secondary));
  border: none; border-radius: var(--radius); color: white;
  font-family: 'Cairo',sans-serif; font-size: 15px; font-weight: 800; cursor: pointer;
}
.rating-skip { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--text3); cursor: pointer; }

/* Fix text colors inside delivery input boxes */
#addressLabelInput,
.delivery-location-input,
input[name="Label"],
#regAddressLabel {
    color: #111111 !important; /* Deep, legible text contrast */
    background-color: #ffffff !important;
    font-weight: 600 !important;
}

    /* Ensure placeholder values are legible */
    #addressLabelInput::placeholder,
    .delivery-location-input::placeholder {
        color: #666666 !important;
    }