/* ========================================================
   ملك الفطائر (Pie King) - Modern Flat Design System
   Font: Tajawal | Flat Colors | Reduced Border Curves
   ======================================================== */

:root {
  /* Modern Flat Palette */
  --primary: #d97706;          /* Amber 600 */
  --primary-hover: #b45309;    /* Amber 700 */
  --primary-subtle: #fef3c7;   /* Amber 100 */
  --primary-text: #ffffff;
  --primary-2: #fef3c7;

  --accent: #0f172a;           /* Dark Slate 900 */
  --accent-hover: #1e293b;     /* Dark Slate 800 */
  --accent-subtle: #f1f5f9;

  --bg: #f8fafc;               /* Clean soft flat background */
  --paper: #ffffff;            /* Pure white surface */
  --paper-solid: #ffffff;
  --paper-subtle: #f8fafc;

  --text: #0f172a;             /* High contrast dark slate */
  --muted: #64748b;            /* Refined slate 500 */
  --line: #e2e8f0;             /* Clean subtle border */
  --line-focus: #d97706;

  /* Modern Flat Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 14px 28px -4px rgba(15, 23, 42, 0.10);

  /* Reduced Border Curves (Max 12-14px) */
  --radius: 12px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 14px;

  --font: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base Themes: Unified Modern Flat Colors (No Gradients) */
body.theme-royal {
  --primary: #d97706; --primary-hover: #b45309; --primary-subtle: #fef3c7;
  --accent: #0f172a; --bg: #f8fafc; --paper: #ffffff; --paper-solid: #ffffff;
  --text: #0f172a; --muted: #64748b; --line: #e2e8f0;
}
body.theme-night {
  --primary: #f59e0b; --primary-hover: #d97706; --primary-subtle: #292524;
  --accent: #ffffff; --bg: #0c0a09; --paper: #1c1917; --paper-solid: #1c1917;
  --text: #fafaf9; --muted: #a8a29e; --line: #292524;
}
body.theme-fresh {
  --primary: #059669; --primary-hover: #047857; --primary-subtle: #d1fae5;
  --accent: #064e3b; --bg: #f0fdf4; --paper: #ffffff; --paper-solid: #ffffff;
  --text: #064e3b; --muted: #047857; --line: #e2e8f0;
}
body.theme-berry {
  --primary: #e11d48; --primary-hover: #be123c; --primary-subtle: #ffe4e6;
  --accent: #881337; --bg: #fff1f2; --paper: #ffffff; --paper-solid: #ffffff;
  --text: #881337; --muted: #be123c; --line: #e2e8f0;
}
body.theme-coffee {
  --primary: #b45309; --primary-hover: #92400e; --primary-subtle: #fef3c7;
  --accent: #451a03; --bg: #fffbeb; --paper: #ffffff; --paper-solid: #ffffff;
  --text: #451a03; --muted: #78350f; --line: #e2e8f0;
}
body.theme-ice {
  --primary: #0284c7; --primary-hover: #0369a1; --primary-subtle: #e0f2fe;
  --accent: #0c4a6e; --bg: #f0f9ff; --paper: #ffffff; --paper-solid: #ffffff;
  --text: #0c4a6e; --muted: #0369a1; --line: #e2e8f0;
}
body.theme-classic {
  --primary: #18181b; --primary-hover: #27272a; --primary-subtle: #f4f4f5;
  --accent: #18181b; --bg: #fafafa; --paper: #ffffff; --paper-solid: #ffffff;
  --text: #18181b; --muted: #71717a; --line: #e4e4e7;
}
body.theme-neon {
  --primary: #7c3aed; --primary-hover: #6d28d9; --primary-subtle: #ede9fe;
  --accent: #4c1d95; --bg: #0f172a; --paper: #1e293b; --paper-solid: #1e293b;
  --text: #f8fafc; --muted: #94a3b8; --line: #334155;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::selection {
  background-color: var(--primary);
  color: #fff;
}
button, input, textarea, select {
  font-family: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}

/* Ambient Subtle Background */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-color: var(--bg);
}

/* Flat Panel Surface */
.glass-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

/* App Shell Container */
.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 60px;
}

/* ========================================================
   Topbar (Flat, Crisp, 12px Radius)
   ======================================================== */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper-subtle);
  border: 1px solid var(--line);
}
.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}
.brand-logo-image[hidden] {
  display: none !important;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--primary-text);
  font-weight: 900;
  font-size: 1.15rem;
  background-color: var(--accent);
}
.brand strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 1px;
}

