/* =============================================================
   styles.css — Casa Tartufo
   CSS crítico above-the-fold está inlinado em index.html.
   Este arquivo contém apenas estilos não-críticos e é carregado
   de forma assíncrona para não bloquear a renderização.
   ============================================================= */

:root {
  --bg:             #FFFFFF;
  --primary:        #111111;
  --text:           #6B1E1E;
  --secondary:      #F4F0EC;
  --font-title:     2.5rem;
  --font-sub:       1.2rem;
  --radius:         12px;
  --main-font:      "Copperplate Gothic Bold";
  --secondary-font: "baskerville-old-face";
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  padding-top: 70px;
}

section { text-align: center; padding: 80px 20px; border-bottom: 1px solid rgba(0,0,0,0.06); }
/* Fundo alternado: aplicar classe .sec-alt nas seções que devem ter fundo secundário.
   Evita o seletor genérico nth-child que sobrepõe seções com background próprio (hero, etc). */
.sec-alt { background: var(--secondary); }
.sec-alt .card { background: var(--bg); }
.sec-alt .cardapio-card { background: var(--bg); }
.sec-alt .promo-slide { background: var(--secondary); }


/* ── HERO ── */
/* Regras do hero estão no CSS crítico inline em index.html.
   Não duplicar aqui para evitar piscada ao carregar styles.css. */

/* ── BOTÕES ── */
button {
  background: var(--primary);
  color: var(--secondary);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: bold;
}
button:hover { opacity: 0.9; }

.a-button {
  display: inline-block;
  background: var(--text);
  color: var(--secondary);
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: .03em;
  transition: opacity .2s, transform .15s;
}
.a-button:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-whatsapp img { width: 20px; height: 20px; }


/* ── NOVIDADES / PROMOÇÕES ── */
.novidades h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 6px; }
.novidades-sub {  color: rgba(107,30,30,.85);}

.promo-carousel {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
}

.promo-slides {
  position: relative;
  min-height: 280px;
}

.promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
  background: var(--bg);
  border: 2px solid rgba(107,30,30,.15);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.promo-slide.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}
section:nth-child(even) .promo-slide { background: var(--secondary); }

.promo-slide--destaque {
  border-color: var(--text);
  background: linear-gradient(135deg, #fff 70%, rgba(107,30,30,.04));
}
section:nth-child(even) .promo-slide--destaque {
  background: linear-gradient(135deg, var(--secondary) 70%, rgba(107,30,30,.06));
}

.promo-tag {
  display: inline-block;
  background: var(--text);
  color: #fff;
  font-size: .72rem;
  font-weight: bold;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  width: fit-content;
}

.promo-slide h3 {
  font-size: 1.35rem;
  color: var(--primary);
  line-height: 1.25;
}

.promo-slide p {
  font-size: .93rem;
  color: rgba(17,17,17,.7);
  line-height: 1.55;
}

.promo-cta {
  display: inline-block;
  margin-top: 4px;
  background: var(--text);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: bold;
  text-decoration: none;
  font-size: .9rem;
  width: fit-content;
  transition: opacity .2s;
}
.promo-cta:hover { opacity: .85; }

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.promo-dot {
  width: 8px;
  height: 8px;
  background: rgba(107,30,30,.25);
  border-radius: 50%;
  cursor: pointer;
  transition: background .3s;
}
.promo-dot.active { background: var(--text); }


/* ── CARDÁPIO ── */
.cardapio { padding: 80px 20px; }

.cardapio-header { max-width: 580px; margin: 0 auto 48px; }
.cardapio-header h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 12px; }
.cardapio-header p  { font-size: 1rem; color: rgba(107,30,30,.75); line-height: 1.6; }

.cardapio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 860px;
  margin: 0 auto 40px;
  text-align: left;
}

/* Reset herança de text-align:center vinda do seletor global section */
.cardapio-card,
.cardapio-card * {
  text-align: left;
}

.cardapio-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1.5px solid rgba(107,30,30,.14);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cardapio-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(107,30,30,.1);
  border-color: var(--text);
}
section:nth-child(even) .cardapio-card { background: var(--bg); }

.cardapio-card--destaque { border-color: var(--text); }

.cardapio-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--text);
  color: #fff;
  font-size: .68rem;
  font-weight: bold;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  z-index: 1;
}

.cardapio-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block !important;
  border-radius: 0;
  flex-shrink: 0;
  align-self: stretch;
  min-width: 0;
}

.cardapio-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cardapio-card-body h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 8px;
}
.cardapio-card-body p {
  font-size: .88rem;
  color: rgba(17,17,17,.65);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}
.cardapio-card-cta {
  font-size: .85rem;
  font-weight: bold;
  color: var(--text);
}

.cardapio-cta-btn { margin-top: 8px; }


/* ── GUIA DE FINALIZAÇÃO ── */
.guia { padding: 80px 20px; }
.guia-sub {
  color: rgba(107,30,30,.85);
  margin: 8px 0 36px;
  font-size: .97rem;
}

.cards { display: flex; gap: 20px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

.card {
  border-top: 3px solid var(--text);
  background: var(--secondary);
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  width: 260px;
  text-align: left;
  position: relative;
}
.card-num {
  position: absolute;
  top: -1px;
  right: 20px;
  font-size: 2.5rem;
  font-weight: bold;
  color: rgba(107,30,30,.12);
  line-height: 1;
}
.card h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 6px; }
.card p   { font-size: .9rem; color: rgba(17,17,17,.7); }
.card-detalhe { margin-top: 10px; font-size: .85rem; opacity: .85; line-height: 1.55; }
.card:hover   { transform: scale(1.03); }
section:nth-child(even) .card { background: var(--bg); }

