/* =========================================================
   QRFOOD v0.3.4 — Premium menu renderer (Cafe Nouvelle style)
   All selectors scoped under .qrf-menu-v2 to avoid collision
   with the legacy catalog.css (which targets .qrf-wrap).
========================================================= */

.qrf-menu-v2,
.qrf-menu-v2 *,
.qrf-menu-v2 *::before,
.qrf-menu-v2 *::after {
  box-sizing: border-box;
}

.qrf-menu-v2 {
  --qrf-v2-bg:        #0d0d0d;
  --qrf-v2-card:      #1a1a1a;
  --qrf-v2-gold:      #d4af37;
  --qrf-v2-gold-dark: #aa8620;
  --qrf-v2-text:      #ffffff;
  --qrf-v2-muted:     #cccccc;
  --qrf-v2-border:    #332a15;
  --qrf-v2-line:      #2a2a2a;
  --qrf-v2-font:      'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  display: block;
  background: var(--qrf-v2-bg);
  color: var(--qrf-v2-text);
  font-family: var(--qrf-v2-font);
  min-height: 100vh;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 0 140px 0;   /* bottom space reserved for the sticky panel */
  position: relative;
}

/* The wp page background outside the centered column */
body.qrfood-page {
  background: #050505;
}

/* ── Header ─────────────────────────────────────────── */
.qrf-menu-v2 .qrf-v2-header {
  background: linear-gradient(180deg, #1f1f1f 0%, #0d0d0d 100%);
  padding: 22px 16px 18px;
  text-align: center;
  border-bottom: 1px solid var(--qrf-v2-border);
}

.qrf-menu-v2 .qrf-v2-logo {
  display: block;
  max-width: 180px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto 10px;
  border-radius: 8px;
}

.qrf-menu-v2 .qrf-v2-header h1 {
  color: var(--qrf-v2-gold);
  font-size: 1.4rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 6px;
  font-weight: 700;
  line-height: 1.15;
}

.qrf-menu-v2 .qrf-v2-header p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--qrf-v2-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Utility bar (compact row of small actions) ─────── */
.qrf-menu-v2 .qrf-v2-utilities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--qrf-v2-line);
}

.qrf-menu-v2 .qrf-v2-util {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(212, 175, 55, 0.08);
  color: var(--qrf-v2-gold) !important;
  text-decoration: none !important;
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  line-height: 1;
  min-height: 32px;
}

.qrf-menu-v2 .qrf-v2-util:hover,
.qrf-menu-v2 .qrf-v2-util:focus {
  background: rgba(212, 175, 55, 0.18);
  outline: none;
}

.qrf-menu-v2 .qrf-v2-util.is-copied {
  background: rgba(80, 200, 120, 0.18);
  border-color: rgba(80, 200, 120, 0.5);
  color: #b6f0c8 !important;
}

/* ── Menu list ──────────────────────────────────────── */
.qrf-menu-v2 .qrf-v2-menu-list {
  padding: 16px 14px 8px;
}

.qrf-menu-v2 .qrf-v2-empty {
  text-align: center;
  padding: 30px 14px;
  color: var(--qrf-v2-muted);
}

.qrf-menu-v2 .qrf-v2-raw {
  margin-top: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  color: var(--qrf-v2-muted);
  font-size: 0.85rem;
  white-space: pre-wrap;
  text-align: left;
}

/* ── Category headings ──────────────────────────────── */
.qrf-menu-v2 .qrf-v2-cat-heading {
  color: var(--qrf-v2-gold);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 18px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--qrf-v2-border);
  font-weight: 700;
}

.qrf-menu-v2 .qrf-v2-cat-heading:first-child {
  margin-top: 0;
}

