/* ══════════════════════════════════════════════════════════════
   Takeaway Ordering – Customer Frontend Styles
   Three templates: Modern (default), Bold, Classic
   ══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --primary-light: rgba(230, 57, 70, 0.08);
  --primary-glow: rgba(230, 57, 70, 0.15);
  --secondary: #667eea;
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6c757d;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.16);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-full: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-height: 64px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Google Fonts preload ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.header-logo:hover { transform: scale(1.05); }

.header-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.lang-toggle:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }
.lang-toggle:active { transform: translateY(0); }

.account-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}
.account-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }
.account-btn:active { transform: translateY(0); }

.cart-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.45rem 0.85rem 0.45rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  flex-shrink: 0;
}
.cart-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }
.cart-btn:active { transform: translateY(0); }
.cart-btn svg { flex-shrink: 0; }

.cart-count {
  background: #fff;
  color: var(--primary);
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  transition: transform var(--transition-spring);
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero-section {
  position: relative;
  height: 280px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 1.5rem;
  color: #fff;
}

.hero-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border: 3px solid rgba(255,255,255,0.3);
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 0.5rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  font-weight: 400;
}

/* ── Category Nav ────────────────────────────────────────────── */
.category-nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}
.category-nav::-webkit-scrollbar { display: none; }

.category-nav-inner {
  display: flex;
  gap: 0;
  padding: 0 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.cat-tab {
  padding: 0.8rem 1rem;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.cat-tab:hover { color: var(--primary); }
.cat-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Menu ────────────────────────────────────────────────────── */
.menu-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  padding-bottom: 7rem;
}

.category-section {
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.4s ease-out both;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.02em;
  color: var(--text);
}

.items-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

@media (min-width: 560px) {
  .items-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 820px) {
  .items-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ── Item Card ───────────────────────────────────────────────── */
.item-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border-light);
}
.item-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.item-card:active { transform: translateY(-2px); }

.item-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f0f0f0;
  transition: transform 0.5s ease;
}
.item-card:hover .item-image { transform: scale(1.03); }

.item-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f8f8f8, #eeeeee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ddd;
  overflow: hidden;
}

.item-body {
  padding: 0.875rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.item-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.item-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.add-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.25);
}
.add-btn:hover { background: var(--primary-dark); transform: scale(1.1); box-shadow: 0 4px 12px rgba(230, 57, 70, 0.35); }
.add-btn:active { transform: scale(0.95); }

/* Cart badge on item card */
.item-cart-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
  animation: badgePop 0.3s var(--transition-spring);
}

@keyframes badgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ── Cart Drawer ─────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--card-bg);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-header h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.3rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.close-btn:hover { background: var(--bg); color: var(--text); }

/* Checkout Steps */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.25rem;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}
.step.active { opacity: 1; }
.step.done { opacity: 0.65; }
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.3s ease;
}
.step.active .step-num { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(230,57,70,0.3); }
.step.done .step-num { background: var(--primary); color: #fff; }
.step-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.step.active .step-label { color: var(--text); }
.step-line { width: 28px; height: 2px; background: var(--border); margin: 0 0.3rem; transition: background 0.3s; }
.step.done + .step-line { background: var(--primary); }

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  animation: slideUp 0.25s ease-out;
  transition: background var(--transition);
}
.cart-item:hover { background: var(--border-light); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 0.92rem; }
.cart-item-price { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.1rem; }

.qty-controls { display: flex; align-items: center; gap: 0.5rem; }
.qty-btn {
  background: var(--card-bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-weight: 600;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.qty-btn:active { transform: scale(0.92); }
.qty-val { font-weight: 700; min-width: 20px; text-align: center; font-size: 0.95rem; }

.cart-empty { text-align: center; color: var(--text-muted); padding: 3rem 1rem; font-size: 0.92rem; }

.drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
}

/* ── Back Link ───────────────────────────────────────────────── */
.back-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  font-family: inherit;
  transition: all var(--transition);
}
.back-link:hover { opacity: 0.8; }

