/* ==========================================================================
   Ofertas Premium — CupomFacil Commerce Content System
   Namespace: cf-offer-
   Mobile-first, editorial commerce, shopping assistant aesthetic
   ========================================================================== */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --cfo-navy:          #1d2784;
  --cfo-navy-dark:     #141d6a;
  --cfo-navy-light:    #eef0fb;
  --cfo-green:         #0c7a58;
  --cfo-green-light:   #ecf7f2;
  --cfo-amber:         #b45309;
  --cfo-amber-light:   #fffbeb;
  --cfo-text:          #1a2236;
  --cfo-muted:         #64748b;
  --cfo-border:        rgba(29, 39, 132, 0.11);
  --cfo-border-hover:  rgba(29, 39, 132, 0.22);
  --cfo-shadow:        0 1px 2px rgba(0, 0, 0, 0.04), 0 3px 10px rgba(29, 39, 132, 0.06);
  --cfo-shadow-hover:  0 2px 6px rgba(0, 0, 0, 0.07), 0 8px 22px rgba(29, 39, 132, 0.10);
  --cfo-radius:        12px;
  --cfo-radius-sm:     8px;
  --cfo-radius-pill:   999px;
  --cfo-ease:          0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base Card ───────────────────────────────────────────────────────────── */
.cf-offer-card {
  background: #fff;
  border-radius: var(--cfo-radius);
  border: 1px solid var(--cfo-border);
  box-shadow: var(--cfo-shadow);
  margin: 0 0 16px;
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--cfo-ease), border-color var(--cfo-ease), transform var(--cfo-ease);
}

.cf-offer-card:hover {
  box-shadow: var(--cfo-shadow-hover);
  border-color: var(--cfo-border-hover);
}

/* Featured accent — left stripe */
.cf-offer-card--featured {
  border-left: 3px solid var(--cfo-navy);
}

/* ── Inner Layout (grid) ─────────────────────────────────────────────────── */
.cf-offer-card__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'logo content cta';
  align-items: center;
  gap: 0 16px;
  padding: 16px 18px;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.cf-offer-card__logo {
  grid-area: logo;
  width: 72px;
  height: 56px;
  border-radius: var(--cfo-radius-sm);
  background: #f8f9ff;
  border: 1px solid rgba(29, 39, 132, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cf-offer-card__logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.cf-offer-card__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 7px;
  display: block;
  float: none !important;
  margin: 0 !important;
  border-radius: 0;
  box-shadow: none;
}

/* ── Content ─────────────────────────────────────────────────────────────── */
.cf-offer-card__content {
  grid-area: content;
  min-width: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.cf-offer-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.cf-offer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--cfo-radius-pill);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.6;
}

.cf-offer-badge--active {
  color: var(--cfo-green);
  background: var(--cfo-green-light);
  border: 1px solid rgba(12, 122, 88, 0.14);
}

.cf-offer-badge--top {
  color: var(--cfo-navy);
  background: var(--cfo-navy-light);
  border: 1px solid rgba(29, 39, 132, 0.12);
}

.cf-offer-badge--proof {
  color: var(--cfo-amber);
  background: var(--cfo-amber-light);
  border: 1px solid rgba(180, 83, 9, 0.13);
}

.cf-offer-badge--expired {
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.cf-offer-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cfo-text);
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Description ─────────────────────────────────────────────────────────── */
.cf-offer-card__desc {
  font-size: 0.82rem;
  color: var(--cfo-muted);
  line-height: 1.45;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ── Trust indicator ─────────────────────────────────────────────────────── */
.cf-offer-card__trust {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cfo-green);
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

.cf-offer-card__trust svg {
  flex-shrink: 0;
  opacity: 0.9;
}

/* ── CTA Area ────────────────────────────────────────────────────────────── */
.cf-offer-card__cta {
  grid-area: cta;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── CTA Button ──────────────────────────────────────────────────────────── */
.cf-offer-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 128px;
  min-height: 40px;
  padding: 0 18px !important;
  background: var(--cfo-navy) !important;
  color: #fff !important;
  border-radius: var(--cfo-radius-sm);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  border: none !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(29, 39, 132, 0.18);
  transition: filter var(--cfo-ease), transform var(--cfo-ease), box-shadow var(--cfo-ease);
  line-height: 1.2 !important;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  vertical-align: middle;
}

.cf-offer-btn:hover,
.cf-offer-btn:focus {
  color: #fff !important;
  text-decoration: none !important;
  filter: brightness(0.88);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 39, 132, 0.26);
  outline: none;
}

