/* Cupons — corpo: layout claro, tipográfico, minimal (footer inalterado abaixo) */
:root {
  --paper: #f0eeeb;
  --paper-2: #ffffff;
  --ink: #1c1917;
  --ink-muted: #78716c;
  --line: #d6d3d1;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-soft: rgba(194, 65, 12, 0.09);
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-card: 0 4px 24px rgba(28, 25, 23, 0.07);
  --max: 1100px;
  --topbar-bg: rgba(240, 238, 235, 0.88);
  --overlay-scrim: rgba(240, 238, 235, 0.72);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c1917;
  --paper-2: #292524;
  --ink: #fafaf9;
  --ink-muted: #a8a29e;
  --line: #44403c;
  --accent: #ea580c;
  --accent-hover: #fb923c;
  --accent-soft: rgba(234, 88, 12, 0.2);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 4px 28px rgba(0, 0, 0, 0.42);
  --topbar-bg: rgba(28, 25, 23, 0.92);
  --overlay-scrim: rgba(28, 25, 23, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ——— Tela de carregamento ——— */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--paper);
  transition: opacity 0.45s ease, visibility 0.45s ease, background 0.2s ease;
}

#page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  width: 96px;
  height: 96px;
  object-fit: contain;
  animation: loader-breathe 1.6s ease-in-out infinite;
}

.loader-text {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.loader-progress {
  width: min(280px, 85vw);
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.loader-progress__bar {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ea580c);
  animation: loader-progress-indeterminate 1.15s ease-in-out infinite;
}

@keyframes loader-progress-indeterminate {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(290%);
  }
}

@keyframes loader-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.94);
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader-brand {
    animation: none;
  }

  .loader-progress__bar {
    animation: none;
    width: 100%;
    opacity: 0.55;
  }
}

/* ——— Conteúdo principal (após carregar) ——— */
#main-content {
  opacity: 0;
  transition: opacity 0.5s ease;
}

#main-content.is-ready {
  opacity: 1;
}

/* Catálogo (Lojas + Ofertas): blur e overlay enquanto cupons carregam */
.catalog-shell {
  position: relative;
  margin-top: 0;
}

.catalog-shell__content {
  transition: filter 0.35s ease, opacity 0.35s ease;
}

/* Menos respiro entre o hero e “Lojas” (evita faixa vazia grande) */
.catalog-shell__content > .block:first-of-type {
  padding-top: 1.65rem;
}

.catalog-shell.is-catalog-loading .catalog-shell__content {
  filter: blur(9px);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.catalog-shell__overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 1rem 2rem;
  background: var(--overlay-scrim);
  backdrop-filter: blur(4px);
  transition: opacity 0.35s ease, visibility 0.35s ease, background 0.2s ease;
}

/* Só o overlay inicial da página; não usar .catalog-shell__overlay genérico — o #catalog-more-overlay
   também usa essa classe e ficaria invisível após o primeiro carregamento */
.catalog-shell:not(.is-catalog-loading) #catalog-loading-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.catalog-shell__overlay-card {
  position: sticky;
  /* Abaixo do topbar fixo + área segura; acompanha o scroll da página */
  top: max(0.65rem, calc(env(safe-area-inset-top, 0px) + 3.55rem));
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.35rem 1.75rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  max-width: min(100%, 22rem);
  width: calc(100% - 0.5rem);
  text-align: center;
}

.catalog-shell__overlay-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  animation: loader-breathe 1.6s ease-in-out infinite;
}

