/* ============================================================
   MISSANGA MÁGICA - STYLES
   ============================================================ */

:root {
/* Cores */
  --base-dark:  #2D2623;
  --base-med:   #5C4E47;
  --base-light: #F5F0EB;
  --bg:         #FAF8F6;

  --bordo:      #7B3F3F;
  --bordo-hover:#643333;

  --vermelho-escuro:       #4A0000;
  --vermelho-escuro-hover: #3D0000;
  --vermelho-escuro-light: #5D0000;

  --dourado:      #D4A843;
  --dourado-pale: #F5E8C8;

  --gray-700: #6B5E57;
  --gray-500: #9D8F87;
  --gray-300: #D4C9C2;
  --gray-100: #EDE7E2;

/* Tipografia - apenas Poppins */
  --font-primary:   'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-accent:    'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --weight-reg:  400;
  --weight-med:  500;
  --weight-sb:   600;
  --weight-bold: 700;

  --track-tight: -0.02em;

  /* Raio */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 999px;

  /* Sombras */
  --shadow-sm:  0 2px 8px rgba(45,38,35,0.06);

  /* Layout */
  --container: 1140px;
  --header-h:  72px;

  /* Animações */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  font-family: var(--font-primary);
  font-size: clamp(0.9375rem, 0.875rem + 0.3125vw, 1rem);
  line-height: 1.6;
  color: var(--base-dark);
  background: var(--bg);
  font-weight: var(--weight-reg);
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
address { font-style: normal; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
::selection { background: var(--dourado); color: var(--base-dark); }

/* Barra de scroll da página: sem fundo (trilho transparente), só o indicador */
html {
  scrollbar-width: thin;                              /* Firefox */
  scrollbar-color: rgba(212, 168, 67, 0.7) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 67, 0.7);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--dourado); }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

/* ============================================================
   UTILITY CLASSES - Font overrides
   ============================================================ */
.font-poppins { font-family: var(--font-accent) !important; }
.font-bold { font-weight: var(--weight-bold) !important; }
.text-dourado { color: var(--dourado) !important; }


/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--base-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
  animation: preloaderAutoHide 0.4s ease 3.2s both;
}
.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-inner {
  text-align: center;
  position: relative;
  animation: preloaderPulse 1.2s ease-in-out infinite;
}
.preloader-inner::before {
  content: '';
  position: absolute;
  inset: -26px;
  margin: auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(184, 149, 106, 0.22);
  animation: preloaderSpin 3s linear infinite;
}
.preloader-inner::after {
  content: '';
  position: absolute;
  inset: -26px;
  margin: auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--dourado);
  border-right-color: rgba(196, 122, 92, 0.35);
  animation: preloaderSpin 1.4s linear infinite;
}
@keyframes preloaderSpin { to { transform: rotate(360deg); } }
@keyframes preloaderAutoHide { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.preloader-brand {
  font-family: var(--font-primary);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: var(--weight-sb);
  color: var(--base-light);
  letter-spacing: var(--track-tight);
}
.preloader-brand span { color: var(--dourado); font-style: italic; font-family: var(--font-accent); }

@keyframes preloaderPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(250, 248, 246, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(45, 38, 35, 0.06);
  transition: background 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  background: rgba(250, 248, 246, 0.98);
  border-bottom-color: var(--gray-300);
  box-shadow: 0 4px 20px -2px rgba(45, 38, 35, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Brand */
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-primary);
  font-size: 1.35rem;
  font-weight: var(--weight-sb);
  letter-spacing: var(--track-tight);
  color: var(--base-dark);
}
.brand-name span { color: var(--dourado); font-style: italic; font-family: var(--font-accent); }

/* Nav desktop */
.nav-list { display: flex; gap: 4px; }
.nav-link {
  position: relative;
  padding: 10px 16px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: var(--weight-med);
  color: var(--base-med);
  border-radius: var(--radius-full);
  transition: color 0.3s ease, background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  white-space: nowrap;
  font-family: var(--font-accent);
}
.nav-link:hover,
.nav-link:focus {
  color: var(--dourado);
  background: rgba(212, 168, 67, 0.12);
  outline: none;
}
.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--base-dark);
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.22), rgba(232, 200, 122, 0.18));
  font-weight: var(--weight-sb);
}
.nav-link:focus-visible { outline: 2px solid var(--dourado); outline-offset: 2px; }

