/* ============================================================
   COMPARATORE CARTE — Main Stylesheet
   ============================================================ */

:root {
  --primary:       #1a56db;
  --primary-dark:  #1343b0;
  --primary-light: #e8f0fe;
  --accent:        #f59e0b;
  --accent-dark:   #d97706;
  --success:       #10b981;
  --danger:        #ef4444;
  --text:          #111827;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f9fafb;
  --white:         #ffffff;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.13);
  --radius:        12px;
  --radius-sm:     8px;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem;    font-weight: 600; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 3.5rem 0; }
.section--alt { background: var(--white); }

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.navbar__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
.navbar__brand span { color: var(--accent); }
.navbar__brand-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
}
.navbar__links {
  display: flex; gap: .25rem;
}
.navbar__links a {
  padding: .45rem .85rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.navbar__links a:hover,
.navbar__links a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}
.navbar__cta {
  background: var(--primary);
  color: #fff !important;
  padding: .5rem 1.1rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: background .15s !important;
}
.navbar__cta:hover { background: var(--primary-dark) !important; }
.navbar__hamburger { display: none; cursor: pointer; font-size: 1.4rem; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a56db 0%, #1e3a8a 60%, #1e1b4b 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__title { margin-bottom: 1rem; }
.hero__title span { color: var(--accent); }
.hero__subtitle {
  font-size: 1.1rem;
  opacity: .88;
  margin-bottom: 2rem;
  max-width: 480px;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.hero__stat {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  backdrop-filter: blur(4px);
}
.hero__stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}
.hero__stat-label { font-size: .8rem; opacity: .8; }

/* Hero visual card stack */
.hero__visual {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  position: relative;
}
.hero__card-preview {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(8px);
  transition: transform .2s;
}
.hero__card-preview:hover { transform: translateX(6px); }
.hero__card-preview img {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  padding: 4px;
}
.hero__card-preview-info { flex: 1; }
.hero__card-preview-name { font-weight: 600; font-size: .95rem; }
.hero__card-preview-bonus { font-size: .8rem; opacity: .8; }
.hero__card-preview-badge {
  background: var(--accent);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 20px;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }

.btn-accent {
  background: var(--accent);
  color: #000;
}
.btn-accent:hover { background: var(--accent-dark); text-decoration: none; }

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.5);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; }

