/* ==========================================================================
   components.css — peças reutilizáveis
   Botões · Badges · Carrossel · Card de produto · Tiles · Blocos promo
   ========================================================================== */

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-sm);
  background: var(--grey-900);
  color: var(--text-inverse);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}

.btn:hover {
  background: var(--grey-700);
  color: var(--text-inverse);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand-500);
}

.btn--primary:hover {
  background: var(--brand-600);
}

.btn--block {
  width: 100%;
  padding-block: var(--sp-4);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  border-radius: 0;
}

.btn--ghost {
  background: transparent;
  border: 1.5px solid currentColor;
  color: var(--text-strong);
}

.btn--ghost:hover {
  background: var(--grey-900);
  border-color: var(--grey-900);
  color: var(--text-inverse);
}

/* Botão redondo só com ícone (carrinho, setas, coração). */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-circle);
  color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.icon-btn:hover {
  background: var(--grey-50);
  color: var(--text-strong);
}

.icon-btn--cart {
  background: var(--brand-500);
  color: var(--text-inverse);
  flex: 0 0 auto;
}

.icon-btn--cart:hover {
  background: var(--brand-600);
  color: var(--text-inverse);
}

/* Confirmação visual ao adicionar — o contador no header sobe ao mesmo tempo. */
.icon-btn--cart.is-added {
  background: var(--success);
  transform: scale(1.12);
}

.icon-btn--fav.is-active {
  color: var(--danger);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* --------------------------------------------------------------------------
   Badges e etiquetas
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  white-space: nowrap;
}

/* "3x sem juros" — informativo, discreto. Cinza neutro em vez de rosa: não é
   a mensagem que converte, por isso não rouba atenção ao preço e ao botão. */
.badge--pay {
  background: var(--grey-100);
  color: var(--grey-600);
}

.badge--discount {
  background: var(--accent-500);
  color: var(--text-inverse);
}

/* Ícones de destaque do produto: troféu, estrela, últimas unidades. */
.flags {
  display: flex;
  gap: var(--sp-2);
  min-height: 22px;
}

.flag {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--grey-600);
}

.flag svg {
  width: 100%;
  height: 100%;
}

.flag--last {
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   Carrossel
   Scroll nativo com scroll-snap: arrastar com o dedo funciona sem JS.
   O JS só trata das setas e da sincronização dos pontinhos.
   -------------------------------------------------------------------------- */

.carousel {
  --gap: var(--sp-4);
  --per: 1;             /* quantos slides visíveis; aceita fracções (ex.: 1.4) */
  position: relative;
}

.carousel__viewport {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}

.carousel__viewport::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  min-width: 0;   /* sem isto, um conteúdo largo faz o slide crescer além da base */
  scroll-snap-align: start;
}

/* Pontinhos: o ativo é uma barra azul mais larga. */
.carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.carousel__dot {
  width: 22px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--grey-200);
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
}

.carousel__dot.is-active {
  width: 34px;
  background: var(--brand-500);
}

/* Setas do carrossel.
   No TELEMÓVEL escondem-se: sobrepunham-se aos cards (cara de amador) e o
   swipe já resolve a navegação. Só aparecem no DESKTOP, onde há rato e não há
   toque — e aí ficam fora da zona dos cards, não por cima. */
.carousel__arrow {
  display: none;
}

.carousel__arrow svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 1024px) and (hover: hover) {
  .carousel__arrow {
    position: absolute;
    top: 50%;
    z-index: var(--z-sticky);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-circle);
    background: var(--bg-surface);
    color: var(--grey-900);
    box-shadow: var(--sh-lg);
    transform: translateY(-50%);
    transition: opacity var(--dur) var(--ease), background var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease);
  }
  .carousel__arrow:hover {
    background: var(--grey-900);
    color: #fff;
  }
  /* Puxadas para fora da zona dos cards (a --container-pad do lado). */
  .carousel__arrow--prev { left: calc(var(--sp-5) * -1); }
  .carousel__arrow--next { right: calc(var(--sp-5) * -1); }
}

.carousel__arrow[disabled] {
  opacity: 0.3;
  cursor: default;
  box-shadow: none;
}