.catalog-shell__overlay-text {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.catalog-shell__overlay-count {
  margin: 0;
  min-height: 1.35em;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: reduce) {
  .catalog-shell__content {
    transition: none;
  }

  .catalog-shell__overlay {
    transition: none;
  }

  .catalog-shell__overlay-icon {
    animation: none;
  }

  .catalog-shell.is-catalog-loading .catalog-shell__content {
    filter: blur(4px);
  }
}

/* Ofertas: overlay + blur ao carregar mais cupons (mesmo padrão do catálogo inicial) */
.cupons-panel {
  position: relative;
  isolation: isolate;
}

.cupons-panel__content {
  position: relative;
  z-index: 0;
  transition: filter 0.35s ease, opacity 0.35s ease;
}

.cupons-panel.is-loading-more .cupons-panel__content {
  filter: blur(9px);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

/* Overlay depois do conteúdo no DOM + z-index alto: `filter` no irmão cria camada por cima se o overlay vier primeiro */
.catalog-shell__overlay--more {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 1rem 2rem;
  background: var(--overlay-scrim);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s ease;
  pointer-events: auto;
}

.catalog-shell__overlay--more[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .cupons-panel__content {
    transition: none;
  }

  .catalog-shell__overlay--more {
    transition: none;
  }

  .cupons-panel.is-loading-more .cupons-panel__content {
    filter: blur(4px);
  }
}

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Cabeçalho */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.nav-mini {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-mini a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}

.nav-mini a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--line);
}

.theme-toggle:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-toggle svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.theme-toggle__glyph--sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle__glyph--moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle__glyph--sun {
  display: block;
}

/* Bloco intro — sem clip duro: gradiente animado fica contido no próprio layer */
.intro {
  position: relative;
  overflow: visible;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: clamp(2.25rem, 7vw, 3.75rem) 0 clamp(0.85rem, 2vw, 1.35rem);
}

.intro-bg {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse 85% 70% at 18% 28%, var(--accent-soft), transparent 55%),
    radial-gradient(ellipse 65% 55% at 88% 72%, rgba(234, 88, 12, 0.11), transparent 52%),
    radial-gradient(ellipse 90% 45% at 48% 100%, rgba(120, 113, 108, 0.07), transparent 58%);
  background-size: 115% 115%;
  background-position: 30% 45%;
  z-index: 0;
  animation: intro-bg-shift 26s ease-in-out infinite alternate;
}

html[data-theme="dark"] .intro-bg {
  background:
    radial-gradient(ellipse 85% 70% at 18% 28%, var(--accent-soft), transparent 55%),
    radial-gradient(ellipse 65% 55% at 88% 72%, rgba(234, 88, 12, 0.15), transparent 52%),
    radial-gradient(ellipse 90% 45% at 48% 100%, rgba(250, 250, 249, 0.04), transparent 58%);
  background-size: 115% 115%;
  background-position: 30% 45%;
}

@keyframes intro-bg-shift {
  0% {
    background-position: 28% 42%;
    opacity: 1;
  }
  100% {
    background-position: 62% 58%;
    opacity: 0.94;
  }
}

.intro-head {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@keyframes intro-grid-rise {
  from {
    opacity: 0.88;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

#main-content.is-ready .intro-head {
  animation: intro-grid-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.intro-copy{
  padding-left: 40px;
}

.intro-copy > * {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
}

#main-content.is-ready .intro-copy > * {
  animation: intro-line-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#main-content.is-ready .intro h1 {
  animation-delay: 0.02s;
}

#main-content.is-ready .intro-lead {
  animation-delay: 0.08s;
}

#main-content.is-ready .intro-stat:not([hidden]) {
  animation-delay: 0.14s;
}

@keyframes intro-line-in {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.intro-stat {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.intro-stat::before {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.1em;
  opacity: 0.9;
}

.intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.6vw, 2.65rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  color: var(--ink);
}

.intro-lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 38ch;
}

/* Faixa de fotos (cupons com imagem) */
.hero-strip-outer {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: clamp(1.15rem, 3vw, 1.75rem);
  padding-top: clamp(0.65rem, 1.5vw, 1rem);
  padding-bottom: 0;
  overflow: visible;
}

.hero-strip-outer[hidden] {
  display: none !important;
}

.hero-strip-heading {
  padding-left: 40px;
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-strip-fade {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.35rem 0 0.5rem;
  overflow-x: clip;
  overflow-y: visible;
}

.hero-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.85rem;
  width: max-content;
  animation: hero-strip-marquee 42s linear infinite;
}

.hero-strip-fade:hover .hero-strip {
  animation-play-state: paused;
}

.hero-strip-outer--active .hero-strip {
  will-change: transform;
}

@keyframes hero-strip-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero-strip__card {
  position: relative;
  flex: 0 0 auto;
  width: 148px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--paper-2);
  transition: box-shadow 0.25s ease, z-index 0s linear 0.15s;
}