/* Topbar Actions */
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.ghost-btn, .admin-link, .cart-btn, .primary-btn, .hero-order-btn {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.ghost-btn, .admin-link {
  background: var(--paper-subtle);
  color: var(--text);
  border-color: var(--line);
}
.ghost-btn:hover, .admin-link:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.ghost-btn:active, .admin-link:active {
  transform: scale(0.98);
}
.cart-btn, .primary-btn, .hero-order-btn {
  background-color: var(--primary);
  color: var(--primary-text);
  box-shadow: var(--shadow-sm);
}
.cart-btn:hover, .primary-btn:hover, .hero-order-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.cart-btn:active, .primary-btn:active, .hero-order-btn:active {
  transform: scale(0.98);
}
.cart-btn span {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background-color: rgba(0, 0, 0, 0.18);
  font-weight: 800;
  font-size: 0.82rem;
}
.primary-btn.full, .ghost-btn.full {
  width: 100%;
}

/* ========================================================
   Hero Section (Modern Flat & Rich Food Visuals)
   ======================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  align-items: stretch;
  margin: 24px 0 20px;
}
.hero-copy {
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 42px);
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-logo-box {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  padding: 6px;
  background: var(--paper-subtle);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.hero-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.eyebrow {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text);
  margin: 8px 0 14px;
  letter-spacing: -0.5px;
}
h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.hero-copy p {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  max-width: 680px;
  line-height: 1.8;
  font-weight: 500;
}
.hero-controls {
  position: relative;
  margin-top: 20px;
}
.search-box {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-subtle);
}
.search-box span {
  color: var(--muted);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}
.search-box input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  width: 100%;
  min-height: 48px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Mini Stats (Flat Chips with Icons) */
.mini-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.stat-chip {
  border: 1px solid var(--line);
  background: var(--paper-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease;
}
.stat-chip:hover {
  background-color: #f1f5f9;
}
.stat-chip b {
  color: var(--primary);
  font-weight: 800;
}

/* Daily Offer Hero Card (Modern Flat Dark Slate, Photo & Price) */
.hero-card {
  min-height: 340px;
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
  background-color: var(--accent);
  color: #ffffff;
  border: 1px solid #1e293b;
  box-shadow: var(--shadow-lg);
}
.hero-card-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.hero-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.6s ease;
}
.hero-card:hover .hero-card-img-wrap img {
  transform: scale(1.06);
}
.hero-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.95) 85%);
}
.hero-card > *:not(.hero-card-img-wrap):not(.hero-card-overlay) {
  position: relative;
  z-index: 3;
}
.hero-card-badge {
  background-color: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  width: fit-content;
  margin-bottom: 8px;
}
.hero-card strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  margin: 6px 0;
  color: #ffffff;
  line-height: 1.25;
}
.hero-card p {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 90%;
}
.hero-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.hero-card-price {
  font-size: 1.4rem;
  font-weight: 900;
  color: #f59e0b;
}
.hero-order-btn {
  background-color: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  border: 0;
  min-height: 40px;
  padding: 0 18px;
  font-weight: 800;
}
.hero-order-btn:hover {
  background-color: var(--primary-hover);
}

/* ========================================================
   Trust & Features Strip (لماذا ملك الفطائر؟)
   ======================================================== */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.trust-card {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.trust-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}
.trust-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--primary-subtle);
  color: var(--primary-hover);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.trust-content h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}
.trust-content p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* ========================================================
   Dynamic Promotional Banners (Flat, Crisp 12px)
   ======================================================== */
.banner-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.banner-strip.is-empty {
  display: none;
}
.store-banner {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}
.store-banner:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
}
.store-banner img, .banner-fallback {
  width: 100%;
  height: 100%;
  min-height: 175px;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}
.store-banner-copy {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.store-banner-copy h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}
.store-banner-copy p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 10px;
}
.store-banner-copy .primary-btn {
  width: fit-content;
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

/* ========================================================
   Branches Panel (Flat, Clean, 8px Buttons)
   ======================================================== */
.branch-panel {
  border-radius: var(--radius);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) 1.25fr;
  gap: 16px;
  align-items: center;
  margin: 0 0 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.branch-panel h2 {
  margin-bottom: 4px;
}
.branch-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.branch-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.branch-btn {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--paper-subtle);
  min-height: 42px;
  border-radius: var(--radius-md);
  padding: 0 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.branch-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.branch-btn.active {
  color: var(--primary-text);
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ========================================================
   Category Strip (Thumbnails + Icons + Flat Buttons)
   ======================================================== */
.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 2px 18px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.category-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--paper);
  min-height: 46px;
  border-radius: var(--radius-md);
  padding: 6px 14px 6px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}
