/* =========================================================
   Pé de Pimenta Calçados — Link na Bio
   RHZ Agência · paleta "Pimenta & Creme"

   Base: template Mili (D:\RHZ\CLIENTES\ATIVOS\MILI\SITE)
   Novo aqui: hero em vídeo, barra de prova social, cupom
   e vitrine automática sincronizada com a loja.
   ========================================================= */

:root {
  /* Marca (espelham CONFIG.theme em config.js) */
  --pimenta:      #8C1D2C;   /* botões, bordas, texto principal   */
  --pimenta-soft: #A83244;   /* hover, texto secundário           */
  --creme:        #F5EDE4;   /* fundo                             */
  --creme-deep:   #EBE0D2;   /* degradê inferior                  */
  --coral:        #E4572E;   /* acento, badges, foco               */
  --gold:         #B4885C;   /* bronze da logo — estrelas, filetes */
  --ink:          #2B1216;   /* títulos                           */

  /* Tipografia */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui:      "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Formas */
  --radius-pill: 999px;
  --radius-card: 28px;
  --maxw: 460px;
  --shadow-soft: 0 18px 40px -20px rgba(140, 29, 44, .45);
  --pad: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: var(--font-ui);
  color: var(--pimenta);
  background:
    radial-gradient(120% 80% at 50% -10%, #FDF8F2 0%, var(--creme) 55%, var(--creme-deep) 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px) 16px;
  position: relative;
  overflow-x: hidden;
}

/* ---------- Fundo decorativo ---------- */
.bg-decor { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .26; will-change: transform; }
.orb--1 { width: 50vmax; height: 50vmax; top: -18vmax; left: -14vmax;
          background: radial-gradient(circle, var(--coral), transparent 70%);
          animation: drift 22s ease-in-out infinite; }
.orb--2 { width: 42vmax; height: 42vmax; bottom: -16vmax; right: -12vmax;
          background: radial-gradient(circle, var(--pimenta), transparent 70%);
          animation: drift 28s ease-in-out infinite reverse; }
.orb--3 { width: 30vmax; height: 30vmax; top: 40%; right: -8vmax; opacity: .18;
          background: radial-gradient(circle, var(--gold), transparent 70%);
          animation: drift 34s ease-in-out infinite; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(2vmax, 3vmax, 0) scale(1.08); }
}

/* ---------- Card principal ---------- */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  background: rgba(255, 253, 250, .74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(140, 29, 44, .10);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 0 0 22px;
  overflow: hidden;
}

/* ---------- Hero em vídeo ---------- */
.hero { position: relative; }

.hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--creme-deep);
}

/* O <video> e o <img> de fallback compartilham o mesmo enquadramento.
   object-position puxa o corte para baixo: o material foi filmado na
   vertical e o produto fica no terço inferior do quadro — no topo só
   sobra parede. */
.hero__video,
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 78%;
  display: block;
}

/* Só a imagem (poster / reduced-motion) ganha o ken burns */
.hero__img { animation: kenburns 20s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1.04) translateY(0); }
  to   { transform: scale(1.12) translateY(-2%); }
}

/* Estado sem vídeo: some o <video>, mostra o <img> */
.hero--static .hero__video { display: none; }
.hero__img { opacity: 0; transition: opacity .4s ease; }
.hero--static .hero__img { opacity: 1; }

.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
              rgba(43, 18, 22, .18) 0%,
              rgba(43, 18, 22, 0) 38%,
              rgba(245, 237, 228, .88) 90%,
              var(--creme) 100%);
}

/* Logo sobreposta */
.brand { position: relative; margin-top: -52px; display: flex; justify-content: center; }
.brand__logo {
  position: relative;
  width: 244px;
  min-height: 70px;
  display: grid;
  place-items: center;
  padding: 8px 14px;
}
/* Halo claro atrás da logo: ela é bronze e, sozinha sobre o vídeo, some. */
.brand__logo::before {
  content: "";
  position: absolute;
  inset: -14% -6%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(253, 249, 244, .95) 0%, rgba(253, 249, 244, .6) 55%, transparent 78%);
  z-index: 0;
}
.brand__logo img {
  position: relative;
  z-index: 1;
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 3px 8px rgba(43, 18, 22, .28));
}
/* Fallback em texto, caso a logo não carregue */
.brand__logo.is-fallback { width: auto; }
.brand__fallback {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 700; line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--pimenta);
  text-align: center;
  text-shadow: 0 6px 14px rgba(140, 29, 44, .18);
}

/* ---------- Tagline ---------- */
.tagline {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(15px, 4vw, 17.5px);
  font-weight: 500;
  font-style: italic;
  letter-spacing: .01em;
  line-height: 1.45;
  color: var(--pimenta-soft);
  margin: 8px var(--pad) 22px;
}

