/* ============================================================
   Smokehouse Digital Menu — shared styles
   ============================================================ */

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

:root {
  --bg: #171310;
  --bg-card: #211b16;
  --bg-card-hover: #2a221b;
  --ember: #d97b34;
  --ember-bright: #f0983f;
  --cream: #f4ead9;
  --cream-dim: #c9bba4;
  --line: #3a3128;
  --good: #5fa87a;
  --bad: #c95b4f;
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'Oswald', 'Tajawal', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse at top, rgba(217,123,52,0.08), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 40px);
}

.ar {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
}

a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #1a1512ee, #17131099);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 14px;
  text-align: center;
}

.brand-mark {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--ember);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.brand-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 1px;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-name .ar {
  font-weight: 700;
  font-size: 26px;
  color: var(--ember-bright);
}

.brand-sep {
  color: var(--line);
  font-weight: 300;
}

.brand-logo {
  display: block;
  height: 92px;
  width: auto;
  margin: 4px auto 6px;
}

.brand-logo.small {
  height: 56px;
  margin: 2px auto 4px;
}

.brand-name-ar {
  text-align: center;
  font-size: 16px;
  color: var(--ember-bright);
  font-weight: 500;
}

.brand-tagline {
  text-align: center;
  font-size: 12px;
  color: var(--cream-dim);
  font-style: italic;
  margin-top: 2px;
}
.brand-tagline.ar { font-style: normal; }

/* Category nav (sticky pills) */
.cat-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 4px;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }

.cat-pill {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--cream-dim);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease;
}
.cat-pill.active,
.cat-pill:hover {
  background: var(--ember);
  color: #1a1310;
  border-color: var(--ember);
}

/* ---------- Layout ---------- */
.menu-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 60px;
}

.category-section {
  margin-top: 34px;
}

.category-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--ember);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.category-title .en {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.category-title .ar {
  font-size: 19px;
  color: var(--ember-bright);
}

/* ---------- Item card ---------- */
.item-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.item-photo {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
  background: #2a221b center/cover no-repeat;
}

.item-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--line);
}

.item-body { flex: 1; min-width: 0; }

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.item-name-en {
  font-weight: 600;
  font-size: 16.5px;
  color: var(--cream);
  line-height: 1.25;
}

.item-name-ar {
  font-size: 15.5px;
  color: var(--ember-bright);
  margin-top: 2px;
  line-height: 1.3;
}

.item-price {
  flex: 0 0 auto;
  font-weight: 600;
  font-size: 15px;
  color: var(--ember-bright);
  white-space: nowrap;
}

.item-desc-en {
  font-size: 13px;
  color: var(--cream-dim);
  margin-top: 5px;
  line-height: 1.45;
}

.item-desc-ar {
  font-size: 13px;
  color: var(--cream-dim);
  margin-top: 3px;
  line-height: 1.5;
}

.sold-out-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bad);
  border: 1px solid var(--bad);
  border-radius: 5px;
  padding: 2px 7px;
}

/* ---------- Badges (NEW / Signature / Serves N) ---------- */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.6;
}
.badge-pill .ar { text-transform: none; font-weight: 500; font-size: 10.5px; }
.badge-pill.new {
  background: rgba(217,123,52,0.18);
  color: var(--ember-bright);
  border: 1px solid rgba(217,123,52,0.4);
}
.badge-pill.signature {
  background: rgba(244,234,217,0.1);
  color: var(--cream);
  border: 1px solid var(--cream-dim);
}
.badge-pill.serves {
  background: transparent;
  color: var(--cream-dim);
  border: 1px solid var(--line);
  text-transform: none;
  font-weight: 500;
}