/* Mobile toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 1001; }
.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--base-dark);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile overlay - fullscreen like PP Têxteis */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: var(--base-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-list-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.nav-link-mobile {
  font-family: var(--font-accent);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 600;
  color: var(--base-light);
  letter-spacing: var(--track-tight);
  padding: 12px 24px;
  transition: color 0.2s;
  opacity: 0;
  transform: translateY(20px);
}
.nav-overlay.is-open .nav-link-mobile {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color 0.2s;
}
.nav-overlay.is-open .nav-link-mobile:nth-child(1) { transition-delay: 0.05s; }
.nav-overlay.is-open .nav-link-mobile:nth-child(2) { transition-delay: 0.1s; }
.nav-overlay.is-open .nav-link-mobile:nth-child(3) { transition-delay: 0.15s; }
.nav-overlay.is-open .nav-link-mobile:nth-child(4) { transition-delay: 0.2s; }
.nav-overlay.is-open .nav-link-mobile:nth-child(5) { transition-delay: 0.25s; }

.nav-link-mobile:hover { color: var(--dourado); }
.nav-overlay-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 1.5rem;
  transition: color 0.2s;
  z-index: 1001;
}
.nav-overlay-close:hover { color: var(--base-light); }


/* ============================================================
   HERO (página inicial)
   O pin e a animação frame-by-frame são geridos por GSAP
   ScrollTrigger (js/main.js): o .hero-pin fica preso no topo e o
   hero só desliza para cima quando o scrub termina.
   ============================================================ */
.hero {
  position: relative;
  display: flex;
}
.hero--pinned {
  min-height: 100vh;
  height: 100vh;
  justify-content: flex-start;
  align-items: center;
  padding: 24px 0 56px;
  overflow: clip;
}
.hero-pin {
  position: relative;
  height: 100vh;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dourado);
  font-weight: var(--weight-sb);
  margin-bottom: 28px;
}

.hero h1 {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  font-weight: var(--weight-sb);
  line-height: 1.1;
  letter-spacing: var(--track-tight);
  color: var(--base-light);
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: italic;
  font-weight: var(--weight-bold);
  color: var(--dourado);
}

.featured-products { position: relative; }

/* ============================================================
   FUNDO SÓLIDO + GRADE SUTIL (hero e produtos)
   Cor: o marrom mais escuro do hero (#110D0C). A grade do hero é
   ancorada em baixo e a dos produtos em cima, para as linhas
   continuarem sem corte na passagem entre as duas secções.
   ============================================================ */
:root {
  --bg-deep: #110D0C;
  --grid-line: rgba(245, 232, 200, 0.045);
  --grid-size: 64px;
}
.hero-pin,
.hero--pinned,
section.featured-products { /* "section." vence o .section--dark definido mais abaixo */
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}
.hero-pin,
.hero--pinned { background-position: center bottom; }
section.featured-products { background-position: center top; }

/* ============================================================
   JANELA DE RESUMO (Botões / Fechos / Rendas) - secção Produtos
   Fica na coluna à direita dos cards, presa a meio do ecrã
   (sticky) enquanto a pilha de cards passa. O js/main.js controla
   --open (0→1) conforme o scroll: a janela abre a partir do lado
   dos cards e fecha quando o card seguinte chega.
   ============================================================ */
.item-info {
  --open: 0;
  position: sticky;
  top: 50%;
  align-self: start;
  justify-self: start;
  height: 0; /* não ocupa altura: fica presa até ao fim da secção */
  width: min(280px, 100%);
  z-index: 3;
}
/* O botão é o ponto fixo: fica sempre no mesmo sítio (um pouco abaixo
   do meio do ecrã) e a janela é posicionada por cima dele. Assim, mudar
   o texto da janela (altura diferente) nunca desloca o botão. */
.item-info__inner {
  position: relative;
  transform: translateY(48px);
}
.item-info__cta {
  white-space: nowrap;
}

.item-info__box {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 16px);
  padding: 18px 20px;
  border: 1px solid rgba(212, 168, 67, 0.35);
  border-radius: var(--radius-lg);
  background: rgba(24, 19, 17, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  opacity: var(--open);
  transform: translateX(calc((1 - var(--open)) * -24px)) scale(calc(0.95 + var(--open) * 0.05));
  transform-origin: left center;
  /* "abre" do lado dos cards para fora, como uma janela */
  clip-path: inset(0 calc((1 - var(--open)) * 100%) 0 0 round var(--radius-lg));
}

.item-info__panel {
  display: none;
  margin: 0;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--dourado-pale);
  /* o texto aparece um pouco depois da moldura */
  opacity: clamp(0, calc(var(--open) * 2 - 0.8), 1);
}
.item-info__panel.is-current { display: block; }