/* ---------- Prova social ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 var(--pad) 18px;
  padding: 16px 8px;
  border-top: 1px solid rgba(140, 29, 44, .14);
  border-bottom: 1px solid rgba(140, 29, 44, .14);
}
.trust:empty { display: none; }

.trust__item { text-align: center; }
/* nowrap + fonte menor: com o "+" na frente, "+420 mil" quebrava em duas
   linhas numa coluna de ~110px e desalinhava a faixa inteira. */
.trust__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(16px, 4.6vw, 20px);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--ink);
}
.trust__label {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--pimenta-soft);
  opacity: .85;
}

/* ---------- Cupom ---------- */
.coupon {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - var(--pad) * 2);
  margin: 0 var(--pad) 24px;
  padding: 13px 16px;
  border: 1.4px dashed var(--coral);
  border-radius: 16px;
  background: rgba(228, 87, 46, .07);
  color: var(--pimenta);
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: background-color .3s ease, transform .3s ease, border-color .3s ease;
}
.coupon:empty { display: none; }
.coupon:hover { background: rgba(228, 87, 46, .13); transform: translateY(-2px); }
.coupon:active { transform: translateY(0); }
.coupon:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.coupon__icon { flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px; color: var(--coral); }
.coupon__icon svg { width: 100%; height: 100%; }

.coupon__body { flex: 1 1 auto; min-width: 0; }
.coupon__title { display: block; font-size: 13px; font-weight: 700; letter-spacing: -.005em; line-height: 1.3; }
.coupon__code {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .1em;
  color: var(--coral);
}
.coupon__sub { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: var(--pimenta-soft); opacity: .8; }

.coupon__hint {
  flex: 0 0 auto;
  align-self: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap;
}
.coupon.is-copied { border-style: solid; background: rgba(228, 87, 46, .16); }
.coupon.is-copied .coupon__hint { opacity: 1; }

/* ---------- Vitrine (produtos sincronizados da loja) ---------- */
.shop { margin-bottom: 26px; }
.shop:empty { display: none; }

.shop__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--pad);
  margin-bottom: 13px;
}
.shop__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(17px, 4.8vw, 20px);
  letter-spacing: -.01em;
  color: var(--ink);
}
.shop__all {
  flex: 0 0 auto;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--pimenta-soft);
  text-decoration: none;
  border-bottom: 1.4px solid rgba(140, 29, 44, .3);
  padding-bottom: 1px;
  transition: color .3s ease, border-color .3s ease;
}
.shop__all:hover { color: var(--coral); border-color: var(--coral); }
.shop__all:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* Trilho com scroll-snap. O overflow fica AQUI, nunca no body. */
.shop__rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--pad);
  padding: 4px var(--pad) 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shop__rail::-webkit-scrollbar { display: none; }

.product {
  flex: 0 0 auto;
  width: 148px;
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.product:hover { transform: translateY(-4px); }
.product:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; border-radius: 18px; }
.product.is-broken { display: none; }

.product__media {
  /* É um <span>: sem display:block o aspect-ratio abaixo é ignorado,
     a foto estica e empurra nome e preço para fora do card. */
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: var(--creme-deep);
  border: 1px solid rgba(140, 29, 44, .12);
  box-shadow: 0 10px 22px -16px rgba(140, 29, 44, .6);
}
.product__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .5s ease;
}
.product:hover .product__img { transform: scale(1.06); }

.product__badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  opacity: .92;
}
.product__badge--out { background: var(--ink); }
.product__badge--new { background: var(--coral); }

.product__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--pimenta-soft);
  min-height: 34px;
}
.product__price {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--pimenta);
}

/* ---------- Links ---------- */
.links { display: flex; flex-direction: column; gap: 13px; padding: 0 var(--pad); }

.link-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 56px;
  padding: 13px 20px;
  border: 1.6px solid var(--pimenta);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--pimenta);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1),
              box-shadow .35s ease, background-color .35s ease, color .35s ease;
}
.link-btn__label { position: relative; z-index: 1; }
.link-btn__icon {
  position: relative; z-index: 1;
  display: inline-flex;
  width: 19px; height: 19px;
  flex: 0 0 auto;
}
.link-btn__icon svg { width: 100%; height: 100%; }

/* Brilho que cruza o botão no hover */
.link-btn::before {
  content: "";
  position: absolute;
  top: 0; left: -130%;
  width: 70%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg);
  transition: left .7s ease;
}
.link-btn:hover {
  transform: translateY(-3px);
  background: var(--pimenta);
  color: #fff;
  box-shadow: 0 16px 28px -14px rgba(140, 29, 44, .65);
}
.link-btn:hover::before { left: 130%; }
.link-btn:active { transform: translateY(-1px) scale(.99); }
.link-btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* CTA em destaque */
.link-btn--highlight {
  background: var(--pimenta);
  color: #fff;
  border-color: var(--pimenta);
  box-shadow: 0 12px 26px -16px rgba(140, 29, 44, .7);
}
.link-btn--highlight:hover { background: var(--pimenta-soft); border-color: var(--pimenta-soft); }

