/* Payidar Döner — v9 Premium Compact */

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

:root {
  --orange: #FF6B00; --orange-dark: #E85E00;
  --orange-light: #FFF4EC; --orange-pale: #FFFAF5;
  --orange-glow: rgba(255,107,0,.18);
  --green: #22C55E; --green-dark: #16A34A;
  --gold: #F59E0B; --white: #FFFFFF; --bg: #F5F5F7;
  --gray-200: #E8E8ED; --gray-300: #D1D5DB;
  --gray-400: #9CA3AF; --gray-500: #6B7280; --gray-600: #4B5563;
  --gray-900: #111827;
  --shadow-card: 0 2px 8px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.1);
  --shadow-orange: 0 4px 16px rgba(255,107,0,.2);
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px; --r-full: 9999px;
  --ease: cubic-bezier(.25,.1,.25,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --device-w: 393px; --device-h: 852px;
  --statusbar-h: 54px; --tabbar-h: 72px; --cartbar-h: 50px;
  --pad: 16px;
}

html {
  font-family: 'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
  -webkit-font-smoothing: antialiased; background: var(--bg); height: 100%; color: var(--gray-900);
}
body { height: 100%; display: flex; align-items: center; justify-content: center; margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; outline: none; }
button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
img { display: block; max-width: 100%; }

/* ─── Device ─── */
.device {
  position: relative; width: var(--device-w); height: var(--device-h);
  background: var(--white); overflow: hidden; border-radius: 47px;
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.1), 0 0 0 11px #1D1D1F,
    0 0 0 12.5px #3A3A3C, 0 0 0 14px #1D1D1F, 0 20px 60px rgba(0,0,0,.4);
}
.device::before {
  content: ''; position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 126px; height: 36px; background: #000; border-radius: 20px; z-index: 999;
}

/* ─── Status Bar ─── */
.statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: var(--statusbar-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 30px 0; background: var(--white); pointer-events: none;
}
.statusbar-time { font-size: 15px; font-weight: 700; }
.statusbar-icons { display: flex; align-items: center; gap: 5px; }
.statusbar-icons svg { display: block; }

/* ─── Content ─── */
.content {
  position: absolute; top: var(--statusbar-h); left: 0; right: 0; bottom: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; background: var(--bg);
}
.content::-webkit-scrollbar { display: none; }
.scroll-pad { height: calc(var(--tabbar-h) + var(--cartbar-h) + 16px); }

/* ═══════════════════
   HEADER
   ═══════════════════ */
.rest-header {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 18px 10px; background: var(--white);
}
.rest-logo {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 3px 14px var(--orange-glow); border: 2px solid var(--orange-light);
}
.rest-brand { flex: 1; min-width: 0; }
.rest-name { font-size: 26px; font-weight: 900; line-height: .95; letter-spacing: -.6px; }
.rest-tagline { display: block; font-size: 13px; font-weight: 600; color: var(--orange); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.header-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1px solid var(--gray-200); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.03); position: relative; transition: all .15s var(--ease);
}
.header-btn:active { transform: scale(.92); }
.header-btn svg { width: 18px; height: 18px; color: var(--gray-600); }
.notif-dot {
  position: absolute; top: 7px; right: 7px; width: 7px; height: 7px;
  background: var(--orange); border-radius: 50%; border: 1.5px solid var(--white);
}

/* ─── Info Bar ─── */
.info-bar {
  display: flex; align-items: center; justify-content: center;
  padding: 8px var(--pad); background: var(--white); border-bottom: 1px solid var(--gray-200);
}
.info-item { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--gray-600); white-space: nowrap; }
.info-item strong { font-weight: 700; color: var(--gray-900); }
.info-dim { color: var(--gray-400); }
.info-icon { flex-shrink: 0; }
.info-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-300); margin: 0 8px; }

/* ═══════════════════
   LAST ORDER
   ═══════════════════ */
