/* Premium QR Menu — mobile-first, steakhouse atmosphere */

:root {
  --ink: var(--brand-ink, #1b1b1d);
  --ink-soft: #56565b;
  --cream: #f7f2e8;
  --cream-2: #fbf8f2;
  --line: rgba(27, 27, 29, 0.12);
  --gold: var(--brand-gold, #c8a24a);
  --gold-deep: #765718;
  --surface: #fffdfa;
  --shadow: 0 12px 40px rgba(27, 27, 29, 0.13);
  --shadow-soft: 0 6px 20px rgba(27, 27, 29, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dock-h: 4.75rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body.qm-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(200, 162, 74, 0.18), transparent 60%),
    linear-gradient(180deg, #eee8dc 0%, var(--cream) 28%, #f5f0e7 100%);
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
  border-radius: 10px;
}

.qm {
  width: min(480px, 100%);
  margin: 0 auto;
  padding-bottom: calc(var(--dock-h) + var(--safe-b) + 1.25rem);
}

/* Hero — full-bleed identity plane */
.qm-hero {
  position: relative;
  min-height: clamp(300px, 52vw, 400px);
  padding: 1rem 1.1rem 1.6rem;
  color: #f8f1e8;
  overflow: hidden;
  isolation: isolate;
}

.qm-hero__media {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #242426 0%, #111112 48%, #202124 100%);
}

.qm-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qm-hero__media > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.qm-card__media picture,
.qm-cat__thumb picture,
.qm-related picture,
.qm-hero__brand > picture {
  display: contents;
}
.qm-hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(200, 162, 74, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(8, 8, 9, 0.36) 0%, rgba(10, 10, 11, 0.62) 48%, rgba(11, 11, 12, 0.9) 100%);
}

.qm-hero__top,
.qm-hero__brand {
  position: relative;
  z-index: 1;
}

.qm-hero__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.qm-chip {
  border: 0;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.qm-chip--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.qm-chip--gold {
  color: #1a120c;
  background: var(--gold);
}

.qm-hero__brand {
  margin-top: 2.75rem;
  text-align: center;
}

.qm-logo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 90, 0.72);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  background: #111112;
  margin: 0 auto;
  display: block;
}
.qm-logo--fallback {
  display: grid;
  place-items: center;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--gold);
}


.qm-title {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 3.2rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.qm-slogan {
  margin: 0.7rem auto 0;
  max-width: 22rem;
  color: rgba(246, 239, 228, 0.84);
  font-size: 1rem;
  line-height: 1.45;
}

.qm-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.1rem;
}

.qm-status,
.qm-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 600;
}

.qm-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8d8d8d;
}
.qm-status.is-open .qm-status__dot { background: #6fbf8b; box-shadow: 0 0 0 3px rgba(111, 191, 139, 0.2); }
.qm-status.is-closed .qm-status__dot { background: #c47a6a; }

.qm-meta__item--table {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(201, 162, 99, 0.22);
  border-color: rgba(201, 162, 99, 0.45);
  color: #f0e2c8;
}

.qm-meta__item--table[hidden] {
  display: none !important;
}

.qm-table-change {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
  opacity: 0.92;
}

.qm-table-change:hover,
.qm-table-change:focus-visible {
  opacity: 1;
  outline: none;
}

/* Table number gate — blocking before browse/order */
.qm-table-gate[hidden] {
  display: none !important;
}

.qm-table-gate {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  pointer-events: auto !important;
  touch-action: manipulation;
}

.qm-table-gate__veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(720px 380px at 50% 10%, rgba(196, 163, 90, 0.28), transparent 62%),
    linear-gradient(165deg, rgba(18, 12, 8, 0.92), rgba(26, 18, 12, 0.96));
  /* No backdrop-filter: it can create a stacking layer above the card and swallow taps. */
  pointer-events: none;
}

.qm-table-gate__card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 1.6rem 1.35rem 1.35rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #fffaf3 0%, #f6efe4 100%);
  border: 1px solid rgba(154, 123, 60, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: qm-gate-in 0.38s var(--ease) both;
  pointer-events: auto !important;
  -webkit-user-select: text;
  user-select: text;
  isolation: isolate;
}

@keyframes qm-gate-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.qm-table-gate__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.15;
}

