/* ===== Страница меню ===== */

.site-nav__link--active { color: #DE5F98; }

/* ===== Шапка каталога ===== */
.catalog-hero {
  position: relative;
  padding: clamp(40px, 6vw, 76px) 0 clamp(10px, 2vw, 22px);
  overflow: hidden;
}
.catalog-hero .section-decor {
  position: absolute;
  right: -60px;
  top: -40px;
  width: clamp(220px, 26vw, 340px);
  opacity: .5;
  pointer-events: none;
}
.catalog-hero__back {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: #6A6A63;
  margin-bottom: 26px;
  transition: color .2s ease;
}
.catalog-hero__back:hover { color: #DE5F98; }
.catalog-hero__title {
  font-size: clamp(38px, 6.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -.02em;
  font-weight: 800;
  margin: 14px 0 0;
}
.catalog-hero__lead { max-width: 560px; }
.catalog-hero__note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: #3C6B2C;
  background: #EEF3E7;
  border: 1px solid #D8E4C9;
  border-radius: 999px;
  padding: 9px 16px;
}

/* ===== Табы категорий ===== */
.catalog { padding-bottom: clamp(70px, 9vw, 120px); }
.catalog__tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #EDECE7;
  padding: 14px 0;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.catalog__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.catalog__tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #3C3C3B;
  background: #F4F3EE;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.tab:hover { border-color: #EC76AB; }
.tab__count { font-size: 11px; color: #A5A49D; transition: color .2s ease; }
.tab[aria-selected="true"] {
  background: #3C3C3B;
  color: #fff;
}
.tab[aria-selected="true"] .tab__count { color: #F19FC3; }

/* ===== Сетка ===== */
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.2vw, 26px);
}
@media (max-width: 1020px) { .catalog__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .catalog__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px)  { .catalog__grid { grid-template-columns: 1fr; } }

@keyframes dish-card-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dish-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #fff;
  border: 1px solid #E9E8E2;
  border-radius: 22px;
  padding: 10px 10px 18px;
  cursor: pointer;
  opacity: 0;
  animation: dish-card-in .5s cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: transform .22s cubic-bezier(.22,.61,.36,1), box-shadow .22s ease, border-color .22s ease;
}
@media (prefers-reduced-motion: reduce) {
  .dish-card { animation: none; opacity: 1; }
}
.dish-card:hover {
  transform: translateY(-4px);
  border-color: #E2C7D4;
  box-shadow: 0 18px 40px -18px rgba(60,60,59,.28);
}
.dish-card:focus-visible {
  outline: 2.5px solid #EC76AB;
  outline-offset: 3px;
}
.dish-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #F4F3EE;
}
.dish-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.dish-card:hover .dish-card__media img { transform: scale(1.045); }
.dish-card--off .dish-card__media img { filter: grayscale(.85); opacity: .6; }

.dish-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #F1EFE8;
}
.dish-card__placeholder img { width: 54%; height: auto; opacity: .55; object-fit: contain; }
.dish-card__placeholder span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #A5A49D;
}

.dish-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  background: #fff;
  color: #6A6A63;
  border-radius: 999px;
  padding: 6px 11px;
  box-shadow: 0 4px 14px rgba(35,35,34,.14);
}

.dish-card__body { padding: 16px 8px 0; display: flex; flex-direction: column; flex: 1; }
.dish-card__name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0;
}
.dish-card__price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #3C3C3B;
  margin-top: 8px;
}
.dish-card__price--off { color: #A5A49D; font-weight: 500; font-size: 14px; }
.dish-card__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: #6A6A63;
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dish-card__more {
  margin-top: auto;
  padding-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #DE5F98;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}
.dish-card:hover .dish-card__more,
.dish-card:focus-visible .dish-card__more { opacity: 1; transform: translateY(0); }

.catalog__empty {
  text-align: center;
  padding: 70px 0;
  color: #6A6A63;
}
.catalog__empty-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #DE5F98;
  margin-bottom: 10px;
}

/* ===== Оверлей позиции ===== */
.dish { position: fixed; inset: 0; z-index: 120; }
.dish[hidden] { display: none; }
.dish__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35,35,34,.55);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: dish-fade .25s ease forwards;
}
@keyframes dish-fade { from { opacity: 0; } to { opacity: 1; } }

.dish__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(960px, calc(100vw - 32px));
  max-height: min(86vh, 780px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  animation: dish-pop .32s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes dish-pop {
  from { opacity: 0; transform: translate(-50%, -47%) scale(.965); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .dish__backdrop, .dish__panel { animation: none; }
}

.dish__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #3C3C3B;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(35,35,34,.18);
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.dish__close:hover { background: #EC76AB; color: #fff; transform: rotate(90deg); }

.dish__media { position: relative; background: #F1EFE8; min-height: 320px; }
.dish__photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish__photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.dish__photo-fallback[hidden] { display: none; }
.dish__photo-fallback img { width: 46%; opacity: .55; }
.dish__photo-fallback span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #A5A49D;
}

.dish__info {
  padding: clamp(26px, 4vw, 44px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.dish__name {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 800;
  margin: 12px 0 0;
}
.dish__price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  margin-top: 14px;
}
.dish__price--off { color: #A5A49D; font-size: 17px; font-weight: 500; }
.dish__desc {
  font-size: 16px;
  line-height: 1.65;
  color: #605F59;
  margin: 18px 0 0;
}
.dish__divider { height: 1px; background: #EDECE7; margin: 26px 0 0; }
.dish__where {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  color: #6A6A63;
}
.dish__where-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6FA84D;
  flex: 0 0 auto;
  animation: bnch-pulse 2.2s ease-in-out infinite;
}
.dish__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

@media (max-width: 760px) {
  .dish__panel {
    grid-template-columns: 1fr;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .dish__media { min-height: 0; aspect-ratio: 16 / 10; }
  .dish__photo { position: absolute; inset: 0; }
  .dish__info { padding: 22px 20px 28px; }
}
