/* Shared styles for legal/info pages: faq, privacidade, termos, envios */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Tem de acompanhar o :root das restantes páginas. Divergia em dois pontos e
     dava-se por isso logo na barra do menu: corpo em DM Sans em vez de Rosario
     e um cinzento secundário mais claro. */
  --bg: #F5F0E8; --bg2: #EDE7D9; --accent: #C4622D; --accent2: #5C7A5A; --gold: #B8964E;
  --text: #2C2416; --text2: #6B5A48; --border: #D9D0C0; --dark: #1A1208;
  --D: 'Cormorant Garamond', Georgia, serif; --B: 'Rosario', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--B); font-weight: 300; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
nav { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; background: rgba(245,240,232,0.96); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* Sem esta altura o PNG renderiza ao tamanho natural (1513x835) e atravessa a página. */
.nav-logo-png { height: 40px; width: auto; object-fit: contain; display: block; }
.nav-diamond { color: #B8964E; flex-shrink: 0; }
.nav-logo-wordmark { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-kin { font-family: var(--D); font-style: italic; font-size: 21px; color: var(--text); letter-spacing: 0.02em; }
.nav-logo-ferments { font-family: var(--B); font-weight: 500; font-size: 8.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text2); margin-top: 1px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text2); text-decoration: none; transition: color 0.2s; }
/* O sublinhado no hover é para o texto corrido destas páginas; na barra não. */
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-cart { display: flex; align-items: center; gap: 8px; cursor: pointer; background: none; border: none; font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text2); transition: color 0.2s; }
.nav-cart:hover { color: var(--text); }
.cart-pill { background: var(--accent); color: #fff; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; display: flex; align-items: center; justify-content: center; }

/* SELECTOR DE IDIOMA
   Vive aqui e não injectado pelo build: estas páginas não têm bloco <style>,
   que é onde o build_en.py ancora o CSS do selector. Sem isto ficava sem estilo. */
.lang-switch { display: flex; align-items: center; gap: 6px; font-family: var(--B); font-weight: 500; font-size: 10px; letter-spacing: 0.12em; margin-left: 20px; }
.lang-switch a, .lang-switch span { text-decoration: none; transition: color 0.2s; }
.lang-switch .lang-on { color: var(--accent); }
.lang-switch a { color: var(--text2); }
.lang-switch a:hover { color: var(--text); text-decoration: none; }

/* HAMBÚRGUER + GAVETA */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; width: 36px; height: 36px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: transform 0.3s, opacity 0.3s; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
/* overflow-y: com oito destinos mais as redes, a gaveta precisa de 762px de
   altura e não cabe num ecrã baixo; sem isto os últimos itens ficavam
   inalcançáveis, por ser position:fixed. */
.mobile-drawer { display: none; position: fixed; inset: 0; top: 68px; z-index: 190; background: var(--bg); padding: 40px 32px; flex-direction: column; gap: 8px; transform: translateX(100%); transition: transform 0.35s cubic-bezier(.4,0,.2,1); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a { font-family: var(--D); font-style: italic; font-size: 36px; font-weight: 300; color: var(--text); padding: 12px 0; border-bottom: 1px solid var(--border); transition: color 0.2s; text-decoration: none; }
.mobile-drawer a:hover { color: var(--accent); text-decoration: none; }
.mobile-drawer a:last-child { border-bottom: none; }
.mob-social { margin-top: 32px; display: flex; gap: 24px; }
.mob-social a { font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-style: normal; border: none; padding: 0; color: var(--text2); }
/* Depois das regras acima, senão os 36px sobrepunham-se a este bloco. */
@media (max-height: 780px) {
  .mobile-drawer { padding: 24px 32px; }
  .mobile-drawer a { font-size: 28px; padding: 8px 0; }
  .mob-social { margin-top: 20px; }
}

/* CARRINHO */
.cart-overlay { position: fixed; inset: 0; background: rgba(14,9,2,0.5); z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-sidebar { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; background: var(--bg); z-index: 301; transform: translateX(100%); transition: transform 0.35s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.cart-sidebar.open { transform: translateX(0); }
.cart-head { padding: 28px 32px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-head-title { font-family: var(--D); font-size: 24px; }
.cart-x { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--text2); transition: color 0.2s; }
.cart-x:hover { color: var(--text); }
.cart-body { flex: 1; padding: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.cart-empty-msg { font-family: var(--D); font-style: italic; font-size: 20px; color: var(--text2); }
.cart-items-list { width: 100%; list-style: none; }
.cart-item { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text2); display: flex; justify-content: space-between; }
.btn-secondary { display: inline-flex; align-items: center; background: transparent; color: var(--accent); font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 13px 28px; border-radius: 2px; border: 1.5px solid var(--accent); cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn-secondary:hover { background: var(--accent); color: #fff; text-decoration: none; }
/* Usado pelo botão "Encomendar por email" que o cart.js injecta. */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 14px 30px; border-radius: 2px; border: none; cursor: pointer; text-decoration: none; transition: background 0.2s; }
.btn-primary:hover { background: #A8521F; color: #fff; text-decoration: none; }

/* PAGE HEADER */
main { flex: 1; }
.page-header { padding: 64px 80px 48px; border-bottom: 1px solid var(--border); }
.overline { font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text2); display: block; margin-bottom: 12px; }
.page-header h1 { font-family: var(--D); font-weight: 300; font-size: 56px; line-height: 1.05; color: var(--text); }
.page-header h1 em { font-style: italic; }

/* CONTENT */
.content { max-width: 780px; margin: 0 auto; padding: 56px 80px 80px; }

/* FAQ */
.faq-group { margin-bottom: 48px; }
.faq-group h2 { font-family: var(--D); font-weight: 400; font-size: 28px; color: var(--text); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: none; border: none; cursor: pointer; padding: 20px 0; font-family: var(--B); font-weight: 400; font-size: 16px; color: var(--text); text-align: left; transition: color 0.2s; }
.faq-q:hover { color: var(--accent); }
.faq-icon { font-size: 20px; font-weight: 300; color: var(--accent); flex-shrink: 0; transition: transform 0.3s; }
.faq-a { display: none; padding: 0 0 20px; }
.faq-item.open .faq-a { display: block; }
.faq-a p { font-family: var(--B); font-weight: 300; font-size: 15px; line-height: 1.75; color: var(--text2); margin-bottom: 12px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a a { color: var(--accent); }

/* LEGAL PROSE */
.legal-section { margin-bottom: 40px; }
.legal-section h2 { font-family: var(--D); font-weight: 400; font-size: 24px; color: var(--text); margin-bottom: 14px; }
.legal-section h3 { font-family: var(--B); font-weight: 500; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); margin-bottom: 10px; margin-top: 20px; }
.legal-section p, .legal-section li { font-family: var(--B); font-weight: 300; font-size: 15px; line-height: 1.75; color: var(--text2); margin-bottom: 10px; }
.legal-section ul { padding-left: 20px; }
.legal-section li { list-style: disc; }
.legal-date { font-family: var(--B); font-size: 13px; color: var(--text2); margin-bottom: 32px; }

/* SHIPPING TABLE */
.shipping-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.shipping-table th { font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text2); padding: 10px 16px; border-bottom: 2px solid var(--border); text-align: left; }
.shipping-table td { font-family: var(--B); font-weight: 300; font-size: 14px; color: var(--text); padding: 12px 16px; border-bottom: 1px solid var(--border); }
.shipping-table tr:last-child td { border-bottom: none; }

/* FOOTER */
.legal-footer { background: var(--dark); padding: 32px 80px; margin-top: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 16px; }
.footer-nav a { font-family: var(--B); font-size: 13px; color: rgba(237,231,217,0.4); text-decoration: none; transition: color 0.2s; }
.footer-nav a:hover { color: rgba(237,231,217,0.8); text-decoration: none; }
.footer-copy { font-family: var(--B); font-size: 12px; color: rgba(237,231,217,0.2); }
.footer-copy a { color: rgba(237,231,217,0.35); }

/* A barra recolhe para hambúrguer aos 1100px, como no resto do site: com sete
   itens, abaixo disso o logótipo encostaria aos links. */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-drawer { display: flex; }
}

/* O resto do enxoval de telemóvel entra mais tarde: o conteúdo destas páginas
   só precisa de refluir aos 900px. */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-drawer { display: flex; }
  .cart-sidebar { width: 100%; }
  .nav-logo-png { height: 30px; }
  .lang-switch { margin-left: 12px; }
}

@media (max-width: 768px) {
  .page-header { padding: 40px 24px 32px; }
  .page-header h1 { font-size: 40px; }
  .content { padding: 40px 24px 56px; }
  .legal-footer { padding: 28px 24px; }
}


@media (min-width: 1200px) {
  .content { max-width: 900px; padding: 56px 0 80px; margin: 0 auto; }
}
@media (min-width: 1440px) {
  nav { padding: 0 80px; }
  .page-header { padding: 80px 120px 56px; }
}
@media (min-width: 1600px) {
  body { max-width: 1800px; margin: 0 auto; }
}
/* ── RODAPÉ (igual ao das restantes páginas) ── */
footer { background: var(--dark); padding: 56px 80px 36px; margin-top: auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 28px; }
.footer-logo-png { height: 64px; width: auto; object-fit: contain; display: block; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: 0.72; }
.footer-tagline { font-family: var(--D); font-style: italic; font-weight: 300; font-size: 14px; color: rgba(237,231,217,0.3); line-height: 1.6; margin-bottom: 20px; }
.footer-col-label { font-family: var(--B); font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(237,231,217,0.25); margin-bottom: 16px; display: block; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.footer-links a { font-family: var(--B); font-weight: 300; font-size: 14px; color: rgba(237,231,217,0.45); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: rgba(237,231,217,0.8); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-socials { display: flex; gap: 20px; }
.footer-socials a { font-family: var(--B); font-weight: 500; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(237,231,217,0.25); text-decoration: none; transition: color 0.2s; }
.footer-socials a:hover { color: var(--accent); }
@media (max-width: 768px) {
  footer { padding: 48px 24px 28px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 14px; align-items: flex-start; }
}