.qm-table-gate__hint {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.qm-table-gate__form {
  display: grid;
  gap: 0.85rem;
}

.qm-table-gate__form .qm-field {
  margin: 0;
}

.qm-table-gate__form .qm-field input {
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-align: center;
  font-weight: 600;
  min-height: 52px;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
  caret-color: var(--ink);
}

.qm-table-gate__card button {
  pointer-events: auto !important;
  touch-action: manipulation;
}

.qm-table-gate__error {
  margin: 0;
  color: #a14a3a;
  font-size: 0.88rem;
  line-height: 1.35;
}

.qm-table-gate__error[hidden] {
  display: none !important;
}

body.qm-table-gate-open .qm,
body.qm-table-gate-open .qm-dock,
body.qm-table-gate-open .qm-browse-cart,
body.qm-table-gate-open .qm-sheet,
body.qm-loyalty-gate-open .qm,
body.qm-loyalty-gate-open .qm-dock,
body.qm-loyalty-gate-open .qm-browse-cart,
body.qm-loyalty-gate-open .qm-sheet {
  pointer-events: none !important;
  user-select: none;
}

/* Gates live outside .qm — never inherit the lock above */
body.qm-table-gate-open .qm-table-gate,
body.qm-loyalty-gate-open .qm-loyalty-gate,
body.qm-table-gate-open .qm-table-gate__card,
body.qm-loyalty-gate-open .qm-loyalty-gate .qm-table-gate__card,
body.qm-table-gate-open .qm-table-gate__card *,
body.qm-loyalty-gate-open .qm-loyalty-gate .qm-table-gate__card * {
  pointer-events: auto !important;
}

body.qm-table-gate-open .qm-table-gate__veil,
body.qm-loyalty-gate-open .qm-loyalty-gate .qm-table-gate__veil {
  pointer-events: none !important;
}

.qm-loyalty-gate__actions {
  display: grid;
  gap: 0.7rem;
}

.qm-loyalty-gate .qm-field input {
  font-size: 1.05rem;
  letter-spacing: 0;
  text-align: left;
  font-weight: 500;
}

.qm-loyalty-gate .qm-field input[data-phone-mask],
.qm-field input[data-phone-mask] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.qm-field input.is-looking-up {
  opacity: 0.92;
}

.qm-field input.is-autofilled,
.qm-field input:read-only.is-autofilled {
  background: color-mix(in srgb, var(--brand-gold, #C4A35A) 10%, #fff);
  border-color: color-mix(in srgb, var(--brand-gold, #C4A35A) 45%, var(--line));
  cursor: default;
}

.qm-field__note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--ink-soft, #6b6560);
  line-height: 1.35;
}

.qm-field__note.is-loading {
  color: var(--brand-gold, #C4A35A);
}

.qm-field__note[hidden] {
  display: none !important;
}

.qm-meta__item--loyalty {
  color: var(--brand-gold, #C4A35A);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.qm-meta__item--loyalty[hidden] {
  display: none !important;
}

/* Closed Banner */
.qm-closed-banner {
  margin: 1rem 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: color-mix(in srgb, #c47a6a 14%, var(--cream-2, #fbf8f2));
  border: 1px solid color-mix(in srgb, #c47a6a 32%, var(--line, rgba(27,27,29,0.12)));
  color: var(--ink, #1b1b1d);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow-soft, 0 6px 20px rgba(27, 27, 29, 0.08));
  position: relative;
  z-index: 3;
}

.qm-closed-banner strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: #a14a3a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qm-closed-banner span {
  font-size: 0.86rem;
  color: var(--ink-soft, #56565b);
  line-height: 1.4;
}

.qm-closed-banner + .qm-search-wrap {
  margin-top: 0.85rem !important;
}

/* Search */
.qm-search-wrap {
  padding: 0 1rem;
  margin-top: -1.15rem;
  position: relative;
  z-index: 2;
}

.qm-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0 1.1rem;
  border-radius: 16px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.qm-search__icon {
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.qm-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}

/* Campaigns */
.qm-campaigns {
  padding: 1rem 0 0.25rem;
}

.qm-campaigns__track {
  display: grid;
  grid-auto-flow: column;
  /* Mobile: each slide fills the menu column (1rem edge padding matches search) */
  grid-auto-columns: 100%;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0 1rem;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  scrollbar-width: none;
}
.qm-campaigns__track::-webkit-scrollbar { display: none; }

/* Single campaign: no carousel peek / empty side gutter at any breakpoint */
.qm-campaigns__track:has(> .qm-campaign:only-child) {
  grid-auto-columns: 100%;
  overflow-x: hidden;
}

.qm-campaign {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  scroll-snap-align: start;
  display: grid;
  gap: 1rem;
  padding: 1.2rem 1.15rem;
  border-radius: var(--radius);
  color: #f8f1e8;
  background:
    linear-gradient(135deg, rgba(44, 24, 16, 0.96), rgba(26, 18, 12, 0.92)),
    radial-gradient(400px 160px at 100% 0%, rgba(196, 163, 90, 0.35), transparent 60%);
  border: 1px solid rgba(196, 163, 90, 0.28);
  box-shadow: var(--shadow-soft);
  min-height: 148px;
}

.qm-campaign.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--campaign-image) center/cover no-repeat;
  transform: scale(1.04);
}

.qm-campaign.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(18, 12, 8, 0.92) 0%, rgba(18, 12, 8, 0.72) 48%, rgba(18, 12, 8, 0.45) 100%);
}

.qm-campaign__copy { position: relative; }

.qm-campaign__badge {
  display: inline-flex;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(196, 163, 90, 0.2);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qm-campaign__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
}

.qm-campaign__body {
  margin: 0.45rem 0 0;
  color: rgba(248, 241, 232, 0.78);
  font-size: 0.92rem;
}

/* Sticky category cards */
.qm-cats {
  position: sticky;
  top: 0;
  z-index: 30;
  margin-top: 0.85rem;
  padding: 0.65rem 0;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.qm-cats__track {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
}
.qm-cats__track::-webkit-scrollbar { display: none; }

.qm-cat {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  min-width: 74px;
  padding: 0.55rem 0.45rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}
.qm-cat__icon,
.qm-cat__thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  font-size: 1.15rem;
  overflow: hidden;
}
.qm-cat__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qm-cat__label {
  font-size: 0.72rem;
  font-weight: 650;
}
.qm-cat.is-active,
.qm-cat:hover {
  color: var(--ink);
  background: rgba(196, 163, 90, 0.12);
}
.qm-cat.is-active .qm-cat__icon,
.qm-cat.is-active .qm-cat__thumb {
  border-color: color-mix(in srgb, var(--gold) 50%, var(--line));
  box-shadow: 0 6px 16px rgba(154, 123, 60, 0.18);
}

/* Sections + cards */
.qm-main { padding: 1rem 1rem 0; }

.qm-section {
  margin-bottom: 1.75rem;
  scroll-margin-top: 6.5rem;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.qm-section__head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.qm-section__head p {
  margin: 0 0 0.95rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.qm-grid {
  display: grid;
  gap: 1rem;
}

.qm-card {
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.qm-card:active { transform: scale(0.985); }
.qm-card.is-sold-out { opacity: 0.72; }
.qm-card.is-hidden { display: none; }

.qm-card__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 16 / 11;
  background:
    linear-gradient(110deg, #2a1c14 25%, #3a281c 37%, #2a1c14 63%);
  background-size: 200% 100%;
  cursor: pointer;
  overflow: hidden;
}
.qm-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qm-card__media-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(26, 18, 12, 0.28));
}
.qm-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(196, 163, 90, 0.25), transparent 50%),
    linear-gradient(160deg, #3a281c, #1a120c);
}

.qm-card__badges {
  position: absolute;
  left: 0.7rem;
  top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.qm-badge {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(26, 18, 12, 0.78);
  color: #f6efe4;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.qm-badge--new { background: rgba(154, 123, 60, 0.92); color: #1a120c; }
.qm-badge--chef { background: rgba(246, 239, 228, 0.92); color: #1a120c; }
.qm-badge--out { background: rgba(140, 70, 55, 0.92); }

.qm-card__body { padding: 0.9rem 0.95rem 1rem; }

.qm-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.qm-card__name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
}

.qm-fav {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
}
.qm-fav.is-on { color: #b08a3b; }

.qm-card__desc {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qm-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.qm-card__facts span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(44, 24, 16, 0.05);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.qm-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.qm-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.qm-price-wrap--detail {
  margin: 0.35rem 0 0.75rem;
}

.qm-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  color: #1b1b1d;
}
.qm-price__value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.qm-price__cur {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-deep);
}
.qm-price--lg .qm-price__value,
.qm-price--lg span:first-child {
  font-size: 1.7rem;
  font-weight: 800;
}

.qm-earn-points {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.qm-price-wrap--detail .qm-earn-points {
  font-size: 0.9rem;
}

.qm-btn {
  border: 0;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms var(--ease), opacity 160ms var(--ease), background 160ms var(--ease);
}
.qm-btn:active { transform: translateY(1px); }
.qm-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.qm-btn--ink { background: linear-gradient(180deg, #2a2a2d, var(--ink)); color: #fbf8f2; }
.qm-btn--gold { background: linear-gradient(180deg, #d4af5a, var(--gold)); color: #171718; }
.qm-btn--sm { min-height: 38px; font-size: 0.86rem; }
.qm-btn--block { width: 100%; }

/* Dock */
.qm-dock {
  position: fixed;
  left: 50%;
  bottom: calc(0.55rem + var(--safe-b));
  transform: translateX(-50%);
  width: min(480px, calc(100% - 0.75rem));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.15rem;
  padding: 0.35rem 0.25rem;
  border-radius: 18px;
  background: rgba(27, 27, 29, 0.96);
  border: 1px solid rgba(200, 162, 74, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  z-index: 50;
}

.qm-dock__btn {
  position: relative;
  border: 0;
  background: transparent;
  color: rgba(251, 248, 242, 0.78);
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  padding: 0.4rem 0.1rem;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
  min-width: 0;
}
.qm-dock__btn span,
.qm-dock__glyph { font-size: 1.05rem; display: grid; place-items: center; }
.qm-dock__btn small { font-size: 0.68rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qm-dock__btn--accent {
  color: #171718;
  background: var(--gold);
}
.qm-dock__count {
  position: absolute;
  top: 0.15rem;
  right: 0.35rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--gold);
  color: #1a120c;
  font-size: 0.65rem;
  font-weight: 800;
  font-style: normal;
  display: grid;
  place-items: center;
}

/* Sticky browse cart CTA */
.qm-browse-cart {
  position: fixed;
  left: 50%;
  bottom: calc(4.85rem + var(--safe-b));
  transform: translateX(-50%) translateY(0);
  width: min(480px, calc(100% - 0.75rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #2b2b2e, var(--ink));
  color: #fbf8f2;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  z-index: 55;
  transition: transform 220ms var(--ease), opacity 180ms var(--ease), visibility 180ms;
}
.qm-browse-cart[hidden] {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}
.qm-browse-cart__label { text-align: left; }
.qm-browse-cart__hint {
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
}
.qm.has-browse-cart {
  padding-bottom: calc(var(--dock-h) + var(--safe-b) + 5.25rem);
}

/* Sheets */
.qm-sheet[hidden] { display: none !important; }
.qm-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.qm-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 5, 0.55);
}
.qm-sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(480px, 100%);
  max-height: min(92vh, 820px);
  max-height: min(92dvh, 820px);
  overflow: auto;
  background: var(--cream-2);
  border-radius: 24px 24px 0 0;
  padding: 1rem 1rem calc(1.2rem + var(--safe-b));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.28);
  animation: qm-up 280ms var(--ease);
}
.qm-sheet__panel--cart { padding-bottom: 0; }
.qm-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.qm-sheet__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.qm-sheet__close {
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(44, 24, 16, 0.06);
  font-size: 1.4rem;
  cursor: pointer;
}

.qm-detail__media {
  aspect-ratio: 16 / 11;
  border-radius: 16px;
  overflow: hidden;
  background: #2a1c14;
  margin-bottom: 0.9rem;
}
.qm-detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qm-detail__body h3 {
  margin: 0.5rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1.05;
}
.qm-detail__desc {
  color: var(--ink-soft);
  line-height: 1.5;
}
.qm-detail__facts {
  list-style: none;
  margin: 0.75rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.qm-detail__facts li {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(44, 24, 16, 0.06);
  font-size: 0.8rem;
  font-weight: 650;
}
.qm-detail__block { margin: 0.9rem 0; }
.qm-detail__block h4 {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.qm-detail__block p { margin: 0; line-height: 1.45; }

.qm-related-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 42%;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.qm-related {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.qm-related img,
.qm-related__ph {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #2a1c14;
}
.qm-related__ph { display: grid; place-items: center; color: #fff; }
.qm-related strong,
.qm-related span {
  display: block;
  padding: 0.35rem 0.45rem 0;
  font-size: 0.78rem;
}
.qm-related span { padding-bottom: 0.45rem; color: var(--gold-deep); font-weight: 700; }

.qm-field {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0;
  font-weight: 650;
  font-size: 0.88rem;
}
.qm-field input,
.qm-field textarea,
.qm-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #fff;
}

.qm-form__hint { color: var(--ink-soft); margin-top: 0; }
.qm-reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.qm-reason {
  display: block;
  cursor: pointer;
}
.qm-reason input { position: absolute; opacity: 0; pointer-events: none; }
.qm-reason span {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 650;
  font-size: 0.88rem;
}
.qm-reason input:checked + span {
  border-color: var(--gold);
  background: rgba(196, 163, 90, 0.14);
}

.qm-cart { min-height: 180px; padding-bottom: 11rem; }
.qm-cart__empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 2rem 1rem;
}
.qm-cart__note textarea {
  width: 100%;
  resize: vertical;
  min-height: 2.75rem;
}
.qm-cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.qm-cart-item img,
.qm-cart-item__ph {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #2a1c14;
}
.qm-cart-item__ph { display: grid; place-items: center; color: #fff; }
.qm-cart-item h3 {
  margin: 0;
  font-size: 0.95rem;
}
.qm-cart-item p {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.qm-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.qm-qty button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.qm-cart__sticky {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem 0 calc(0.9rem + var(--safe-b));
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.2), var(--cream-2) 28%);
  border-top: 1px solid var(--line);
}
.qm-cart__sticky > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 650;
}
.qm-cart__sticky strong {
  font-size: 1.25rem;
}

.qm-loyalty__score {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin: 0.2rem 0;
}
.qm-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(44, 24, 16, 0.08);
  overflow: hidden;
  margin: 0.75rem 0 0.4rem;
}
.qm-progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  border-radius: inherit;
}
.qm-rewards {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.qm-reward {
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.qm-reward strong { display: block; margin-bottom: 0.2rem; }
.qm-reward span { color: var(--ink-soft); font-size: 0.88rem; }

.qm-empty,
.qm-search-empty,
.qm-bill {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--ink-soft);
}

.qm-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + 1rem + var(--safe-b));
  transform: translateX(-50%);
  z-index: 90;
  min-width: min(320px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(26, 18, 12, 0.94);
  color: #f6efe4;
  font-weight: 650;
  text-align: center;
  box-shadow: var(--shadow);
  animation: qm-fade 220ms var(--ease);
}
.qm-toast[hidden] { display: none !important; }

@keyframes qm-up {
  from { transform: translate(-50%, 18px); opacity: 0.4; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
@keyframes qm-fade {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (min-width: 768px) {
  .qm { width: min(720px, 100%); }
  .qm-grid { grid-template-columns: 1fr 1fr; }
  .qm-hero { min-height: 460px; padding: 1.25rem 1.5rem 2rem; }
  /* Tablet+: show a next-card peek when multiple campaigns exist */
  .qm-campaigns__track:not(:has(> .qm-campaign:only-child)) {
    grid-auto-columns: minmax(48%, 360px);
  }
}

@media (min-width: 1100px) {
  .qm { width: min(860px, 100%); }
  .qm-grid { gap: 1rem; }
}

@media (hover: hover) and (pointer: fine) {
  .qm-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .qm-card,
  .qm-btn,
  .qm-cat,
  .qm-sheet__panel,
  .qm-toast { animation: none; transition: none; }
}

/* Phase B polish */
.qm-hero__desc {
  margin: 0.85rem auto 0;
  max-width: 26rem;
  color: rgba(246, 239, 228, 0.68);
  font-size: 0.9rem;
  line-height: 1.45;
}
.qm-closed-banner {
  margin: 0.85rem 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(140, 70, 55, 0.12);
  border: 1px solid rgba(140, 70, 55, 0.28);
  display: grid;
  gap: 0.2rem;
}
.qm-closed-banner strong { font-size: 0.92rem; }
.qm-closed-banner span { color: var(--ink-soft); font-size: 0.86rem; }
.qm-dock--compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.qm-dock__count--soft {
  background: color-mix(in srgb, var(--qm-ink, #1a1510) 72%, transparent);
}
.qm-my-order {
  padding: 0.25rem 1rem 1.5rem;
  display: grid;
  gap: 1rem;
}
.qm-my-order__empty {
  padding: 2rem 0.5rem;
  text-align: center;
  color: color-mix(in srgb, var(--qm-ink, #1a1510) 62%, transparent);
  font-size: 0.95rem;
  line-height: 1.45;
}
.qm-my-order__card {
  border-top: 1px solid color-mix(in srgb, var(--qm-ink, #1a1510) 10%, transparent);
  padding-top: 0.85rem;
  display: grid;
  gap: 0.75rem;
}
.qm-my-order__card:first-child { border-top: 0; padding-top: 0; }
.qm-my-order__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}
.qm-my-order__meta strong {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.qm-my-order__status {
  font-size: 0.78rem;
  font-weight: 650;
  opacity: 0.72;
}
.qm-my-order__line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: start;
  padding: 0.55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--qm-ink, #1a1510) 8%, transparent);
}
.qm-my-order__line:last-of-type { border-bottom: 0; }
.qm-my-order__line h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}
.qm-my-order__line p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  opacity: 0.7;
}
.qm-my-order__hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--qm-accent, #b0893e) 88%, #1a1510);
}
.qm-my-order__hint--locked {
  color: color-mix(in srgb, #8a3b2a 85%, #1a1510);
}
.qm-my-order__hint--drink {
  color: color-mix(in srgb, #2f6b4f 80%, #1a1510);
}
.qm-my-order__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.qm-my-order__actions .qm-btn { flex: 1 1 auto; min-width: 7.5rem; }
.qm-my-order__note {
  width: 100%;
  margin-top: 0.4rem;
  border: 1px solid color-mix(in srgb, var(--qm-ink, #1a1510) 14%, transparent);
  border-radius: 0.55rem;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.85rem;
  background: color-mix(in srgb, #fff 88%, transparent);
  resize: vertical;
}
.qm-my-order__note:disabled {
  opacity: 0.55;
}
.qm-my-order__order-note {
  display: block;
  margin: 0.65rem 0 0.15rem;
}
.qm-my-order__order-note-view {
  margin: 0.65rem 0 0.15rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--qm-ink, #1a1510) 78%, transparent);
}
.qm-bill-now { margin: 0 0 1rem; }
.qm-loyalty-ask__actions { display: grid; gap: 0.65rem; }
.qm-loyalty-ask__form { margin-top: 1rem; }
.qm-loyalty__history { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.qm-loyalty__history li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(44, 24, 16, 0.05);
  font-size: 0.86rem;
}
.qm-loyalty__h { margin: 1.1rem 0 0.35rem; font-size: 0.95rem; }
.qm-detail__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #1a120c;
}
.qm-detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qm-detail__gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.65rem 1rem 0;
}
.qm-gallery__thumb {
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  cursor: pointer;
  background: #2a1c14;
}
.qm-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qm-fav.is-on svg { fill: currentColor; }
.qm-fav svg { display: block; margin: 0 auto; }

/* Hünkar gold + anthracite brand layer */
.qm :is(a, button, input, textarea, select):focus-visible,
.qm-table-gate :is(button, input):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 72%, #fff);
  outline-offset: 2px;
}
.qm-campaign,
.qm-table-gate__veil {
  --brand-ink: #1b1b1d;
}
.qm-campaign {
  background:
    linear-gradient(135deg, rgba(27, 27, 29, 0.97), rgba(17, 17, 18, 0.94)),
    radial-gradient(400px 160px at 100% 0%, rgba(200, 162, 74, 0.38), transparent 60%);
  border-color: rgba(200, 162, 74, 0.34);
}
.qm-campaign.has-image::after {
  background: linear-gradient(105deg, rgba(17, 17, 18, 0.94) 0%, rgba(17, 17, 18, 0.76) 48%, rgba(17, 17, 18, 0.5) 100%);
}
.qm-badge--new {
  background: #c8a24a;
  color: #171718;
}

@media (prefers-color-scheme: dark) {
  body.qm-body {
    --ink: #f7f2e8;
    --ink-soft: #c8c3ba;
    --cream: #171719;
    --cream-2: #202124;
    --line: rgba(212, 175, 90, 0.18);
    --surface: #242426;
    background:
      radial-gradient(800px 400px at 50% -10%, rgba(200, 162, 74, 0.14), transparent 60%),
      #171719;
  }
  .qm-search,
  .qm-sheet__panel,
  .qm-table-gate__card {
    background: #202124;
    color: #f7f2e8;
  }
  .qm-card,
  .qm-related,
  .qm-reward,
  .qm-field :is(input, textarea, select),
  .qm-reason span,
  .qm-qty button {
    background: #242426;
    color: #f7f2e8;
  }
  .qm-price { color: #f7f2e8; }
  .qm-cart__sticky {
    background: linear-gradient(180deg, rgba(32, 33, 36, 0.2), #202124 28%);
  }
}