/* Quán 79 menu page - mobile first */

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

html {
  background: #d8c9bb;
  scroll-behavior: smooth;
}

body {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding-top: 56px;
  background: #fff;
  color: var(--text-dark);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.m-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 1000;
  width: min(100%, 430px);
  height: 56px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(14px);
}

.back-home,
.m-header__back {
  position: static;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  gap: 0;
  background: #f6edf0;
  color: var(--primary-color);
  text-decoration: none;
  box-shadow: none;
  transform: none;
  font-weight: 800;
}

.back-home:hover {
  background: #f6edf0;
  color: var(--primary-color);
  box-shadow: none;
  transform: none;
}

.back-home span[aria-hidden="true"] {
  font-size: 22px;
  line-height: 1;
}

.back-home-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.m-header__title {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-language-switcher {
  position: static;
  z-index: auto;
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f5f5f5;
  box-shadow: none;
}

.menu-language-switcher .lang-btn {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.menu-hero {
  padding: 26px 18px 22px;
  background:
    linear-gradient(rgba(20, 20, 20, 0.34), rgba(20, 20, 20, 0.5)),
    url("../images/hero.jpg") center / cover;
  color: #fff;
}

.menu-header-content {
  max-width: none;
  margin: 0;
}

.menu-main-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.18;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.menu-subtitle {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
  line-height: 1.5;
}

.menu-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  line-height: 1.45;
  font-style: normal;
}

.m-catnav {
  position: sticky;
  top: 56px;
  z-index: 900;
  display: flex;
  gap: 10px;
  padding: 10px 14px 12px;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.m-catnav::-webkit-scrollbar {
  display: none;
}

.m-catnav__item {
  flex: 0 0 82px;
  height: 106px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 9px 7px 7px;
  border: 1px solid rgba(199, 28, 78, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #faf6f3 100%);
  color: var(--text-dark);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.m-catnav__item.is-active {
  border-color: var(--primary-color);
  background: #fff3f6;
  box-shadow: 0 5px 14px rgba(199, 28, 78, 0.18);
}

.m-catnav__item-name {
  min-height: 30px;
  display: -webkit-box;
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.m-catnav__item-img,
.m-catnav__item-img-placeholder {
  width: 58px;
  height: 46px;
  border-radius: 12px;
}

.m-catnav__item-img {
  object-fit: cover;
}

.m-catnav__item-img-placeholder {
  background: #f6edf0;
}

.m-main,
.menu-container {
  max-width: none;
  margin: 0;
  padding: 4px 0 28px;
}

.m-section {
  padding-top: 22px;
  scroll-margin-top: 184px;
}

.m-section__heading {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--text-dark);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.m-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 14px;
  padding: 0 14px 6px;
}

.m-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.m-card:active {
  transform: scale(0.985);
}

.m-card__img-wrap {
  position: relative;
  aspect-ratio: 1 / 0.78;
  overflow: hidden;
  border-radius: 14px;
  background: #f4efeb;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.m-card__img-wrap::after {
  content: "+";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.m-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-card__body {
  padding-top: 9px;
}

.m-card__name {
  min-height: 42px;
  display: -webkit-box;
  margin-bottom: 5px;
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.38;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.m-card__desc {
  min-height: 20px;
  display: -webkit-box;
  margin-bottom: 5px;
  color: #706a66;
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.m-card__price {
  color: var(--primary-color);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.m-empty {
  margin: 28px 14px;
  padding: 18px;
  border-radius: 12px;
  background: #faf6f3;
  color: #706a66;
  font-size: 14px;
  text-align: center;
}

.menu-footer-cta {
  padding: 42px 18px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #252525 100%);
  color: #fff;
  text-align: center;
}

.menu-footer-cta h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 25px;
  line-height: 1.25;
}

.menu-footer-cta p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.menu-footer-cta .cta-button {
  width: 100%;
  max-width: none;
  justify-content: center;
}

.cta-button.secondary {
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
}

.cta-button.secondary:hover {
  background: #fff;
  color: var(--primary-color);
}

.footer {
  margin-left: 0;
  padding: 36px 18px 22px;
}

.footer-content {
  grid-template-columns: 1fr;
  gap: 24px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  padding-top: 22px;
  font-size: 11px;
  line-height: 1.6;
}

.m-dialog {
  width: min(100%, 430px);
  max-height: 90dvh;
  margin: auto auto 0;
  padding: 0;
  overflow-y: auto;
  border: none;
  border-radius: 18px 18px 0 0;
  background: #fff;
  color: var(--text-dark);
}

.m-dialog::backdrop {
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
}

.m-dialog__inner {
  position: relative;
}

.m-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  cursor: pointer;
}

.m-dialog__close svg {
  width: 18px;
  height: 18px;
}

.m-dialog__img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f4efeb;
}

.m-dialog__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-dialog__body {
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
}

.m-dialog__price {
  margin-bottom: 8px;
  color: var(--primary-color);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.m-dialog__name {
  margin: 0 0 5px;
  color: var(--text-dark);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.38;
}

.m-dialog__subname {
  margin: 0 0 12px;
  color: #777;
  font-size: 14px;
  line-height: 1.45;
}

.m-dialog__desc {
  margin: 0;
  color: #4c4946;
  font-size: 14px;
  line-height: 1.75;
}

@media (min-width: 431px) {
  .m-dialog {
    border-radius: 18px;
    margin: auto;
  }
}
