/* Product cards and detail sheets designed as one botanical menu system. */
.menu-section .dish-grid { --product-card-height: 350px; --product-photo-height: 130px; }
.menu-section .dish-grid .dish-body { padding: .9rem 1rem; gap: .45rem; }
.dish-kicker { display: none; }
.menu-section .dish-title-row { display: block; }
.menu-section .dish-title-row h3 { font-size: 1.05rem; line-height: 1.3; min-block-size: 2.6em; }
.menu-section .dish-grid .dish-body > p { font-size: .83rem; line-height: 1.45; margin: 0; }
.dish-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; }
.dish-meta > span { font-size: .69rem; color: var(--selva); background: #edf0e3; border-radius: 6px; padding: .25rem .45rem; line-height: 1.3; }
.dish-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .2rem; }
.menu-section .dish-footer .dish-price { font-size: 1.1rem; font-weight: 750; color: var(--forest); }
.dish-open { display: grid; place-items: center; inline-size: 27px; block-size: 27px; border: 1px solid var(--line); border-radius: 50%; color: var(--forest); transition: background 180ms, color 180ms; }
.dish-card:hover .dish-open, .dish-card:focus-visible .dish-open { background: var(--forest); color: var(--paper); }
.dish-badge { background: var(--paper); color: var(--forest); font-size: .68rem; border: 1px solid var(--line); }
.offer-filters { margin-bottom: 1rem; gap: .5rem; }
#dishLightbox { overflow: auto; max-block-size: calc(100dvh - 24px); scrollbar-width: thin; scrollbar-gutter: auto; }
#dishLightbox .lightbox-card { display: grid; grid-template-columns: .95fr 1.05fr; overflow: visible; max-block-size: none; }
#dishLightbox .lightbox-media { block-size: 420px; max-block-size: none; min-block-size: 0; }
#dishLightbox .lightbox-media img { block-size: 100%; max-block-size: none; }
#dishLightbox .lightbox-copy { padding: 3.5rem 1.5rem 1.25rem; min-inline-size: 0; overflow: visible; }
#dishLightbox .lightbox-copy h3 { font-size: 1.5rem; line-height: 1.2; margin: .5rem 0 1rem; }
#dishLightbox .lightbox-copy p { font-size: .88rem; line-height: 1.5; margin: .75rem 0; }
.product-tabs { display: flex; gap: .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.product-tabs button { min-block-size: 40px; border: 0; padding: .5rem .7rem; border-radius: 8px; background: transparent; color: var(--muted); font-size: .78rem; cursor: pointer; }
.product-tabs button[aria-pressed="true"] { background: #e8eddf; color: var(--forest); font-weight: 700; }
.product-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0; }
.product-facts dt { font-size: .68rem; color: var(--muted); margin-bottom: .3rem; }
.product-facts dd { font-size: .8rem; font-weight: 600; margin: 0; }
#lbIngredientsPanel h4 { font-size: .75rem; margin: .75rem 0 .25rem; color: var(--forest); }
.product-bottom { display: flex; justify-content: space-between; align-items: center; gap: .75rem; border-top: 1px solid var(--line); padding-top: .85rem; margin-top: 1rem; }
#dishLightbox .lightbox-price { margin: 0; font-size: 1.3rem; }
#dishLightbox .lightbox-note { font-size: .66rem; line-height: 1.4; margin-top: .75rem; }
#dishLightbox.is-gallery :is(.product-tabs, #lbPreparation, #lbIngredientsPanel, .product-bottom) { display: none; }
#dishLightbox.is-gallery .lightbox-card { grid-template-columns: 1fr; }
#dishLightbox.is-gallery .lightbox-media { block-size: min(60svh, 600px); }
#dishLightbox.is-gallery .lightbox-copy { padding: .85rem 1.25rem; }
#dishLightbox.is-gallery .lightbox-copy h3 { margin: 0; font-size: .9rem; }
/* Avoid multiple nested scroll areas in any detail dialog. */
.reading-dialog-inner, .contact-dialog-inner { overflow: visible; max-block-size: none; }
@media (max-width: 1100px) {
  #dishLightbox .lightbox-card { grid-template-columns: 1fr; }
  #dishLightbox .lightbox-media { block-size: 150px; }
  #dishLightbox .lightbox-copy { padding: 1.1rem 1.25rem; }
  #dishLightbox .lightbox-copy h3 { font-size: 1.3rem; margin-block: .4rem .65rem; }
  .product-facts { margin-block: .75rem; }
  .product-tabs button { min-block-size: 44px; }
  .menu-toolbar > [data-contact="pedido"] { display: none; }
}
@media (max-height: 700px) {
  .menu-section .dish-grid { --product-card-height: 200px; --product-photo-height: 50px; }
  .menu-section .dish-grid .dish-body { padding: .55rem .75rem; gap: .25rem; }
  .menu-section .dish-title-row h3 { font-size: .95rem; min-block-size: 2.6em; }
  .menu-section .dish-grid .dish-body > p { font-size: .78rem; line-height: 1.35; }
  .dish-meta { display: none; }
  .dish-footer { margin-top: auto; padding-top: .3rem; }
  .menu-section .dish-footer .dish-price { font-size: 1rem; }
  #dishLightbox .lightbox-media { block-size: 100px; }
  #dishLightbox .lightbox-copy { padding: .8rem 1rem; }
  .product-bottom { margin-top: .65rem; padding-top: .65rem; }
}
@media (max-height: 550px) and (min-width: 600px) {
  .menu-section .dish-grid { --product-card-height: 184px; }
  #dishLightbox .lightbox-card { grid-template-columns: .7fr 1.3fr; }
  #dishLightbox .lightbox-media { block-size: 300px; }
  #dishLightbox .lightbox-copy { padding: .85rem 3.5rem .85rem 1rem; }
  #dishLightbox .lightbox-copy h3 { font-size: 1.15rem; }
  .product-tabs button { min-block-size: 36px; }
}
/* Several uniform cards per page; a second row appears when height allows it. */
.menu-section .dish-grid {
  --product-card-width: 250px;
  --product-card-height: 280px;
  --product-photo-height: 90px;
  column-gap: 1rem;
  row-gap: 1rem;
}
.menu-section .dish-grid .dish-body { padding: .75rem .85rem; gap: .35rem; }
.menu-section .dish-title-row h3 { font-size: 1rem; }
.dish-meta > span { font-size: .66rem; padding: .2rem .4rem; }
.dish-footer { padding-top: .4rem; }
@media (min-width: 600px) and (max-width: 1100px) {
  .menu-section .dish-grid { --product-card-width: 240px; }
}
@media (max-height: 700px) {
  .menu-section .dish-grid { --product-card-height: 200px; --product-photo-height: 50px; }
  .menu-section .dish-grid .dish-body { padding: .55rem .75rem; gap: .25rem; }
}
@media (max-width: 599px) {
  .menu-section .dish-grid { --product-card-width: 280px; }
}
@media (max-height: 550px) and (min-width: 600px) {
  .menu-section .dish-grid { --product-card-width: 300px; --product-card-height: 184px; }
}
/* Restore food-first thumbnails and a stable product-detail panel. */
.menu-section .dish-grid { --product-card-height: 350px; --product-photo-height: 170px; }
.menu-section .dish-grid .dish-image img { object-position: 50% 52%; }
.menu-section .dish-grid .dish-body { padding: .65rem .85rem; gap: .3rem; }
.menu-section .dish-title-row h3 { font-size: 1rem; }
.dish-footer { padding-top: .35rem; }
.product-panel-stack { display: grid; min-inline-size: 0; }
.product-panel-stack > div { grid-area: 1 / 1; min-inline-size: 0; }
.product-panel-stack > [aria-hidden="true"] { visibility: hidden; pointer-events: none; }
#dishLightbox .lightbox-copy { display: flex; flex-direction: column; }
#dishLightbox .product-bottom { margin-top: auto; }
#dishLightbox .product-panel-stack { margin-bottom: 1rem; }
#dishLightbox .lightbox-media { block-size: 440px; }
@media (max-width: 1100px) {
  #dishLightbox .lightbox-media { block-size: 155px; }
}
@media (max-height: 700px) {
  .menu-section .dish-grid { --product-card-height: 270px; --product-photo-height: 110px; }
  .menu-section .dish-grid .dish-body { padding: .5rem .75rem; gap: .25rem; }
  #dishLightbox .lightbox-media { block-size: 110px; }
  #dishLightbox .product-panel-stack { margin-bottom: .6rem; }
}
@media (max-height: 550px) and (min-width: 600px) {
  .menu-section .dish-grid { --product-card-height: 184px; }
  .menu-section .dish-grid > .dish-card { grid-template-columns: 42% minmax(0, 1fr); }
  .menu-section .dish-grid .dish-image { block-size: 100%; }
  #dishLightbox .lightbox-media { block-size: 320px; }
}
/* The gallery has its own dialog, independent of product tabs and prices. */
#galleryDialog {
  position: fixed;
  inset: 0;
  margin: auto;
  inline-size: min(1120px, calc(100% - 24px));
  block-size: min(88dvh, 820px);
  max-inline-size: calc(100% - 24px);
  max-block-size: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid rgba(169,185,164,.3);
  border-radius: 22px;
  background: #10271e;
  color: var(--paper);
  overflow: hidden;
}
#galleryDialog[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
#galleryDialog .gallery-media { display: grid; place-items: center; min-block-size: 0; min-inline-size: 0; padding: 48px 16px 12px; }
#galleryDialog .gallery-media img { display: block; inline-size: 100%; block-size: 100%; min-block-size: 0; object-fit: contain; }
#galleryDialog .gallery-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; border-top: 1px solid rgba(169,185,164,.2); }
#galleryDialog #galleryTitle { font-family: system-ui, sans-serif; font-size: .9rem; line-height: 1.4; margin: 0; color: var(--paper); }
#galleryDialog .gallery-navigation { flex-shrink: 0; padding: 0; gap: .65rem; }
#galleryDialog .gallery-navigation output { color: var(--paper); }
@media (max-width: 599px) {
  #galleryDialog .gallery-bottom { flex-direction: column; gap: .6rem; }
  #galleryDialog #galleryTitle { font-size: .8rem; text-align: center; }
  #galleryDialog .gallery-media { padding-inline: 8px; }
}
/* The menu is primary content: show the full filtered grid down the page. */
#ofertas, #carta {
  block-size: auto;
  height: auto;
  min-height: 0;
  min-block-size: 0;
  max-height: none;
  max-block-size: none;
  overflow: visible;
  padding-block: clamp(32px, 5vw, 64px);
}
#ofertas > .wrap, #carta > .wrap { max-block-size: none; }
.menu-section .dish-grid {
  --product-card-height: 350px;
  --product-photo-height: 170px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.25rem;
  touch-action: pan-y pinch-zoom;
}
.menu-section .dish-grid > .dish-card { display: flex; flex-direction: column; }
.menu-section .dish-grid .dish-image { block-size: var(--product-photo-height); flex: 0 0 var(--product-photo-height); }
.menu-section .dish-grid .dish-body { padding: .65rem .85rem; gap: .3rem; }
.menu-section .dish-grid .dish-meta { display: flex; }
.menu-section .dish-title-row h3 { font-size: 1rem; }
.menu-section .dish-grid .dish-body > p { font-size: .83rem; line-height: 1.45; }
@media (max-width: 599px) {
  .menu-section .dish-grid { gap: 1rem; }
}
