:root {
  --menu-border: rgba(255, 255, 255, 0.08);
  --menu-accent: #9f7729;
}

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

@media (max-width: 480px) {
  html {
    scroll-padding-top: 108px;
  }
}

body.theme-light {
  --menu-border: var(--line);
}

body.theme-light .menu-app {
  background: var(--bg);
}

body.theme-light .menu-sticky {
  background: var(--bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

body.theme-light .search-panel-inner,
body.theme-light .categories-sheet,
body.theme-light .cart-sheet {
  background: var(--surface);
  color: var(--text);
}

/* ─── Light mode: menu icon rəng düzəlişləri ─── */
body.theme-light .menu-top-btn img {
  filter: brightness(0) saturate(100%) invert(28%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(95%) contrast(90%);
}

body.theme-light .menu-top-icon img {
  filter: brightness(0) saturate(100%) invert(28%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(95%) contrast(90%);
}

body.theme-light .menu-tab-icon img {
  filter: brightness(0) saturate(100%) invert(28%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(95%) contrast(90%);
}

body.theme-light .cart-icon img {
  filter: brightness(0) saturate(100%) invert(100%);
}

.menu-app {
  min-height: 100vh;
  background: #141414;
  display: flex;
  justify-content: center;
}

.menu-shell {
  width: min(980px, 100%);
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom, 0px));
}

.menu-sticky {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #141414;
  padding-bottom: 2px;
  margin: 0 -2px;
  padding-left: 2px;
  padding-right: 2px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  border-radius: 5px;
}

.menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 4px 12px;
}

.menu-top-btn {
  width: clamp(36px, 10vw, 44px);
  height: clamp(36px, 10vw, 44px);
  border-radius: 12px;
  border: 1px solid rgba(159, 119, 41, 0.45);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 22px;
  flex-shrink: 0;
}

.menu-top-btn img {
  width: clamp(18px, 5vw, 26px);
  height: auto;
  max-height: 26px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(52%) sepia(38%) saturate(580%) hue-rotate(5deg) brightness(95%)
    contrast(92%);
}

.menu-top-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.menu-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.menu-top-icon {
  width: clamp(36px, 10vw, 44px);
  height: clamp(36px, 10vw, 44px);
  border-radius: 12px;
  border: 1px solid rgba(159, 119, 41, 0.45);
  background: transparent;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
}

.menu-top-icon img {
  width: clamp(16px, 4.5vw, 24px);
  height: auto;
  max-height: 24px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(52%) sepia(38%) saturate(580%) hue-rotate(5deg) brightness(95%)
    contrast(92%);
}

.menu-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: auto;
  padding: 10px 2px;
  scrollbar-width: none;
}

.menu-tabs::-webkit-scrollbar {
  display: none;
}

.menu-tab {
  border: 1px solid var(--menu-border);
  background: var(--surface-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: clamp(11px, 3.2vw, 13px);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button.menu-tab {
  font-family: inherit;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.menu-tab-icon {
  width: clamp(44px, 12vw, 54px);
  min-width: 44px;
  padding: 8px 0;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}

.menu-tab-icon img {
  width: clamp(18px, 5vw, 28px);
  height: auto;
  max-height: 28px;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(52%) sepia(38%) saturate(580%) hue-rotate(5deg) brightness(95%)
    contrast(92%);
}

.menu-tab.active {
  outline: 2px solid #9f7729;
  border-color: transparent;
}

.menu-hint {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 6px 14px;
  border-bottom: 1px solid var(--menu-border);
  color: var(--text);
  font-size: 14px;
}

.menu-hint-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #2b3c52;
  color: #cfe6ff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
  flex-shrink: 0;
}

.menu-section {
  padding-top: 14px;
  scroll-margin-top: 100px;
}

@media (max-width: 480px) {
  .menu-section {
    scroll-margin-top: 92px;
  }
}

.menu-section-title {
  margin: 0;
  padding: 14px 0 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--menu-border);
}

.menu-grid {
  display: grid;
  gap: 14px;
  padding: 14px 0 6px;
}

.menu-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.menu-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  cursor: pointer;
}

.menu-row-name {
  font-weight: 650;
  font-size: 14px;
  color: var(--text);
}

.menu-row-line {
  flex: 1;
  height: 2px;
  margin: 0 6px;
  border-bottom: 0;
  border-radius: 2px;
  opacity: 0.65;
  background: repeating-linear-gradient(
    90deg,
    rgba(159, 119, 41, 0.95) 0 6px,
    rgba(159, 119, 41, 0.0) 6px 12px
  );
}

.menu-row-price {
  white-space: nowrap;
  font-weight: 800;
  font-size: 14px;
  color: #9f7729;
}

.menu-item {
  display: grid;
  gap: 10px;
}

.menu-img {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #111317;
}

.menu-img img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  display: block;
}