@media (max-width: 768px) {
  .cards { flex-direction: column; align-items: center; }
  .card  { width: 100%; max-width: 360px; }
}


/* ── ONDE ATENDEMOS ── */
.onde-atendemos { padding: 64px 20px; }
.onde-atendemos h2 { margin-bottom: 20px; }
.onde-p { max-width: 520px; margin: 0 auto 12px; font-size: 1rem; line-height: 1.6; }
.onde-p strong { color: var(--primary); font-weight: bold; }
.onde-p--minor { font-size: .88rem; opacity: .8; }


/* ── CTA FINAL ── */
.cta { padding: 80px 20px; }
.cta-image { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 24px; display: block; }
.cta h2 { font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.3; margin-bottom: 14px; }
.cta p  { margin-bottom: 28px; opacity: .8; max-width: 420px; margin-left: auto; margin-right: auto; line-height: 1.6; }


/* ── FLOATING WHATSAPP ── */
.floating-whatsapp {
  z-index: 10;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transition: transform .2s;
}
.floating-whatsapp:hover { transform: scale(1.08); }
.floating-whatsapp img { width: 48px; height: 48px; }


/* ── ANIMAÇÕES ── */
.highlight { animation: pulse 1.5s ease; }
@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.heat { animation: heatPulse 1.5s ease; color: #e67a00; font-weight: bold; text-shadow: 0 0 8px rgba(230,122,0,.6); }
@keyframes heatPulse {
  0%   { color: var(--text); }
  50%  { color: #e67a00; }
  100% { color: var(--text); }
}

.highlight-sabores { animation: sectionGlow 1.5s ease; }
@keyframes sectionGlow {
  0%   { box-shadow: 0 0 0 rgba(197,157,95,0); }
  50%  { box-shadow: 0 0 30px rgba(197,157,95,.25); }
  100% { box-shadow: 0 0 0 rgba(197,157,95,0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ── POPUP ── */
.popup { z-index: 1001; position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none; justify-content: center; align-items: center; }
.popup.active  { display: flex; animation: popupFadeIn .3s forwards; }
.popup.closing { animation: popupFadeOut .3s forwards; }
.popup-content { animation: contentZoomIn .25s forwards; background: var(--bg); padding: 30px; border-radius: var(--radius); position: relative; max-width: 400px; width: 90%; }
.popup.closing .popup-content { animation: contentZoomOut .25s forwards; }
@keyframes popupFadeIn   { from { background: rgba(0,0,0,0); }   to { background: rgba(0,0,0,.5); } }
@keyframes popupFadeOut  { from { background: rgba(0,0,0,.5); } to { background: rgba(0,0,0,0); } }
@keyframes contentZoomIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@keyframes contentZoomOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.95); } }


/* ── AUTH MODAL ── */
#authModal { position: fixed; inset: 0; z-index: 9999; display: none; }
#authModal .auth-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
#authModal .auth-box { background: white; border-radius: 16px; padding: 40px 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
#authModal .auth-box h2 { font-size: 1.2rem; color: #111; margin-bottom: 8px; }
#authModal #authCancelBtn { background: none; border: none; color: #888; font-size: .85rem; cursor: pointer; text-decoration: underline; }
#authModal #authCancelBtn:hover { color: #333; }


/* ── FOOTER ── */
footer { background: var(--secondary); text-align: center; padding: 20px; font-size: .9rem; opacity: .8; }
footer img { width: 20px; vertical-align: middle; margin: 8px; }

/* ── LINKS PAGE ── */
.links-page { min-height: 100vh; background: var(--primary); display: flex; justify-content: center; align-items: center; padding: 30px 20px; }
.links-container { width: 100%; max-width: 420px; text-align: center; }
.profile-image { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 3px solid var(--text); background: white; }
.links-title { color: var(--secondary); font-size: 2rem; margin-bottom: 10px; font-family: var(--main-font); }
.links-subtitle { color: rgba(255,255,255,.75); margin-bottom: 35px; }
.links-list { display: flex; flex-direction: column; gap: 16px; }
.link-card { background: var(--secondary); color: var(--text); text-decoration: none; padding: 18px 20px; border-radius: var(--radius); font-weight: bold; transition: .25s ease; border: 2px solid transparent; }
.link-card:hover { transform: translateY(-3px); border-color: var(--text); opacity: 1; }
.featured-link { position: relative; overflow: hidden; background: linear-gradient(135deg, #6B1E1E 0%, #8b2b2b 100%); color: white; padding: 24px 20px; text-align: left; border: 2px solid rgba(255,255,255,.08); box-shadow: 0 10px 30px rgba(0,0,0,.18); transition: transform .25s ease, box-shadow .25s ease; }
.featured-link:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.featured-link::before { content: ""; position: absolute; top: -40%; left: -20%; width: 120px; height: 220%; background: rgba(255,255,255,.08); transform: rotate(25deg); pointer-events: none; }
.featured-content h2 { font-size: 1.1rem; margin-bottom: 8px; color: white; }
.featured-content p  { font-size: .92rem; opacity: .9; line-height: 1.4; }
.featured-badge { position: absolute; top: 12px; right: 12px; background: #F4F0EC; color: #6B1E1E; font-size: .7rem; font-weight: bold; padding: 5px 10px; border-radius: 999px; letter-spacing: 1px; }


/* ── NAV DESKTOP/MOBILE (não-crítico complementar) ── */
.btn-voltar.no-back { display: none; }
.btn-corrigir-endereco { display: inline-block; margin-top: 10px; padding: 10px 14px; background: var(--text); color: white; border-radius: var(--radius); font-size: .82rem; font-weight: bold; text-decoration: none; }
.btn-corrigir-endereco:hover { opacity: .9; }

.btn-sair:hover { opacity: .8; }
.nav-links-desktop a:hover { opacity: 1; }
