/* ====================================================
   MASS CAFE DIGITAL MENU — BLACK & GOLD DESIGN SYSTEM
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;800&family=Inter:wght@300;400;500;600&family=Noto+Sans:wght@400;500;700&display=swap');

/* ---- ROOT TOKENS (Dark default) ---- */
:root {
  --gold:         #c9a227;
  --gold-light:   #e8c84a;
  --gold-dim:     rgba(201, 162, 39, 0.15);
  --gold-border:  rgba(201, 162, 39, 0.35);
  --black-deep:   #090806;
  --black-card:   #111009;
  --black-surface:#1a1710;
  --black-raised: #222018;
  --text-primary: #f4ede0;
  --text-muted:   #8a7e6c;
  --text-dim:     #5a5244;
  --border-subtle: rgba(201, 162, 39, 0.12);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', 'Noto Sans', -apple-system, sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
  scrollbar-color: var(--gold-border) var(--black-deep);
  scrollbar-width: thin;
}

/* ---- LIGHT THEME ---- */
body[data-theme="light"] {
  --gold:         #a07818;
  --gold-light:   #c9a227;
  --gold-dim:     rgba(160, 120, 24, 0.1);
  --gold-border:  rgba(160, 120, 24, 0.25);
  --black-deep:   #faf8f5;
  --black-card:   #ffffff;
  --black-surface:#f5f1ea;
  --black-raised: #ede6da;
  --text-primary: #1a1610;
  --text-muted:   #6b5e4a;
  --text-dim:     #9c8e7a;
  --border-subtle: rgba(160, 120, 24, 0.12);

  color-scheme: light;
  scrollbar-color: var(--gold-border) #faf8f5;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 200px; }

body {
  font-family: var(--font-body);
  background: var(--black-deep);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background subtle texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(201,162,39,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 90% 90%, rgba(201,162,39,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   TOP BAR — Language + QR + Theme
   ============================================================ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 0;
  gap: 8px;
}

.lang-selector {
  display: flex;
  align-items: center;
}

.lang-select {
  background: var(--black-card);
  border: 1px solid var(--gold-border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 5px 28px 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23c9a227' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all 0.3s ease;
  max-width: 160px;
}

.lang-select:hover,
.lang-select:focus {
  border-color: var(--gold);
  outline: none;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  color: var(--gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

.qr-link:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-btn svg {
  width: 18px;
  height: 18px;
}

.theme-btn:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

/* ============================================================
   FOOTER
   ============================================================ */
.store-footer {
  text-align: center;
  padding: 24px 20px 32px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-subtle);
  margin-top: 16px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
}

.footer-sep {
  opacity: 0.3;
}

.store-footer a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.store-footer a:hover {
  color: var(--gold-light);
}

.footer-phone {
  font-weight: 500;
}

/* ============================================================
   HEADER
   ============================================================ */
.menu-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black-deep);
  border-bottom: 1px solid var(--border-subtle);
}

/* --- Hero Banner --- */
.hero-banner {
  position: relative;
  padding: 36px 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a1208 0%, #090806 60%);
  overflow: hidden;
}

/* Gold accent lines */
.hero-banner::before, .hero-banner::after {
  content: '';
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  width: 80%;
  left: 10%;
}
.hero-banner::before { top: 0; }
.hero-banner::after  { bottom: 0; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(201,162,39,0.06) 0%, transparent 70%);
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.brand-logo {
  margin: 0 auto 12px;
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 0 12px rgba(201,162,39,0.4));
}

.brand-name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #f4ede0;
  letter-spacing: 0.25em;
  line-height: 1;
  margin-bottom: 2px;
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.5em;
  color: var(--gold);
}

.brand-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* --- Store Info Bar --- */
.store-info-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--black-card);
}
.store-info-bar::-webkit-scrollbar { display: none; }

.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--black-raised);
  border: 1px solid var(--gold-border);
  color: var(--text-muted);
  text-decoration: none;
}

.info-chip strong {
  color: var(--gold);
  font-weight: 700;
}

.info-chip svg {
  width: 13px;
  height: 13px;
  color: var(--gold);
  flex-shrink: 0;
}

.delivery-chip {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: var(--gold-border);
}

/* --- Search & Controls --- */
.menu-controls {
  background: var(--black-deep);
  padding: 12px 16px 0;
}

.search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

