/* Pizzeria Malredo — menu
   Palette taken from the photo set: slate-marble table, flour, mosaic-plate teal and terracotta tesserae. */
:root {
  --stone: #25272a;      /* marble table */
  --slab: #2f3235;       /* raised surface */
  --slab-2: #383b3f;
  --flour: #f1eadf;      /* main text */
  --ash: #b3ada3;        /* secondary text, 7.4:1 on stone */
  --tessera: #8fb0b0;    /* mosaic teal */
  --terra: #c9733f;      /* mosaic terracotta */
  --pomodoro: #d24a32;   /* actions */
  --line: rgba(241, 234, 223, .12);
  --radius-card: 14px;
  --radius-img: 10px;
  --sans: "Josefin Sans", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --max: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--flour); font: 400 17px/1.5 var(--sans); }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tessera); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--flour); color: var(--stone); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Mosaic band — echoes the meander on the house plates */
.mosaic {
  height: 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='14' viewBox='0 0 56 14'%3E%3Cpath d='M0 7c7 0 7-5 14-5s7 10 14 10 7-10 14-10 7 5 14 5' fill='none' stroke='%238fb0b0' stroke-width='2.4' stroke-dasharray='2.6 1.4'/%3E%3Cpath d='M0 7c7 0 7 5 14 5s7-10 14-10 7 10 14 10 7-5 14-5' fill='none' stroke='%23c9733f' stroke-width='2.4' stroke-dasharray='2.6 1.4' opacity='.9'/%3E%3C/svg%3E") repeat-x center / 56px 14px;
  opacity: .85;
}

/* Hero */
.hero {
  position: relative;
  text-align: center;
  padding: max(14px, env(safe-area-inset-top)) 20px 0;
  background: linear-gradient(180deg, rgba(20,21,23,.55), rgba(37,39,42,.92) 78%, var(--stone)), url("/img/brand/bg-stone.webp") center / cover;
}
.hero-top { display: flex; justify-content: flex-end; max-width: var(--max); margin: 0 auto; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(0,0,0,.25); }
.lang button { border: 0; background: none; min-width: 44px; min-height: 36px; border-radius: 999px; font-weight: 600; font-size: 14px; letter-spacing: .04em; cursor: pointer; color: var(--ash); }
.lang button[aria-pressed="true"] { background: var(--flour); color: var(--stone); }
.hero-logo { width: min(190px, 46vw); height: auto; margin: 18px auto 14px; }
.tagline { font: italic 400 21px/1.35 var(--serif); margin: 0 auto 10px; max-width: 30ch; }
.status { margin: 0 0 18px; color: var(--ash); font-size: 15px; }
.status b { color: var(--flour); font-weight: 600; }
.status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7fbf7a; margin-right: 8px; vertical-align: 1px; }
.status .dot.off { background: var(--ash); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 16px; border: 1px solid var(--line); background: rgba(0,0,0,.28); transition: transform .12s, background .12s; }
.btn:active { transform: scale(.97); }
.btn svg { flex: none; }
.btn--primary { background: var(--pomodoro); border-color: var(--pomodoro); color: #fff; }
.btn--primary:hover { background: #bd3f29; }
.btn:not(.btn--primary):hover { background: rgba(255,255,255,.08); }
.mosaic--hero { margin: 0 -20px; }

/* Category bar */
.catbar { position: sticky; top: 0; z-index: 20; background: rgba(37,39,42,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.catbar-inner { display: flex; align-items: center; gap: 6px; max-width: var(--max); margin: 0 auto; padding: 8px 10px 8px 16px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; scroll-behavior: smooth; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--ash); font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.chip[aria-current="true"] { color: var(--stone); background: var(--flour); }
.search-toggle { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: none; display: grid; place-items: center; cursor: pointer; }
.searchbox { max-width: var(--max); margin: 0 auto; padding: 0 16px 10px; }
.searchbox input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--slab); padding: 0 14px; font-size: 16px; }
.searchbox input::placeholder { color: var(--ash); }

/* Sections */
main { max-width: var(--max); margin: 0 auto; padding: 8px 16px 40px; outline: none; }
.popular { margin-top: 22px; }
h2 { font-weight: 700; font-size: 26px; line-height: 1.15; margin: 0; letter-spacing: .01em; }
.cat { padding-top: 30px; }
.cat-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.cat-head .mosaic { flex: 1; height: 10px; background-size: 40px 10px; transform: translateY(-3px); opacity: .55; }

/* Popular track — the one big-photo moment */
.pop-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 330px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 14px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.pop-track::-webkit-scrollbar { display: none; }
.pop { scroll-snap-align: start; text-align: left; border: 0; padding: 0; background: none; cursor: pointer; }
.pop img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--radius-card); background: var(--slab); }
.pop .pop-name { display: block; font-weight: 600; font-size: 19px; margin-top: 10px; }
.pop .pop-price { color: var(--ash); font-size: 15px; }