.hero-strip__card:hover,
.hero-strip__card:focus-within {
  z-index: 30;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  transition-delay: 0s;
}

.hero-strip__preview {
  position: relative;
  height: 92px;
  overflow: hidden;
  border-radius: calc(var(--radius-sm) - 1px);
}

.hero-strip__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

.hero-strip__tag {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  max-width: calc(100% - 0.9rem);
  padding: 0.22rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #c2410c 100%);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .hero-strip__tag {
  background: linear-gradient(135deg, var(--accent) 0%, #9a3412 100%);
}

.hero-strip__expand {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% - 1px);
  z-index: 3;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  transition:
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.hero-strip__card:hover .hero-strip__expand,
.hero-strip__card:focus-within .hero-strip__expand {
  max-height: 240px;
  opacity: 1;
  pointer-events: auto;
}

.hero-strip__expand-inner {
  padding: 0.5rem 0.55rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-strip__store {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-strip__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.hero-strip__code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  word-break: break-all;
}

.hero-strip__link {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease;
}

.hero-strip__link:hover {
  background: var(--accent-hover);
}

@media (prefers-reduced-motion: reduce) {
  #main-content.is-ready .intro-copy > * {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .intro-bg {
    animation: none;
  }

  .hero-strip {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    row-gap: 0.75rem;
  }

  .hero-strip__expand {
    transition: none;
  }

  #main-content.is-ready .intro-head {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e7e5e4, #d6d3d1);
}

html[data-theme="dark"] .thumb-fallback {
  background: linear-gradient(145deg, #3f3f46, #52525b);
}

.thumb-fallback img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.85;
}

.thumb-fallback-letter {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Seções */
.block {
  padding: 2.25rem 0 2.75rem;
}

.block-head {
  margin-bottom: 1.25rem;
}

.block-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.block-sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.block-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.block-head--row .block-title {
  margin: 0;
}

.search-field {
  margin-bottom: 1.35rem;
}

.search-field input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2378716c' stroke-width='1.8'%3E%3Ccircle cx='8' cy='8' r='5.5'/%3E%3Cpath d='M12.5 12.5 16 16' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0.85rem 50%;
  background-size: 18px 18px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-field input::placeholder {
  color: var(--ink-muted);
  opacity: 0.85;
}

.search-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Lista de cupons — grid 3 / 2 / 1 colunas */
.deal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

@media (max-width: 960px) {
  .deal-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .deal-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.deal-load-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}

.btn-load-more:hover:not(:disabled) {
  border-color: #cfcac4;
  background: var(--paper);
}

.btn-load-more:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-load-more:disabled {
  opacity: 0.65;
  cursor: wait;
}

.deal-load-status {
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-muted);
  max-width: 36ch;
}

.deal-load-status.is-loading {
  color: var(--ink);
}

.deal-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1rem;
  align-items: stretch;
  padding: 0.85rem 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.deal-card:hover {
  border-color: #cfcac4;
  box-shadow: var(--shadow-card);
}

@media (max-width: 520px) {
  .deal-card {
    grid-template-columns: 88px 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }
}

.deal-card__media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper);
  min-height: 88px;
  align-self: start;
}

.deal-card__media img,
.deal-card__media .thumb-fallback {
  width: 100%;
  height: 100%;
  min-height: 88px;
  object-fit: cover;
}

.deal-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.deal-store {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.deal-title {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--ink);
}