.last-order {
  margin: 10px var(--pad) 0; background: linear-gradient(90deg, var(--white) 55%, #FFF8F0 100%);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  display: flex; overflow: hidden; position: relative;
}
.lo-body {
  flex: 1; padding: 12px 16px; display: flex; flex-direction: column;
  z-index: 2; max-width: 62%;
}
.lo-label { font-size: 11px; font-weight: 600; color: var(--gray-400); }
.lo-items { font-size: 15px; font-weight: 700; line-height: 1.35; margin-top: 3px; }
.lo-date { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.lo-btn {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  padding: 8px 16px; background: linear-gradient(135deg, var(--orange), #FF7A1A);
  color: var(--white); border-radius: var(--r-full); font-size: 12px; font-weight: 700;
  width: fit-content; white-space: nowrap;
  box-shadow: var(--shadow-orange); transition: all .2s var(--ease);
}
.lo-btn:active { transform: scale(.95); }
.lo-btn svg { flex-shrink: 0; width: 13px; height: 13px; }
.lo-img {
  width: 38%; height: 100%; object-fit: cover; position: absolute; right: 0; top: 0; bottom: 0;
  mask-image: linear-gradient(to right, transparent 0%, black 35%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 35%);
}

/* ═══════════════════
   HERO CTA
   ═══════════════════ */
.hero-cta {
  margin: 10px var(--pad) 0; height: 100px;
  background: linear-gradient(120deg, #FF6B00 0%, #FF7E22 40%, #FF4D00 100%);
  border-radius: var(--r-xl); display: flex; align-items: center; overflow: hidden;
  position: relative; cursor: pointer; transition: transform .2s var(--ease);
  box-shadow: var(--shadow-orange);
}
.hero-cta:active { transform: scale(.98); }
.hero-cta::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 60%);
  pointer-events: none;
}
.hero-mascot {
  width: 82px; height: 100%; object-fit: contain; object-position: bottom;
  flex-shrink: 0; margin-left: 8px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.12));
}
.hero-divider { width: 1px; height: 50%; background: rgba(255,255,255,.28); flex-shrink: 0; margin: 0 10px 0 6px; }
.hero-copy { flex: 1; z-index: 1; }
.hero-copy h2 { font-size: 18px; font-weight: 800; color: var(--white); line-height: 1.15; white-space: nowrap; }
.hero-copy p { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.85); line-height: 1.3; margin-top: 3px; }
.hero-arrow {
  width: 40px; height: 40px; border-radius: 50%; background: var(--white); color: var(--orange);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,.08); transition: all .2s var(--ease);
}
.hero-arrow:active { transform: scale(.88); }

/* ═══════════════════════
   CATEGORIES — Pill chips
   ═══════════════════════ */
.categories {
  display: flex; gap: 8px; padding: 10px var(--pad) 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.categories::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: var(--r-md);
  background: var(--white); border: 1.5px solid var(--gray-200);
  font-size: 12px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.03); transition: all .15s var(--ease);
}
.cat-chip:active { transform: scale(.95); }
.cat-chip .cat-emoji { font-size: 16px; line-height: 1; }
.cat-chip.active { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-light); }

/* ─── Section Headers ─── */
.section-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 6px; }
.section-title { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 5px; letter-spacing: -.2px; }
.section-icon { font-size: 15px; }
.section-link { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--orange); }
.section-link:active { opacity: .6; }

/* ═══════════════════
   DEAL CARD
   ═══════════════════ */
.deal-card {
  margin: 0 var(--pad); background: var(--white); border-radius: var(--r-lg);
  border: 1.5px dashed var(--orange); display: flex; overflow: hidden;
  position: relative; cursor: pointer; min-height: 110px;
  transition: transform .15s var(--ease); box-shadow: var(--shadow-card);
}
.deal-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--orange-pale) 0%, transparent 50%); pointer-events: none;
}
.deal-card:active { transform: scale(.98); }
.deal-visual { width: 80px; flex-shrink: 0; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.deal-mascot { width: 70px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.08)); }
.deal-sparkle { position: absolute; color: var(--orange); font-size: 14px; opacity: .5; animation: sparkle 2s ease infinite; }
.s1 { top: 12px; right: 4px; } .s2 { top: 34px; left: 4px; animation-delay: .7s; }
@keyframes sparkle { 0%,100%{opacity:.3;transform:scale(.8)} 50%{opacity:.7;transform:scale(1.1)} }
.deal-info {
  flex: 1; padding: 10px 8px 10px 4px; display: flex; flex-direction: column;
  justify-content: center; z-index: 2; background: var(--white);
}
.deal-badge { display: inline-flex; font-size: 9px; font-weight: 700; color: var(--orange); background: var(--orange-light); padding: 2px 7px; border-radius: var(--r-full); width: fit-content; margin-bottom: 3px; }
.deal-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.deal-sub { font-size: 10px; color: var(--gray-400); margin-top: 1px; }
.deal-price-row { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; }
.deal-price { font-size: 20px; font-weight: 800; color: var(--orange); }
.deal-price span { font-size: 14px; }
.deal-food {
  width: 100px; height: 100%; object-fit: cover; position: absolute; right: 0; top: 0;
  mask-image: linear-gradient(to right, transparent 0%, black 35%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 35%);
}
.deal-add {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--white); color: var(--orange); display: flex; align-items: center;
  justify-content: center; box-shadow: var(--shadow-md); z-index: 2; transition: all .15s var(--ease);
}
.deal-add:active { transform: scale(.85); background: var(--orange); color: var(--white); }

/* ─── Filter Chips ─── */
.chips { display: flex; gap: 7px; padding: 0 18px 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 7px 16px; border-radius: var(--r-full); font-size: 12px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0; background: var(--white); color: var(--gray-500);
  border: 1.5px solid var(--gray-200); transition: all .15s var(--ease);
}
.chip:active { transform: scale(.95); }
.chip.active { background: var(--gray-900); color: var(--white); border-color: var(--gray-900); box-shadow: 0 2px 8px rgba(0,0,0,.1); }