/* Tablet/telemóvel: uma coluna só, a janela fica fixa em baixo, centrada */
@media (max-width: 1024px) {
  .item-info {
    position: fixed;
    top: auto;
    left: 50%;
    bottom: 16px;
    height: auto;
    width: min(360px, calc(100vw - 32px));
    z-index: 40;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .item-info__inner { transform: none; }
  /* numa coluna só não há espaço ao lado dos cards: a janela taparia o texto
     do próprio card (que diz o mesmo), por isso fica só o botão */
  .item-info__box { display: none; }
  /* no telemóvel a janela é fixa na página toda: o botão só aparece na secção Produtos */
  .item-info__cta {
    display: flex;
    width: 100%;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-out), visibility 0.3s;
  }
  .item-info.is-in-view .item-info__cta {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .item-info__box { clip-path: none; transform: none; }
}

/* Featured Products - layout lateral com labels e cards */
.featured-products {
  min-height: 100vh;
  padding: clamp(60px, 8vw, 100px) 0;
  overflow: visible;
}

/* Cabeçalho da secção */
.featured-products__head {
  position: relative;
  z-index: 3;
}
.featured-products__head h2 {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .featured-products {
    min-height: auto;
    padding: clamp(40px, 6vw, 80px) 0;
  }
}

.hero-grid {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  padding: 0 clamp(36px, 8vw, 110px);
}
.hero-content {
  flex: 0 1 auto;
  max-width: 520px;
  text-align: left;
}
.hero--pinned .hero-eyebrow { margin-bottom: 22px; margin-right: auto; }

/* Visor de imagens (meio-direita) */
.hero-visual {
  flex: 0 1 580px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.visual-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: min(80vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.visual-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}
.visual-frame::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92%;
  height: 84%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(196, 158, 128, 0.11) 0%, rgba(196, 122, 92, 0.04) 50%, transparent 70%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s var(--ease-out);
}
html.js .visual-frame:not(.is-active)::before { opacity: 0; }
html.js .visual-frame:not(.is-active) { opacity: 0; }
.visual-frame::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 4%;
  height: 26%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
  filter: blur(3px);
  pointer-events: none;
}
.visual-frame img {
  position: relative;
  max-width: 92%;
  max-height: 88%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Tracinhos de progresso (canto direito, ao meio) - verticais, de cima para baixo */
.visual-progress {
  position: absolute;
  right: clamp(16px, 3vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.progress-bar {
  position: relative;
  width: 3px;
  height: 46px;
  border-radius: 2px;
  background: rgba(245, 240, 235, 0.22);
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px;
  /* dourado em todos os estados: a carregar, ativo e já carregado */
  background: var(--dourado);
  transform-origin: top;
  transform: scaleY(var(--fill, 0));
  will-change: transform;
  transition: transform 0.1s linear, box-shadow 0.3s var(--ease-out);
}
.progress-bar.is-active::after {
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.55);
}
.progress-bar.is-complete::after {
  box-shadow: none;
}

/* Tablet/telemóvel: sem pin, tudo numa coluna; as fotos trocam sozinhas
   com fade (js/main.js alterna .is-active). O topo desconta o cabeçalho
   fixo para o texto não ficar tapado. */
@media (max-width: 1024px) {
  .hero-pin { height: auto; }
  .hero-grid { flex-direction: column; justify-content: center; align-items: stretch; gap: 16px; padding: 0 24px; }
  .hero--pinned { min-height: auto; height: auto; padding: calc(var(--header-h) + 32px) 0 32px; }
  .hero-content { max-width: 560px; }
  .hero-visual { justify-content: center; flex: none; } /* em coluna, a base de 580px viraria altura */
  /* as 3 fotos ficam sobrepostas; a ativa aparece com fade in, as outras com fade out */
  .visual-stage { width: min(100%, 460px); height: min(42vh, 380px); }
  .visual-frame { transition: opacity 0.9s ease; }
  .visual-frame::before { transition: opacity 0.9s ease; }
  .visual-frame img { max-width: 100%; max-height: 100%; }
  .visual-progress { display: none; }
}

@media (max-width: 480px) {
  .hero--pinned { padding-top: calc(var(--header-h) + 24px); }
}

/* Reduz movimento: mostra apenas o primeiro frame, sem pin */
@media (prefers-reduced-motion: reduce) {
  .hero--pinned { padding-top: calc(var(--header-h) + 24px); }
}


/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: var(--weight-sb);
  border-radius: var(--radius-full);
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
  font-family: var(--font-accent);
}
.btn:focus-visible { outline: 2px solid var(--vermelho-escuro); outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(135deg, var(--vermelho-escuro-light), var(--vermelho-escuro));
  color: var(--base-light);
  box-shadow: 0 6px 24px rgba(74, 0, 0, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--vermelho-escuro), var(--vermelho-escuro-hover));
  box-shadow: 0 10px 32px rgba(74, 0, 0, 0.5);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }


/* ============================================================
   SEÇÕES - HIERARQUIA ESTILO PP TÊXTEIS
   ============================================================ */
.section {
  padding: clamp(72px, 6vw, 120px) 0;
}
.section--dark {
  background: var(--base-dark);
  color: var(--base-light);
}

/* Section head - eyebrow + large heading */
.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-secondary);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dourado);
  font-weight: var(--weight-sb);
  margin-bottom: 16px;
}