/* Densidade por tipo de carrossel ---------------------------------------- */

/* O `0px` tem de levar unidade: `calc(100% - (0 * 0))` com zero sem unidade é
   inválido, e um calc inválido faz cair a declaração `flex` inteira. */
.carousel--hero    { --per: 1; --gap: 0px; }
.carousel--campaign{ --per: 1; --gap: var(--sp-3); }
.carousel--promo   { --per: 1; --gap: var(--sp-4); }
.carousel--reviews { --per: 1.1; --gap: var(--sp-3); }
.carousel--tiles   { --per: 3.2; }
/* Mobile: 2 cards por vista + um espreitar do 3.º. Cards mais pequenos =
   vê-se mais produto de uma vez, que é o que interessa no telemóvel. */
.carousel--products{ --per: 2.2; --gap: var(--sp-2); }

@media (min-width: 480px) {
  .carousel--products { --per: 2.6; }
}

@media (min-width: 600px) {
  .carousel--tiles    { --per: 4; }
  .carousel--products { --per: 3.2; }
}

@media (min-width: 600px) {
  .carousel--reviews { --per: 2.1; }
}

@media (min-width: 700px) {
  /* Banner vertical sozinho num ecrã largo ficaria gigante — mostramos dois. */
  .carousel--campaign { --per: 2; }
}

@media (min-width: 900px) {
  .carousel--reviews { --per: 3.1; }
}

@media (min-width: 900px) {
  .carousel--promo    { --per: 2; }
  .carousel--tiles    { --per: 6; }
  .carousel--products { --per: 3.4; }
}

@media (min-width: 1100px) {
  .carousel--campaign { --per: 2.4; }
}

@media (min-width: 1200px) {
  .carousel--promo    { --per: 3; }
  .carousel--tiles    { --per: 8; }
  .carousel--products { --per: 5; }
}

/* --------------------------------------------------------------------------
   Banner de campanha
   A imagem é mostrada INTEIRA (contain), nunca cortada — o texto gravado nela
   fica sempre legível. O vazio à volta é preenchido pela própria imagem
   desfocada e ampliada, por isso não há barras pretas seja qual for a
   proporção. Funciona igual com banner vertical ou horizontal.
   -------------------------------------------------------------------------- */

.campaign {
  position: relative;
  display: block;
  width: 100%;
  /* Proporção EXATA dos banners verticais (781x1400). Com o slot a bater
     certo com a imagem, o `cover` preenche tudo — sem barras, sem corte. */
  aspect-ratio: 781 / 1400;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--grey-900);      /* rede de segurança antes de a imagem carregar */
}

/* Fundo desfocado: só aparece se algum banner não bater certo com a proporção.
   Com banners 9:16 no slot 9:16 fica coberto e nunca se vê. */
.campaign__bg {
  position: absolute;
  inset: -8%;
  background-size: cover;
  background-position: center;
  filter: blur(26px) brightness(0.88);
  transform: scale(1.06);
  z-index: 0;
}

.campaign__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;                /* preenche o slot todo — sem barras */
  transition: transform var(--dur-slow) var(--ease);
}

.campaign:hover .campaign__img { transform: scale(1.02); }

/* No desktop os banners verticais mostram-se como cartões em pé, vários por
   linha (--per no bloco de densidade), mantendo a mesma proporção. */

/* --------------------------------------------------------------------------
   Slide do hero
   -------------------------------------------------------------------------- */

.hero-slide {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 230px;
  padding: var(--sp-6);
  border-radius: var(--r-md);
  overflow: hidden;
  color: var(--grey-900);
}

.hero-slide__body {
  position: relative;
  z-index: 1;
}

