:root {
  --bg-color: #faf8f3;
  --bg-subtle: #f1ece1;
  --card-bg: #ffffff;
  --text-primary: #1f1915;
  --text-secondary: #756b62;
  --navy-primary: #1f1915;
  --gold-accent: #b88a44;
  --whatsapp-green: #16a34a;
  --font-serif: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-sans: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: #e8e3d8;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.menu-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg-color);
  position: relative;
  padding-bottom: 92px;
}

.top-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 244, 237, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13, 27, 42, 0.08);
  padding: 12px 16px 10px;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.back-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(13, 27, 42, 0.06);
  flex-shrink: 0;
}

.header-titles {
  flex: 1;
  min-width: 0;
}

.header-titles h1 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-titles span {
  font-size: 12px;
  color: var(--text-secondary);
}

.header-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-accent);
  flex-shrink: 0;
}

.table-badge {
  background: rgba(184, 138, 68, 0.16);
  color: #7c5820;
  border: 1px solid rgba(184, 138, 68, 0.35);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.table-badge.hidden {
  display: none;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid rgba(13, 27, 42, 0.08);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

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

.cat-tab {
  border: none;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid rgba(13, 27, 42, 0.08);
  transition: all 0.2s ease;
}

.cat-tab.active {
  background: var(--navy-primary);
  color: #ffffff;
  border-color: var(--navy-primary);
}

.menu-content {
  padding: 14px 16px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-primary);
  margin: 18px 0 10px;
}

.section-title:first-child {
  margin-top: 4px;
}

.dishes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dish-card {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid rgba(31, 25, 21, 0.06);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(31, 25, 21, 0.04);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.dish-card.no-photo {
  padding: 12px 14px;
}

.dish-card.no-photo .dish-bottom {
  margin-top: 6px;
}

.dish-card:active {
  transform: scale(0.99);
}

.dish-card.unavailable {
  opacity: 0.55;
}

.dish-img {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

.dish-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.dish-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.dish-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(205, 162, 80, 0.18);
  color: #8f681d;
  white-space: nowrap;
}

.dish-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0;
}

.dish-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.dish-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.dish-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-primary);
}

.dish-weight {
  font-size: 11px;
  color: var(--text-secondary);
}

.add-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: var(--navy-primary);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Cart Bar */
.cart-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  z-index: 40;
}

.cart-bar.hidden {
  display: none;
}

.cart-bar-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  background: var(--navy-primary);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(13, 27, 42, 0.3);
  cursor: pointer;
}

.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-count {
  background: var(--gold-accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Modals */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.active {
  display: flex;
}

.sheet-card {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  position: relative;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-primary);
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

.sheet-close.static {
  position: static;
  background: var(--bg-subtle);
}

.sheet-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-subtle);
}

.sheet-body {
  padding: 16px;
}

.sheet-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sheet-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(205, 162, 80, 0.2);
  color: #8f681d;
}

.sheet-badge.hidden,
.sheet-options.hidden {
  display: none;
}

.sheet-weight {
  font-size: 12px;
  color: var(--text-secondary);
}

.sheet-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 8px;
}

.sheet-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 14px;
}

.options-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.option-chip {
  border: 1px solid rgba(13, 27, 42, 0.14);
  background: var(--bg-color);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.option-chip.selected {
  background: var(--navy-primary);
  color: #ffffff;
  border-color: var(--navy-primary);
}

.sheet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(13, 27, 42, 0.08);
}

.sheet-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-primary);
}

.btn-primary {
  flex: 1;
  border: none;
  border-radius: 14px;
  background: var(--navy-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 16px;
  cursor: pointer;
}

.cart-sheet {
  padding: 16px;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cart-header h2 {
  font-size: 19px;
  color: var(--navy-primary);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 36vh;
  overflow-y: auto;
  margin-bottom: 14px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: var(--bg-color);
  border-radius: 12px;
}

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

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
}

.cart-item-opt {
  font-size: 11px;
  color: var(--text-secondary);
}

.cart-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-primary);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(13, 27, 42, 0.14);
  background: #ffffff;
  font-size: 16px;
  cursor: pointer;
}

.cart-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.cart-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(13, 27, 42, 0.14);
  font-family: inherit;
  font-size: 13px;
}

.cart-footer {
  border-top: 1px solid rgba(13, 27, 42, 0.08);
  padding-top: 12px;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  margin-bottom: 10px;
}

.btn-whatsapp {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--whatsapp-green);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Subtle QazMenu Powered-By Footer */
.powered-footer {
  text-align: center;
  padding: 18px 16px 14px;
}

.powered-footer a {
  display: inline-block;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.powered-footer a:hover {
  opacity: 1;
}

.powered-footer span {
  font-weight: 600;
  color: var(--navy-primary);
}