/* ---------- Unidade (Google Meu Negócio) ---------- */
.units { display: flex; flex-direction: column; gap: 14px; padding: 0 var(--pad); margin-top: 28px; }
.units:empty { display: none; }

.units__title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(17px, 4.8vw, 20px);
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 4px;
}
.units__title::after {
  content: "";
  display: block;
  width: 46px; height: 2px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.unit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1.4px solid rgba(140, 29, 44, .22);
  border-radius: 20px;
  background: rgba(255, 253, 250, .7);
  color: var(--pimenta);
  text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.unit:hover {
  transform: translateY(-3px);
  border-color: var(--pimenta);
  box-shadow: 0 16px 30px -18px rgba(140, 29, 44, .55);
}
.unit:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.unit__pin {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(228, 87, 46, .12);
  color: var(--coral);
}
.unit__pin svg { width: 22px; height: 22px; }

.unit__body { flex: 1 1 auto; min-width: 0; }
.unit__city {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ink);
}
.unit__badge {
  font-family: var(--font-ui);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--coral);
  padding: 3px 9px; border-radius: 999px;
}
.unit__addr {
  display: block;
  font-size: 12px; line-height: 1.45;
  color: var(--pimenta-soft);
  margin-top: 3px;
}
.unit__rating { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.unit__stars { display: inline-flex; color: var(--gold); }
.unit__stars svg { width: 14px; height: 14px; }
.unit__reviews { font-size: 12px; font-weight: 600; color: var(--pimenta); }
.unit__g { display: inline-flex; width: 15px; height: 15px; }
.unit__g svg { width: 100%; height: 100%; }

.unit__cta {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 20px; height: 20px;
  color: var(--pimenta-soft);
  opacity: .6;
  transition: transform .3s ease, opacity .3s ease;
}
.unit:hover .unit__cta { opacity: 1; transform: translateX(2px); }

/* ---------- Redes sociais ---------- */
.socials { display: flex; justify-content: center; gap: 16px; margin-top: 24px; padding: 0 var(--pad); }
.socials:empty { display: none; }
.social-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--pimenta);
  border: 1.4px solid rgba(140, 29, 44, .35);
  transition: transform .3s ease, background-color .3s ease, color .3s ease;
}
.social-btn svg { width: 20px; height: 20px; }
.social-btn:hover { transform: translateY(-3px) scale(1.06); background: var(--pimenta); color: #fff; }
.social-btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* ---------- Footer ---------- */
/* Sem opacity no bloco: ele desbotaria também a logo azul da RHZ.
   O tom mais claro vai só no texto. */
.footer {
  margin-top: 26px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: rgba(168, 50, 68, .82);
}
.footer .heart { color: var(--coral); }

.footer__line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}
/* O arquivo da logo já traz o respiro da marca embutido, por isso a margem
   negativa: sem ela sobra um vão grande demais depois de "pela". */
.footer__rhz {
  display: inline-flex;
  margin-left: -7px;
  transition: opacity .3s ease, transform .3s ease;
}
.footer__rhz img { width: 88px; height: auto; display: block; }
.footer__rhz:hover { opacity: .7; transform: translateY(-1px); }
.footer__rhz:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }

/* ---------- Animações de entrada (stagger) ----------
   O estado inicial escondido só vale quando o JS está de fato no comando
   (a classe .js é posta pelo script inline no <head>). Sem isso, uma falha
   de JS — ou um requestAnimationFrame que nunca dispara, o que acontece em
   aba de segundo plano e no modo de economia de bateria do iOS — deixaria
   a página inteira invisível. Sem .js, tudo nasce visível. */
.js .reveal,
.js .link-btn,
.js .unit,
.js .product { opacity: 0; transform: translateY(16px); }

.is-ready .reveal {
  animation: rise .7s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: var(--delay, 0ms);
}
.is-ready .link-btn,
.is-ready .unit,
.is-ready .product {
  animation: rise .6s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: var(--delay, 0ms);
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsivo ---------- */
@media (min-width: 600px) {
  .hero__media { aspect-ratio: 1 / 1; }
  .product { width: 160px; }
}

/* ---------- Acessibilidade: movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .orb, .hero__img { animation: none !important; }
  .reveal, .link-btn, .unit, .product {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
  .link-btn::before { display: none; }
  .shop__rail { scroll-snap-type: none; }
  * { transition-duration: .01ms !important; }
}
