html { scroll-padding-top: 84px; }
body { background: var(--card); overflow-x: hidden; }

/* ---------- Nav ---------- */
.nav { display: flex; gap: 28px; margin-left: auto; margin-right: 24px; }
.nav a { font-size: .92rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 60px;
  background: var(--navy-dark);
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  right: -120px; top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 0, .16), transparent 65%);
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .72);
}
.eyebrow i { color: var(--yellow); font-size: .85rem; }
.eyebrow #today { color: #fff; font-weight: 600; text-transform: capitalize; }
.hero__title {
  margin-top: 16px;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.hero__title span { color: var(--yellow); }
.hero__subtitle {
  max-width: 460px;
  margin: 12px auto 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, .7);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section--alt { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 620px; margin-bottom: 28px; }
.section__kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
}
.section__title {
  margin-top: 8px;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--ink);
}
.section__desc { margin-top: 10px; font-size: 1rem; color: var(--muted); }

/* ---------- Guía de uso ---------- */
.guide {
  max-width: 620px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}
.guide__title {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.guide__title i { color: var(--navy); font-size: 1rem; }
.guide__list { list-style: none; margin-top: 4px; }
.guide__list li {
  display: flex; align-items: flex-start; gap: 14px;
  min-width: 0;
  padding: 18px 0;
}
.guide__list li + li { border-top: 1px solid var(--border); }
.guide__num {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--navy-dark);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.guide__list p { flex: 1; min-width: 0; font-size: .95rem; color: var(--muted); overflow-wrap: anywhere; }
.guide__list strong { font-weight: 600; color: var(--ink); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}
.tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tab__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tabs a.tab { text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--navy-dark); color: #fff; }
.tab__count {
  padding: 1px 7px;
  border-radius: 999px;
  background: #eceefa;
  font-size: .75rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.tab.is-active .tab__count { background: rgba(255, 255, 255, .18); color: #fff; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ---------- Coupon card ---------- */
.coupon {
  display: flex; flex-direction: column;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.coupon:hover { border-color: #cdd2e4; box-shadow: var(--shadow); }

.coupon__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.coupon__value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--navy-dark);
}
.coupon__label { display: block; margin-top: 4px; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.coupon__badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge i { font-size: .72rem; }
.badge--hot { background: #fef3f2; color: #b42318; }
.store-logo {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.store-logo img { width: 22px; height: 22px; object-fit: contain; }
.store-logo--meli { background: var(--yellow); }
.store-logo--amazon { background: #131921; color: #ff9900; }
.store-logo--amazon i { font-size: 1.15rem; }
.coupon__desc { margin: 14px 0 18px; font-size: .92rem; color: var(--muted); flex: 1; }

.code {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  height: 48px;
  padding: 0 36px;
  border: 1.5px dashed #c5cbe0;
  border-radius: 8px;
  background: #f8f9fc;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--navy-dark);
  overflow: hidden;
  user-select: none;
}
.code__visible { font-weight: 600; }
.code__hidden { color: #9aa2bd; letter-spacing: .1em; }
.code__lock {
  position: absolute;
  right: 14px;
  font-size: .78rem;
  color: #9aa2bd;
}

.coupon__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.uses { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.uses i { color: var(--red); font-size: .85rem; }
.uses strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.coupon__foot .btn { padding: 10px 16px; }

/* ---------- Estados vacíos y 404 ---------- */
.empty {
  padding: 40px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  color: var(--muted);
}
.nf { padding: 60px 0; text-align: center; }
.nf h1 { font-size: 5rem; line-height: 1; letter-spacing: -.04em; color: #d6d9e6; }
.nf p { margin: 10px 0 24px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 44px 48px;
  border-radius: 16px;
  background: var(--navy-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta::after {
  content: "";
  position: absolute; right: -80px; bottom: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 0, .18), transparent 65%);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); font-weight: 700; letter-spacing: -.03em; }
.cta p { max-width: 520px; margin-top: 8px; color: rgba(255, 255, 255, .7); }

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--border); font-size: .9rem; }
.footer__inner {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 44px;
  padding-bottom: 28px;
  text-align: center;
}
.footer .brand { font-size: 1.1rem; }
.footer__nav {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 28px;
  margin-top: 22px;
}
.footer__nav a { color: var(--muted); transition: color .2s; }
.footer__nav a:hover { color: var(--ink); }
.footer__note { max-width: 520px; margin-top: 22px; font-size: .85rem; color: var(--muted); }
.footer__copy {
  width: 100%;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav { display: none; }
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 44px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .section { padding: 40px 0; }
  .section__head { margin-bottom: 28px; }
  .guide { width: 100%; padding: 20px 16px; border-radius: 14px; }
  .guide__title { padding-bottom: 14px; font-size: 1.02rem; }
  .guide__list li { padding: 14px 0; gap: 12px; }
  .guide__list p { font-size: .9rem; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .coupon { padding: 18px 16px; }
  .coupon__value { font-size: 1.7rem; }
  .code { font-size: .92rem; letter-spacing: .06em; height: 46px; }
  .coupon__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .coupon__foot .btn { width: 100%; }
  .uses { justify-content: flex-start; }
  /* 4 categorías: dos arriba y dos abajo. 3: las tres en una línea. */
  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 18px;
    overflow: visible;
  }
  .tabs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tab {
    flex-direction: column;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    padding: 10px 8px;
    font-size: .78rem;
    gap: 4px;
    overflow: visible;
  }
  .tab__name { overflow: visible; text-overflow: unset; overflow-wrap: break-word; }
  .tab i { font-size: .8rem; }
  .tab__count { padding: 0 6px; font-size: .68rem; }
  .cta { flex-direction: column; align-items: stretch; padding: 28px 20px; gap: 20px; }
  .cta .btn { width: 100%; }
  .footer__nav { gap: 14px 18px; }
  .footer__inner { padding-top: 32px; }
}

@media (max-width: 380px) {
  .hero__title { font-size: 1.55rem; }
  .tab { font-size: .72rem; padding: 9px 6px; }
  .section__desc { font-size: .92rem; }
}
