#menu-preview {
  font-family: var(--body-font-family);
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  background-color: var(--page-bg-color);
}

#menu-preview.has-active-order {
  padding-bottom: 30vh;
}

.img-fluid {
  max-width: 200px;
}

.container {
  max-width: 800px;
}
section.menu-section {
  padding: 0;
  scroll-margin-top: 76px;
}

/* Header and Section Styles */
.menu-content .restaurant-name {
  font-family: var(--title-font-family);
  font-size: var(--title-font-size);
  font-weight: var(--title-font-weight);
  text-align: var(--title-text-align);
  color: var(--title-text-color);
}

.menu-content header {
  padding: 1rem;
  text-align: center;
}

footer.menu-footer {
  color: var(--footer-text-color);
  padding: 1rem;
  text-align: center;
  border-radius: 12px;
}

.menu-content .section-title {
  font-family: var(--section-title-font-family);
  font-size: var(--section-title-font-size);
  font-weight: var(--section-title-font-weight);
  font-style: var(--section-title-font-style);
  text-align: var(--section-title-text-align);
  color: var(--section-title-color);
  border-bottom: 2px solid var(--section-border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Header and Footer Text */
.menu-content .header-text {
  font-family: var(--header-footer-font-family);
  font-size: var(--header-footer-font-size);
  font-weight: var(--header-footer-font-weight);
  font-style: var(--header-footer-font-style);
  text-align: var(--header-footer-text-align);
  margin: 1rem 0;
  color: var(--header-text-color);
}

.menu-content .footer-text {
  font-family: var(--header-footer-font-family);
  font-size: var(--header-footer-font-size);
  font-weight: var(--header-footer-font-weight);
  font-style: var(--header-footer-font-style);
  text-align: var(--header-footer-text-align);
  margin: 1rem 0;
  color: var(--footer-text-color);
}

/* Section Header/Footer Text */
.menu-content .section-header-text,
.menu-content .section-footer-text {
  font-family: var(--section-header-footer-font-family);
  font-size: var(--section-header-footer-font-size);
  font-weight: var(--section-header-footer-font-weight);
  font-style: var(--section-header-footer-font-style);
  text-align: var(--section-header-footer-text-align);
}

/* Menu Item Styles */
.menu-content .menu-item {
  display: flex;
  margin-bottom: 1.5rem;
  background-color: var(--item-bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 6px #0000001a;
  overflow: hidden;
  align-items: flex-start;
}

.menu-content .item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  gap: 0.25rem;
}

.menu-content .item-name {
  font-family: var(--item-name-font-family);
  font-size: var(--item-name-font-size);
  font-weight: var(--item-name-font-weight);
  font-style: var(--item-name-font-style);
  color: var(--item-name-color);
  flex-direction: row;
  margin: 0;
}

.menu-content .item-description {
  font-family: var(--item-desc-font-family);
  font-size: var(--item-desc-font-size);
  font-weight: var(--item-desc-font-weight);
  font-style: var(--item-desc-font-style);
  text-transform: var(--item-desc-text-transform);
  line-height: 1.4;
  color: var(--item-desc-color);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  margin-bottom: 0.25rem;
}

.menu-content .item-price {
  font-family: var(--item-price-font-family);
  font-size: var(--item-price-font-size);
  font-weight: var(--item-price-font-weight);
  font-style: var(--item-price-font-style);
  margin-bottom: 0;
  color: var(--item-price-color);
}

.menu-content .item-image-container {
  width: 100px;
  height: 100px;
  min-width: 100px;
  min-height: 100px;
  overflow: hidden;
  flex-shrink: 0;
  margin: 8px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: right;
  margin-top: 0.75rem;
}

.menu-content .item-image {
  object-fit: cover;
  border-radius: 10px;
  object-position: center;
}

/* Order System Styles */
.quantity-control {
  display: flex;
  align-items: center;
  margin-top: 8px;
  flex-direction: row;
}

.quantity-btn {
  width: 28px;
  height: 28px;
  background-color: var(--quantity-btn-bg-color);
  color: var(--quantity-btn-text-color);
  border: none;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quantity-display {
  margin: 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

.menu-content .menu-item.in-order {
  border-left: 3px solid;
  border-left-color: var(--accent-color);
}

#order-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--item-bg-color);
  border-top: 2px solid;
  border-top-color: var(--order-border-color);
  padding: 15px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 30vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
}

.order-section {
  margin-bottom: 15px;
}

.order-section-title {
  border-bottom: 1px solid;
  border-bottom-color: var(--order-border-color);
  margin-bottom: 10px;
  padding-bottom: 5px;
  font-family: var(--section-title-font-family);
  font-style: var(--section-title-font-style);
}

.order-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 5px;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.2em;
  border-top: 2px solid;
  border-top-color: var(--order-border-color);
  padding-top: 10px;
  margin-top: 15px;
}

.menu-content footer a {
  color: inherit;
  text-decoration: underline;
}

/* Section Navigation Styles - Scoped to menu-preview */
#menu-preview .section-navigation {
  background-color: var(--nav-bar-bg-color);
  border-bottom: 1px solid var(--nav-bar-border-color);
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#menu-preview .section-nav-container {
  position: relative;
  max-width: 800px; /* Match your container max-width */
  margin: 0 auto;
  padding: 0 1rem;
}

#menu-preview .section-nav-scroll {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 0.5rem 0;
  gap: 0.25rem;
  scroll-behavior: smooth;
}