#search-input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border-radius: var(--r-md);
  background: var(--black-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s var(--ease);
}
#search-input:focus {
  border-color: var(--gold-border);
}
#search-input::placeholder {
  color: var(--text-dim);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
}
.search-clear-btn:hover {
  color: var(--gold);
}

/* --- Categories Nav --- */
.categories-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
}
.categories-nav::-webkit-scrollbar { display: none; }

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--black-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.cat-tab.active {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold-light);
}

/* ============================================================
   MENU BODY
   ============================================================ */
.menu-body {
  position: relative;
  z-index: 1;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ---- Category Section ---- */
.category-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-heading {
  margin-bottom: 4px;
}

/* Category image banner */
.cat-image-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 6px;
}

.cat-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.cat-image-wrap:hover .cat-image {
  transform: scale(1.05);
}

.cat-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(9,8,6,0.88) 0%, rgba(9,8,6,0.25) 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
}

.cat-image-overlay .cat-icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.cat-image-overlay .cat-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  text-transform: uppercase;
}

/* ---- Item Cards ---- */
.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--black-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  gap: 12px;
}

.item-card:hover, .item-card:active {
  border-color: var(--gold-border);
  background: var(--black-surface);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

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

.item-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.item-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.item-price {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.item-tags {
  display: flex;
  gap: 4px;
}

.item-tag {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tag-new     { background: rgba(16,185,129,0.15); color: #10b981; }
.tag-popular { background: rgba(201,162,39,0.15); color: var(--gold); }
.tag-spicy   { background: rgba(220,38,38,0.15);  color: #f87171; }

/* Extras / add-on indicator */
.item-options-hint {
  font-size: 0.65rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
}
.item-options-hint svg { width: 11px; height: 11px; }

/* ---- Special Coffee Cards (larger) ---- */
.items-specials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.item-card-special {
  background: linear-gradient(145deg, var(--black-card), var(--black-surface));
  border: 1px solid var(--gold-border);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.item-card-special::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(201,162,39,0.08) 0%, transparent 70%);
}

.item-card-special:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,162,39,0.1);
}

.special-emoji { font-size: 1.5rem; margin-bottom: 4px; }

.special-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.special-price {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

/* ---- Extras Row Cards ---- */
.items-extras {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--black-surface);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle);
  gap: 8px;
}

.extra-name {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.extra-price {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

/* ---- Empty State ---- */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.no-results .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
}

/* ============================================================
   DIALOG / POPUP (Bottom Sheet)
   ============================================================ */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.dialog-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.dialog-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--black-card);
  border-top: 1px solid var(--gold-border);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
}

.dialog-backdrop.open .dialog-sheet {
  transform: translateY(0);
}

/* Gold drag handle */
.dialog-sheet::before {
  content: '';
  width: 40px;
  height: 4px;
  background: var(--gold-border);
  border-radius: 2px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--black-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.dialog-close svg { width: 16px; height: 16px; }
.dialog-close:hover { color: var(--gold); border-color: var(--gold-border); }

.dialog-inner {
  padding: 32px 22px 24px;
  overflow-y: auto;
}

.dialog-item-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-right: 30px;
}

.dialog-item-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Option groups inside dialog */
.dialog-option-group {
  margin-bottom: 20px;
}

.option-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.option-choices {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  background: var(--black-surface);
  cursor: pointer;
  transition: border-color 0.15s;
}

.option-row:hover  { border-color: var(--gold-border); }

.option-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  font-size: 0.875rem;
}

.option-row input { accent-color: var(--gold); }

.option-modifier {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
}

/* Dialog footer */
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--black-card);
  flex-shrink: 0;
}

.dialog-total {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

.btn-add {
  background: linear-gradient(135deg, var(--gold), #a07818);
  color: #0a0804;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s var(--ease);
  box-shadow: 0 4px 14px rgba(201,162,39,0.25);
}
.btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201,162,39,0.35);
}

/* Quantity selector in dialog */
.dialog-qty-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dialog-qty-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--black-raised);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.dialog-qty-btn:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
}
.dialog-qty-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 24px;
  text-align: center;
}

/* ---- RTL SUPPORT (Arabic, Hebrew) ---- */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}
[dir="rtl"] .lang-selector select { direction: rtl; }
[dir="rtl"] .top-bar-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .qr-link { margin-right: 0; margin-left: 10px; }