/* ---------- Featured / highlighted card (e.g. shared platters) ---------- */
.item-card.featured {
  background: linear-gradient(135deg, #4a2e1a, #3a2314);
  border-color: var(--ember);
}
.item-card.featured .item-desc-en,
.item-card.featured .item-desc-ar { color: #e9d3b8; }
.item-card.featured .item-name-en { color: #fff5e8; }

/* ---------- Print-preview-only inline option summary ---------- */
.option-preview {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--cream-dim);
}
.option-preview-group { margin-top: 3px; }
.option-preview-group b { color: var(--ember-bright); font-weight: 600; }

/* ---------- Customer-facing "Customize" section ---------- */
.customize-toggle {
  margin-top: 8px;
  background: none;
  border: 1px solid var(--line);
  color: var(--ember-bright);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.customize-toggle:hover { border-color: var(--ember); }

.customize-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.customize-panel.hidden { display: none; }

.option-group { margin-bottom: 12px; }
.option-group:last-child { margin-bottom: 0; }

.option-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.option-group-title .ar { color: var(--ember-bright); font-weight: 500; font-size: 11.5px; }
.option-group-title .required-tag {
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--bad);
  font-weight: 700;
  letter-spacing: .5px;
}

.option-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  font-size: 13px;
  border-radius: 6px;
  cursor: pointer;
}
.option-choice:hover { background: rgba(255,255,255,0.03); }
.option-choice input { width: auto; margin: 0; accent-color: var(--ember); flex: 0 0 auto; }
.option-choice .oc-name { flex: 1; }
.option-choice .oc-name .ar { color: var(--ember-bright); margin-inline-start: 6px; font-size: 12px; }
.option-choice .oc-price { flex: 0 0 auto; color: var(--cream-dim); font-size: 12px; }

.customize-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ember-bright);
}

/* ---------- Admin: option groups editor ---------- */
.option-group-editor {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.option-group-editor .og-head {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.option-group-editor .og-head select { flex: 0 0 130px; }
.option-group-editor .og-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--cream-dim);
}
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr 90px auto;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.empty-state, .loading-state {
  text-align: center;
  color: var(--cream-dim);
  padding: 60px 20px;
  font-size: 14px;
}

.footer-note {
  text-align: center;
  color: var(--line);
  font-size: 11px;
  padding: 30px 0 10px;
}

/* ============================================================
   Admin panel
   ============================================================ */
.admin-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--cream-dim);
  margin-bottom: 4px;
  letter-spacing: .3px;
}
.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

input[type=text], input[type=number], input[type=email], input[type=password],
textarea, select {
  width: 100%;
  background: #14100d;
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 54px; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ember);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: var(--ember);
  color: #1a1310;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--ember-bright); }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
}
.btn.secondary:hover { border-color: var(--ember); }
.btn.danger {
  background: transparent;
  border: 1px solid var(--bad);
  color: var(--bad);
}
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.admin-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.admin-item-row:last-child { border-bottom: none; }
.admin-item-thumb {
  width: 52px; height: 52px; border-radius: 8px;
  object-fit: cover; background: #14100d; flex: 0 0 auto;
}
.admin-item-info { flex: 1; min-width: 0; }
.admin-item-info .n { font-weight: 600; font-size: 14px; }
.admin-item-info .n .ar { color: var(--ember-bright); margin-inline-start: 6px; font-size: 13px; }
.admin-item-info .p { font-size: 12px; color: var(--cream-dim); }
.admin-item-actions { display: flex; gap: 6px; flex: 0 0 auto; }

.toggle-switch {
  position: relative;
  width: 40px; height: 22px;
  flex: 0 0 auto;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--line); border-radius: 999px; transition: .15s;
}
.toggle-slider::before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 3px; top: 3px; background: var(--cream);
  border-radius: 50%; transition: .15s;
}
input:checked + .toggle-slider { background: var(--good); }
input:checked + .toggle-slider::before { transform: translateX(18px); }

.section-title {
  font-weight: 600;
  font-size: 15px;
  margin: 26px 0 10px;
  color: var(--ember-bright);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.status-msg {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.status-msg.ok { background: rgba(95,168,122,0.12); color: var(--good); }
.status-msg.err { background: rgba(201,91,79,0.12); color: var(--bad); }

/* ---------- Order list (tick-to-add tally, informational only —
   nothing is submitted anywhere; smokehouse.html only) ---------- */
.order-control { margin-top: 10px; }

.order-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.order-add-btn:hover { border-color: var(--good); color: var(--good); }

.order-qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--good);
  border-radius: 999px;
  padding: 4px 6px;
  background: rgba(95,168,122,0.1);
}
.order-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--good);
  color: #10281b;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-qty-btn:hover { opacity: .85; }