.deal-discount {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.deal-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.deal-code-row code {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 0.2rem 0.45rem;
  background: var(--paper);
  border-radius: 4px;
  border: 1px solid var(--line);
}

.deal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-text:hover {
  background: var(--paper);
  border-color: #cfcac4;
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-solid:hover {
  background: var(--accent-hover);
}

/* Lojas — filtro por chip */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.pill-row.pill-row--catalog-search {
  max-height: min(48vh, 32rem);
  overflow-y: auto;
  padding-right: 0.15rem;
  align-content: flex-start;
}

button.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  font-size: 0.84rem;
  font-family: inherit;
  color: var(--ink-muted);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

button.pill:hover {
  color: var(--ink);
  border-color: #cfcac4;
}

button.pill.is-selected {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
  border-color: rgba(194, 65, 12, 0.35);
  box-shadow: 0 0 0 1px rgba(194, 65, 12, 0.15);
}

.filter-clear {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink-muted);
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.filter-clear:hover {
  color: var(--accent);
  border-color: rgba(194, 65, 12, 0.4);
  background: var(--accent-soft);
}

/* Estados */
.msg {
  padding: 1.5rem;
  text-align: center;
  color: var(--ink-muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.msg.error {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

html[data-theme="dark"] .msg.error {
  color: #fecaca;
  border-color: #7f1d1d;
  background: #450a0a;
}

.msg.empty {
  grid-column: 1 / -1;
}

.skeleton-line {
  height: 0.85em;
  border-radius: 4px;
  background: linear-gradient(90deg, #e7e5e4 0%, #f5f3f0 50%, #e7e5e4 100%);
  background-size: 200% 100%;
  animation: sk 1.2s ease-in-out infinite;
}

@keyframes sk {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

html[data-theme="dark"] .skeleton-line {
  background: linear-gradient(90deg, #3f3f46 0%, #52525b 50%, #3f3f46 100%);
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line {
    animation: none;
    background: #e7e5e4;
  }

  html[data-theme="dark"] .skeleton-line {
    animation: none;
    background: #3f3f46;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Footer (layout alinhado ao Dicionário Informal) ── */
.site-footer {
  background: #1e1e22;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 3rem;
  max-width: 100%;
  overflow-x: clip;
  --footer-t: 0.15s ease;
}

.footer-main {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1.15fr 1fr auto minmax(11rem, 1.35fr);
  gap: 2rem 2.5rem;
  min-width: 0;
}

.footer-col-spacer {
  height: 1em;
  margin-bottom: 0.85rem;
}

.footer-copyright-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.footer-copyright-line {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.45;
}

.footer-col--copyright .footer-by {
  display: block;
  text-align: right;
}

.footer-col--social {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-col-title--contact {
  width: 100%;
  text-align: center;
  margin: 0 0 0.85rem 0;
}

.footer-social-nav {
  display: grid;
  grid-template-columns: repeat(3, 2.1rem);
  grid-template-rows: repeat(3, 2.1rem);
  gap: 0.32rem 0.45rem;
  justify-content: center;
  justify-items: center;
  align-items: center;
  margin: 0 auto;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: rgba(255, 255, 255, 0.52);
  border-radius: 6px;
  transition: color var(--footer-t), background var(--footer-t);
}

.footer-social-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.footer-social-link svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-cupons-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.footer-cupons-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-cupons-wordmark {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--footer-t);
}

.footer-cupons-brand:hover .footer-cupons-wordmark {
  color: #fff;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-contact-link {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--footer-t);
}

.footer-contact-link:hover {
  color: #fff;
}

.footer-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 0.85rem 0;
}

.footer-col-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-col-list a,
.footer-link-btn {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
  transition: color var(--footer-t);
}

.footer-col-list a:hover,
.footer-link-btn:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.footer-by {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.25);
}

.footer-bottom-badges {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}

.footer-store-link {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.8;
  transition: opacity var(--footer-t);
}

.footer-store-link:hover {
  opacity: 1;
}

.footer-badge {
  height: auto;
  width: auto;
  max-width: 100%;
  max-height: 48px;
  display: block;
  object-fit: contain;
}

.footer-bottom-inner .footer-virtues-link {
  flex-shrink: 0;
}

.footer-virtues-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: opacity var(--footer-t);
}

.footer-virtues-link:hover {
  opacity: 0.85;
  color: #fff;
}

.footer-virtues-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.footer-virtues-text {
  font-family: "Source Sans 3", system-ui, sans-serif;
  letter-spacing: 0.02em;
}

/* Modais Sugestão / Fale conosco (formulário claro — variáveis locais) */
.fmodal-overlay {
  --blue: #2563eb;
  --border: #e5e7eb;
  --text: #111827;
  --text2: #374151;
  --text3: #6b7280;
  --white: #ffffff;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.fmodal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.fmodal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s;
}

.fmodal-overlay.open .fmodal {
  transform: translateY(0) scale(1);
}

.fmodal-header {
  padding: 1.1rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--border);
}

.fmodal-tabs {
  display: flex;
  gap: 0;
}

.fmodal-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text3);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.fmodal-tab-icon {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.fmodal-tab-icon svg {
  display: block;
}

.fmodal-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.fmodal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  transition: color 0.15s;
  font-family: inherit;
}

.fmodal-close:hover {
  color: var(--text);
}

.fmodal-body {
  padding: 1.5rem;
}

.fform-group {
  margin-bottom: 1rem;
}

.fform-hint {
  font-size: 0.8rem;
  color: var(--text3);
  margin: 0 0 0.85rem;
  line-height: 1.35;
}

.fform-hint strong {
  color: var(--text2);
  font-weight: 700;
}

.fform-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.4rem;
}

.fform-input,
.fform-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  background: var(--white);
}

.fform-input:focus,
.fform-textarea:focus {
  border-color: var(--blue);
}

.fform-textarea {
  resize: vertical;
  min-height: 88px;
}

.fform-submit {
  width: 100%;
  padding: 0.78rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.25rem;
  font-family: inherit;
}

.fform-submit:hover {
  opacity: 0.88;
}

.fform-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fmodal-msg {
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.83rem;
  margin-bottom: 1rem;
}

.fmodal-msg.error {
  background: #fff0f0;
  border: 1.5px solid #ffc5c5;
  color: #b00;
}

.fmodal-success-view {
  text-align: center;
  padding: 2rem 1.5rem;
}

.fmodal-success-icon {
  margin-bottom: 0.75rem;
  line-height: 0;
  color: #1a7a3f;
}

.fmodal-success-icon svg {
  display: block;
  margin: 0 auto;
}

.fmodal-success-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.fmodal-success-desc {
  font-size: 0.85rem;
  color: var(--text3);
}

html[data-theme="dark"] .fmodal-overlay {
  --blue: #60a5fa;
  --border: #3f3f46;
  --text: #fafaf9;
  --text2: #e7e5e4;
  --text3: #a8a29e;
  --white: #1c1917;
}

html[data-theme="dark"] .fmodal {
  background: #292524;
  border: 1px solid #3f3f46;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .fmodal-msg.error {
  background: #450a0a;
  border-color: #7f1d1d;
  color: #fecaca;
}

html[data-theme="dark"] .fmodal-success-icon {
  color: #4ade80;
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 2rem 1rem 1.5rem;
    gap: 1.5rem 1rem;
  }

  .footer-brand-col,
  .footer-col--copyright {
    grid-column: 1 / -1;
  }

  .footer-main > .footer-col,
  .footer-main > .footer-brand-col {
    min-width: 0;
  }

  .footer-col--social {
    justify-self: end;
    align-items: flex-end;
  }

  .site-footer .footer-col--social .footer-col-title--contact {
    text-align: right;
  }

  .footer-col--social .footer-social-nav {
    margin-left: auto;
    margin-right: 0;
  }

  .footer-copyright-block,
  .footer-col--copyright .footer-by {
    text-align: center;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }

  .footer-bottom-badges {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-bottom-inner .footer-virtues-link {
    justify-content: center;
  }
}

@media (max-width: 540px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem 0.75rem;
    padding: 1.5rem 1rem 1.75rem;
    align-items: start;
  }

  .footer-col--dic .footer-link-btn,
  .footer-col--dic a,
  .footer-col--legal a,
  .footer-contact-link {
    overflow-wrap: anywhere;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
    max-width: none;
  }

  .footer-col--copyright {
    grid-column: 1 / -1;
  }

  .footer-col--copyright .footer-copyright-block,
  .footer-col--copyright .footer-by {
    text-align: center;
  }

  .footer-bottom-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    gap: 0.55rem 0.4rem;
    padding: 1rem 0.85rem 1.25rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .footer-bottom-badges {
    display: contents;
  }

  .footer-bottom-inner .footer-store-link {
    flex: none;
    min-width: 0;
    justify-content: center;
  }

  .footer-bottom-inner .footer-virtues-link {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    align-self: center;
    margin: 0;
  }

  .footer-badge {
    max-height: 42px;
    margin: 0 auto;
  }

  .fmodal {
    border-radius: 10px;
  }

  .fmodal-body {
    padding: 1rem;
  }
}
