@font-face {
  font-family: "PT Serif";
  src: url("../assets/fonts/PTSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PT Serif";
  src: url("../assets/fonts/PTSerif-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PT Serif";
  src: url("../assets/fonts/PTSerif-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "PT Sans";
  src: url("../assets/fonts/PTSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PT Sans";
  src: url("../assets/fonts/PTSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --espresso: #4A3525;
  --doce-de-leite: #C49A74;
  --cafe-com-leite: #8A5E43;
  --areia: #EFE8DE;
  --baunilha: #F6F1EB;
  --chocolate: #5A3939;
  --matcha: #8F9674;

  --font-display: "PT Serif", Georgia, serif;
  --font-body: "PT Sans", -apple-system, "Segoe UI", sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--baunilha);
  color: var(--espresso);
  font-family: var(--font-body);
  overflow-x: hidden;
  width: 100%;
}

body {
  padding-bottom: calc(24px + var(--safe-bottom));
}

img { max-width: 100%; display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: var(--safe-top);
  background: var(--espresso);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__content {
  width: 100%;
  padding: 22px 20px 20px;
  text-align: center;
}
.hero__logo {
  width: 132px;
  margin: 0 auto 6px;
  filter: brightness(0) invert(1);
}
.hero__tagline {
  margin: 0;
  color: var(--baunilha);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: .2px;
  opacity: .95;
}

/* ---------- Tabs ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  background: var(--espresso);
  padding: 0 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.tab {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--doce-de-leite);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 16px;
  padding: 14px 4px 11px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.tab[aria-selected="true"] {
  color: var(--baunilha);
  border-bottom-color: var(--matcha);
}

/* ---------- Menu content ---------- */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 14px 4px;
}
.category { display: none; }
.category.is-active { display: block; }

.group { margin-bottom: 28px; }
.group__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 2px solid var(--doce-de-leite);
  padding-bottom: 6px;
  margin-bottom: 4px;
}
.group__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 21px;
  color: var(--cafe-com-leite);
  margin: 0;
}
.group__subtitulo {
  margin: 2px 0 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--cafe-com-leite);
  font-style: italic;
}

.item {
  border-bottom: 1px solid rgba(138,94,67,.18);
  padding: 12px 0;
}
.item:last-child { border-bottom: none; }

.item--photo {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
}
.item__photo-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--areia);
  cursor: pointer;
}
.item__photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item__expand {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(74,53,37,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.item__expand svg { width: 12px; height: 12px; fill: var(--baunilha); }

.item__body { min-width: 0; }

.item__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.item__nome {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--espresso);
  margin: 0;
}
.item__preco {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--chocolate);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item__tamanho {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--cafe-com-leite);
  margin-top: 1px;
}
.item__desc {
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  color: #6b5644;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 22px 14px 0;
  color: var(--cafe-com-leite);
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 15px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20,13,8,.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 10px;
  object-fit: contain;
}
.lightbox__caption {
  color: var(--baunilha);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-top: 14px;
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: calc(14px + var(--safe-top));
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.12);
  color: var(--baunilha);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 640px) {
  .hero__logo { width: 160px; }
}

/* ---------- Category banner (e.g. Especiais) ---------- */
.category__banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  aspect-ratio: 16 / 9;
}
.category__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.category__banner-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(74,53,37,.85), rgba(74,53,37,0));
  color: var(--baunilha);
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 16px;
}