.menu-add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: #b31313;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.menu-body {
  padding: 0 2px;
}

.menu-name {
  font-weight: 800;
  color: var(--text);
  font-size: 13px;
}

.menu-desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-price {
  margin-top: 8px;
  color: #cf2020;
  font-weight: 900;
  font-size: 14px;
}

.menu-entry {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 0;
  cursor: pointer;
  text-align: left;
}

.menu-list .menu-entry:first-child {
  padding-top: 16px;
}

.menu-list .menu-entry:last-child {
  padding-bottom: 16px;
}

.menu-entry-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-entry-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.menu-entry-title {
  font-weight: 900;
  font-size: 15px;
  color: var(--text);
  min-width: 0;
}

.menu-entry-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 6px;
  background: #9f7729;
  color: #0e0f14;
  font-weight: 900;
  font-size: 11px;
}

.menu-entry-desc {
  display: none;
}

.menu-entry-dots {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  opacity: 0.7;
  background: repeating-linear-gradient(
    90deg,
    rgba(159, 119, 41, 0.95) 0 3px,
    rgba(159, 119, 41, 0) 3px 7px
  );
}

.menu-entry-price {
  white-space: nowrap;
  font-weight: 900;
  font-size: 14px;
  color: #9f7729;
  flex-shrink: 0;
}

.menu-bottom-spacer {
  height: 90px;
}

.cart-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 28px));
  border: 0;
  border-radius: 14px;
  background: #9f7729;
  color: #fff;
  padding: 14px 16px;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  justify-content: flex-start;
  z-index: 998;
}

.cart-icon {
  width: clamp(22px, 6.5vw, 32px);
  height: clamp(22px, 6.5vw, 32px);
  min-width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cart-icon img {
  width: 100%;
  height: 100%;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

/* Axtarış paneli */
.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1002;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 1003;
  display: flex;
  flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 12px 12px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.search-panel.open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.search-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(90vh, 720px);
  margin: 0 auto;
  width: 100%;
  max-width: min(980px, 100%);
  background: #1a1a1a;
  border: 1px solid var(--menu-border);
  border-radius: 14px;
  overflow: hidden;
}

.search-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--menu-border);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #9f7729;
  border-radius: 10px;
  padding: 12px 14px;
  background: #141414;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.search-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.search-results {
  flex: 1;
  overflow: auto;
  padding: 6px 0 10px;
  -webkit-overflow-scrolling: touch;
}

.search-hint,
.search-empty {
  margin: 0;
  padding: 20px 16px;
  text-align: center;
  color: var(--muted, #9aa0a8);
  font-size: 14px;
}

.search-result {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--menu-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.search-result-meta {
  font-size: 12px;
  color: var(--muted, #9aa0a8);
}

.search-result-price {
  font-weight: 800;
  font-size: 13px;
  color: var(--menu-accent);
  margin-top: 2px;
}

/* Kateqoriya siyahısı (hamburger) */
.categories-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1004;
}

.categories-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: min(980px, 100%);
  max-height: min(78vh, 620px);
  background: #1a1a1a;
  border: 1px solid var(--menu-border);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  z-index: 1005;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.28s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.categories-sheet.open {
  transform: translate(-50%, 0);
}

.categories-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 10px auto 6px;
  flex-shrink: 0;
}

.categories-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 12px;
  border-bottom: 1px solid var(--menu-border);
}

.categories-sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.categories-sheet-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.categories-sheet-body {
  flex: 1;
  overflow: auto;
  padding: 8px 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.categories-sheet-link {
  display: block;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 15px;
  border-bottom: 1px solid var(--menu-border);
}

.categories-sheet-link:last-child {
  border-bottom: 0;
}

.categories-sheet-link:active {
  background: rgba(255, 255, 255, 0.06);
}

/* Səbət paneli */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
}