.cf-offer-btn:active {
  transform: translateY(0);
  filter: brightness(0.82);
}

/* Code reveal variant */
.cf-offer-btn--code {
  background: #fffce7 !important;
  color: #1a2236 !important;
  border: 1.5px dashed var(--cfo-navy) !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.07em;
  box-shadow: none;
}

.cf-offer-btn--code:hover,
.cf-offer-btn--code:focus {
  background: #fff9c4 !important;
  color: #1a2236 !important;
  filter: none;
  transform: none;
  box-shadow: none;
}

/* ── Expiry ──────────────────────────────────────────────────────────────── */
.cf-offer-card__expiry {
  font-size: 0.67rem;
  color: #dc2626;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  line-height: 1.4;
}

/* ── Hero variant ────────────────────────────────────────────────────────── */
.cf-offer-card--hero {
  border-left: 4px solid var(--cfo-navy);
  background: linear-gradient(105deg, #f8f9ff 0%, #fff 55%);
  margin-bottom: 20px;
}

.cf-offer-card--hero .cf-offer-card__title {
  font-size: 1.06rem;
  white-space: normal;
}

.cf-offer-card--hero .cf-offer-card__desc {
  -webkit-line-clamp: 3;
}

.cf-offer-card--hero .cf-offer-btn {
  min-width: 148px;
  min-height: 46px;
  font-size: 0.78rem;
}

.cf-offer-card--hero .cf-offer-card__logo {
  width: 84px;
  height: 66px;
}

/* ── Compact variant ─────────────────────────────────────────────────────── */
.cf-offer-card--compact {
  margin: 0 0 10px;
}

.cf-offer-card--compact .cf-offer-card__inner {
  padding: 10px 13px;
  gap: 0 10px;
}

.cf-offer-card--compact .cf-offer-card__logo {
  width: 50px;
  height: 40px;
}

.cf-offer-card--compact .cf-offer-card__title {
  font-size: 0.83rem;
}

.cf-offer-card--compact .cf-offer-card__desc {
  font-size: 0.75rem;
  -webkit-line-clamp: 1;
  margin-bottom: 3px;
}

.cf-offer-card--compact .cf-offer-card__trust {
  font-size: 0.63rem;
}

.cf-offer-card--compact .cf-offer-badge {
  font-size: 0.58rem;
  padding: 1px 6px;
}

.cf-offer-card--compact .cf-offer-card__badges {
  margin-bottom: 4px;
}

.cf-offer-card--compact .cf-offer-btn {
  min-width: 96px;
  min-height: 34px;
  font-size: 0.66rem;
  padding: 0 11px !important;
}

/* ── Minimal variant ─────────────────────────────────────────────────────── */
.cf-offer-card--minimal {
  border: none;
  box-shadow: none;
  border-radius: var(--cfo-radius-sm);
  background: #f8f9ff;
  margin: 0 0 8px;
}

.cf-offer-card--minimal:hover {
  box-shadow: var(--cfo-shadow);
}

.cf-offer-card--minimal .cf-offer-card__inner {
  padding: 10px 12px;
  gap: 0 10px;
}

.cf-offer-card--minimal .cf-offer-card__logo {
  width: 44px;
  height: 36px;
  background: #fff;
}

.cf-offer-card--minimal .cf-offer-card__title {
  font-size: 0.80rem;
}

.cf-offer-card--minimal .cf-offer-card__badges,
.cf-offer-card--minimal .cf-offer-card__trust {
  display: none;
}

.cf-offer-card--minimal .cf-offer-card__desc {
  font-size: 0.72rem;
  -webkit-line-clamp: 1;
  margin-bottom: 0;
}

.cf-offer-card--minimal .cf-offer-btn {
  min-width: 84px;
  min-height: 30px;
  font-size: 0.63rem;
  padding: 0 10px !important;
  box-shadow: none;
}

/* ── No-logo layout (2-col grid) ─────────────────────────────────────────── */
.cf-offer-card--no-logo .cf-offer-card__inner {
  grid-template-columns: 1fr auto;
  grid-template-areas: 'content cta';
}

/* ── Pointer-events: span inside clickable card ──────────────────────────── */
.cf-offer-card__content .cf-offer-card__title,
.cf-offer-card__content .cf-offer-card__desc,
.cf-offer-card__content .cf-offer-card__trust,
.cf-offer-card__content .cf-offer-card__badges {
  pointer-events: none;
}

/* ── Mobile-first responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {

  /* Card COM logo: logo + content / cta abaixo */
  .cf-offer-card__inner {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      'logo content'
      '.    cta';
    gap: 10px 12px;
    padding: 14px 14px;
  }

  /* Card SEM logo: coluna única, botão abaixo em largura total */
  .cf-offer-card--no-logo .cf-offer-card__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      'content'
      'cta';
    gap: 10px 0;
  }

  .cf-offer-card--no-logo .cf-offer-card__cta {
    align-items: stretch;
    flex-direction: column;
  }

  .cf-offer-card--no-logo .cf-offer-btn {
    width: 100%;
    flex: none;
  }

  /* Badges sempre em linha única (não quebram) */
  .cf-offer-card__badges {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .cf-offer-badge {
    flex-shrink: 0;
  }

  .cf-offer-card__title {
    white-space: normal;
    font-size: 0.90rem;
  }

  .cf-offer-card__cta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cf-offer-btn {
    min-width: 0;
    flex: 1;
    min-height: 44px;
    font-size: 0.76rem;
  }

  /* Hero on mobile */
  .cf-offer-card--hero .cf-offer-card__inner {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      'logo content'
      '.    cta';
  }

  .cf-offer-card--hero .cf-offer-btn {
    min-height: 44px;
    flex: 1;
  }

  /* Compact on mobile */
  .cf-offer-card--compact .cf-offer-card__inner {
    padding: 10px 12px;
  }

  .cf-offer-card--compact .cf-offer-btn {
    min-height: 40px;
  }

  /* Minimal on mobile */
  .cf-offer-card--minimal .cf-offer-card__inner {
    padding: 9px 11px;
  }
}