.section-head h2 {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  font-weight: var(--weight-sb);
  line-height: 1.15;
  letter-spacing: var(--track-tight);
  color: var(--vermelho-escuro);
  margin-bottom: 12px;
}
.section--dark .section-head h2 { color: var(--base-light); }
.section-head h2 em { font-style: italic; font-weight: var(--weight-bold); color: var(--vermelho-escuro); }


/* ============================================================
   SCROLL REVEAL
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
html.js .reveal-delay-1 { transition-delay: 0.1s; }


/* ============================================================
   FEATURED PRODUCTS - LAYOUT LATERAL (LABELS + CARDS)
   ============================================================ */
.featured-layout {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

/* Labels à esquerda, encostados aos cards (que ficam ao centro) */
.featured-labels {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vw, 24px);
  justify-self: end;
  text-align: right;
  z-index: 2;
}

/* Mesmo estilo de letra do texto dos cards (.featured-content p):
   Poppins regular, cor creme, espaçamento normal. Só o tamanho é maior. */
.featured-label {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: var(--weight-reg);
  line-height: 1.2;
  letter-spacing: normal;
  color: #F5E8C8;
  margin: 0;
  transition: color 0.3s var(--ease-out), text-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

/* Botão dentro de cada label: ao clicar, leva aos cards da categoria */
.featured-label__btn {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.featured-label__btn:focus-visible {
  outline: 2px solid var(--dourado);
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}

.featured-label:hover,
.featured-label.is-active,
.featured-label.is-current {
  color: var(--dourado);
  transform: translateX(8px);
  text-shadow: 0 0 30px rgba(196, 122, 92, 0.6);
}

.featured-cards {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 24px);
  width: min(440px, 36vw);
  justify-self: center;
}

.featured-cards .featured-card {
  width: 100%;
}

/* Grupos de categoria */
.featured-group {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 24px);
}

.group-divider {
  border: none;
  border-top: 1px solid var(--gray-300);
  margin: clamp(16px, 2.5vw, 24px) 0;
  opacity: 0.4;
}

.featured-card {
  position: relative;
  /* mesmo vermelho escuro dos ícones da secção Contactos */
  background: linear-gradient(135deg, var(--vermelho-escuro-light), var(--vermelho-escuro));
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.featured-card:hover,
.featured-card.is-hovered {
  border-color: var(--dourado);
  transform: translateY(-4px);
}
.featured-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(93, 0, 0, 0.1) 0%, rgba(74, 0, 0, 0.15) 100%);
  height: auto;
}
.featured-visual img {
  display: block;
  width: 100%;
  height: auto;
}
.featured-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.25) 100%);
}
.featured-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(32px, 5vw, 40px) clamp(16px, 2.2vw, 22px) clamp(14px, 2vw, 18px);
  background: linear-gradient(180deg, rgba(18, 6, 6, 0) 0%, rgba(18, 6, 6, 0.74) 55%, rgba(18, 6, 6, 0.92) 100%);
}
.featured-content p {
  font-family: var(--font-primary);
  color: #F5E8C8;
  margin-bottom: 0;
  line-height: 1.65;
  font-size: 0.85rem;
  text-align: left;
}

/* Scroll Stack (js/main.js, adaptado do ScrollStack do React Bits):
   os cards prendem-se perto do topo e empilham-se uns sobre os outros.
   Cada card tem o tamanho da sua imagem. */
.featured-products.is-stacked .featured-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0; /* o espaçamento entre cards vem do JS (itemDistance) */
}
.featured-products.is-stacked .featured-group { display: contents; }
.featured-products.is-stacked .group-divider { display: none; }
.featured-products.is-stacked .featured-card {
  position: sticky; /* o "top" de cada card é definido no JS (ponto onde prende) */
  flex: none;
  width: fit-content;
  max-width: 100%;
  transform-origin: top center;
  will-change: transform, filter;
  backface-visibility: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
  /* o transform é controlado pelo scroll: sem transição para não atrasar */
  transition: border-color 0.35s var(--ease-out);
}
.featured-products.is-stacked .featured-visual img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 70vh; /* o card inteiro cabe no ecrã quando está preso */
}
/* pequena pausa depois do último card prender, antes de a pilha se soltar
   (é exatamente o scroll extra que fica no fim) */
.featured-products.is-stacked .scroll-stack-end {
  width: 100%;
  height: 10vh;
}
.featured-products.is-stacked .featured-labels {
  top: 20vh; /* alinhado com o ponto onde os cards prendem */
}
/* Tablet/telemóvel: cards mais baixos para caberem entre o cabeçalho
   e o botão "Ver catálogo completo" fixo em baixo */
@media (max-width: 1024px) {
  .featured-products.is-stacked .featured-visual img { max-height: 55vh; }
}