.order-qty-value {
  min-width: 16px;
  text-align: center;
  font-weight: 600;
  color: var(--good);
  font-size: 13px;
}

body.has-basket .menu-wrap { padding-bottom: 100px; }

.basket-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, #171310ee, #17131099);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
}
.basket-bar-btn {
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ember);
  color: #1a1310;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.basket-bar-icon { font-size: 16px; }
.basket-bar-count {
  background: #1a1310;
  color: var(--ember-bright);
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  padding: 0 5px;
}
.basket-bar-label { opacity: .85; font-weight: 500; }
.basket-bar-total { margin-inline-start: auto; font-weight: 700; }
.basket-bar-view { opacity: .85; font-weight: 500; }

.basket-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 39;
}

.basket-panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
}
.basket-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.basket-panel-title { font-weight: 700; font-size: 17px; }
.basket-close-btn {
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.basket-close-btn:hover { color: var(--cream); }
.basket-panel-note {
  font-size: 11.5px;
  color: var(--cream-dim);
  margin-top: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.basket-lines {
  overflow-y: auto;
  margin-top: 10px;
  flex: 1;
}
.basket-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.basket-line:last-child { border-bottom: none; }
.basket-line-main { flex: 1; min-width: 0; }
.basket-line-name { font-size: 14px; font-weight: 600; }
.basket-line-name .ar { color: var(--ember-bright); margin-inline-start: 6px; font-size: 13px; }
.basket-line-notes { font-size: 11.5px; color: var(--cream-dim); margin-top: 2px; }
.basket-line-qty { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.basket-line-price {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--ember-bright);
  font-size: 13px;
  min-width: 70px;
  text-align: right;
}
.basket-empty {
  color: var(--cream-dim);
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}
.basket-panel-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.qr-target-btn.active {
  background: var(--ember);
  border-color: var(--ember);
  color: #1a1310;
}

.qr-box {
  text-align: center;
  padding: 20px;
}
#qrcode-canvas { margin: 0 auto; background: #fff; padding: 10px; border-radius: 10px; }

.hidden { display: none !important; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.top-bar h1 { font-size: 20px; margin: 0; }

/* ============================================================
   Hub / landing page (root index.html — Butchery vs Smokehouse)
   ============================================================ */
.hub-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hub-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.hub-card:hover,
.hub-card:active {
  border-color: var(--ember);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

/* The Prime Cut Butchery logo uses black/brown ink designed for a white
   background — on this dark theme it needs a light chip behind it to
   stay legible, unlike the round Smokehouse badge which already reads
   fine directly on dark. */
.hc-logo-chip {
  display: inline-flex;
  background: var(--cream);
  padding: 8px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.hc-logo-chip img {
  display: block;
  height: 36px;
  width: auto;
}

.butchery-logo-chip {
  display: inline-flex;
  background: var(--cream);
  padding: 10px 20px;
  border-radius: 12px;
  margin: 4px auto 8px;
}
.butchery-logo-chip img {
  display: block;
  height: 60px;
  width: auto;
}

.hc-title {
  font-weight: 700;
  font-size: 20px;
  color: var(--cream);
  letter-spacing: .3px;
}

.hc-title-ar {
  font-size: 17px;
  color: var(--ember-bright);
  margin-top: 3px;
}

.hc-desc {
  font-size: 13px;
  color: var(--cream-dim);
  margin-top: 8px;
  line-height: 1.45;
}

/* "back to hub" link shown on the top of each storefront's header */
.hub-back {
  display: inline-block;
  font-size: 12px;
  color: var(--cream-dim);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 10px;
  letter-spacing: .3px;
}
.hub-back:hover { border-color: var(--ember); color: var(--ember-bright); }

/* ============================================================
   Butchery hero (location / phone / Talabat)
   ============================================================ */
.hero-info {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 16px 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.hero-btn:hover { border-color: var(--ember); }
.hero-btn.primary {
  background: var(--ember);
  border-color: var(--ember);
  color: #1a1310;
}
.hero-btn.primary:hover { background: var(--ember-bright); }
.hero-btn.disabled {
  opacity: .55;
  pointer-events: none;
}

.hero-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--line);
  margin-top: 10px;
}
