#menu-top {
  overflow-x: clip;
}

.menu-category-dropdown {
  position: relative;
}

.menu-category-dropdown-toggle {
  align-items: center;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #4b5563;
  display: inline-flex;
  height: 1.4rem;
  justify-content: center;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  width: 1.4rem;
}

.menu-category-dropdown-toggle:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

.menu-category-dropdown-toggle:focus-visible {
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

.menu-category-dropdown-arrow {
  height: 0.75rem;
  transition: transform 180ms ease;
  width: 0.75rem;
}

.menu-category-dropdown.is-open .menu-category-dropdown-toggle {
  background: rgba(2, 119, 189, 0.1);
  border-color: var(--simpson-blue);
  color: var(--simpson-blue);
}

.menu-category-dropdown.is-open .menu-category-dropdown-arrow {
  transform: rotate(180deg);
}

.menu-category-dropdown-panel {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  left: 0;
  max-width: calc(100vw - 2.5rem);
  min-width: 13rem;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 0.45rem);
  transform: translateY(-6px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  visibility: hidden;
  width: min(18rem, calc(100vw - 2.5rem));
  z-index: 70;
}

.menu-category-dropdown.is-open .menu-category-dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.menu-category-dropdown-list {
  max-height: 16rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.4rem;
  position: relative;
}

.menu-category-dropdown-list::-webkit-scrollbar {
  width: 0.375rem;
}

.menu-category-dropdown-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

.menu-category-dropdown-item {
  align-items: center;
  border-radius: 0.6rem;
  color: #374151;
  display: flex;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 0.6rem;
  justify-content: space-between;
  padding: 0.52rem 0.65rem;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.menu-category-dropdown-item:hover {
  background: #f3f4f6;
  color: #111827;
}

.menu-category-dropdown-item:focus-visible {
  outline: 2px solid var(--simpson-blue);
  outline-offset: -2px;
}

.menu-category-dropdown-item.is-active {
  background: rgba(2, 119, 189, 0.12);
  color: #075985;
}

.menu-category-dropdown-count {
  background: #f3f4f6;
  border-radius: 999px;
  color: #6b7280;
  flex: 0 0 auto;
  font-size: 0.7rem;
  line-height: 1;
  min-width: 1.65rem;
  padding: 0.28rem 0.45rem;
  text-align: center;
}

.menu-category-dropdown-item.is-active .menu-category-dropdown-count {
  background: rgba(7, 89, 133, 0.14);
  color: #075985;
}

.menu-category-dropdown-fade {
  height: 1rem;
  left: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 1px;
  transition: opacity 150ms ease;
  z-index: 2;
}

.menu-category-dropdown-fade-top {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
  top: 1px;
}

.menu-category-dropdown-fade-bottom {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
  bottom: 1px;
}

.menu-category-dropdown-panel.has-top-fade .menu-category-dropdown-fade-top {
  opacity: 1;
}

.menu-category-dropdown-panel.has-bottom-fade .menu-category-dropdown-fade-bottom {
  opacity: 1;
}

.menu-category-track {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-padding-inline: 0.25rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.menu-category-track::-webkit-scrollbar {
  display: none;
}

.menu-category-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}

.menu-category-chip.is-active {
  background-color: var(--simpson-blue);
  border-color: var(--simpson-blue);
  color: #fff;
}

.menu-category-chip.is-active .menu-category-count {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.menu-category-chip.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.menu-category-chip:focus-visible {
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

.category-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.category-section + .category-section {
  border-top: 1px solid #e5e7eb;
  margin-top: 2.25rem;
  padding-top: 2.25rem;
}

.menu-product-image-trigger {
  cursor: zoom-in;
  position: relative;
}

.menu-product-image-trigger img {
  transition: transform 180ms ease;
}

.menu-product-image-trigger:hover img {
  transform: scale(1.04);
}

.menu-product-image-trigger:focus-visible {
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

body.menu-image-lightbox-open {
  overflow: hidden;
}

.menu-image-lightbox {
  align-items: center;
  background: rgba(17, 24, 39, 0.74);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 1rem;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 90;
}

.menu-image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.menu-image-lightbox__backdrop {
  background: transparent;
  border: 0;
  cursor: zoom-out;
  inset: 0;
  margin: 0;
  padding: 0;
  position: absolute;
}

.menu-image-lightbox__dialog {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 24px 55px rgba(17, 24, 39, 0.3);
  max-height: calc(100dvh - 2rem);
  max-width: min(900px, 100%);
  overflow: hidden;
  position: relative;
  transform: translateY(12px) scale(0.985);
  transition: transform 180ms ease;
  width: 100%;
  z-index: 1;
}

.menu-image-lightbox.is-open .menu-image-lightbox__dialog {
  transform: translateY(0) scale(1);
}

.menu-image-lightbox__header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
}

.menu-image-lightbox__title {
  color: #111827;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.menu-image-lightbox__close {
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.45rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  width: 2rem;
}

.menu-image-lightbox__close:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  color: #111827;
}

.menu-image-lightbox__close:focus-visible {
  outline: 2px solid var(--simpson-blue);
  outline-offset: 2px;
}

.menu-image-lightbox__media {
  align-items: center;
  background: #f9fafb;
  display: flex;
  justify-content: center;
  max-height: calc(100dvh - 6.5rem);
  min-height: 14rem;
  overflow: auto;
  padding: 0.9rem;
}

.menu-image-lightbox__image {
  display: block;
  height: auto;
  max-height: calc(100dvh - 8.5rem);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

@media (max-width: 640px) {
  .menu-category-dropdown-toggle {
    height: 1.75rem;
    width: 1.75rem;
  }

  .menu-category-dropdown-arrow {
    height: 0.85rem;
    width: 0.85rem;
  }

  .menu-category-dropdown-panel {
    left: 0;
    min-width: min(17rem, calc(100vw - 1.75rem));
    width: min(19rem, calc(100vw - 1.75rem));
  }

  .menu-category-dropdown-list {
    max-height: 13.5rem;
  }

  .menu-category-dropdown-item {
    padding: 0.6rem 0.7rem;
  }

  .menu-category-chip {
    min-height: 2rem;
  }

  .menu-category-track {
    scroll-snap-type: x proximity;
  }

  .category-section + .category-section {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
  }

  .category-section {
    content-visibility: visible;
    contain-intrinsic-size: auto;
  }

  .menu-image-lightbox {
    padding: 0.65rem;
  }

  .menu-image-lightbox__dialog {
    border-radius: 0.85rem;
    max-height: calc(100dvh - 1.3rem);
  }

  .menu-image-lightbox__header {
    padding: 0.62rem 0.72rem;
  }

  .menu-image-lightbox__title {
    font-size: 0.86rem;
  }

  .menu-image-lightbox__media {
    max-height: calc(100dvh - 5.2rem);
    min-height: 12rem;
    padding: 0.7rem;
  }

  .menu-image-lightbox__image {
    max-height: calc(100dvh - 7rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-category-dropdown-arrow,
  .menu-category-dropdown-fade,
  .menu-category-dropdown-panel,
  .menu-category-dropdown-toggle,
  .menu-category-track,
  .menu-image-lightbox,
  .menu-image-lightbox__dialog,
  .menu-image-lightbox__close,
  .menu-product-image-trigger img {
    scroll-behavior: auto;
    transition: none;
  }

  .menu-category-chip {
    transition: none;
  }
}

@media (min-width: 768px) {
  .menu-category-dropdown-panel {
    min-width: 14.5rem;
  }

  .menu-category-track {
    scroll-padding-inline: 0;
    scroll-snap-type: x proximity;
  }
}