/* About Cards - 3 cards grid */
/* "Sobre nós": mesmo fundo do hero (marrom escuro + grade sutil),
   título à esquerda e um só card à direita, por baixo da linha do título */
.about-cards {
  padding: clamp(64px, 8vw, 120px) 0;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center top; /* continua a grade do hero (ancorada em baixo) */
}
.about-cards .section-head {
  max-width: var(--container);
  margin: 0 0 clamp(24px, 3vw, 40px);
  text-align: left;
}
.about-cards .section-head h2 { color: var(--base-light); }
.about-card {
  max-width: 560px;
  margin-left: auto; /* encosta o card à direita */
  padding: clamp(28px, 3vw, 40px);
  background: rgba(24, 19, 17, 0.9);
  border: 1px solid rgba(212, 168, 67, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s var(--ease-out);
}
.about-card:hover { border-color: var(--dourado); }
.about-card p {
  font-family: var(--font-primary);
  color: var(--dourado-pale);
  line-height: 1.75;
  font-size: 0.95rem;
}
.about-card p + p { margin-top: 14px; }
/* telemóvel: card com a largura toda */
@media (max-width: 560px) {
  .about-card { max-width: none; }
}

/* Tablet/telemóvel: tudo numa coluna */
@media (max-width: 1024px) {
  .featured-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .featured-labels {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }
  .featured-label {
    font-size: clamp(1.5rem, 3vw, 2rem);
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
  }
  .featured-label:hover,
  .featured-label.is-active {
    transform: none;
  }
  .featured-labels { justify-self: stretch; }
  .featured-cards { gap: 20px; width: min(460px, 100%); }
  .featured-group { gap: 20px; }
  .group-divider { margin: 20px 0; }
}


/* ============================================================
   CATÁLOGO (/catalogo/) - cabeçalho e chamada final
   ============================================================ */
.catalog-hero {
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--gray-300);
}
.catalog-hero .container { max-width: var(--container); margin: 0 auto; }
.catalog-hero h1 {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  font-weight: var(--weight-sb);
  line-height: 1.1;
  letter-spacing: var(--track-tight);
  color: var(--base-dark);
  margin-top: 12px;
}
.catalog-hero h1 em { font-style: italic; color: var(--vermelho-escuro); font-weight: var(--weight-bold); }
.catalog-hero .lead {
  margin-top: 20px;
  font-size: clamp(1rem, 0.9375rem + 0.3125vw, 1.1rem);
  color: var(--base-med);
  max-width: 640px;
  line-height: 1.75;
}

.catalog-cta {
  text-align: center;
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--gray-300);
}
.catalog-cta p {
  color: var(--base-med);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 24px;
}

/* ============================================================
   CATÁLOGO COMPLETO (/catalogo/ - CPT "produtos")
   ============================================================ */
.catalog-back {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--base-med);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.catalog-back:hover { color: var(--vermelho-escuro); }

.catalog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.catalog-filter__btn {
  padding: 10px 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-full);
  background: var(--base-light);
  color: var(--base-dark);
  font-size: 0.8rem;
  font-weight: var(--weight-med);
  transition: background 0.25s var(--ease-out), color 0.25s, border-color 0.25s;
}
.catalog-filter__btn:hover { border-color: var(--vermelho-escuro); }
.catalog-filter__btn.is-active {
  background: linear-gradient(135deg, var(--vermelho-escuro-light), var(--vermelho-escuro));
  border-color: transparent;
  color: var(--base-light);
}
.catalog-filter__btn:focus-visible { outline: 2px solid var(--dourado); outline-offset: 3px; }

.catalog-products { padding-top: clamp(40px, 5vw, 64px); }
.catalog-group + .catalog-group { margin-top: clamp(48px, 6vw, 72px); }
.catalog-group[hidden] { display: none; }
.catalog-group__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  font-weight: var(--weight-sb);
  color: var(--vermelho-escuro);
  margin-bottom: 24px;
}
.catalog-group__title span {
  font-size: 0.8rem;
  font-weight: var(--weight-med);
  color: var(--gray-500);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}
.product-card {
  background: var(--base-light);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-margin-top: calc(var(--header-h) + 24px);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--dourado);
  box-shadow: 0 20px 48px -12px rgba(45, 38, 35, 0.18);
}
.product-card:target { border-color: var(--dourado); box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.35); }
.product-card__media {
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-card:hover .product-card__media img { transform: scale(1.05); }
.product-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-card__desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--base-med);
}
.catalog-empty {
  text-align: center;
  color: var(--base-med);
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card__body { padding: 12px; }
}

/* ============================================================
   PÁGINAS LEGAIS (Privacidade, Cookies, Resolução de Litígios)
   ============================================================ */
.legal-page { background: var(--bg); }
.legal-container { max-width: 860px; }