.hero-slide--pink { background: linear-gradient(115deg, #ffc9dd 0%, #ffb3ce 55%, #ff9ec2 100%); }
.hero-slide--blue { background: linear-gradient(115deg, var(--brand-300) 0%, var(--brand-500) 60%, var(--brand-600) 100%); color: var(--text-inverse); }
.hero-slide--teal { background: linear-gradient(115deg, #9ae6d8 0%, #4fc9b4 55%, #22a58f 100%); }

/* Duas formas decorativas sobrepostas em vez de uma. Dão profundidade e
   evitam que o lado direito do banner fique um vazio de cor chapada. */
.hero-slide::before,
.hero-slide::after {
  content: '';
  position: absolute;
  border-radius: var(--r-circle);
  pointer-events: none;
}

.hero-slide::after {
  right: -90px;
  top: -90px;
  width: 330px;
  height: 330px;
  background: rgba(255, 255, 255, 0.20);
}

.hero-slide::before {
  right: 40px;
  bottom: -120px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.13);
}

/* A ilustração só entra quando há largura para ela respirar; abaixo disso
   roubava espaço ao texto, que é o que interessa no telemóvel. */
.hero-slide__art {
  display: none;
}

@media (min-width: 700px) {
  .hero-slide {
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--sp-8);
  }
  .hero-slide__art {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 260px;
    justify-self: center;
    filter: drop-shadow(0 12px 24px rgba(18, 22, 28, 0.18));
  }
}

.hero-slide__eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
}

.hero-slide__title {
  margin-top: var(--sp-2);
  color: inherit;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
}

.hero-slide__text {
  margin-top: var(--sp-3);
  max-width: 34ch;
  font-size: var(--fs-md);
  opacity: 0.85;
}

.hero-slide__cta {
  align-self: flex-start;
  margin-top: var(--sp-5);
}

@media (min-width: 900px) {
  .hero-slide {
    /* Encurtado de propósito: cada pixel de banner é um pixel a empurrar os
       produtos para fora do primeiro ecrã. */
    min-height: 300px;
    padding: var(--sp-10);
  }
  .hero-slide__title {
    font-size: var(--fs-4xl);
  }
}

/* --------------------------------------------------------------------------
   Bloco de categoria em destaque ("Ver mais +")
   -------------------------------------------------------------------------- */

/* Card de promoção com FOTO grande (quadrada) em cima e rodapé com título +
   botão. A foto vive em assets/img/promo/; sem ela, cai na ilustração. */
.promo-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--grey-100);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.promo-block:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); }

.promo-block__pic {
  display: block;
  aspect-ratio: 1;
  background: var(--grey-50);
  overflow: hidden;
}
.promo-block__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--dur-slow) var(--ease);
}
.promo-block:hover .promo-block__pic img { transform: scale(1.04); }

.promo-block__foot {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-4);
}
.promo-block__text { flex: 1; }
.promo-block__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.promo-block__subtitle {
  margin-top: 4px;
  max-width: 34ch;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   Tile de categoria (quadrado com legenda por baixo)
   -------------------------------------------------------------------------- */

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
}

