:root {
  --rm-bg: #f3f5f8;
  --rm-card: #ffffff;
  --rm-border: #dfe5ef;
  --rm-text: #1f2a37;
  --rm-muted: #607086;
  --rm-accent: #0f6f5c;
  --rm-accent-soft: rgba(15, 111, 92, 0.12);
}

html,
body {
  min-height: 100%;
}

.rest-menu-body {
  margin: 0;
  color: var(--rm-text);
  background:
    radial-gradient(1300px 420px at 15% -10%, #d7f0e8 0%, rgba(215, 240, 232, 0) 68%),
    radial-gradient(1000px 360px at 95% -20%, #ffe8cf 0%, rgba(255, 232, 207, 0) 64%),
    var(--rm-bg);
}

.rest-menu-main {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.1rem 1rem 1.5rem;
}

.rest-menu-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--rm-border);
  background: transparent;
  color: var(--rm-text);
  padding: 0.55rem 0.8rem;
  box-shadow: none;
}

.rest-menu-hero__identity {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
}

.rest-menu-hero__logo {
  width: 46px;
  height: 46px;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rm-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
}

.rest-menu-hero__logo i {
  font-size: 1.1rem;
  color: #55667d;
}

.rest-menu-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rest-menu-hero__text {
  min-width: 0;
}

.rest-menu-hero__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7b8f;
}

.rest-menu-hero h1 {
  margin: 0.05rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  line-height: 1.12;
  word-break: break-word;
  color: #1f2d3f;
}

.rest-menu-hero__address {
  margin: 0.16rem 0 0;
  font-size: 0.84rem;
  color: #5f7085;
}

.rest-menu-hero__meta {
  margin: 0.2rem 0 0;
  font-size: 0.79rem;
  color: #5f7085;
}

.rest-menu-hero__actions {
  flex: 0 0 auto;
}

.rest-menu-hero .btn-outline-light {
  border-color: #cdd7e5;
  color: #4e6077;
  background: #fff;
}

.rest-menu-controls {
  position: sticky;
  top: 0;
  z-index: 50;
  margin-top: 1rem;
  margin-bottom: 0.85rem;
  border-radius: 0.95rem;
  padding: 0.72rem;
  background: rgba(243, 245, 248, 0.9);
  border: 1px solid rgba(210, 219, 231, 0.8);
  backdrop-filter: blur(8px);
}

.rest-menu-layout {
  display: block;
}

.rest-menu-sidebar {
  margin-bottom: 0.9rem;
}

.rest-menu-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--rm-border);
  background: #fff;
  padding: 0.56rem 0.68rem;
}

.rest-menu-search i {
  color: var(--rm-muted);
}

.rest-menu-search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--rm-text);
  font-size: 0.95rem;
}

.rest-menu-search input::placeholder {
  color: #8191a6;
}

.rest-menu-categories {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  margin-top: 0;
  overflow-x: auto;
  padding-bottom: 0.24rem;
  scroll-behavior: smooth;
}

.rest-menu-category-btn {
  border: 1px solid var(--rm-border);
  background: #fff;
  color: #31445b;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.12;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
}

.rest-menu-category-btn small {
  font-size: 0.76rem;
  color: #66758a;
  font-weight: 700;
}

.rest-menu-category-btn.is-active {
  border-color: var(--rm-accent);
  background: var(--rm-accent-soft);
  color: #124a44;
}

.rest-menu-category-btn.is-active small {
  color: #0c5751;
}

.rest-menu-section {
  margin-bottom: 1.35rem;
}

.rest-menu-sections {
  min-width: 0;
}

.rest-menu-section__header {
  margin-bottom: 0.72rem;
}

.rest-menu-section__parent {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6c7b90;
  margin-bottom: 0.14rem;
}

.rest-menu-section h2 {
  margin: 0;
  font-size: 1.16rem;
  color: #1f2d3f;
}

.rest-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  grid-template-rows: auto auto;
  grid-template-areas:
    "body image"
    "footer image";
  align-items: start;
  border: 1px solid var(--rm-border);
  border-radius: 0.95rem;
  overflow: hidden;
  background: var(--rm-card);
  min-height: 148px;
  box-shadow: 0 0.16rem 0.5rem rgba(31, 42, 55, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.rest-menu-item-wrap {
  cursor: pointer;
}

.rest-menu-item-wrap:focus-visible .rest-menu-item {
  outline: 2px solid var(--rm-accent);
  outline-offset: 2px;
}

.rest-menu-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.45rem 1rem rgba(31, 42, 55, 0.12);
}