/* ==========================================================================
   Home — Hero Editorial
   ========================================================================== */

/* Hero visível apenas em mobile */
@media (min-width: 769px) {
  .cf-home-hero { display: none; }
}

.cf-home-hero {
  background: linear-gradient(135deg, #f0f2fc 0%, #f6f7fb 55%, #fff 100%);
  border-radius: 16px;
  padding: 36px 32px 30px;
  margin: 0 0 28px;
  border: 1px solid rgba(29, 39, 132, 0.08);
  position: relative;
  overflow: hidden;
}

.cf-home-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(29, 39, 132, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cf-home-hero__title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #172033;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
  padding: 0;
  text-align: left;
}

.cf-home-hero__sub {
  font-size: 0.92rem;
  color: #4a5568;
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 560px;
}

.cf-home-hero__benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 22px;
}

.cf-home-hero__benefit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1d2784;
}

.cf-home-hero__benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(29, 39, 132, 0.10);
  font-size: 0.65rem;
  font-style: normal;
  flex-shrink: 0;
}

.cf-home-hero__search {
  display: flex;
  gap: 8px;
  max-width: 460px;
}

.cf-home-hero__search-input {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid rgba(29, 39, 132, 0.18);
  padding: 0 14px;
  font-size: 0.88rem;
  color: #172033;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.cf-home-hero__search-input:focus {
  border-color: #1d2784;
}

.cf-home-hero__search-btn {
  height: 44px;
  padding: 0 20px;
  background: #1d2784;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s;
}

.cf-home-hero__search-btn:hover {
  filter: brightness(0.88);
}