.category-btn .cat-thumb {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.category-btn .cat-icon {
  font-size: 1.1rem;
}
.category-btn:hover {
  background-color: var(--paper-subtle);
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category-btn.active {
  color: var(--primary-text);
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.category-btn.active .cat-thumb {
  border-color: rgba(255, 255, 255, 0.4);
}

/* ========================================================
   Section Head (Products Heading & Sort Tools)
   ======================================================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 10px 0 18px;
  border-radius: var(--radius);
  padding: 18px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.section-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.section-tools select {
  min-width: 175px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 12px;
  background: var(--paper);
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.pill {
  border: 1px solid var(--line);
  background: var(--paper-subtle);
  color: var(--muted);
  border-radius: var(--radius-sm);
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ========================================================
   Menu Grid & Food Cards (Rich Images, Zoom & Hover)
   ======================================================== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
body.compact-layout .menu-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.menu-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.menu-card:hover {
  transform: translateY(-4px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-hover);
}
.food-art {
  height: 195px;
  position: relative;
  overflow: hidden;
  background-color: #f1f5f9;
}
.food-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-card:hover .food-art img {
  transform: scale(1.05);
}
.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background-color: var(--paper);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-weight: 800;
  font-size: 0.78rem;
  box-shadow: var(--shadow-sm);
}
.unavailable-tag {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 4;
  background-color: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
}
.menu-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.menu-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.menu-content h3 {
  margin: 8px 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}
.menu-content p {
  margin: 0;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}
.calories-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border: 1px solid #fed7aa;
  background-color: #fff7ed;
  color: #c2410c;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-weight: 700;
  font-size: 0.78rem;
  margin-top: 8px;
}
.product-sizes-select {
  margin-top: 10px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 10px;
  background: var(--paper-subtle);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.price {
  color: var(--primary);
  font-weight: 900;
  font-size: 1.25rem;
}
.add-btn {
  border: 0;
  border-radius: var(--radius-md);
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  background-color: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.add-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}
.add-btn:active {
  transform: scale(0.97);
}
.add-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
  background-color: #cbd5e1;
}
.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  font-weight: 600;
}

/* ========================================================
   Customer Dashboard (Loyalty & Orders)
   ======================================================== */
.customer-dashboard {
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.customer-dashboard-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.loyalty-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.loyalty-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--paper-subtle);
  text-align: center;
}
.loyalty-card span {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
}
.loyalty-card strong {
  display: block;
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 900;
  margin-top: 4px;
}

/* ========================================================
   Cart Drawer (Modern Flat, Crisp 12px)
   ======================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 70;
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.12);
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--line);
}
.cart-drawer.open {
  transform: translateX(0);
}
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 {
  margin: 0 0 2px;
  font-size: 1.25rem;
}
.cart-head small {
  color: var(--muted);
  font-size: 0.82rem;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper-subtle);
  color: var(--text);
  cursor: pointer;
  font-size: 1.4rem;
  display: grid;
  place-items: center;
  transition: background-color 0.2s ease;
}
.icon-btn:hover {
  background-color: #f1f5f9;
}
.cart-items {
  padding: 16px 20px;
  overflow: auto;
  max-height: 32vh;
}
.cart-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--paper-subtle);
  margin-bottom: 10px;
}
.cart-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}
.qty-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.qty-actions button {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.customer-form {
  padding: 8px 20px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  overflow: auto;
}
.customer-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
}
.customer-form .wide {
  grid-column: 1 / -1;
}
.customer-form input, .customer-form select, .customer-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 12px;
  background: var(--paper);
  color: var(--text);
  font-size: 0.88rem;
}
.customer-form textarea {
  padding: 10px 12px;
  resize: vertical;
}
.cart-extra-box {
  margin: 8px 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-subtle);
  display: grid;
  gap: 8px;
}
.coupon-box {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
}
.coupon-box label {
  display: grid;
  gap: 4px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
}
.coupon-box input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 12px;
  background: var(--paper);
}
.coupon-box .ghost-btn {
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.82rem;
}
.cart-footer {
  border-top: 1px solid var(--line);
  padding: 16px 20px 20px;
  display: grid;
  gap: 10px;
  margin-top: auto;
  background: var(--paper);
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.total-row strong {
  color: var(--text);
}
.total-row.discount-row strong {
  color: #16a34a;
}
.total-row.grand {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 900;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.total-row.grand strong {
  color: var(--primary);
  font-size: 1.4rem;
}

/* Overlay & Toast */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.overlay.show {
  opacity: 1;
  visibility: visible;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background-color: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ========================================================
   Store Footer (Modern Flat, Clean Apps Grid)
   ======================================================== */
.store-footer {
  margin: 36px 0 0;
}
.store-footer-main {
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
  gap: 24px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.store-footer-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}
.store-footer-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--radius-md);
  padding: 6px;
  background: var(--paper-subtle);
  border: 1px solid var(--line);
}
.store-footer-brand h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
}
.store-footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.store-social-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.social-link {
  min-height: 90px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  background: var(--paper-subtle);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.social-link:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}
.social-link .social-app-holder {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
}
.social-link .social-app-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.social-link b {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

/* ========================================================
   Responsive Media Queries
   ======================================================== */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 780px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .top-actions > * {
    width: 100%;
    font-size: 0.85rem;
  }
  .branch-panel, .section-head, .store-footer-main, .customer-dashboard {
    grid-template-columns: 1fr;
  }
  .branch-grid {
    justify-content: flex-start;
  }
  .menu-grid {
    grid-template-columns: 1fr;
  }
  .trust-strip {
    grid-template-columns: 1fr;
  }
  .store-banner {
    grid-template-columns: 1fr;
  }
  .store-banner img {
    height: 160px;
    min-height: 160px;
  }
  .store-social-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cart-drawer {
    width: 100vw;
  }
  .customer-form {
    grid-template-columns: 1fr;
  }
}