/* Item rows */
.items { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left; background: var(--slab); border: 1px solid transparent; border-radius: var(--radius-card); padding: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.item:hover { border-color: var(--line); background: var(--slab-2); }
.item:active { background: var(--slab-2); }
.item-name { font-weight: 600; font-size: 18px; line-height: 1.25; display: block; }
.item-desc { font: italic 400 15px/1.45 var(--serif); color: var(--ash); margin: 4px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-price { font-weight: 600; font-size: 16px; }
.item-photo { width: 112px; aspect-ratio: 4 / 3; border-radius: var(--radius-img); object-fit: cover; background: var(--slab-2); }
.badge { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 6px; padding: 3px 7px 1px; margin-left: 8px; vertical-align: 2px; }
.badge--out { color: var(--stone); background: var(--ash); }
.item.is-out .item-photo, .item.is-out .item-name, .item.is-out .item-price { opacity: .5; }
.items--plain .item { grid-template-columns: 1fr auto; padding: 12px 14px; }
.items--plain .item-desc { margin-bottom: 0; }
.items--plain .item-price { align-self: center; }
.empty { text-align: center; color: var(--ash); padding: 40px 0; font-size: 17px; }

@media (min-width: 760px) {
  .items { grid-template-columns: 1fr 1fr; }
  .item-photo { width: 132px; }
  h2 { font-size: 30px; }
  .pop-track { grid-auto-columns: 300px; margin: 0; padding: 14px 0 6px; scroll-padding-inline: 0; }
}

/* Sheet */
.sheet { border: 0; padding: 0; background: var(--slab); color: var(--flour); width: min(560px, 100%); max-height: 92vh; border-radius: 20px; overflow: auto; }
.sheet::backdrop { background: rgba(10,10,12,.7); }
@media (max-width: 600px) {
  .sheet { margin: auto 0 0; max-width: 100%; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
.sheet[open] { animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet-close-form { position: sticky; top: 0; height: 0; z-index: 2; }
.sheet-close { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(20,21,23,.7); display: grid; place-items: center; cursor: pointer; }
.sheet-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--slab-2); }
.sheet-img[hidden] { display: none; }
.sheet-body { padding: 20px 22px 26px; }
.sheet-body h3 { font-size: 26px; margin: 0 0 8px; line-height: 1.2; }
.sheet-desc { font: italic 400 18px/1.55 var(--serif); color: var(--ash); margin: 0 0 14px; }
.sheet-price { font-weight: 700; font-size: 22px; margin: 0 0 18px; }

/* Footer */
.foot { margin-top: 20px; background: #202224; padding-bottom: max(26px, env(safe-area-inset-bottom)); }
.foot-grid { max-width: var(--max); margin: 0 auto; padding: 30px 20px 10px; display: grid; gap: 26px; }
.foot h2 { font-size: 20px; margin-bottom: 8px; }
.foot p { margin: 0 0 6px; color: var(--ash); }
.foot a { color: var(--flour); text-underline-offset: 3px; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 0; color: var(--ash); }
.hours dt.today, .hours dd.today { color: var(--flour); font-weight: 600; }
.hours dd { margin: 0; }
.fine { max-width: var(--max); margin: 10px auto 0; padding: 0 20px; color: #a39d94; font-size: 14px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 160px 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