@media (max-width: 640px) {
  .cf-home-hero {
    padding: 24px 18px 22px;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .cf-home-hero__title {
    font-size: 1.18rem;
  }

  .cf-home-hero__sub {
    font-size: 0.87rem;
  }

  .cf-home-hero__search {
    flex-direction: column;
    max-width: 100%;
  }

  .cf-home-hero__search-btn {
    width: 100%;
  }
}

/* ==========================================================================
   Home — Section Header
   ========================================================================== */

.cf-section-header {
  text-align: center;
  margin: 0 0 24px;
}

.cf-section-header__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #172033;
  margin: 0 0 6px;
  letter-spacing: -0.2px;
  display: inline-block;
  position: relative;
  padding-bottom: 8px;
}

.cf-section-header__title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 36px;
  height: 3px;
  background: #1d2784;
  border-radius: 2px;
}

.cf-section-header__sub {
  font-size: 0.84rem;
  color: #64748b;
  margin: 10px auto 0;
  max-width: 520px;
  line-height: 1.5;
}

/* ==========================================================================
   Home — Store Cards (cf-store-card)
   ========================================================================== */

.cf-store-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 0 0 4px;
}

.cf-store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(29, 39, 132, 0.09);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 14px 10px 12px;
  text-decoration: none !important;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  text-align: center;
}

.cf-store-card:hover {
  box-shadow: 0 4px 14px rgba(29, 39, 132, 0.12);
  border-color: rgba(29, 39, 132, 0.2);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none !important;
}

.cf-store-card__img-wrap {
  width: 72px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.cf-store-card__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  float: none !important;
  background: none;
}

.cf-store-card__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1a2236;
  line-height: 1.3;
  margin-bottom: 4px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cf-store-card__meta {
  display: none;
}

@media (max-width: 991px) {
  .cf-store-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .cf-store-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .cf-store-card {
    padding: 11px 8px 10px;
    border-radius: 10px;
  }

  .cf-store-card__img-wrap {
    width: 56px;
    height: 40px;
    margin-bottom: 6px;
  }

  .cf-store-card__name {
    font-size: 0.68rem;
  }

  .cf-store-card__meta {
    font-size: 0.59rem;
  }
}

/* ==========================================================================
   Newsletter — Premium
   ========================================================================== */

.cf-newsletter-premium {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
  border: 1px solid rgba(29, 39, 132, 0.10);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(29, 39, 132, 0.07);
  padding: 28px 28px 22px;
  max-width: 680px;
  margin: 0 auto;
}

.cf-newsletter-premium__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.cf-newsletter-premium__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(29, 39, 132, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cf-newsletter-premium__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #172033;
  margin: 0 0 4px;
  line-height: 1.3;
}

.cf-newsletter-premium__sub {
  font-size: 0.83rem;
  color: #4a5568;
  margin: 0;
  line-height: 1.45;
}

.cf-newsletter-premium__row {
  display: flex;
  gap: 10px;
}

.cf-newsletter-premium__input {
  flex: 1;
  height: 46px;
  border-radius: 10px;
  border: 1.5px solid rgba(29, 39, 132, 0.15);
  padding: 0 14px;
  font-size: 0.88rem;
  color: #172033;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.cf-newsletter-premium__input:focus {
  border-color: #1d2784;
  box-shadow: 0 0 0 3px rgba(29, 39, 132, 0.10);
}

.cf-newsletter-premium__btn {
  height: 46px;
  padding: 0 22px;
  background: #1d2784;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.03em;
  transition: filter 0.15s;
}

.cf-newsletter-premium__btn:hover {
  filter: brightness(0.88);
  background: #1d2784;
}

.cf-newsletter-premium__fineprint {
  margin-top: 12px;
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.4;
}

.cf-newsletter-premium__fineprint a {
  color: #1d2784;
  font-weight: 600;
  text-decoration: none;
}

.cf-newsletter-premium__fineprint a:hover {
  text-decoration: underline;
}

@media (max-width: 576px) {
  .cf-newsletter-premium {
    padding: 20px 16px 18px;
  }

  .cf-newsletter-premium__row {
    flex-direction: column;
  }

  .cf-newsletter-premium__btn {
    width: 100%;
    height: 48px;
  }

  .cf-newsletter-premium__title {
    font-size: 0.96rem;
  }
}