.legal-hero {
  padding: calc(var(--header-h) + 48px) 0 40px;
  border-bottom: 1px solid var(--gray-300);
}
.legal-hero h1 {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  font-weight: var(--weight-sb);
  line-height: 1.1;
  letter-spacing: var(--track-tight);
  color: var(--vermelho-escuro);
  margin: 4px 0 20px;
}
.legal-lede {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.08rem);
  line-height: 1.75;
  color: var(--base-med);
}
.legal-lede + .legal-lede { margin-top: 12px; }
.legal-updated {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.legal-body { padding: clamp(40px, 5vw, 64px) 0 clamp(64px, 8vw, 96px); }

.legal-clause + .legal-clause {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--gray-100);
}
.legal-clause h2,
.legal-card h2 {
  font-size: 1.25rem;
  font-weight: var(--weight-sb);
  color: var(--base-dark);
  margin-bottom: 14px;
}
.legal-no {
  color: var(--dourado);
  margin-right: 10px;
}
.legal-clause h3 {
  font-size: 1rem;
  font-weight: var(--weight-sb);
  color: var(--base-dark);
  margin: 20px 0 8px;
}
.legal-clause p,
.legal-card p,
.legal-clause li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--base-med);
}
.legal-clause p + p,
.legal-card p + p { margin-top: 10px; }
.legal-clause ul {
  margin: 10px 0 12px;
  padding-left: 22px;
  list-style: disc;
}
.legal-clause li::marker { color: var(--dourado); }
.legal-page a:not(.legal-ext):not(.btn) {
  color: var(--vermelho-escuro);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-page a:not(.legal-ext):not(.btn):hover { color: var(--bordo); }

.legal-contact {
  margin-top: 14px;
  padding: 20px 22px;
  background: var(--base-light);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
}
.legal-contact p + p { margin-top: 4px; }

/* Tabelas de cookies */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.88rem;
}
.cookie-table caption {
  text-align: left;
  font-weight: var(--weight-sb);
  color: var(--base-dark);
  padding-bottom: 8px;
}
.cookie-table th,
.cookie-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-300);
  color: var(--base-med);
  vertical-align: top;
}
.cookie-table th {
  background: var(--gray-100);
  color: var(--base-dark);
  font-weight: var(--weight-sb);
}
.cookie-name { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.82rem; color: var(--base-dark); word-break: break-all; }
.cookie-note { font-size: 0.85rem !important; }

/* Cartões (Resolução de Litígios) */
.legal-card {
  padding: clamp(24px, 3vw, 36px);
  background: var(--base-light);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-xl);
}
.legal-card + .legal-card { margin-top: 28px; }
.legal-kicker {
  display: block;
  font-size: 0.66rem;
  font-weight: var(--weight-sb);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dourado);
  margin-bottom: 6px;
}
.legal-entities {
  margin: 20px 0;
  display: grid;
  gap: 10px;
}
.legal-entities li {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-300);
  font-size: 0.9rem;
}
.legal-entities__acr { font-weight: var(--weight-sb); color: var(--vermelho-escuro); }
.legal-entities__full { color: var(--base-med); line-height: 1.5; }
.legal-entities__site { font-size: 0.82rem; }
.legal-ext {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--vermelho-escuro-light), var(--vermelho-escuro));
  color: var(--base-light);
  font-size: 0.72rem;
  font-weight: var(--weight-sb);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.legal-ext::after { content: '↗'; }
.legal-ext:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(74, 0, 0, 0.3); }
.legal-note { font-size: 0.82rem !important; color: var(--gray-500) !important; }

@media (max-width: 600px) {
  .legal-entities li { grid-template-columns: 1fr; }
  .cookie-table { display: block; overflow-x: auto; }
}


/* ============================================================
   CONTACTOS - CARDS + FORMULÁRIO
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}

/* Cards de contacto - um abaixo do outro */
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.5vw, 20px);
}
.contact-card {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 22px);
  padding: clamp(22px, 2.5vw, 30px);
  background: var(--base-light);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.contact-card:hover {
  border-color: var(--dourado);
  box-shadow: 0 12px 28px rgba(45, 38, 35, 0.09);
  transform: translateY(-2px);
}
.contact-card__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--vermelho-escuro-light), var(--vermelho-escuro));
  color: var(--base-light);
  box-shadow: 0 6px 18px rgba(74, 0, 0, 0.25);
}
.contact-card__icon svg {
  width: 24px;
  height: 24px;
}
.contact-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.contact-card__label {
  font-family: var(--font-secondary);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bordo);
  font-weight: var(--weight-sb);
}
.contact-card__value {
  font-family: var(--font-primary);
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  font-weight: var(--weight-med);
  color: var(--base-dark);
  line-height: 1.5;
  text-decoration: none;
}
a.contact-card__value:hover { color: var(--bordo); text-decoration: underline; text-underline-offset: 3px; }

