/* ==========================================================
   L'ATTICO · Menu público
   ========================================================== */
:root {
  --green: #274641;
  --green-900: #1b322e;
  --green-700: #345a53;
  --gold: #B59053;
  --gold-soft: #d8c39b;
  --ivory: #F7F3EC;
  --paper: #FBF9F5;
  --ink: #23302d;
  --muted: #6f7c78;
  --line: rgba(39, 70, 65, .14);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 160px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* Idioma: PT por defeito; EN quando body.lang-en */
.t-en { display: none; }
body.lang-en .t-en { display: inline; }
body.lang-en .t-pt { display: none; }

main, .footer, .topbar { position: relative; z-index: 1; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow .3s;
}
.topbar.scrolled { box-shadow: 0 8px 28px -20px rgba(39, 70, 65, .5); }

/* Header igual ao de lattico.ao (Elementor: Urbanist 500, #7A7A7A, acento #BC9459, 1300px, 42/16/42) */
.site-header { --site-accent: #BC9459; --site-text: #7A7A7A; background: #FFFFFF; position: relative; z-index: 2; }
.sh-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 42fr 16fr 42fr;
  align-items: center;
}
.sh-nav { display: flex; align-items: center; justify-self: start; }
.sh-nav a, .sh-mobile a:not(.sh-cta) {
  position: relative;
  font-family: 'Urbanist', var(--sans);
  font-weight: 500;
  font-size: 17px;
  color: var(--site-text);
  text-decoration: none;
  padding: 8px 20px;
  transition: color .3s;
}
.sh-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 3px;
  background: var(--site-accent);
  opacity: 0;
  transform: scaleX(.4);
  transition: opacity .3s, transform .3s var(--ease);
}
.sh-nav a:hover, .sh-nav a.active, .sh-mobile a.active { color: var(--site-accent); }
.sh-nav a:hover::after, .sh-nav a.active::after { opacity: 1; transform: none; }
.sh-logo { justify-self: center; display: block; }
.sh-logo img { width: 190px; height: auto; }
.sh-right { justify-self: end; }
.sh-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--site-accent);
  color: #FFFFFF;
  font-family: 'Urbanist', var(--sans);
  font-weight: 400;
  font-size: 17px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 0;
  transition: filter .25s, transform .2s;
}
.sh-cta:hover { filter: brightness(.92); }
.sh-cta:active { transform: scale(.98); }
.sh-burger { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--site-accent); place-items: center; padding: 0; }
.sh-burger path { transition: transform .3s var(--ease), opacity .2s; transform-origin: center; }
.sh-burger[aria-expanded="true"] .l1 { transform: translateY(6px) rotate(45deg); }
.sh-burger[aria-expanded="true"] .l2 { opacity: 0; }
.sh-burger[aria-expanded="true"] .l3 { transform: translateY(-6px) rotate(-45deg); }
.sh-mobile { display: none; }

/* Barra do menu (categorias, pesquisa, idioma) */
.subbar {
  position: relative;
  z-index: 1;
  background: rgba(247, 243, 236, .9);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid rgba(39, 70, 65, .08);
  border-bottom: 1px solid var(--line);
}
.subbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--green);
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover, .icon-btn.active { background: var(--green); color: var(--ivory); border-color: var(--green); }

.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  border: 0; background: transparent;
  font-size: 12px; letter-spacing: .12em; font-weight: 500;
  color: var(--muted);
  padding: 6px 11px; border-radius: 999px;
  transition: background .25s, color .25s;
}
.lang button.active { background: var(--green); color: var(--ivory); }

.search-wrap {
  max-width: 1300px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease), padding .35s;
}
.search-wrap > input { overflow: hidden; min-height: 0; }
.search-wrap.open { grid-template-rows: 1fr; padding-bottom: 10px; }
.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 12px 20px;
  font: 400 15px var(--sans);
  color: var(--ink);
  outline: none;
}
.search-wrap:not(.open) input { padding-top: 0; padding-bottom: 0; border-width: 0; }
.search-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(181, 144, 83, .18); }

