/* Guest refinements shared by the Clássico and Editorial layouts. */

/* Feed: struck-through regular price during a promotion. */
.price-stack { display: inline-flex; flex-direction: column; line-height: 1.05; }
.price-was { font: 500 12px/1.2 system-ui, sans-serif; color: rgb(255 255 255 / 72%); text-decoration-thickness: 1.5px; }
.price-action .price-was { margin-inline-end: 6px; font-size: 13px; }
.price-was[hidden] { display: none !important; }

/* The name and description share one native, keyboard-accessible hit target. */
.dish-summary { position: relative; width: fit-content; max-width: 100%; }
.dish-summary:has([data-detail]) { min-height: var(--alvo-toque); }
.dish-summary [data-detail] {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0;
  background: transparent; border-radius: 5px; pointer-events: auto;
}
.dish-summary [data-detail]:focus-visible { outline: 2px solid white; outline-offset: 4px; box-shadow: 0 0 0 4px #153c33; }
.dish-summary [data-detail]:active { background: rgb(255 255 255 / 8%); }

.dish-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dish-tags li {
  padding: 4px 9px; border-radius: var(--raio-pilula);
  font: 650 11px/1.25 var(--fonte-painel); letter-spacing: .015em;
}
.feed-tags {
  margin: 2px max(var(--feed-edge, 12px), env(safe-area-inset-right)) 0 max(var(--feed-edge, 12px), env(safe-area-inset-left));
  pointer-events: none;
}
.feed-tags li {
  color: white; background: rgb(16 26 22 / 66%); border: 1px solid rgb(255 255 255 / 36%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
/* The classic toolbar has a 60px header and a 51px category strip. */
[data-layout="classico"] .feed-tags {
  position: absolute; inset: calc(env(safe-area-inset-top, 0px) + 111px) 0 auto; z-index: 2;
}

/* The list and the dish card have their own scrolling content and stationary controls. */
#sheet:is([data-list], [data-detail]) {
  --sheet-edge: clamp(16px, 4.8vw, 24px);
  width: min(460px, 100%); max-width: 100%;
  max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 12px));
  padding: 0; border: 1px solid #dddcd0; background: var(--grub-papel);
  color: var(--grub-tinta); overflow: hidden; font-family: var(--fonte-painel);
  box-shadow: 0 12px 48px rgb(14 31 22 / 20%);
}
#sheet:is([data-list], [data-detail])[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
#sheet:is([data-list], [data-detail]) .sheet-head {
  margin: 0; min-width: 0; padding: 13px var(--sheet-edge) 10px;
}
#sheet:is([data-list], [data-detail]) .sheet-head h2 {
  font: 500 clamp(27px, 6vw, 32px)/1.13 Georgia, serif; letter-spacing: -.04em; overflow-wrap: anywhere;
}
#sheet:is([data-list], [data-detail]) .close {
  width: var(--alvo-toque); height: var(--alvo-toque); background: #f0f2e9; color: var(--grub-tinta);
  border: 1px solid #d9dfd1;
}
#sheet:is([data-list], [data-detail]) .close svg { width: 18px; height: 18px; }
#sheet:is([data-list], [data-detail]) :is(button, input, [tabindex]):focus-visible { outline: 2px solid var(--slip-folha); outline-offset: 2px; }
#sheet:is([data-list], [data-detail]) #sheet-body { display: grid; min-width: 0; min-height: 0; }
#sheet[data-detail] #sheet-body { grid-template-rows: minmax(0, 1fr) auto; }
.detail-scroll, .dish-list {
  min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 var(--sheet-edge) 16px; overflow-wrap: anywhere;
}
#sheet[data-detail] .detail-scroll:focus-visible { outline-offset: -2px; }
.detail-photo {
  margin: 0; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #e8ebdf;
}
.detail-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.detail-photo img[src$="/grub/classico.jpg"] { object-position: 50% 70%; }
.detail-tags { margin-top: 12px; }
.detail-tags li { color: var(--grub-verde); background: #e6f3c8; }
.detail-desc { margin: 12px 0 0; font-size: 16px; line-height: 1.5; }
.detail-block { margin: 16px 0 0; border-top: 1px solid #dfe2d7; padding-top: 12px; }
.detail-block h3, .detail-facts strong {
  margin: 0 0 4px; color: #495e50; font: 700 11px/1.35 var(--fonte-painel);
  text-transform: uppercase; letter-spacing: .12em;
}
.detail-block p { margin: 0; font-size: 15px; line-height: 1.48; }
.detail-allergens {
  padding: 12px 14px; border: 0; border-inline-start: 3px solid #c6b487;
  border-radius: 3px 9px 9px 3px; background: #f4f0e3;
}
.detail-facts { margin: 12px 0 0; padding: 0; list-style: none; }
.detail-facts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.detail-facts strong { margin: 0; }
.detail-facts span { font-size: 14px; font-weight: 650; }
.detail-options { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; line-height: 1.48; }
.detail-options strong { display: block; }
.detail-options span { color: #495e50; }
.detail-footer {
  padding: 10px var(--sheet-edge) max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #dce1d4; background: var(--grub-papel);
}
.detail-add, .detail-add:hover {
  width: 100%; min-height: 48px; padding: 11px 15px; display: flex; justify-content: space-between;
  gap: 12px; text-align: start; border-radius: 12px; background: var(--botao-adicionar, var(--grub-adicionar));
  color: var(--texto-adicionar, white); font: 650 15px/1.3 var(--fonte-painel); overflow-wrap: anywhere;
}
.detail-price { flex: none; text-align: end; font-variant-numeric: tabular-nums; }
.detail-price del { display: block; font-size: 12px; font-weight: 450; }

#sheet[data-list] { height: min(82dvh, 710px); }
#sheet[data-list] #sheet-body { grid-template-rows: auto minmax(0, 1fr); }
.dish-search { position: relative; margin: 0 var(--sheet-edge) 4px; }
.dish-search > svg {
  position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: #536351; pointer-events: none;
}
#sheet[data-list] .field {
  min-height: 44px; padding: 10px 12px; padding-inline-start: 40px;
  background: #f4f5ed; color: var(--grub-tinta); border: 1px solid #bbc5b5; border-radius: 10px;
  font: 400 16px/1.3 var(--fonte-painel);
}
#sheet[data-list] .field::placeholder { color: #536351; opacity: 1; }
.dish-list { padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
.dish-group h3 {
  display: flex; align-items: center; gap: 10px; margin: 17px 0 2px;
  color: #465a4b; font: 700 11px/1.35 var(--fonte-painel); letter-spacing: .14em; text-transform: uppercase;
}
.dish-group h3::after { content: ""; flex: 1; height: 1px; background: #d5ddcf; }
.dish-row { display: flex; align-items: center; gap: 8px; }
.dish-row + .dish-row { border-top: 1px solid #e1e4d9; }
.dish-row-open { display: flex; flex: 1; min-width: 0; align-items: center; gap: 12px; padding: 12px 0; text-align: start; }
.dish-row-open img { width: clamp(52px, 16vw, 68px); aspect-ratio: 1; border-radius: 10px; object-fit: cover; flex: none; }
.dish-row-text { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.dish-row-text strong { font: 700 16px/1.2 var(--fonte-painel); letter-spacing: -.015em; }
.dish-row-text small {
  color: #4f5e52; font: 400 13px/1.4 var(--fonte-painel);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dish-row-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-top: 2px; }
.dish-row-price b { color: var(--grub-verde); font: 650 14px/1.3 var(--fonte-painel); font-variant-numeric: tabular-nums; }
.dish-row-price del { color: #546455; font-size: 12px; }
.dish-row-add {
  display: grid; flex: none; place-items: center; width: var(--alvo-toque); height: var(--alvo-toque);
  padding: 0; border: 1px solid #cedbc9; border-radius: 50%; background: #edf3e7; color: var(--grub-verde);
}
.dish-row-add svg { width: 18px; height: 18px; stroke-width: 2; }
@media (max-width: 740px) {
  #sheet:is([data-list], [data-detail]) { margin: auto auto 0; border-radius: 22px 22px 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
  #sheet:is([data-list], [data-detail])[open] { animation: dish-sheet-open .2s cubic-bezier(.2,.7,.3,1); }
  @keyframes dish-sheet-open { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .dish-row-add, .detail-add { transition: transform .15s ease; }
  .dish-row-add:active, .detail-add:active { transform: scale(.97); }
}