.tile__frame {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;              /* não deixa a imagem esticar a moldura */
  padding: var(--sp-2);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.tile:hover .tile__frame {
  border-color: var(--brand-300);
  transform: translateY(-2px);
}

/* A imagem CABE dentro do quadrado (max-*), em vez de o preencher a 100% e o
   obrigar a crescer. Assim retrato e paisagem ficam no mesmo quadrado. */
.tile__frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  /* Esbate os 12% finais da foto para o branco do cartão. Nas fotos com fundo
     branco não se nota; nas que trazem um cinza-claro de estúdio, o rebordo
     funde-se em vez de aparecer como um retângulo colado. */
  -webkit-mask-image: radial-gradient(circle at center, #000 76%, transparent 100%);
  mask-image: radial-gradient(circle at center, #000 76%, transparent 100%);
}

.tile__label {
  /* altura de 2 linhas fixa: tiles com legenda de 1 ou 2 linhas ficam com a
     mesma altura total, alinhados na fila. */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(2 * var(--fs-sm) * var(--lh-snug));
  color: var(--text-strong);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

/* --------------------------------------------------------------------------
   Card de produto
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Blocos de quebra ("breakers") — cartão vertical premium
   Foto no topo MESCLADA num gradiente (não flutua numa caixa à parte),
   badge, texto e CTA cheio de cor por baixo. Pensado mobile-first: é a
   mesma estrutura em qualquer largura, como um cartão de produto grande.
   -------------------------------------------------------------------------- */

.breaker {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.breaker:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); }

/* Palco da foto: gradiente que nasce mais claro no topo e escurece até à
   MESMA cor do painel de texto por baixo — a foto "derrete" no cartão em
   vez de ficar numa caixa separada. */
.breaker__stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
}

.breaker__stage img {
  max-width: 68%;
  max-height: 230px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 26px rgba(18, 22, 28, 0.16));
  /* As fotos têm fundo BRANCO opaco (não transparente) — sem isto, ficam num
     retângulo branco colado em cima do gradiente. O fade começa mais cedo
     que nos cards porque aqui o contraste com o fundo escuro é maior. */
  -webkit-mask-image: radial-gradient(circle at center, #000 58%, transparent 92%);
  mask-image: radial-gradient(circle at center, #000 58%, transparent 92%);
}

/* Azul reservado só a este bloco (destaques/editorial) — o resto do site
   usa preto (ações) e laranja (desconto/urgência); este é o 3º tom, para os
   cartões "vitrina" se distinguirem sem voltar a encher o site de cor. */
.breaker__badge {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px 6px 11px;
  border-radius: var(--r-pill);
  background: #0d87e0;
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(13, 135, 224, 0.32);
}
.breaker__badge--accent {
  background: linear-gradient(135deg, #17a0f0, #0a6cb8);
}
/* ✓ dentro de um disco branco — dá o ar de "selo", não de autocolante. */
.breaker__badge--accent::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  color: #0a6cb8;
  font-size: 10px;
  line-height: 1;
}

.breaker__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
}

.breaker__eyebrow {
  color: #0d87e0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.breaker__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.breaker__text {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

/* CTA cheio de cor, maiúsculas, largura total — "aperta aqui", não um link
   discreto. Azul, não laranja: aqui é destaque editorial, não desconto. */
.breaker__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  background: #0d87e0;
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 4px 12px rgba(13, 135, 224, 0.28);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.breaker__btn:hover { background: #0a6cb8; box-shadow: 0 6px 16px rgba(13, 135, 224, 0.36); }

@media (min-width: 460px) {
  .breaker__btn { width: auto; align-self: center; padding-inline: var(--sp-8); }
}

/* As duas variantes são agora cartões BRANCOS — nada de fundo escuro. O
   palco da foto leva só um véu azul muito ténue que esvai para branco, para
   a foto "derreter" no cartão sem precisar de um fundo escuro para isso. */
.breaker--dark {
  border: 1px solid var(--grey-100);
}
.breaker--dark .breaker__stage {
  background: radial-gradient(120% 100% at 50% 0%, #eaf4fd 0%, #ffffff 68%);
}
.breaker--dark .breaker__panel { background: var(--bg-surface); color: var(--text); }
.breaker--dark .breaker__title { color: var(--text-strong); }
.breaker--dark .breaker__text { color: var(--text); }

.breaker--light {
  border: 1px solid var(--grey-100);
}
.breaker--light .breaker__stage {
  background: linear-gradient(160deg, #eaf4fd 0%, #ffffff 62%);
}
.breaker--light .breaker__panel { background: var(--bg-surface); }
.breaker--light .breaker__title { color: var(--text-strong); }
.breaker--light .breaker__text { color: var(--text); }

.product {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--sp-3);
  background: var(--bg-surface);
  border: 1px solid var(--grey-100);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);        /* card levanta-se do fundo branco */
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.product:hover {
  border-color: var(--border-strong);
  box-shadow: var(--sh-lg);
  transform: translateY(-2px);
}

.product__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 24px;
}

/* Sem padding: as ilustrações já trazem o seu próprio fundo circular, por isso
   o espaço tem de vir de dentro do SVG e não daqui — assim ocupam o card todo
   em vez de flutuarem pequenas no meio de branco. */
.product__media {
  position: relative;               /* âncora da etiqueta de desconto/mais vendido */
  display: grid;
  place-items: center;
  margin-block: var(--sp-2);
  aspect-ratio: 1;
  min-height: 0;                    /* a imagem não pode esticar a moldura */
  overflow: hidden;
}

/* A foto CABE dentro do quadrado (max-*), nunca o obriga a crescer — assim
   fotos retrato e paisagem ocupam todas a mesma altura e os cards alinham. */
.product__media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  transition: transform var(--dur-slow) var(--ease);
  /* mesma vinheta suave dos tiles — funde fundos de estúdio não-brancos. */
  -webkit-mask-image: radial-gradient(circle at center, #000 76%, transparent 100%);
  mask-image: radial-gradient(circle at center, #000 76%, transparent 100%);
}

.product:hover .product__media img {
  transform: scale(1.04);
}

.product__sku {
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.product__name {
  margin-top: var(--sp-1);
  min-height: 2.6em;
  color: var(--text-strong);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
}

/* Grupo de preço encostado ao fundo do card: garante que o botão "Adicionar"
   e a linha de stock ficam SEMPRE à mesma altura em todos os cards da fila. */
.product__pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--sp-2);
  margin-top: auto;               /* empurra preço+botão+stock para baixo */
  padding-top: var(--sp-3);
}

/* Linha 1 reservada (preço antigo + poupança). Fica sempre com a mesma altura,
   com ou sem desconto, para o preço grande alinhar entre cards. */
.product__price-old {
  order: 1;
  color: var(--price-old);
  font-size: var(--fs-xs);
  text-decoration: line-through;
}

.product__save {
  order: 2;
}

.product__price {
  order: 3;
  flex-basis: 100%;              /* preço grande numa linha só */
  color: var(--price);
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.product__price-store {
  order: 4;
  flex-basis: 100%;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--fs-2xs);
}

/* --------------------------------------------------------------------------
   Avaliações
   -------------------------------------------------------------------------- */

.reviews__summary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}

.reviews__score {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  color: var(--text-strong);
  line-height: 1;
}

.reviews__score small {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}

.reviews__stars { color: var(--grey-200); }
.reviews__stars .star svg { width: 18px; height: 18px; }
.reviews__stars .star.is-full { color: #f5a623; }

.reviews__count {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.review {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  height: 100%;
  padding: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.review__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.review__name {
  font-weight: var(--fw-bold);
  color: var(--text-strong);
}

.review__badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--success);
}

.review__badge svg { width: 13px; height: 13px; }

.review__stars .star svg { width: 15px; height: 15px; }
.review__stars .star.is-full { color: #f5a623; }
.review__stars { color: var(--grey-200); }

.review__text {
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.review__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
}

.review__prod {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--brand-600);
}

.review__date {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Barra de confiança
   Faixa de garantias logo abaixo do hero. Em telemóvel desliza na horizontal
   (não parte para 5 linhas); em desktop é uma linha só, distribuída.
   -------------------------------------------------------------------------- */

/* Faixa PRETA — o look agressivo/premium tipo aktive. Alto contraste, ícones
   a azul de marca. Desliza na horizontal no telemóvel. */
.trustbar {
  padding-block: var(--sp-3);
  background: var(--grey-900);
}

.trustbar__list {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  scrollbar-width: none;
}

.trustbar__list::-webkit-scrollbar { display: none; }

.trust {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
}

.trust__ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--brand-300);
}

.trust__ico svg { width: 20px; height: 20px; }

.trust b {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: #fff;
  line-height: 1.2;
}

.trust small {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--grey-400);
}

@media (min-width: 1024px) {
  .trustbar__list {
    justify-content: space-between;
    overflow-x: visible;
  }
}

/* --------------------------------------------------------------------------
   Banner de campanha a SANGRAR até às margens no telemóvel (edge-to-edge).
   No desktop volta a ficar contido, que fica melhor com dois cards.
   -------------------------------------------------------------------------- */
#campaigns-section { padding: 0; }
#campaigns-section .container { max-width: none; padding-inline: 0; }
#campaigns-section .campaign { border-radius: 0; }
#campaigns-section .carousel__arrow--prev { display: none; }  /* sem margem onde caber */

/* Pontinhos SOBREPOSTOS ao fundo do banner (não empurram para baixo), para a
   barra preta colar diretamente por baixo do banner, sem folga. */
#campaigns-section .carousel { position: relative; }
#campaigns-section .carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 4;
  margin: 0;
}
#campaigns-section .carousel__dot { background: rgba(255, 255, 255, 0.5); }
#campaigns-section .carousel__dot.is-active { background: #fff; }