.cart-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: min(980px, 100%);
  max-height: min(72vh, 560px);
  background: #1a1a1a;
  border: 1px solid var(--menu-border);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.28s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.cart-sheet.open {
  transform: translate(-50%, 0);
}

.cart-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 10px auto 6px;
  flex-shrink: 0;
}

.cart-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 12px;
  border-bottom: 1px solid var(--menu-border);
}

.cart-sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.cart-sheet-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.cart-sheet-body {
  flex: 1;
  overflow: auto;
  padding: 8px 14px 12px;
  -webkit-overflow-scrolling: touch;
}

.cart-empty {
  margin: 20px 0;
  text-align: center;
  color: var(--muted, #9aa0a8);
  font-size: 14px;
}

.cart-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--menu-border);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-line-title {
  font-weight: 650;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}

.cart-line-price {
  font-weight: 800;
  font-size: 13px;
  color: var(--menu-accent);
}

.cart-line-remove {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--menu-border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ─── Say idarəetməsi (- qty +) ─── */
.cart-qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--menu-border);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  height: 36px;
}

.cart-qty-btn {
  width: 34px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.cart-qty-btn:hover {
  background: rgba(159, 119, 41, 0.15);
  color: #9f7729;
}

.cart-qty-btn[data-action="dec"]:hover {
  background: rgba(220, 60, 60, 0.12);
  color: #e05252;
}

.cart-qty-num {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  border-left: 1px solid var(--menu-border);
  border-right: 1px solid var(--menu-border);
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  user-select: none;
}

.cart-sheet-footer {
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--menu-border);
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}

.cart-sheet-footer strong {
  color: var(--menu-accent);
}

.cart-sheet-summary {
  padding: 10px 16px 8px;
  border-top: 1px solid var(--menu-border);
  font-size: 13px;
  color: var(--text);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.cart-summary-fee > span:first-child {
  color: var(--muted, #9aa0a8);
}

.cart-summary-amount {
  font-weight: 800;
  color: var(--menu-accent);
  white-space: nowrap;
}

.cart-azn {
  font-weight: 600;
  font-size: 12px;
  opacity: 0.85;
  margin-left: 2px;
}

/* index.html ilə eyni copy-toast animasiyası; səbət üstü */
.copy-toast {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 997;
}

@media (min-width: 768px) {
  .copy-toast {
    bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 360px) {
  .menu-shell {
    padding: 14px 12px 16px;
  }
  .menu-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .menu-top {
    gap: 8px;
  }

  .menu-top-btn,
  .menu-top-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .menu-top-title {
    font-size: 15px;
  }

  .menu-entry-title {
    font-size: 14px;
  }

  .menu-entry-desc {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .cart-bar {
    bottom: 10px;
    font-size: 15px;
    padding: 13px 14px;
  }
}

@media (min-width: 768px) {
  .menu-shell {
    padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .menu-top {
    padding: 8px 4px 16px;
  }

  .menu-top-title {
    font-size: 20px;
  }

  .menu-tab {
    font-size: 14px;
    padding: 11px 14px;
  }

  .menu-hint {
    font-size: 15px;
  }

  .menu-section-title {
    font-size: 18px;
    padding: 16px 0 14px;
  }

  .menu-entry {
    padding: 12px 0;
  }

  .menu-list .menu-entry:first-child {
    padding-top: 18px;
  }

  .menu-list .menu-entry:last-child {
    padding-bottom: 18px;
  }

  .menu-entry-title {
    font-size: 16px;
  }

  .menu-entry-desc {
    font-size: 13px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .menu-entry-price {
    font-size: 15px;
  }

  .menu-bottom-spacer {
    height: 104px;
  }

  .cart-bar {
    bottom: 20px;
    width: min(980px, calc(100% - 48px));
    font-size: 17px;
    padding: 16px 20px;
  }
}

@media (min-width: 1200px) {
  .menu-shell {
    width: min(1100px, 100%);
    padding-left: 28px;
    padding-right: 28px;
  }

  .cart-bar {
    width: min(1100px, calc(100% - 64px));
  }
}