.chips {
  flex: 1; min-width: 0;
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
          mask-image: linear-gradient(90deg, #000 92%, transparent);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--green);
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--green); color: var(--ivory); border-color: var(--green); }

/* ---------- Hero ---------- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 9vw, 96px) 24px clamp(36px, 7vw, 72px);
  text-align: center;
}
.hero-logo { width: min(340px, 72vw); margin: 0 auto 28px; animation: rise 1s var(--ease) both; }
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold);
  animation: rise 1s .1s var(--ease) both;
}
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.05;
  color: var(--green);
  animation: rise 1s .2s var(--ease) both;
}
.hero-sub {
  margin: 16px auto 0;
  max-width: 460px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.6vw, 22px);
  color: var(--muted);
  animation: rise 1s .3s var(--ease) both;
}
.hero-rule { display: block; width: 64px; height: 1px; background: var(--gold); margin: 30px auto 0; animation: grow 1.2s .5s var(--ease) both; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Categorias ---------- */
.category {
  max-width: 1180px;
  margin: 0 auto clamp(48px, 8vw, 88px);
  padding: 0 20px;
}
.cat-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 8;
  background: var(--green);
  isolation: isolate;
}
.cat-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.6s var(--ease);
}
.category.in .cat-banner img { transform: scale(1); }
.cat-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(27, 50, 46, .88) 0%, rgba(27, 50, 46, .55) 45%, rgba(27, 50, 46, .05) 100%);
}
.cat-banner-text {
  position: absolute; z-index: 1;
  left: clamp(20px, 5vw, 56px);
  bottom: clamp(18px, 4vw, 44px);
  right: 20px;
  color: var(--ivory);
}
.cat-num { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--gold-soft); }
.cat-banner h2 {
  margin: 2px 0 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
}
.cat-langs { margin: 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: rgba(247, 243, 236, .72); }

/* ---------- Pratos ---------- */
.items {
  list-style: none;
  margin: 0;
  padding: clamp(22px, 4vw, 40px) clamp(4px, 2vw, 24px) 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 6vw, 80px);
}
.item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .3s;
}
.item-head { display: flex; align-items: baseline; gap: 10px; }
.item-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 23px);
  line-height: 1.2;
  color: var(--green);
}
.leader { flex: 1; min-width: 18px; border-bottom: 1px dotted rgba(181, 144, 83, .55); transform: translateY(-5px); }
.price {
  flex: 0 0 auto;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--gold);
  white-space: nowrap;
}
.item-alt { margin: 2px 0 0; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); }
.item-desc { margin: 8px 0 0; font-size: 14.5px; font-weight: 300; color: #4c5956; max-width: 52ch; }

.item.hidden { display: none; }
.category.empty { display: none; }
.no-results { text-align: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); padding: 40px 20px 80px; margin: 0; }

/* ---------- Nota ---------- */
.note {
  max-width: 760px;
  margin: 0 auto clamp(56px, 8vw, 96px);
  padding: 0 24px;
  text-align: center;
}
.note img { width: 40px; margin: 0 auto 14px; opacity: .9; }
.note p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--green-700); }