@media (min-width: 1024px) {
  #campaigns-section { padding-block: var(--sp-5); }
  #campaigns-section .container {
    max-width: var(--container);
    padding-inline: var(--container-pad);
  }
  #campaigns-section .campaign { border-radius: var(--r-md); }
}

/* Etiqueta de canto na foto: desconto (vermelho, urgência) ou "Mais vendido". */
.product__discount,
.product__hot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 6px 11px;
  border-radius: var(--r-sm) 0 var(--r-md) 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-black);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* O desconto é o gatilho psicológico nº1 do card — maior, com sombra própria
   para saltar mesmo por cima da foto, não só mais uma etiqueta plana. */
.product__discount {
  background: var(--accent-500);
  color: #fff;
  font-size: var(--fs-md);
  box-shadow: 0 4px 10px rgba(255, 90, 31, 0.35);
}

.product__hot {
  background: var(--grey-900);
  color: #fff;
  text-transform: uppercase;
  font-size: var(--fs-2xs);
  letter-spacing: 0.04em;
}

/* Estrelas de avaliação (só aparece com dados reais — ver estrelas() no JS). */
.rating {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}

.rating__stars {
  display: inline-flex;
  gap: 1px;
  color: var(--grey-200);
}

.rating__stars .star svg {
  width: 14px;
  height: 14px;
}