/* ═══════════════════
   PRODUCT CARDS
   ═══════════════════ */
.products { padding: 0 var(--pad); display: flex; flex-direction: column; gap: 10px; }
.prod-card {
  display: flex; background: var(--white); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-card); transition: all .15s var(--ease); cursor: pointer;
}
.prod-card:active { transform: scale(.985); box-shadow: var(--shadow-md); }
.prod-img { width: 115px; min-height: 115px; object-fit: cover; flex-shrink: 0; }
.prod-body { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; }
.prod-name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.prod-desc {
  font-size: 12px; color: var(--gray-500); line-height: 1.35; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prod-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.prod-price { font-size: 18px; font-weight: 800; color: var(--orange); }
.prod-price span { font-size: 14px; font-weight: 700; }
.prod-add {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #FF7A1A); color: var(--white);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: var(--shadow-orange); transition: all .15s var(--ease);
}
.prod-add:active { transform: scale(.85); }
.prod-add.added { background: linear-gradient(135deg, var(--green), #27D465); box-shadow: 0 4px 14px rgba(34,197,94,.2); animation: pop .3s var(--ease-spring); }
@keyframes pop { 0%{transform:scale(.6)} 100%{transform:scale(1)} }

/* ─── Cart Bar ─── */
.cart-bar {
  position: absolute; bottom: var(--tabbar-h); left: 14px; right: 14px;
  height: var(--cartbar-h); background: var(--gray-900); border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5px 0 12px; z-index: 20; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  transition: all .3s var(--ease-out);
}
.cart-bar.hidden { transform: translateY(calc(100% + 20px)); opacity: 0; pointer-events: none; }
.cart-left { display: flex; align-items: center; gap: 8px; }
.cart-icon-wrap {
  position: relative; width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; background: var(--orange); border-radius: 7px; flex-shrink: 0;
}
.cart-icon-wrap svg { width: 14px; height: 14px; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px;
  background: var(--white); color: var(--orange); font-size: 9px; font-weight: 800;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.cart-summary { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8); white-space: nowrap; }
.cart-summary strong { color: var(--white); font-weight: 700; }
.cart-btn {
  display: flex; align-items: center; gap: 3px; padding: 9px 18px;
  background: linear-gradient(135deg, var(--orange), #FF7A1A); color: var(--white);
  border-radius: var(--r-full); font-size: 13px; font-weight: 700; transition: all .15s var(--ease);
}
.cart-btn:active { transform: scale(.95); }

/* ═══════════════════
   TAB BAR
   ═══════════════════ */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: var(--tabbar-h);
  background: var(--white); box-shadow: 0 -3px 16px rgba(0,0,0,.06);
  display: flex; align-items: flex-end; justify-content: space-around; z-index: 30;
  padding: 0 6px 6px; border-radius: 22px 22px 0 0;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--gray-400); transition: color .15s; padding: 6px 0;
}
.tab span { font-size: 10px; font-weight: 600; }
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--orange); }
.tab:active { transform: scale(.88); }
.tab-center { margin-top: -18px; padding: 0; }
.tab-center-icon {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, #FFA733, var(--orange));
  display: flex; align-items: center; justify-content: center; color: var(--white);
  box-shadow: 0 5px 18px var(--orange-glow); border: 3.5px solid var(--white);
  transition: all .15s var(--ease);
}
.tab-center span { font-size: 9px; font-weight: 700; color: var(--orange); margin-top: 2px; }
.tab-center:active .tab-center-icon { transform: scale(.9); }

/* ─── Animations ─── */
@keyframes slideUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }
.anim { animation: slideUp .4s var(--ease-out) both; }
.anim-d1{animation-delay:.03s} .anim-d2{animation-delay:.06s} .anim-d3{animation-delay:.09s}
.anim-d4{animation-delay:.12s} .anim-d5{animation-delay:.15s} .anim-d6{animation-delay:.18s}
.anim-d7{animation-delay:.21s} .anim-d8{animation-delay:.24s} .anim-d9{animation-delay:.27s}

.toast {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%) translateY(-20px);
  padding: 9px 18px; background: var(--gray-900); color: var(--white);
  font-size: 12px; font-weight: 600; border-radius: var(--r-full); box-shadow: var(--shadow-lg);
  opacity: 0; transition: all .3s var(--ease-out); pointer-events: none; z-index: 200; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  html { background: var(--bg); overflow: auto; }
  body { display: block; min-height: 100%; }
  .device { width: 100%; height: 100dvh; min-height: 100vh; border-radius: 0; box-shadow: none; }
  .device::before { display: none; }
  .statusbar { display: none; }
  .content { top: 0; padding-top: env(safe-area-inset-top, 8px); }
  .tabbar { padding-bottom: env(safe-area-inset-bottom, 6px); border-radius: 0; }
}
@media (min-width: 769px) { html { background: #0C0C0E; overflow: hidden; } }