.rest-menu-item__image-box {
  grid-area: image;
  width: 100px;
  height: 75px;
  justify-self: end;
  margin: 0.72rem 0.72rem 0.72rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(223, 229, 239, 0.95);
  border-radius: 0.75rem;
  overflow: hidden;
}

.rest-menu-item__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
  border-radius: 0.75rem !important;
}

.rest-menu-item__body {
  grid-area: body;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0.72rem 0 0.56rem 0.78rem;
}

.rest-menu-item__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.44rem;
  margin-bottom: 0.5rem;
}

.rest-menu-item__unit {
  font-size: 0.74rem;
  color: #5f6f83;
}

.rest-menu-item h3 {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.58rem;
  font-size: 1.01rem;
  line-height: 1.28;
  color: #1e2a3a;
}

.rest-menu-item__desc {
  margin: 0.45rem 0 0;
  color: #627185;
  font-size: 0.75rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.04rem;
}

.rest-menu-item__desc.is-empty {
  color: transparent;
}

.rest-menu-item__footer {
  grid-area: footer;
  background: transparent;
  border-top: 0;
  padding: 0 0 0.72rem 0.78rem;
}

.rest-menu-item__price {
  font-size: 1rem;
  font-weight: 700;
  color: #174f6e;
}

.rest-menu-empty {
  margin-top: 0.6rem;
  border: 1px dashed #bfcbdb;
  border-radius: 1rem;
  background: #f8fbff;
  padding: 1.9rem 1.2rem;
  text-align: center;
}

.rest-menu-empty__icon {
  font-size: 1.5rem;
  color: #71839b;
}

.rest-menu-empty h3 {
  margin: 0.55rem 0 0;
  font-size: 1.1rem;
  color: #2f3f52;
}

.rest-menu-empty p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #6f8096;
}

.rest-menu-modal .modal-content {
  border: 0;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: #fff;
}

.rest-menu-modal__close {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  z-index: 5;
  background-color: rgb(241, 242, 244);
  border-radius: 50%;
  opacity: 1;
}

.rest-menu-modal__image-wrap {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  overflow: hidden;
  background: #fff;
  display: block;
  border-bottom: 0;
  padding: 0;
}

.rest-menu-modal__image {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: cover;
}

.rest-menu-modal__body {
  padding: 1rem 1rem 1.05rem;
}

.rest-menu-modal__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.22;
  color: #1e2a3a;
}

.rest-menu-modal__price {
  margin-top: 0.5rem;
  font-weight: 800;
  font-size: 1.12rem;
  color: #0f5772;
}

.rest-menu-modal__desc {
  margin: 0.72rem 0 0;
  line-height: 1.5;
  color: #49586c;
  white-space: pre-wrap;
}

@media (min-width: 576px) {
  .rest-menu-item {
    grid-template-columns: minmax(0, 1fr) 168px;
    min-height: 164px;
  }

  .rest-menu-item__image-box {
    width: 160px;
    height: 120px;
  }

  .rest-menu-modal__body {
    padding: 1.12rem 1.2rem 1.22rem;
  }
}

@media (min-width: 1024px) {
  .rest-menu-modal .modal-content {
    border-radius: 24px;
  }
}

@media (min-width: 1200px) {
  .rest-menu-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }

  .rest-menu-sidebar {
    position: sticky;
    top: 5.35rem;
    margin-bottom: 0;
    align-self: start;
  }

  .rest-menu-categories {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 6.4rem);
    padding: 0 0.2rem 0 0;
  }

  .rest-menu-category-btn {
    width: 100%;
    border-radius: 0.8rem;
    justify-content: space-between;
    padding: 0.56rem 0.78rem;
  }
}

@media (max-width: 991.98px) {
  .rest-menu-main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .rest-menu-hero {
    padding: 0.5rem 0.7rem;
  }
}

@media (max-width: 767.98px) {
  .rest-menu-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .rest-menu-hero__actions {
    width: 100%;
  }

  .rest-menu-hero__actions .btn {
    width: 100%;
  }

  .rest-menu-controls {
    padding: 0.6rem;
  }
}

@media (max-width: 419.98px) {
  .rest-menu-item {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .rest-menu-item__image-box {
    width: 90px;
    height: 74px;
    margin: 0.65rem 0.65rem 0.65rem 0;
  }
}