.rating__stars .star.is-full,
.rating__stars .star.is-half { color: #f5a623; }

.rating__count {
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

/* "Poupa X€" — o ganho concreto, no mesmo acento quente do desconto (não a
   verde): uma só cor de conversão em todo o card. */
.product__save {
  align-self: center;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: #fff1ea;
  color: var(--accent-600);
  font-size: var(--fs-xs);
  font-weight: var(--fw-black);
  white-space: nowrap;
}

/* Botão "Adicionar" com texto — chama o dedo muito mais que o ícone sozinho.
   Sombra própria: sem ela, um preto sólido sobre fundo branco fica achatado
   e sem "peso" — a sombra devolve-lhe profundidade de botão físico. */
.btn-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--brand-500);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1;
  box-shadow: 0 2px 6px rgba(13, 135, 224, 0.28);
  transition: background var(--dur) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.btn-add svg { width: 18px; height: 18px; }
.btn-add:hover { background: var(--brand-600); color: #fff; box-shadow: 0 4px 12px rgba(13, 135, 224, 0.36); }
.btn-add:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(13, 135, 224, 0.28); }
.btn-add.is-added {
  background: var(--success);
}

/* Aviso honesto por baixo do preço (ex.: extração real medida pela DECO,
   diferente da anunciada pelo fabricante). */
.product__note {
  margin-top: var(--sp-2);
  padding: var(--sp-2);
  background: var(--brand-50);
  border-radius: var(--r-sm);
  color: var(--brand-700);
  font-size: var(--fs-2xs);
  line-height: var(--lh-snug);
}

/* Disponibilidade por loja — bolinha verde/cinzenta + nome. */
.product__stock {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: var(--fs-2xs);
}

.stock__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-circle);
  background: var(--grey-300);
}

.stock.is-on .stock__dot {
  background: var(--success);
}

.stock.is-on {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Faixa de vantagens
   -------------------------------------------------------------------------- */

.benefits {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-8) var(--sp-5);
  background: var(--bg-surface);
  border-radius: var(--r-md);
}

.benefit {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.benefit__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--grey-800);
}

.benefit__icon svg {
  width: 100%;
  height: 100%;
}

.benefit__text {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

@media (min-width: 900px) {
  .benefits {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6) var(--sp-10);
  }
}

/* --------------------------------------------------------------------------
   Faixa de marca com redes sociais
   -------------------------------------------------------------------------- */

.brand-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-10) var(--sp-6);
  background: linear-gradient(120deg, var(--brand-400), var(--brand-600));
  border-radius: var(--r-md);
  color: var(--text-inverse);
  text-align: center;
}