/* ---------- Rodapé ---------- */
.footer {
  background: var(--green);
  color: rgba(247, 243, 236, .8);
  text-align: center;
  padding: 56px 24px calc(28px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.footer-logo { width: 200px; margin: 0 auto 22px; }
.footer-tag { margin: 0 auto 18px; max-width: 420px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ivory); }
.footer-info { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; line-height: 1.9; }
.footer-info.small { font-size: 12px; opacity: .65; }
.footer-bottom {
  max-width: 1180px; margin: 36px auto 0; padding-top: 18px;
  border-top: 1px solid rgba(247, 243, 236, .12);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; letter-spacing: .12em;
}
.footer-link { text-decoration: none; color: var(--gold-soft); }
.admin-link {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: rgba(247, 243, 236, .28);
  transition: color .25s, background .25s;
}
.admin-link:hover, .admin-link:focus-visible { color: var(--gold-soft); background: rgba(247, 243, 236, .06); }

/* ---------- Revelar ao rolar ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .sh-nav a { padding: 8px 12px; font-size: 16px; }
  .sh-cta { padding: 11px 16px; font-size: 16px; }
  .sh-logo img { width: 160px; }
}
@media (max-width: 900px) {
  .items { grid-template-columns: 1fr; }
  .cat-banner { aspect-ratio: 16 / 8; }

  /* Header no telemóvel: menu à esquerda, logo à direita (como lattico.ao) */
  .sh-inner { grid-template-columns: auto 1fr; padding: 10px 16px; }
  .sh-burger { display: grid; }
  .sh-nav, .sh-right { display: none; }
  .sh-logo { justify-self: end; }
  .sh-logo img { width: 150px; }
  .sh-mobile:not([hidden]) {
    display: flex; flex-direction: column;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #FFFFFF;
    padding: 6px 16px 18px;
    box-shadow: 0 18px 30px -18px rgba(39, 70, 65, .45);
    animation: drop .3s var(--ease) both;
  }
  .sh-mobile a:not(.sh-cta) { padding: 14px 4px; border-bottom: 1px solid #F0ECE4; }
  .sh-mobile .sh-cta { justify-content: center; margin-top: 16px; padding: 14px 20px; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 560px) {
  html { scroll-padding-top: 130px; }
  .subbar-inner { padding: 0 0 0 16px; gap: 8px; }
  .topbar-actions { padding-right: 12px; gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
  .lang button { padding: 5px 9px; }
  .search-wrap { padding: 0 16px; }
  .category { padding: 0 16px; }
  .cat-banner { aspect-ratio: 4 / 3; border-radius: 14px; }
  .cat-banner::after { background: linear-gradient(0deg, rgba(27, 50, 46, .92) 0%, rgba(27, 50, 46, .4) 55%, rgba(27, 50, 46, .05) 100%); }
  .items { padding-left: 2px; padding-right: 2px; }
  .item-name { font-size: 20px; }
  .leader { display: none; }
  .price { margin-left: auto; }
  .item-head { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: baseline; }
  .footer-bottom { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
@media print {
  .topbar, .admin-link { display: none !important; }
  .reveal { opacity: 1; transform: none; }
  .cat-banner { aspect-ratio: 21 / 5; }
}

/* ==========================================================
   Cartas: Comida | Bebidas
   ========================================================== */
body[data-menu="food"] .for-drinks,
body[data-menu="drinks"] .for-food { display: none; }
.chips[hidden] { display: none; }
.chips-wrap { flex: 1; min-width: 0; display: flex; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Seletor */
.carta-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  isolation: isolate;
}
.cs-thumb {
  position: absolute; z-index: -1;
  top: 5px; bottom: 5px; left: 5px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 8px 18px -10px rgba(39, 70, 65, .7);
  transition: transform .55s cubic-bezier(.65, 0, .25, 1);
}
body[data-menu="drinks"] .cs-thumb { transform: translateX(100%); }
.cs-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; background: transparent;
  color: var(--green);
  font-family: var(--sans);
  border-radius: 999px;
  transition: color .4s;
  white-space: nowrap;
}
.cs-opt.active { color: var(--ivory); }
.cs-opt:not(.active):hover { color: var(--gold); }
.cs-opt svg { flex: 0 0 auto; transition: transform .5s var(--ease); }
.cs-opt.active svg { transform: rotate(-8deg) scale(1.06); }

.carta-switch--hero { width: min(420px, 100%); margin: 34px auto 0; box-shadow: 0 18px 40px -26px rgba(39, 70, 65, .45); animation: rise 1s .45s var(--ease) both; }
.carta-switch--hero .cs-opt { padding: 15px 18px; font-size: 15px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.carta-switch--mini { flex: 0 0 auto; padding: 3px; }
.carta-switch--mini .cs-thumb { top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); }
.carta-switch--mini .cs-opt { padding: 7px 14px; font-size: 13px; letter-spacing: .04em; gap: 7px; }
.carta-switch--mini .cs-opt svg { width: 17px; height: 17px; }
.subbar .carta-switch--mini + .chips-wrap { border-left: 1px solid var(--line); padding-left: 14px; }

/* Transição entre cartas */
.menu-panel.entering { animation: panelIn .7s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Introdução da carta de bebidas */
.panel-intro { max-width: 760px; margin: 0 auto clamp(36px, 6vw, 60px); padding: 0 24px; text-align: center; }
.pi-lead { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.4vw, 24px); color: var(--green-700); }
.pi-info {
  display: inline-block; margin: 16px 0 0; padding: 8px 18px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .6);
  font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}

/* Unidade de preço na capa (por garrafa, por copo, por jarro) */
.cat-unit {
  position: absolute; z-index: 1; top: clamp(14px, 2.4vw, 24px); right: clamp(14px, 2.4vw, 24px);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(247, 243, 236, .92); color: var(--green);
  font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}

/* Lista compacta (bebidas sem descrição) */
.items--compact .item { padding: 13px 0; }
.items--compact .item-name { font-size: clamp(19px, 2vw, 21px); }
.items--compact .item-alt { font-size: 15px; }

/* Duas colunas de preço (Dose | Garrafa) */
.items--cols { grid-template-columns: 1fr; max-width: 880px; margin: 0 auto; }
.items--cols .item-head { display: grid; grid-template-columns: auto 1fr 124px 124px; align-items: baseline; column-gap: 10px; }
.price--col { text-align: right; font-variant-numeric: tabular-nums; }
.price--na { color: var(--line); }
.cols-head {
  display: grid; grid-template-columns: 1fr 124px 124px; column-gap: 10px;
  padding: 0 0 10px; border-bottom: 1px solid var(--gold-soft);
}
.cols-head .ch { text-align: right; font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* Nota do grupo (ex.: sangrias) */
.cat-note { max-width: 880px; margin: 18px auto 0; padding: 0 clamp(4px, 2vw, 24px); font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--muted); text-align: center; }

/* Atalho para a outra carta */
.cross-sell { display: flex; justify-content: center; margin: 0 auto clamp(56px, 8vw, 96px); padding: 0 20px; }
.cross-btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 26px; border-radius: 999px;
  border: 1px solid var(--green); background: transparent; color: var(--green);
  font-size: 14px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  transition: background .3s, color .3s, box-shadow .3s;
}
.cross-btn:hover { background: var(--green); color: var(--ivory); box-shadow: 0 14px 30px -18px rgba(39, 70, 65, .8); }
.cross-btn .arrow { transition: transform .3s var(--ease); }
.cross-btn:hover .arrow { transform: translateX(4px); }

@media (max-width: 900px) {
  .subbar .carta-switch--mini + .chips-wrap { padding-left: 10px; }
}
@media (max-width: 560px) {
  .carta-switch--hero .cs-opt { padding: 14px 12px; font-size: 13px; letter-spacing: .1em; }
  .carta-switch--mini .cs-label { display: none; }
  .carta-switch--mini .cs-opt { padding: 7px 10px; }
  .subbar .carta-switch--mini + .chips-wrap { padding-left: 8px; }
  .items--cols .item-head { grid-template-columns: 1fr 84px 92px; column-gap: 8px; }
  .items--cols .leader { display: none; }
  .items--cols .price { margin-left: 0; font-size: 14px; }
  .cols-head { grid-template-columns: 1fr 84px 92px; column-gap: 8px; }
  .cols-head .ch { font-size: 10.5px; letter-spacing: .1em; }
  .cat-unit { font-size: 10.5px; padding: 6px 11px; }
  .cross-btn { padding: 14px 20px; font-size: 12.5px; letter-spacing: .1em; }
}