/* ── Item card ──────────────────────────────────────── */
.qrf-menu-v2 .qrf-v2-item {
  background-color: var(--qrf-v2-card);
  border: 1px solid var(--qrf-v2-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qrf-menu-v2 .qrf-v2-item-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.qrf-menu-v2 .qrf-v2-item-details {
  flex: 1;
  min-width: 0;
}

.qrf-menu-v2 .qrf-v2-item-details h3 {
  font-size: 1.02rem;
  color: var(--qrf-v2-gold);
  margin: 0 0 4px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.qrf-menu-v2 .qrf-v2-item-icon {
  display: inline-block;
  margin-right: 2px;
}

.qrf-menu-v2 .qrf-v2-item-en {
  margin: 0 0 4px;
  font-size: 0.72rem;
  color: #8a8a8a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.qrf-menu-v2 .qrf-v2-item-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--qrf-v2-muted);
  line-height: 1.35;
}

.qrf-menu-v2 .qrf-v2-item-price {
  font-weight: 700;
  color: var(--qrf-v2-gold);
  font-size: 1.05rem;
  white-space: nowrap;
  padding-top: 2px;
}

/* ── Item actions row ───────────────────────────────── */
.qrf-menu-v2 .qrf-v2-item-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid var(--qrf-v2-line);
  padding-top: 10px;
  margin-top: 2px;
  gap: 10px;
}

/* ── Qty counter ────────────────────────────────────── */
.qrf-menu-v2 .qrf-v2-qty {
  display: inline-flex;
  align-items: center;
  background-color: #111;
  border: 1px solid var(--qrf-v2-border);
  border-radius: 8px;
  overflow: hidden;
}

.qrf-menu-v2 .qrf-v2-btn-qty {
  background: none;
  border: 0;
  color: var(--qrf-v2-gold);
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
  padding: 0;
}

.qrf-menu-v2 .qrf-v2-btn-qty:hover,
.qrf-menu-v2 .qrf-v2-btn-qty:focus {
  background-color: rgba(212, 175, 55, 0.12);
  outline: none;
}

.qrf-menu-v2 .qrf-v2-qty-num {
  width: 28px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--qrf-v2-text);
}

.qrf-menu-v2 .qrf-v2-qty.has-qty {
  border-color: var(--qrf-v2-gold);
  background: rgba(212, 175, 55, 0.08);
}

/* ── Footer ─────────────────────────────────────────── */
.qrf-menu-v2 .qrf-v2-footer {
  padding: 18px 14px 8px;
  text-align: center;
}

.qrf-menu-v2 .qrf-v2-footer p {
  margin: 0;
  font-size: 0.78rem;
  color: #6e6e6e;
  letter-spacing: 0.5px;
}

.qrf-menu-v2 .qrf-v2-footer a {
  color: var(--qrf-v2-gold);
  text-decoration: none;
}

/* ── Sticky bottom panel (lives OUTSIDE .qrf-menu-v2) ── */
.qrf-v2-bottom-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(0deg, #000 60%, rgba(0,0,0,0.92) 100%);
  padding: 14px 16px 16px;
  border-top: 1px solid #332a15;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  display: none;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
  box-sizing: border-box;
}

.qrf-v2-bottom-panel.is-visible {
  display: flex;
}

.qrf-v2-bottom-panel .qrf-v2-total-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #cccccc;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.qrf-v2-bottom-panel .qrf-v2-total-price {
  color: #d4af37;
  font-size: 1.1rem;
  font-weight: 700;
}

.qrf-v2-bottom-panel .qrf-v2-btn-waiter {
  background: linear-gradient(135deg, #d4af37 0%, #aa8620 100%);
  color: #000;
  border: 0;
  padding: 14px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
  transition: transform 0.1s, box-shadow 0.15s;
  font-family: inherit;
  line-height: 1.1;
}

.qrf-v2-bottom-panel .qrf-v2-btn-waiter:hover,
.qrf-v2-bottom-panel .qrf-v2-btn-waiter:focus {
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.45);
  outline: none;
}

.qrf-v2-bottom-panel .qrf-v2-btn-waiter:active {
  transform: scale(0.98);
}

/* ── Modal that shows the full order to the waiter ──── */
.qrf-v2-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
  box-sizing: border-box;
}

.qrf-v2-modal.is-open {
  display: flex;
}

.qrf-v2-modal *,
.qrf-v2-modal *::before,
.qrf-v2-modal *::after {
  box-sizing: border-box;
}

.qrf-v2-modal-box {
  width: 100%;
  max-width: 460px;
  background: #0d0d0d;
  border: 1px solid #332a15;
  border-radius: 16px;
  padding: 22px 18px 18px;
  position: relative;
  margin-top: 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.qrf-v2-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 0;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
}

.qrf-v2-modal h2 {
  margin: 0 0 6px;
  color: #d4af37;
  font-size: 1.2rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  font-weight: 700;
}

.qrf-v2-modal-sub {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: #cccccc;
  text-align: center;
}

.qrf-v2-modal-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-height: 55vh;
  overflow-y: auto;
}

.qrf-v2-modal-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #2a2a2a;
  font-size: 0.95rem;
}

.qrf-v2-modal-list li:last-child {
  border-bottom: 0;
}

.qrf-v2-modal-list .qrf-v2-modal-name {
  font-weight: 600;
  color: #ffffff;
}

.qrf-v2-modal-list .qrf-v2-modal-meta {
  color: #cccccc;
  font-size: 0.85rem;
  margin-top: 2px;
}

.qrf-v2-modal-list .qrf-v2-modal-line-total {
  color: #d4af37;
  font-weight: 700;
  white-space: nowrap;
  align-self: center;
}

.qrf-v2-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px 8px;
  border-top: 2px solid #d4af37;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.qrf-v2-modal-total strong {
  color: #d4af37;
  font-size: 1.35rem;
}

.qrf-v2-modal-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: #999;
  text-align: center;
  line-height: 1.4;
}

/* ── Responsive (desktop a bit wider) ───────────────── */
@media (min-width: 600px) {
  .qrf-menu-v2 {
    border-left: 1px solid #1a1a1a;
    border-right: 1px solid #1a1a1a;
  }
}
