/* Loja Owina — mobile primeiro. Em ecrãs largos o layout expande, mas o desenho parte do telemóvel. */

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }

/* ---------- Cabeçalho ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--paper); border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top);
  transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand__mark { width: 52px; height: auto; flex: none; }
.brand__text { display: grid; line-height: 1.2; min-width: 0; }
.brand__hello { font-size: 12px; color: var(--muted); }
.brand__name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; gap: 8px; align-items: center; }
.topnav { display: none; }

.hero-dock {
  position: fixed; top: var(--hero-dock-top, 64px); left: 0; right: 0; z-index: 25;
  height: 82px; padding: 8px 16px;
  background: rgba(30,26,24,.97); box-shadow: 0 6px 18px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s ease, visibility 0s linear .28s;
}
.hero-dock.is-active { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.hero-dock__content { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 1120px; height: 100%; margin-inline: auto; }
.hero-dock__media { width: clamp(112px, 24vw, 148px); height: 100%; flex: none; overflow: hidden; border-radius: 10px; background: #2a1b12 url('/assets/pizza-poster.webp') center / cover no-repeat; }
.hero-dock__media .hero__video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; border-radius: inherit; }
.hero-dock__status { min-width: 0; }
.hero-dock__status .status { position: static; max-width: 100%; padding: 7px 11px; font-size: 12px; line-height: 1.25; white-space: normal; }
.hero-node-moving { transition: transform .28s cubic-bezier(.2,.8,.2,1); }

.badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--red); color: #fff; border: 2px solid var(--paper);
  border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1;
}
.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* ---------- Hero ---------- */
.hero-wrap { padding-top: 4px; }
.hero {
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
  min-height: 520px; min-height: min(74svh, 580px);
  border-radius: 28px; background: var(--ink); color: #fff; isolation: isolate;
}
.hero__sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.hero__media { position: absolute; inset: 0; z-index: -2; background: #2a1b12 url('/assets/pizza-poster.webp') center 30% / cover no-repeat; }
.hero__video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(22,14,9,.94) 0%, rgba(22,14,9,.62) 38%, rgba(22,14,9,0) 68%);
}
.hero__copy { display: grid; gap: 12px; padding: 24px 20px 22px; width: 100%; }
.hero h1 { font-size: clamp(28px, 8.2vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; max-width: 15ch; }
.hero__lead { font-size: 15px; color: rgba(255,255,255,.86); max-width: 34ch; }
.hero__slogan { font-family: var(--font-script); font-style: italic; font-weight: 500; font-size: 18px; color: var(--gold-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero__actions .btn { flex: 1 1 150px; }

.status {
  position: absolute; top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.94); color: var(--ink); font-size: 13px; font-weight: 500;
}
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.status.is-open .status__dot { background: var(--basil); box-shadow: 0 0 0 3px var(--basil-soft); }
.status.is-closed .status__dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* ---------- Vantagens ---------- */
.perks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.perks li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.perks .ico { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--red); }

/* ---------- Cardápio ---------- */
.menu { min-width: 0; padding-top: 34px; scroll-margin-top: 72px; }
.section-head { display: grid; gap: 4px; margin-bottom: 16px; }
.section-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.section-head p { color: var(--muted); font-size: 14px; }

.search { position: relative; display: block; margin-bottom: 16px; }
.search .ico { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 46px; border-radius: 999px; min-height: 52px; }
.search .input::-webkit-search-cancel-button { display: none; }

.cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(2px, 1.5vw, 10px); width: 100%; max-width: 100%; min-width: 0; margin: 0 0 18px; padding: 4px 0 8px; }
.cat { min-width: 0; width: 100%; display: grid; justify-items: center; align-content: start; gap: clamp(2px, .8vw, 6px); padding: 0; border: 0; background: none; font-size: clamp(9px, 2.8vw, 12px); font-weight: 500; line-height: 1.15; text-align: center; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.cat__ring { width: clamp(40px, 12vw, 64px); height: clamp(40px, 12vw, 64px); display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--line); transition: border-color .15s, background-color .15s; }
.cat__ring svg { width: clamp(28px, 8.5vw, 44px); height: auto; }
.cat[aria-pressed='true'] { color: var(--red); font-weight: 700; }
.cat[aria-pressed='true'] .cat__ring { border-color: var(--red); background: var(--red-soft); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.card__art { flex: 0 0 auto; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: var(--tile, #f3ead9); }
.card__art svg { width: 26%; min-width: 48px; max-width: 62px; height: auto; aspect-ratio: 1; }
.card__art img { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; flex: 1 1 auto; gap: 4px; padding: 10px 12px 12px; }
.card__name { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__desc { font-size: 12px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { display: grid; line-height: 1.2; }
.price__from { font-size: 11px; color: var(--muted); }
.price__val { font-size: 15px; font-weight: 700; color: var(--red); white-space: nowrap; }
.add { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--red); color: #fff; transition: background-color .15s, transform .1s; }
.add:hover { background: var(--red-dark); }
.add:active { transform: scale(.92); }

.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 36px 16px; text-align: center; color: var(--muted); }
.empty svg { width: 72px; height: 72px; opacity: .9; }
.notice { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-sm); background: #fff6df; border: 1px solid #f0dca4; font-size: 13px; }
.skeleton { min-height: 250px; border-radius: var(--r-md); background: linear-gradient(100deg, #efe8dc 30%, #f8f4ec 50%, #efe8dc 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* ---------- Visita ---------- */
.visit { padding-top: 44px; scroll-margin-top: 72px; }
.visit__grid { display: grid; gap: 12px; }
.info { display: grid; gap: 10px; align-content: start; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.info h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.info h3 .ico { color: var(--red); }
.info p, .info li { font-size: 14px; color: var(--muted); }
.info strong { color: var(--ink); font-weight: 700; }
.info a.link { color: var(--red); font-weight: 700; font-size: 17px; text-decoration: none; }
.info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; margin: 0 -10px; border-radius: 10px; }
.hours li.is-today { background: var(--basil-soft); color: var(--ink); font-weight: 500; }
.hours .time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.info__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.map { margin-top: 12px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: #ece5d8; }
.map iframe { width: 100%; height: 320px; border: 0; }
.map__load { display: grid; place-items: center; gap: 10px; width: 100%; min-height: 140px; padding: 18px; border: 0; background: none; text-align: center; color: var(--muted); font-size: 14px; }
.map__load .ico { width: 34px; height: 34px; color: var(--red); }

/* ---------- Rodapé ---------- */
.footer { margin-top: 44px; background: var(--ink); color: rgba(255,255,255,.82); padding: 32px 0 24px; }
.footer__grid { display: grid; gap: 24px; }
.footer__grid > div:first-child { display: grid; align-content: start; gap: 2px; }
.footer h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--gold-soft); }
.footer__slogan { font-family: var(--font-script); font-style: italic; font-size: 17px; color: var(--gold-soft); margin-top: 2px; }
.footer__copy { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: rgba(255,255,255,.6); }

/* ---------- Barra inferior (telemóvel) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
}
.dock a, .dock__cart { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; text-decoration: none; font-size: 11px; font-weight: 500; color: var(--muted); min-height: 52px; align-content: center; }
.dock a.is-active { color: var(--red); font-weight: 700; }
.dock__cart { position: relative; align-self: start; width: 64px; height: 64px; min-height: 0; margin: -26px auto 0; padding: 0; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 0 0 6px var(--paper); place-items: center; }
.dock__cart .ico { width: 26px; height: 26px; }
.dock__cart .badge { top: -2px; right: -2px; background: var(--gold); color: var(--ink); border-color: var(--paper); }

/* ---------- Folhas: itens específicos da loja (a estrutura genérica está em sheet.css) ---------- */
.size-list { display: grid; gap: 10px; padding-bottom: 8px; }
.size-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; padding: 12px 18px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; text-align: left; transition: border-color .15s, background-color .15s; }
.size-opt:hover { border-color: var(--red); background: var(--red-soft); }
.size-opt strong { display: block; font-size: 16px; }
.size-opt small { color: var(--muted); font-size: 12px; }
.size-opt .price__val { font-size: 17px; }
.product-sheet__image { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; margin-bottom: 14px; border-radius: var(--r-md); background: var(--paper); color: var(--muted); }
.product-sheet__image img { width: 100%; height: 100%; object-fit: cover; }
.product-sheet__image svg { width: 25%; max-width: 72px; height: auto; }

.lines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.line { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.line__art { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--tile, #f3ead9); }
.line__art svg { width: 34px; height: 34px; }
.line__info { display: grid; gap: 2px; min-width: 0; }
.line__name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.line__meta { font-size: 12px; color: var(--muted); }
.line__row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line__total { font-size: 15px; font-weight: 700; color: var(--red); }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; }
.stepper button:hover { border-color: var(--red); color: var(--red); }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; }
.line__remove { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 50%; }
.line__remove:hover { color: var(--red); background: var(--red-soft); }

.totals { display: flex; align-items: baseline; justify-content: space-between; }
.totals span { font-weight: 500; }
.totals strong { font-size: 22px; color: var(--red); }
.payment-icon { color: var(--red); }

.summary { margin-bottom: 18px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.summary__title { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.summary ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.summary li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary li span:first-child { min-width: 0; }
.summary li span:last-child { white-space: nowrap; font-weight: 500; }
.callout--muted { background: #f5efe7; color: var(--ink); }

.done { display: grid; justify-items: center; gap: 12px; padding: 24px 4px 8px; text-align: center; }
.done__mark { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--basil-soft); color: var(--basil); }
.done__mark .ico { width: 34px; height: 34px; }
.done h3 { font-size: 20px; }
.done p { color: var(--muted); font-size: 14px; max-width: 34ch; }

.load-error { display: grid; justify-items: center; gap: 12px; padding: 32px 16px; text-align: center; color: var(--muted); }


/* ---------- Ecrãs maiores ---------- */
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .visit__grid { grid-template-columns: repeat(2, 1fr); }
  .form__two { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .cats { grid-template-columns: repeat(5, minmax(0, 100px)); max-width: 560px; margin-inline: auto; padding-inline: 0; justify-content: center; }
  .sheet { left: auto; top: 0; width: 460px; max-height: none; border-radius: 26px 0 0 26px; transform: translateX(100%); }
  .sheet__grab { display: none; }
  .sheet__head { padding-top: 22px; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .toast { bottom: 28px; }
  .wrap { padding-inline: 24px; }
  .brand__mark { width: 60px; }
  .topnav { display: flex; gap: 6px; }
  .topnav a { padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 14px; }
  .topnav a:hover { background: var(--red-soft); color: var(--red); }

  .hero-wrap { padding-top: 16px; }
  .hero-dock { height: 94px; padding-inline: 24px; }
  .hero {
    display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px;
    min-height: 0; padding: 0; border-radius: 0; background: none; color: var(--ink); overflow: visible; isolation: auto;
  }
  .hero::after { display: none; }
  .hero__media { position: relative; inset: auto; z-index: 0; order: 2; height: 600px; border-radius: 32px; overflow: hidden; }
  .hero__copy { order: 1; padding: 0; gap: 16px; }
  .hero h1 { font-size: 52px; max-width: 13ch; }
  .hero__lead { color: var(--muted); font-size: 17px; }
  .hero__slogan { color: var(--red); font-size: 22px; }
  .hero__actions { flex-wrap: nowrap; }
  .hero__actions .btn { flex: 0 0 auto; }
  .hero__actions .btn--light { background: #fff; border-color: var(--line); }
  .status { position: static; justify-self: start; border: 1px solid var(--line); }

  .perks { max-width: 560px; margin-top: 28px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .visit__grid { grid-template-columns: repeat(4, 1fr); }
  .section-head h2 { font-size: 30px; }
}
