:root {
  --bg: #e8f0ff;
  --ink: #1a2332;
  --muted: #5b677a;
  --gold: #f5c542;
  --gold-2: #ffd56a;
  --line: rgba(26, 35, 50, 0.08);
  --card: #ffffff;
  --card-2: #ffffff;
  --blue: #3b6cff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 6.2rem;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background: linear-gradient(180deg, #d7e6ff 0%, #eaf1ff 42%, #f3f7ff 100%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.search-panel,
.hero,
.toolbar,
.coupon-board,
.community,
.site-footer {
  width: min(720px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: relative;
  width: 100%;
  padding: 1rem 0;
}

.header-bar {
  width: min(720px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-link {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.wa-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.wa-chip svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-copy strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.search-panel {
  padding: 1rem 0 0.4rem;
}

.offer-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.4rem 0.4rem 0.4rem 0.9rem;
  box-shadow: 0 8px 24px rgba(59, 108, 255, 0.08);
}

.offer-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 600 0.95rem/1.3 "Manrope", sans-serif;
  outline: none;
}

.search-btn {
  padding: 0.75rem 1.1rem;
}

.search-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  margin: 0.7rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.text-link {
  border: 0;
  background: none;
  color: var(--blue);
  font: 800 0.82rem/1 "Manrope", sans-serif;
  cursor: pointer;
  padding: 0;
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 0.15rem;
}

.chip {
  border: 0;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: 800 0.78rem/1 "Manrope", sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26, 35, 50, 0.05);
}

.chip.is-active {
  background: var(--blue);
  color: #fff;
}

.hero {
  padding: 2.8rem 0 2.2rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.toolbar-head h2,
.community h2,
.how-modal h2,
.modal-card h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1.05;
}

.lede,
.how-intro,
.community p,
.site-footer,
.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.lede {
  max-width: 34rem;
  margin: 1rem auto 0;
}

.hero-actions,
.filters,
.coupon-meta,
.coupon-top,
.store-badge {
  display: flex;
  align-items: center;
}

.hero-actions {
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn,
.filter,
.use-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  font: 800 0.95rem/1 "Manrope", sans-serif;
  cursor: pointer;
}

.btn-gold,
.filter.is-active {
  background: var(--gold);
  color: #111;
  border: 0;
}

.btn-ghost,
.filter,
.use-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(242, 193, 75, 0.7);
}

.toolbar {
  padding-top: 0.4rem;
}

.toolbar-head {
  margin-bottom: 1rem;
}

.toolbar-head h2,
.community h2 {
  font-size: 1.7rem;
}

.toolbar .filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.toolbar .filters.filter-count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toolbar .filters.filter-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toolbar .filters .filter {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  justify-content: center;
  text-align: center;
  padding: 0.7rem 0.55rem;
}

.toolbar .filters.filter-count-2 .filter {
  font-size: 0.9rem;
}

.toolbar .filters.filter-count-3 .filter {
  font-size: 0.62rem;
  letter-spacing: -0.03em;
  padding: 0.7rem 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toolbar .filters.filter-count-4 .filter,
.toolbar .filters.filter-count-5 .filter {
  min-height: 52px;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: normal;
  padding: 0.6rem 0.45rem;
}

.toolbar .filters.filter-count-5 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter[hidden] {
  display: none !important;
}

.coupon-board {
  padding: 1.1rem 0 2.4rem;
}

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.coupon-card {
  background: var(--card);
  border-radius: 22px;
  padding: 1.15rem 1.15rem 1rem;
  box-shadow: 0 10px 24px rgba(59, 108, 255, 0.08);
}

.coupon-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 0.8rem;
  background: #eef3ff;
}

.coupon-top {
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.store-badge {
  gap: 0.5rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.store-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 0.12rem;
}

.discount {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.coupon-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.18rem;
  line-height: 1.3;
}

.coupon-card p {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
}

.price-row strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.price-row s {
  color: #9aa6b8;
  font-size: 0.85rem;
}

.coupon-meta {
  justify-content: space-between;
  gap: 0.8rem;
}

.coupon-code {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.use-btn {
  padding: 0.7rem 0.95rem;
  border: 0;
  background: var(--gold);
  color: #111;
  font-size: 0.82rem;
}

.use-btn:disabled {
  opacity: 0.6;
}

.empty-state,
.hidden {
  display: none;
}

.empty-state:not(.hidden) {
  display: block;
  text-align: center;
}

.community {
  margin-bottom: 2rem;
}

.community-copy {
  margin-bottom: 1.2rem;
  text-align: center;
}

.community-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 0.9rem;
}

.community-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  border-radius: 16px;
  color: #fff;
  font: 800 0.95rem/1 "Manrope", sans-serif;
  box-shadow: 0 8px 20px rgba(26, 35, 50, 0.08);
}

.social-logo {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.social-logo svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.social-facebook { background: #1877f2; }
.social-telegram { background: #229ed9; }
.social-whatsapp { background: #25d366; }
.social-tiktok { background: #111; }

.site-footer {
  padding-bottom: 2rem;
  text-align: center;
  font-size: 0.88rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.72);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.how-modal {
  position: fixed;
  inset: unset;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(720px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 0;
  border-radius: 28px;
  padding: 2rem 3.2rem 1.8rem 1.8rem;
  color: var(--ink);
  background: var(--card-2);
}

.how-modal::backdrop {
  background: rgba(4, 8, 14, 0.82);
}

.how-modal h2 {
  margin: 0 0 0.45rem;
  font-size: 1.8rem;
}

.how-intro {
  margin: 0 0 1.2rem;
}

.how-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.how-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  background: var(--card);
  border-radius: 16px;
  padding: 0.95rem 1rem;
}

.how-steps span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(242, 193, 75, 0.14);
  color: var(--gold);
  font-weight: 800;
}

.how-steps h3,
.how-steps p {
  margin: 0;
}

.how-steps h3 {
  margin-bottom: 0.25rem;
}

.modal-card {
  width: min(420px, 100%);
  background: var(--card-2);
  border-radius: 24px;
  padding: 1.6rem;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #222733;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 0.8rem;
  background: #fff;
  border-radius: 16px;
  padding: 0.35rem;
}

.code-chip {
  display: inline-block;
  margin: 0.4rem 0 1rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}

.progress {
  height: 4px;
  background: #2a3140;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  animation: fill 2s linear forwards;
}

@keyframes fill {
  to {
    width: 100%;
  }
}

.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  gap: 1rem;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(26, 35, 50, 0.06);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
}

.app-nav-btn {
  width: min(220px, 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: 700 0.82rem/1 "Manrope", sans-serif;
  cursor: pointer;
}

.app-nav-btn svg {
  width: 24px;
  height: 24px;
}

.app-nav-btn.is-active {
  color: var(--blue);
}

.nav-icon {
  position: relative;
  display: grid;
  place-items: center;
}

.nav-badge {
  position: absolute;
  top: -7px;
  right: -11px;
  min-width: 16px;
  height: 16px;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--gold);
  color: #111;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 16px;
}

@media (min-width: 960px) {
  body {
    padding-bottom: 2.5rem;
  }

  .search-panel,
  .hero,
  .toolbar,
  .coupon-board,
  .community,
  .site-footer,
  .header-bar {
    width: min(1180px, calc(100% - 4rem));
  }

  .site-header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
    backdrop-filter: blur(14px);
  }

  .header-bar {
    gap: 1.5rem;
  }

  .brand-copy strong {
    font-size: 1.5rem;
  }

  .app-nav {
    position: static;
    display: flex;
    width: auto;
    flex: 1;
    justify-content: center;
    gap: 0.55rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    grid-template-columns: none;
  }

  .app-nav-btn {
    width: auto;
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    background: #f4f7ff;
    font-size: 0.95rem;
  }

  .app-nav-btn.is-active {
    background: var(--blue);
    color: #fff;
  }

  .app-nav-btn svg {
    width: 22px;
    height: 22px;
  }

  .search-panel {
    padding: 1.8rem 0 0.6rem;
  }

  .offer-search {
    max-width: 760px;
    margin: 0 auto;
    padding: 0.5rem 0.5rem 0.5rem 1.2rem;
  }

  .search-help,
  .amount-chips {
    justify-content: center;
  }

  .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.6rem;
  }

  .toolbar-head {
    margin: 0;
  }

  .toolbar-head h2,
  .community h2 {
    font-size: 2rem;
  }

  .coupon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
  }

  .coupon-card {
    padding: 1.3rem;
  }

  .community {
    margin-top: 0.4rem;
    margin-bottom: 3rem;
  }

  .community-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem;
  }

  .community-card {
    padding: 1.4rem 1.2rem;
  }

  .empty-state:not(.hidden) {
    padding: 3rem 1rem;
    font-size: 1.05rem;
  }

  .auth-wrap {
    margin-top: 3rem;
  }
}

