/* Promos da Web — sistema visual.
   Cores extraídas da logo real: roxo #80397B (estrutura) e coral #E55175
   (preços, descontos, ações). Tipografia de sistema: nenhuma requisição
   externa, texto pintado no primeiro frame. */

:root {
  color-scheme: light;

  --brand: #80397B;
  --brand-dark: #5E2A5A;
  --brand-darker: #40203E;
  --brand-soft: #F3E9F2;

  --accent: #E55175;
  --accent-dark: #C93C5F;
  --accent-soft: #FDEEF2;

  --bg: #F7F5F8;
  --surface: #FFFFFF;
  --line: #E7DEE6;

  --text: #2B1A29;
  --muted: #6E5C6C;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(64, 32, 62, .05), 0 4px 14px rgba(64, 32, 62, .06);
  --shadow-hover: 0 8px 26px rgba(64, 32, 62, .14);

  --container: 1180px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ header */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 2px 12px rgba(64, 32, 62, .18);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand__logo {
  width: 40px;
  height: 40px;
  /* Sem fundo: o PNG tem os cantos transparentes e o próprio selo branco,
     então o roxo do header aparece em volta do círculo. */
}

.brand__name {
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  line-height: 1.1;
}

.brand__name span { display: block; font-weight: 500; font-size: .72rem; opacity: .82; }

.search {
  /* Estreito de proposito: um campo de busca ocupando meia tela empurra o
     botao do grupo para fora e quebra o header em duas linhas. */
  flex: 1 1 180px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 999px;
  padding: 0 5px 0 16px;
  height: 42px;
  min-width: 0;
}

.search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: transparent;
}

.search__input::placeholder { color: #9C8B9A; }

.search__submit {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .15s ease;
}

.search__submit:hover { background: var(--accent-dark); }

.wa-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 16px;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}

.wa-button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.wa-button svg { flex-shrink: 0; }

/* Celular: tudo em uma linha so. O rotulo dos botoes sai e sobram os icones,
   que e o suficiente — os aria-label descrevem a acao. */
@media (max-width: 719px) {
  .brand__name { display: none; }
  .header__inner { gap: 10px; flex-wrap: nowrap; }
  .search { flex: 1 1 auto; max-width: none; padding: 0 4px 0 14px; height: 40px; }
  .search__submit span { display: none; }
  .search__submit { padding: 9px; }
  .wa-button { padding: 10px; }
  .wa-button span { display: none; }
}

/* ------------------------------------------------------------------ seções */

main { padding: 24px 0 48px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-head h1, .section-head h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand-darker);
}

.section-head p { margin: 0; color: var(--muted); font-size: .88rem; }

/* ------------------------------------------------------------------- grid */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 640px) {
  .grid { gap: 18px; }
}

/* Desktop: 3 por linha, como pedido — cards largos e legíveis. */
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
}

/* -------------------------------------------------------------------- card */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #D9C8D6;
}

.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  padding: 12px;
}

.card__media img,
.offer__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Se a imagem não carregar, o texto alternativo aparece pequeno e discreto
     em vez de estourar por cima do badge. Leitores de tela seguem lendo o alt. */
  font-size: .72rem;
  line-height: 1.3;
  color: var(--muted);
  overflow: hidden;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: -.01em;
  padding: 5px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(229, 81, 117, .35);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  flex: 1;
}

.card__store {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--brand);
}

.card__title {
  margin: 0;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  /* duas linhas fixas: os cards da linha ficam alinhados */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

/* Empurra preço/ações para a base: cards com e sem cupom terminam alinhados. */
.card__spacer { flex: 1; }

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.price__old {
  color: var(--muted);
  font-size: .82rem;
  text-decoration: line-through;
}

.price__now {
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.price__pix {
  font-size: .78rem;
  color: var(--muted);
}

.price__pix strong { color: var(--brand); font-weight: 700; }

/* ------------------------------------------------------------------ cupom */
/* Só existe no HTML quando há cupom. Sem cupom, nada é renderizado —
   nenhum texto de ausência, nenhum espaço reservado. */

.coupon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 7px 9px;
}

.coupon > div { min-width: 0; }

.coupon__label {
  display: block;
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent-dark);
  line-height: 1.3;
}