.brand-strip__title {
  color: inherit;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
}

.brand-strip__title small {
  display: block;
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  opacity: 0.85;
}

/* Captura de email na faixa de marca. Campo + botão lado a lado; no telemóvel
   empilham para o botão não ficar espremido. */
.news {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  width: min(460px, 100%);
}
.news input {
  flex: 1 1 200px;
  min-width: 0;
  height: 46px;
  padding: 0 var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: #fff;
  color: var(--text-strong);
  font-size: 16px;
  outline: none;
}
.news.is-error input { border-color: #ffd5cc; box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.35); }
.news__btn {
  flex: 0 0 auto;
  height: 46px;
  padding-inline: var(--sp-5);
  border-radius: var(--r-md);
  background: var(--grey-900);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  transition: background var(--dur) var(--ease);
}
.news__btn:hover { background: #000; color: #fff; }
.news__note {
  flex-basis: 100%;
  font-size: var(--fs-2xs);
  color: rgba(255, 255, 255, 0.75);
}
.news__ok {
  flex-basis: 100%;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.15);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.socials {
  display: flex;
  gap: var(--sp-3);
}

.socials a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-circle);
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-inverse);
  transition: background var(--dur) var(--ease);
}

.socials a:hover {
  background: rgba(255, 255, 255, 0.38);
  color: var(--text-inverse);
}

.socials svg {
  width: 17px;
  height: 17px;
}

@media (min-width: 900px) {
  .brand-strip {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding-inline: var(--sp-12);
  }
}

/* --------------------------------------------------------------------------
   Cookie banner (RGPD)
   -------------------------------------------------------------------------- */

.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-modal) + 10);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  box-shadow: var(--sh-up);
}

.cookie-bar p {
  margin: 0;
  max-width: 640px;
}

.cookie-bar a {
  color: var(--brand-300);
  text-decoration: underline;
}

.cookie-bar a:hover {
  color: var(--brand-200);
}

.cookie-bar__btn {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cookie-bar {
    flex-direction: column;
    text-align: center;
    padding: var(--sp-4);
    gap: var(--sp-3);
  }
}

/* --- Pop-up Premium de Pagamento --- */
.payment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  animation: pmFadeIn 0.3s forwards ease-out;
}

@keyframes pmFadeIn { to { opacity: 1; } }

.payment-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  animation: pmPop 0.4s 0.1s forwards cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
}

@keyframes pmPop { to { transform: translateY(0) scale(1); opacity: 1; } }

.pm-header {
  background: var(--azul);
  color: #fff;
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  position: relative;
}
.pm-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.pm-header p {
  margin: var(--sp-2) 0 0;
  opacity: 0.9;
  font-size: 0.9rem;
}
.pm-shield {
  width: 48px;
  height: 48px;
  background: var(--verde);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  box-shadow: 0 4px 12px rgba(23, 199, 138, 0.4);
}
.pm-shield svg { width: 24px; height: 24px; color: #fff; }

.pm-body {
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
}
.pm-ref-box {
  background: var(--cinza-100);
  border: 1px solid var(--cinza-200);
  border-radius: 12px;
  padding: var(--sp-4);
  margin-bottom: var(--sp-5);
  text-align: left;
}
.pm-ref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--cinza-200);
}
.pm-ref-row:last-child { border: 0; padding-bottom: 0; }
.pm-ref-label { font-size: 0.85rem; color: var(--cinza-600); }
.pm-ref-val { font-family: monospace; font-size: 1.1rem; font-weight: 700; color: var(--escuro); letter-spacing: 0.5px; }

.pm-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  background: var(--azul);
  color: #fff;
  border: none;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.pm-btn:hover { background: var(--azul-hover); transform: translateY(-1px); }
.pm-btn.green { background: var(--verde); }
.pm-btn.green:hover { background: #14b37d; }

.pm-footer {
  padding: var(--sp-3) var(--sp-5);
  background: var(--cinza-100);
  text-align: center;
  font-size: 0.75rem;
  color: var(--cinza-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
.pm-footer svg { width: 14px; height: 14px; opacity: 0.7; }