/* ── Checkout Summary ────────────────────────────────────────── */
.checkout-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  margin-bottom: 1rem;
}
.checkout-summary-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.2rem 0;
}
.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

/* ── Form ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--card-bg);
  font-family: inherit;
  color: var(--text);
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--text-light); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}
.btn:active::after { background: rgba(255,255,255,0.1); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.2);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.3);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 4px rgba(230, 57, 70, 0.2); }
.btn-primary:disabled { background: #d1d5db; cursor: not-allowed; transform: none; box-shadow: none; color: #9ca3af; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline:active { transform: translateY(0); }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; width: auto; display: inline-flex; border-radius: var(--radius-xs); }

/* ── Swish ───────────────────────────────────────────────────── */
.swish-box {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
  border: 1.5px solid #b8d4f0;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.swish-logo {
  font-size: 1.2rem;
  font-weight: 900;
  color: #002f5f;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.swish-label { font-size: 0.75rem; font-weight: 600; color: #4a6fa5; text-transform: uppercase; letter-spacing: 0.06em; }
.swish-number { font-size: 1.75rem; font-weight: 900; color: #002f5f; letter-spacing: 0.04em; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.swish-divider { width: 40px; height: 2px; background: #b8d4f0; margin: 0.75rem auto; }
.swish-amount { font-size: 1.4rem; font-weight: 800; color: #002f5f; margin-top: 0.25rem; }
.swish-instructions { font-size: 0.82rem; color: #4a6fa5; margin-top: 1rem; line-height: 1.5; }

.btn-confirm-pay { background: #002f5f; box-shadow: 0 2px 8px rgba(0,47,95,0.2); }
.btn-confirm-pay:hover { background: #001f3f; box-shadow: 0 4px 16px rgba(0,47,95,0.3); }

.pay-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

/* ── Order Confirmation ──────────────────────────────────────── */
.confirmation-page {
  max-width: 520px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
  animation: fadeInUp 0.5s ease-out;
}

.conf-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
  50% { box-shadow: 0 0 0 12px transparent; }
}

.conf-icon svg {
  animation: drawCheck 0.5s ease-out 0.2s both;
}

@keyframes drawCheck {
  from { stroke-dasharray: 30; stroke-dashoffset: 30; }
  to { stroke-dasharray: 30; stroke-dashoffset: 0; }
}

.conf-sub { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.88rem; }

.order-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary);
  margin: 0.5rem 0;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.status-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  margin: 0.5rem 0;
  transition: all 0.3s ease;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-preparing { background: #fef3c7; color: #92400e; }
.status-ready { background: #d1fae5; color: #065f46; animation: readyPulse 1.5s ease-in-out infinite; }
.status-collected { background: #d1fae5; color: #065f46; }

@keyframes readyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.status-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid var(--border-light);
}
.status-label { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.status-poll-note { font-size: 0.78rem; color: var(--text-light); margin-top: 1rem; }

/* ── Mobile Cart Bar ─────────────────────────────────────────── */
.mobile-cart-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.875rem 1.25rem;
  z-index: 95;
  cursor: pointer;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  transition: transform var(--transition-spring);
}
.mobile-cart-bar:active { transform: scale(0.98); }

.mcb-info { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; }
.mcb-count {
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
}
.mcb-total { font-weight: 800; font-size: 1.05rem; }

/* ── Loading / Error ─────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9rem;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #991b1b;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.2s ease;
}

/* ── Closed Notice ───────────────────────────────────────────── */
.closed-notice {
  max-width: 520px;
  margin: 3rem auto;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  animation: fadeInUp 0.5s ease-out;
}
.closed-notice h2 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--text); font-weight: 800; }

/* ── Add-to-Cart Flash Animation ─────────────────────────────── */
@keyframes addPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.cart-btn.flash { animation: addPop 0.3s ease; }

/* ── Toast Notification ──────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  transition: transform var(--transition-spring);
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════════════════════════
   TEMPLATE: MODERN (default)
   Clean, minimal, glassmorphism, elegant whitespace
   ══════════════════════════════════════════════════════════════ */
.template-modern {
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --radius: 16px;
  --radius-sm: 12px;
}

.template-modern .site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.template-modern .header-title { color: var(--text); }
.template-modern .header-logo { background: var(--bg); }
.template-modern .header-logo-placeholder { background: var(--bg); }
.template-modern .cart-btn {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
.template-modern .cart-btn:hover { background: var(--border); }
.template-modern .cart-count { background: var(--primary); color: #fff; }

.template-modern .hero-section { border-radius: 0 0 24px 24px; }
.template-modern .hero-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.45) 100%);
}

.template-modern .category-nav { top: var(--header-height); }

.template-modern .item-card { border: 1px solid var(--border-light); box-shadow: none; }
.template-modern .item-card:hover { box-shadow: var(--shadow-md); border-color: transparent; }

.template-modern .mobile-cart-bar { border-radius: 16px 16px 0 0; }

/* ══════════════════════════════════════════════════════════════
   TEMPLATE: BOLD
   Dark background, vibrant colors, strong typography
   ══════════════════════════════════════════════════════════════ */
.template-bold {
  --bg: #0a0a0a;
  --card-bg: #161616;
  --text: #f0f0f0;
  --text-muted: #888888;
  --text-light: #555;
  --border: #252525;
  --border-light: #1e1e1e;
  --primary-light: rgba(230, 57, 70, 0.12);
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
  --radius: 14px;
  --radius-sm: 10px;
}

.template-bold .site-header {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.template-bold .hero-section { height: 340px; }
.template-bold .hero-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
}
.template-bold .hero-title { font-size: 2.5rem; letter-spacing: -0.04em; }
.template-bold .hero-logo { border-radius: 50%; border: 3px solid var(--primary); }

.template-bold .category-nav {
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.template-bold .cat-tab { font-weight: 700; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.06em; }

.template-bold .item-card {
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform var(--transition), box-shadow 0.3s;
}
.template-bold .item-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(230,57,70,0.15); }
.template-bold .item-image-placeholder { background: linear-gradient(135deg, #151515, #1a1a1a); }

.template-bold .add-btn { border-radius: var(--radius-xs); width: 36px; height: 36px; }

.template-bold .overlay { background: rgba(0,0,0,0.7); }
.template-bold .cart-drawer { background: #111; border-left: 1px solid var(--border); }
.template-bold .drawer-header { border-bottom-color: var(--border); }
.template-bold .cart-item { background: #1a1a1a; }
.template-bold .cart-item:hover { background: #222; }
.template-bold .drawer-footer { background: #111; border-top-color: var(--border); }
.template-bold .checkout-steps { background: #080808; border-bottom-color: var(--border); }
.template-bold .step-num { background: #333; }
.template-bold .qty-btn { background: #1a1a1a; border-color: #3a3a3a; color: #eee; }
.template-bold .qty-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(230,57,70,0.1); }
.template-bold .form-control { background: #1a1a1a; border-color: #333; color: #f0f0f0; }
.template-bold .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,57,70,0.15); }
.template-bold .form-control::placeholder { color: #555; }
.template-bold .checkout-summary { background: #1a1a1a; }
.template-bold .close-btn:hover { background: #222; }

.template-bold .confirmation-page { color: #f0f0f0; }
.template-bold .status-card { background: #161616; border-color: var(--border); }
.template-bold .conf-icon { background: rgba(230,57,70,0.12); }

.template-bold .closed-notice { color: #888; }
.template-bold .closed-notice h2 { color: #f0f0f0; }

.template-bold .swish-box { background: linear-gradient(135deg, #0a1628, #0f2040); border-color: #1a4080; }
.template-bold .swish-logo { color: #6ba3e0; }
.template-bold .swish-label { color: #6090c0; }
.template-bold .swish-number { color: #90c0ff; }
.template-bold .swish-divider { background: #1a3060; }
.template-bold .swish-amount { color: #90c0ff; }
.template-bold .swish-instructions { color: #6090c0; }

.template-bold .error-msg { background: #2a1515; border-color: #5a2020; color: #ff8080; }
.template-bold .mobile-cart-bar { box-shadow: 0 -4px 24px rgba(0,0,0,0.5); }

.template-bold .toast { background: #f0f0f0; color: #111; }

/* ══════════════════════════════════════════════════════════════
   TEMPLATE: CLASSIC
   Warm colors, traditional feel, elegant fonts
   ══════════════════════════════════════════════════════════════ */
.template-classic {
  --bg: #faf8f5;
  --card-bg: #ffffff;
  --text: #2c1810;
  --text-muted: #8b7355;
  --text-light: #b8a08a;
  --border: #e8ddd0;
  --border-light: #f0e8dd;
  --shadow: 0 2px 8px rgba(100,70,30,0.06);
  --shadow-md: 0 4px 16px rgba(100,70,30,0.1);
  --shadow-lg: 0 8px 30px rgba(100,70,30,0.14);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --font: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

.template-classic .site-header {
  background: #2c1810;
  box-shadow: 0 2px 8px rgba(44,24,16,0.3);
}

.template-classic .header-logo { border-radius: 50%; }
.template-classic .header-logo-placeholder { border-radius: 50%; }

.template-classic .hero-section { height: 300px; }
.template-classic .hero-overlay {
  background: linear-gradient(to bottom, rgba(44,24,16,0.2) 0%, rgba(44,24,16,0.65) 100%);
}
.template-classic .hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 700;
  font-style: italic;
}
.template-classic .hero-logo {
  border-radius: 50%;
  border: 3px solid rgba(255,220,180,0.4);
}

.template-classic .category-nav { background: #faf8f5; }
.template-classic .cat-tab { font-family: inherit; font-weight: 600; letter-spacing: 0.02em; }

.template-classic .category-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.template-classic .category-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.template-classic .item-card {
  border: 1px solid var(--border);
  box-shadow: none;
}
.template-classic .item-card:hover {
  box-shadow: var(--shadow-md);
}

.template-classic .item-name { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; }
.template-classic .item-image-placeholder { background: linear-gradient(135deg, #f5f0ea, #ede5d8); }

.template-classic .add-btn { border-radius: var(--radius-xs); }
.template-classic .btn { border-radius: var(--radius-xs); }
.template-classic .form-control { border-radius: var(--radius-xs); }

.template-classic .swish-box { background: #faf5ee; border-color: #c9a96e; }
.template-classic .swish-logo { color: #8b6914; }
.template-classic .swish-label { color: #a08050; }
.template-classic .swish-number { color: #6b4f14; }
.template-classic .swish-divider { background: #d9c8a0; }
.template-classic .swish-amount { color: #6b4f14; }
.template-classic .swish-instructions { color: #8b7355; }

.template-classic .confirmation-page h1 { font-family: 'Playfair Display', Georgia, serif; }
.template-classic .cart-drawer { border-left: 1px solid var(--border); }

/* ── Ornamental separator for Classic ─────────────────────────── */
.template-classic .category-section + .category-section::before {
  content: '~ ~ ~';
  display: block;
  text-align: center;
  color: var(--border);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  letter-spacing: 0.5em;
}

/* ── Dagens Rätt Widget ──────────────────────────────────────── */
.dagens-ratt {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1rem 0;
}
.dagens-ratt-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-glow));
  border: 1.5px solid var(--primary-glow);
  border-radius: var(--radius);
  animation: fadeInUp 0.4s ease-out;
}
.dagens-ratt-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.dagens-ratt-content { flex: 1; min-width: 0; }
.dagens-ratt-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.dagens-ratt-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.1rem; }
.dagens-ratt-price {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bold template override */
.template-bold .dagens-ratt-inner {
  background: linear-gradient(135deg, rgba(230,57,70,0.08), rgba(230,57,70,0.15));
  border-color: rgba(230,57,70,0.2);
}

/* Classic template override */
.template-classic .dagens-ratt-inner {
  border-radius: var(--radius-xs);
}

@media (max-width: 480px) {
  .dagens-ratt-inner { flex-wrap: wrap; gap: 0.5rem; }
  .dagens-ratt-badge { order: -1; }
}

/* ── Menu Search ─────────────────────────────────────────────── */
.menu-search {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  position: sticky;
  top: calc(var(--header-height) + 44px);
  z-index: 85;
}
.menu-search-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}
.menu-search input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.menu-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.menu-search input::placeholder { color: var(--text-light); }
.search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
}
.search-clear:hover { background: var(--border); }
.menu-no-results {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ── Account Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.account-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  z-index: 401;
  animation: modalIn 0.3s var(--transition-smooth);
  border: 1px solid var(--border-light);
}

@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { font-size: 1.05rem; font-weight: 700; }
.account-form { padding: 1.25rem; }
.account-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.account-switch a { color: var(--primary); text-decoration: none; font-weight: 600; transition: opacity var(--transition); }
.account-switch a:hover { opacity: 0.8; }
.success-msg {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #065f46;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.2s ease;
}

/* ── Order History ──────────────────────────────────────────── */
.order-history-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  animation: fadeInUp 0.4s ease-out;
}
.order-history-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  margin-bottom: 0.875rem;
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition), transform var(--transition);
}
.order-history-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.oh-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.oh-restaurant { font-weight: 700; font-size: 0.95rem; }
.oh-date { font-size: 0.78rem; color: var(--text-muted); }
.oh-items { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.45; }
.oh-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.oh-total { font-weight: 700; font-size: 0.95rem; }

/* ── Template overrides for new elements ─────────────────────── */
.template-modern .lang-toggle,
.template-modern .account-btn {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
.template-modern .lang-toggle:hover,
.template-modern .account-btn:hover { background: var(--border); }
.template-modern .menu-search { background: var(--card-bg); }

.template-bold .lang-toggle,
.template-bold .account-btn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}
.template-bold .lang-toggle:hover,
.template-bold .account-btn:hover { background: rgba(255,255,255,0.15); }
.template-bold .menu-search { background: rgba(10,10,10,0.9); border-bottom-color: var(--border); }
.template-bold .menu-search input { background: #1a1a1a; border-color: #333; color: #f0f0f0; }
.template-bold .menu-search input:focus { border-color: var(--primary); }
.template-bold .account-modal { background: #161616; border-color: var(--border); }
.template-bold .modal-header { border-bottom-color: var(--border); }
.template-bold .order-history-card { background: #161616; border-color: var(--border); }
.template-bold .success-msg { background: #0a2a1a; border-color: #1a4a2a; color: #4ade80; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  :root { --header-height: 56px; }
  .hero-section { height: 200px; }
  .template-bold .hero-section { height: 260px; }
  .hero-title { font-size: 1.5rem !important; }
  .hero-logo { width: 56px; height: 56px; }
  .items-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .item-body { padding: 0.6rem; }
  .item-name { font-size: 0.88rem; }
  .item-desc { font-size: 0.78rem; }
  .item-price { font-size: 0.92rem; }
  .add-btn { width: 32px; height: 32px; font-size: 1.2rem; }
  .menu-container { padding: 0.875rem 0.75rem; padding-bottom: 7rem; }
  .category-title { font-size: 1.1rem; }

  /* Bottom cart bar on mobile */
  .mobile-cart-bar.show { display: flex !important; }

  /* Full-width cart on mobile */
  .cart-drawer { width: 100vw; }

  .toast { bottom: 5rem; font-size: 0.82rem; padding: 0.65rem 1.25rem; }
}

@media (max-width: 380px) {
  .items-grid { grid-template-columns: 1fr; }
}

/* ── Accessibility: Focus visible ──────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
  outline: none;
}

/* ── Selection color ──────────────────────────────────────────── */
::selection {
  background: var(--primary-glow);
  color: var(--text);
}

/* ── Smooth scrollbar for webkit ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