.btn-ghost {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.btn-lg { padding: .9rem 1.8rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem .9rem; font-size: .83rem; }

.btn-affiliate {
  background: var(--success);
  color: #fff;
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.btn-affiliate:hover { background: #059669; color: #fff; text-decoration: none; }

/* ── BADGES ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-blue   { background: #dbeafe; color: #1e3a8a; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray   { background: #f3f4f6; color: #374151; }

/* ── FILTERS BAR ──────────────────────────────────────────── */
.filters {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.filters__label { font-weight: 600; font-size: .88rem; color: var(--text-muted); }
.filter-btn {
  padding: .4rem 1rem;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--white);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  color: var(--text);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.sort-select {
  padding: .4rem .8rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--white);
  font-size: .85rem;
  cursor: pointer;
  margin-left: auto;
  color: var(--text);
}
.sort-select:focus { outline: none; border-color: var(--primary); }

/* ── PRODUCT GRID ─────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

/* ── PRODUCT CARD ─────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.product-card__badge-wrap {
  position: absolute;
  top: 1rem; right: 1rem;
}
.product-card__header {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}
.product-card__logo {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
  padding: 6px;
  background: var(--white);
  flex-shrink: 0;
}
.product-card__logo-fallback {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}
.product-card__title-group { flex: 1; min-width: 0; }
.product-card__name { font-size: 1rem; font-weight: 700; }
.product-card__sub  { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.product-card__stars { color: var(--accent); font-size: .85rem; }
.product-card__score { font-size: .8rem; color: var(--text-muted); margin-left: .25rem; }

/* bonus row */
.product-card__bonuses {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}
.bonus-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.bonus-row__icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.bonus-row__icon--reg  { background: #d1fae5; }
.bonus-row__icon--dep  { background: #dbeafe; }
.bonus-row__icon--ref  { background: #fef3c7; }
.bonus-row__icon--promo { background: #ede9fe; }
.bonus-row__info { flex: 1; }
.bonus-row__label { font-size: .72rem; font-weight: 600; text-transform: uppercase;
                     letter-spacing: .04em; color: var(--text-muted); }
.bonus-row__value { font-size: .92rem; font-weight: 700; color: var(--text); }
.bonus-row__extra  { font-size: .78rem; color: var(--text-muted); }

/* pros/cons */
.product-card__details {
  padding: 0 1.25rem 1rem;
}
.product-card__detail-list { display: flex; flex-direction: column; gap: .3rem; }
.product-card__detail-list li {
  font-size: .83rem;
  padding-left: 1.2rem;
  position: relative;
  color: var(--text-muted);
}
.product-card__detail-list li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--success);
  font-weight: 700;
}
.product-card__detail-list.cons li::before {
  content: '–';
  color: var(--danger);
}

/* footer */
.product-card__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.product-card__fee {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
}
.product-card__fee span:first-child { color: var(--text-muted); }
.product-card__fee span:last-child  { font-weight: 600; }

/* ── REFERRAL TABLE ───────────────────────────────────────── */
.ref-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}
.ref-table th {
  background: var(--primary);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .9rem 1rem;
  text-align: left;
  white-space: nowrap;
}
.ref-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  vertical-align: middle;
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table tr:hover td { background: var(--bg); }
.ref-table__logo {
  display: flex; align-items: center; gap: .7rem; font-weight: 600;
}
.ref-table__logo img {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); object-fit: contain; padding: 4px;
}
.bonus-pill {
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
  padding: .2rem .7rem;
  border-radius: 20px;
  font-size: .82rem;
  display: inline-block;
}

/* ── FEATURED CARDS (homepage) ────────────────────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.featured-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: var(--text);
}
.featured-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.featured-card__logo {
  width: 44px; height: 44px;
  border-radius: 8px; border: 1px solid var(--border);
  object-fit: contain; padding: 5px; flex-shrink: 0;
}
.featured-card__body { flex: 1; }
.featured-card__name { font-weight: 700; font-size: .95rem; }
.featured-card__bonus { font-size: .82rem; color: var(--success); font-weight: 600; margin-top: 2px; }
.featured-card__cat { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* ── CATEGORY CARDS (homepage) ───────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); text-decoration: none; }
.cat-card__icon {
  font-size: 2.2rem;
  margin-bottom: .75rem;
  display: block;
}
.cat-card__name { font-weight: 700; font-size: 1rem; }
.cat-card__desc { font-size: .82rem; color: var(--text-muted); margin-top: .35rem; }
.cat-card__count { margin-top: .75rem; }

/* ── HOW IT WORKS ─────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  counter-reset: steps;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  counter-increment: steps;
  position: relative;
}
.step-card::before {
  content: counter(steps);
  position: absolute;
  top: -1rem; left: 50%; transform: translateX(-50%);
  width: 2rem; height: 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
  line-height: 2rem;
  text-align: center;
}
.step-card__icon { font-size: 2rem; margin-bottom: .75rem; margin-top: .5rem; }
.step-card__title { font-weight: 700; margin-bottom: .4rem; }
.step-card__desc { font-size: .88rem; color: var(--text-muted); }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
  color: #fff;
  padding: 3rem 0;
}
.page-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page-header p  { opacity: .85; margin-top: .5rem; font-size: 1.05rem; }
.page-header__meta { display: flex; gap: 1.5rem; margin-top: 1.25rem; flex-wrap: wrap; }
.page-header__meta-item {
  display: flex; align-items: center; gap: .4rem;
  font-size: .88rem; opacity: .9;
}

/* ── DISCLAIMER ───────────────────────────────────────────── */
.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  font-size: .82rem;
  color: #92400e;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.footer {
  background: #111827;
  color: #9ca3af;
  padding: 3rem 0 1.5rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer__brand { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: .75rem; }
.footer__desc { font-size: .85rem; line-height: 1.7; }
.footer__heading { font-weight: 700; color: #fff; margin-bottom: 1rem; font-size: .9rem; }
.footer__links li { margin-bottom: .5rem; }
.footer__links a { color: #9ca3af; font-size: .85rem; }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
}
.footer__bottom a { color: #9ca3af; }
.footer__bottom a:hover { color: #fff; }

/* ── SECTION HEADERS ──────────────────────────────────────── */
.section-header { margin-bottom: 2rem; }
.section-header__label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .25rem .75rem;
  border-radius: 20px;
  margin-bottom: .6rem;
}
.section-header h2 { margin-bottom: .5rem; }
.section-header p   { color: var(--text-muted); max-width: 560px; }

/* ── RESULTS COUNT ────────────────────────────────────────── */
.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: .88rem;
  color: var(--text-muted);
}
.results-meta strong { color: var(--text); }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── TOAST / INFO BOXES ───────────────────────────────────── */
.info-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  font-size: .88rem;
  margin-bottom: 1.5rem;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .navbar__links { display: none; }
  .navbar__hamburger { display: block; }
  .navbar__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: .75rem;
    z-index: 99;
  }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .ref-table th, .ref-table td { font-size: .78rem; padding: .65rem .75rem; }
}
@media (max-width: 380px) {
  .hero__stats { grid-template-columns: 1fr; }
}