/* Formulário */
.contact-form {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  background: var(--base-light);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 3vw, 44px);
  box-shadow: var(--shadow-sm);
}
.contact-form__head { margin-bottom: clamp(24px, 2.5vw, 34px); }
.contact-form__head .eyebrow { margin-bottom: 10px; color: var(--dourado); }
.contact-form__title {
  font-family: var(--font-primary);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  font-weight: var(--weight-sb);
  letter-spacing: var(--track-tight);
  line-height: 1.2;
  color: var(--base-dark);
}
.contact-form__title em {
  font-style: italic;
  font-weight: var(--weight-bold);
  color: var(--vermelho-escuro);
}
.contact-form__sub {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--base-med);
  margin-top: 12px;
}
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form .form-field { display: flex; flex-direction: column; margin-bottom: 20px; }
.contact-form .form-row .form-field { margin-bottom: 0; }
.contact-form label {
  display: block;
  font-family: var(--font-secondary);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--base-med);
  font-weight: var(--weight-sb);
  margin-bottom: 10px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--base-dark);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.contact-form input:hover, .contact-form textarea:hover {
  border-color: var(--gray-500);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--bordo);
  box-shadow: 0 0 0 4px rgba(123, 63, 63, 0.1);
  background: var(--base-light);
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .form-field--full { grid-column: 1 / -1; }
.contact-form .form-actions { margin-top: 4px; }
.contact-form .btn { width: 100%; justify-content: center; padding: 17px 40px; font-size: 0.72rem; }
.contact-form__note {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-secondary);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--gray-500);
}

/* Form demo/static - sem funcionalidade backend */
.contact-form--demo { pointer-events: none; }
.contact-form--demo input,
.contact-form--demo textarea {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-500);
  cursor: not-allowed;
}
.contact-form--demo input::placeholder,
.contact-form--demo textarea::placeholder {
  font-family: var(--font-accent);
  color: var(--gray-500);
}
.contact-form--demo label { color: var(--gray-500); }
.contact-form--demo .btn { opacity: 0.55; cursor: not-allowed; }
.contact-form--demo .btn:hover {
  background: linear-gradient(135deg, var(--vermelho-escuro-light), var(--vermelho-escuro));
  transform: none;
}

/* A secção termina no final do mapa (GPS) */
.contact-home {
  padding-bottom: 0;
}

/* Mapa full width abaixo do grid, sem bordas nem arredondamentos */
.contact-home__map {
  margin-top: clamp(28px, 4vw, 48px);
  overflow: hidden;
}
.contact-home__map iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
  border-radius: 0;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}


/* ============================================================
   FOOTER - ESTILO PP TÊXTEIS (word em background)
   ============================================================ */
.site-footer {
  background: #110d0c;
  color: var(--gray-500);
  position: relative;
  overflow: hidden;
}

/* Efeito granulado - abaixo do conteúdo */
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.footer-grid,
.footer-funding,
.footer-bottom {
  position: relative;
  z-index: 1;
}

/* Logótipos dos fundos europeus (PRR / NextGenerationEU)
   - tablet/PC: pequeno, por baixo da frase da marca (.footer-brand__funding)
   - telemóvel: numa linha própria por baixo das colunas (.footer-funding) */
.footer-brand__funding {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin-top: 20px;
}
.footer-funding { display: none; }

/* Word em background */
.footer-bg-word {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-primary);
  font-size: clamp(3.5rem, 10.5vw, 12rem);
  font-weight: var(--weight-bold);
  color: rgba(245, 240, 235, 0.45);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
  line-height: 1;
  z-index: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  /* só em cima/baixo: o espaço lateral vem do .container (24px) */
  padding-top: clamp(48px, 5vw, 80px);
  padding-bottom: 48px;
}
.footer-brand .brand-name { color: var(--base-light); font-family: var(--font-primary); }
.footer-brand .brand-name span { color: var(--dourado); font-family: var(--font-accent); }
.footer-brand p {
  font-family: var(--font-primary);
  margin-top: 16px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(245, 240, 235, 0.78);
  max-width: 320px;
}

.footer-contact h3, .footer-nav h3 {
  font-family: var(--font-secondary);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dourado);
  margin-bottom: 20px;
  font-weight: var(--weight-sb);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact address {
  font-family: var(--font-primary);
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(245, 240, 235, 0.82);
  margin-bottom: 16px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-family: var(--font-primary); font-size: 0.88rem; color: rgba(245, 240, 235, 0.82); transition: color 0.2s; }
.footer-nav a:hover { color: var(--dourado); }

.footer-bottom {
  border-top: 1px solid rgba(157, 143, 135, 0.15);
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-primary);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 235, 0.65);
}
.footer-bottom p { margin: 0; }