#menu-preview .section-nav-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

#menu-preview .section-nav-item {
  flex-shrink: 0;
  background-color: var(--nav-item-inactive-bg-color);
  border: 1px solid var(--nav-item-active-bg-color);
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  color: var(--nav-item-inactive-text-color);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  min-width: max-content;
}

#menu-preview .section-nav-item:hover,
#menu-preview .section-nav-item.active {
  background-color: var(--nav-item-active-bg-color);
  color: var(--nav-item-active-text-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
#menu-preview .section-nav-item:hover {
  transform: translateY(-1px);
}

#menu-preview .section-nav-item:focus {
  outline: none;
}

/* Fade gradients to indicate more content */
#menu-preview .section-nav-container::before,
#menu-preview .section-nav-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
  width: 15px;
}

#menu-preview .section-nav-container::before {
  left: 0.5rem;
  background: linear-gradient(to right, var(--nav-item-inactive-bg-color), transparent);
}

#menu-preview .section-nav-container::after {
  right: 0.5rem;
  background: linear-gradient(to left, var(--nav-item-inactive-bg-color), transparent);
}

/* Show gradients when scrollable */
#menu-preview .section-nav-container.has-scroll::before,
#menu-preview .section-nav-container.has-scroll::after {
  opacity: 1;
}

/* Smooth scrolling for the whole page */
html {
  scroll-behavior: smooth;
}

/* Animation for when navigation appears */
#menu-preview .section-navigation:not(.d-none) {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#menu-preview .section-navigation + main {
  margin-top: 1rem;
}

/* Only show when scrollable */
#menu-preview .section-nav-container.has-scroll::before,
#menu-preview .section-nav-container.has-scroll::after {
  opacity: 0.8;
}

.restaurant-logo {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

#menu-preview.overflow-visible .flex-grow-1.overflow-auto {
  overflow: visible !important;
}

.cursor-pointer {
  cursor: pointer;
}

.item-name-translated {
  font-size: calc(var(--item-name-font-size) * 0.65);
  font-weight: max(300, calc(var(--item-name-font-weight) - 100));
  color: var(--item-name-color);
  opacity: 0.8;
}

.item-name-container {
  display: flex;
  align-items: baseline; /* or align-items: center */
  flex-direction: column;
}

.dietary-icons {
  font-size: 0.8rem
}

.dietary-legend {
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.menu-content .icon-no-meat {
  color: var(--vegetarian-color)
}
.menu-content .icon-no-gluten {
  color: var(--gluten-free-color)
}
.menu-content .icon-vegan {
  color: var(--vegan-color)
}

/* List Layout Styles - Mobile First */
.menu-content .menu-item.list-item {
  display: flex;
  align-items: flex-start;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--section-border-color);
  margin-bottom: 0;
  padding: 0.75rem 0;
}

.menu-content .menu-item.list-item:last-child {
  border-bottom: none;
}

.menu-content .list-item .item-image-container {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  justify-content: left;
  border-radius: 5px;
  margin-right: 0px;
  margin-top: 0;
}

.menu-content .list-item .item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  padding: 0 0.75rem 0 0.75rem
}

.menu-content .list-item .item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.menu-content .list-item .item-name-container {
  display: flex;
  align-items: baseline;
  flex: 1;
  min-width: 0;
}

.menu-content .list-item .item-name {
  margin: 0;
  font-size: var(--item-name-font-size);
}

.menu-content .list-item .item-price {
  margin: 0;
  font-weight: var(--item-price-font-weight);
  color: var(--item-price-color);
  flex-shrink: 0;
}

.menu-content .list-item .item-description {
  margin: 0;
  line-height: 1.3;
  font-size: calc(var(--item-desc-font-size) * 0.9);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-content .list-item .dietary-icons {
  font-size: 0.75rem;
}

.menu-content .list-item .quantity-control {
  align-self: flex-end;
}

/* Active order state for list items */
.menu-content .menu-item.list-item.in-order {
  border-left: 3px solid var(--accent-color);
  padding-left: calc(0.75rem - 3px);
}

.menu-content .item-image-container {
  display: flex;
}

/* Hide containers in sections with no images */
.menu-content .section-no-images .item-image-container {
  display: none;
}

.menu-content .list-item .item-image {
  border-radius: 5px
}

#scrollable-content {
  background-color: var(--page-bg-color);
}

/* Contact Buttons in Footer */
.contact-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.contact-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #FFF !important;
    border: none;
}

.contact-btn-maps {
    background: #4285f4;
}

.contact-btn-whatsapp {
    background: #25d366;
}

.contact-btn:hover {
    transform: translateY(-2px);
    color: #FFF;
}

.contact-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .contact-btn {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .contact-buttons {
        gap: 12px;
    }
}