.coupon__code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86rem;
  font-weight: 700;
  color: var(--brand-darker);
  line-height: 1.2;
  /* Quebra só se o código for longo demais para o card — nunca no meio de um
     código curto como PROMOS10. */
  overflow-wrap: anywhere;
}

.coupon__copy {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease;
}

.coupon__copy:hover { background: rgba(229, 81, 117, .12); }
.coupon__copy[data-copied="true"] { color: #1B7A4B; }

/* No card de 2 colunas do celular não há largura para o rótulo do botão;
   o ícone sozinho já é entendido, e o aria-label descreve a ação. */
@media (max-width: 639px) {
  .card .coupon { padding: 7px; gap: 4px; }
  .card .coupon__copy { padding: 6px; }
  .card .coupon__copy-label { display: none; }
}

/* --------------------------------------------------------------- ação/CTA */

.cta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  text-align: center;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}

.cta:hover { background: var(--accent-dark); }

.cta--lg { font-size: 1.05rem; padding: 15px 20px; }

/* Link que cobre o card inteiro: clicar em qualquer ponto vai para a loja,
   sem passar pela página individual. Cupom e CTA ficam acima (z-index 2). */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ------------------------------------------------------- página da oferta */

.offer {
  display: grid;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .offer { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 36px; padding: 28px; }
}

.offer__media {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  aspect-ratio: 1 / 1;
}


.offer__title {
  margin: 6px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--brand-darker);
}

@media (min-width: 900px) { .offer__title { font-size: 1.85rem; } }

.offer__store {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--brand);
}

.offer__prices { margin: 20px 0; }
.offer__prices .price__now { font-size: 2.3rem; }
.offer__prices .price__old { font-size: 1rem; }

.offer__description {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}

.offer__meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  color: var(--muted);
}

.offer .coupon { margin: 18px 0; padding: 12px 14px; }
.offer .coupon__code { font-size: 1.1rem; }
.offer .cta { margin-top: 8px; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  font-size: .78rem;
  color: var(--muted);
}

.trust span { display: inline-flex; align-items: center; gap: 6px; }

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--brand);
  font-size: .88rem;
  font-weight: 600;
}

.backlink:hover { text-decoration: underline; }

/* -------------------------------------------------------------- paginação */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  min-width: 40px;
  padding: 9px 12px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand);
}

.pagination a:hover { border-color: var(--brand); background: var(--brand-soft); }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .is-gap { border: 0; background: transparent; color: var(--muted); min-width: 20px; }

/* ------------------------------------------------------------------ vazio */

.empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty h2 { margin: 0 0 8px; color: var(--brand-darker); font-size: 1.2rem; }
.empty p { margin: 0 0 20px; color: var(--muted); }

.empty__logo { width: 72px; height: 72px; margin: 0 auto 16px; }

/* Corpo das páginas institucionais (privacidade, contato). */
.offer h3 {
  margin: 22px 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-darker);
}

.offer h3:first-child { margin-top: 0; }

.offer p { margin: 0 0 12px; color: var(--muted); line-height: 1.65; }

.offer ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); line-height: 1.9; }

.offer a { color: var(--brand); font-weight: 600; text-decoration: underline; }
.offer a:hover { color: var(--accent-dark); }

/* ------------------------------------------------------------------ footer */

.footer {
  background: var(--brand-darker);
  color: #E7D8E5;
  padding: 36px 0 24px;
  margin-top: 40px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer .brand__name { font-size: 1rem; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: .88rem;
}

.footer__links a { opacity: .85; }
.footer__links a:hover { opacity: 1; text-decoration: underline; }

.footer__note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .76rem;
  opacity: .7;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--brand-darker);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
}

.toast[data-visible="true"] { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