/* Frase + botão "Agilstore" */
.footer-credit-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(245, 240, 235, 0.65);
  font-family: var(--font-primary);
}
.footer-credit {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: var(--weight-sb);
  color: rgba(245, 240, 235, 0.9);
  text-decoration: none;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 240, 235, 0.18);
  background: transparent;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.footer-credit:not(:hover) {
  --mx: 50%;
  --my: -20%;
}
.footer-credit:hover {
  transform: translateY(-4px);
  color: var(--base-light);
  /* glow dourado (--dourado #D4A843) que segue o rato */
  border-color: rgba(212, 168, 67, 0.65);
  background: radial-gradient(ellipse at var(--mx, 50%) var(--my, -20%), rgba(212, 168, 67, 0.3), transparent 70%);
  box-shadow: 0 0 18px rgba(212, 168, 67, 0.18);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav { display: none; }
  .footer-grid { gap: 36px 32px; }
  .footer-bg-word { font-size: clamp(3rem, 10vw, 7rem); }
}

/* Telemóvel: rodapé centrado, sem a coluna de contactos (já estão na secção Contactos) */
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .footer-contact { display: none; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-nav h3 { justify-content: center; }
  .footer-nav ul { align-items: center; }
  .footer-brand__funding { display: none; }
  .footer-funding { display: block; padding-bottom: 32px; text-align: center; }
  .footer-funding img { width: 100%; max-width: 560px; height: auto; margin: 0 auto; opacity: 0.9; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .preloader, .nav-overlay, .nav-toggle, .item-info { display: none !important; }

  .hero, .hero-pin, .section, .site-footer, .section--dark { background: #fff !important; color: #000 !important; }
  .section--dark h2 { color: #000 !important; }
  .section--dark p { color: #222 !important; }
  .hero { min-height: auto; padding: 32px 0; }
  .footer-bg-word, .site-footer::before { display: none; }
  .pin-spacer { height: auto !important; }
  .hero-pin { position: static !important; transform: none !important; height: auto !important; }
  .hero h1, .section-head h2 { color: #000 !important; }
  .hero h1 em, .section-head h2 em { color: #333 !important; }

  a { color: #000 !important; text-decoration: underline; }
  .site-footer { border-top: 1px solid #ccc; }
  html.js .reveal, html.js .reveal.is-visible { opacity: 1 !important; transform: none !important; transition: none; }

  .featured-card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .featured-visual { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}


/* ============================================================
   FALLBACK CONTENT (posts/paginas/archives - WP)
   ============================================================ */
.fallback-content { max-width: 720px; }
.fallback-title {
  font-family: var(--font-primary);
  font-size: clamp(1.8rem, 1.5rem + 2vw, 2.75rem);
  font-weight: var(--weight-sb);
  line-height: 1.15;
  letter-spacing: var(--track-tight);
  color: var(--base-dark);
  margin-bottom: 28px;
}
.fallback-content article {
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-300);
}
.fallback-post-title {
  font-family: var(--font-primary);
  font-size: 1.35rem;
  font-weight: var(--weight-sb);
  color: var(--base-dark);
  margin-bottom: 6px;
}
.fallback-post-title a { transition: color 0.2s; }
.fallback-post-title a:hover { color: var(--bordo); }
.fallback-post-meta { font-size: 0.8rem; color: var(--gray-700); margin-bottom: 12px; }
.fallback-post-content { color: var(--base-med); line-height: 1.7; }
.fallback-post-content p { margin-bottom: 12px; }
.fallback-content a { color: var(--bordo); }
.fallback-content a:hover { color: var(--bordo-hover); }
.fallback-content ul, .fallback-content ol { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.fallback-content li { margin-bottom: 6px; }
.fallback-content h1, .fallback-content h2, .fallback-content h3 { font-family: var(--font-primary); color: var(--base-dark); margin: 24px 0 12px; line-height: 1.2; }
.fallback-content h2 { font-size: 1.5rem; }
.fallback-content h3 { font-size: 1.25rem; }
.fallback-content blockquote { border-left: 3px solid var(--dourado); padding-left: 16px; color: var(--base-med); font-style: italic; margin: 16px 0; }
.fallback-content img { border-radius: var(--radius-md); margin: 16px 0; }
.fallback-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9rem; }
.fallback-content th, .fallback-content td { border: 1px solid var(--gray-300); padding: 10px 12px; text-align: left; }
.fallback-content th { background: var(--gray-100); }
.fallback-pagination { margin-top: 32px; display: flex; gap: 8px; }
.fallback-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--base-med);
  font-weight: var(--weight-med);
  transition: all 0.2s;
}
.fallback-pagination a.page-numbers:hover { border-color: var(--bordo); color: var(--bordo); }
.fallback-pagination .page-numbers.current { background: var(--bordo); border-color: var(--bordo); color: var(--base-light); }