.auth-wrap {
  width: min(460px, calc(100% - 2rem));
  margin: 1.2rem auto 3rem;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.5rem;
}

.auth-card h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: 1.7rem;
}

.auth-card .lede {
  margin: 0 0 0.4rem;
}

.auth-card label {
  display: grid;
  gap: 0.4rem;
  margin: 0.85rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  background: #f4f7ff;
  color: var(--ink);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font: 500 1rem/1.2 "Manrope", sans-serif;
}

.auth-card > .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.auth-error {
  background: rgba(220, 70, 70, 0.12);
  color: #b42318;
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-weight: 600;
}

.auth-switch {
  text-align: center;
  color: var(--muted);
}

.auth-switch a {
  color: var(--gold);
  font-weight: 700;
}

.auth-card .hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.coupon-redirect {
  text-align: center;
}

.coupon-redirect img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 0.8rem;
  background: #fff;
  border-radius: 16px;
  padding: 0.35rem;
}

.coupon-redirect .btn {
  width: 100%;
  margin-top: 0.8rem;
}

@media (max-width: 700px) {
  .community-cards {
    grid-template-columns: 1fr;
  }

  .coupon-meta {
    flex-wrap: wrap;
  }

  .coupon-card {
    padding: 0.85rem;
  }

  .coupon-card h3 {
    font-size: 0.95rem;
  }

  .coupon-card p:not(.price-row) {
    font-size: 0.78rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .price-row strong {
    font-size: 1rem;
  }

  .use-btn {
    width: 100%;
    padding: 0.65rem 0.7rem;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .wa-chip {
    padding: 0.5rem 0.7rem;
    font-size: 0.72rem;
  }

  .brand-copy strong {
    font-size: 1.05rem;
  }
}
