/* ==========================================================================
   MigliorCashback.it - Base Styles
   Mobile-first, fintech palette, zero framework
   ========================================================================== */

/* ── Custom Properties ──────────────────────────────────────────── */
:root {
    /* Header height (usata per offset sticky) */
    --site-header-height: 56px;
    /* Altezza floating bar merchant compatta (usata per scroll-margin) */
    --merchant-sticky-hero-height: 64px;

    /* Palette */
    --color-white: #ffffff;
    --color-bg: #f5f7fa;
    --color-bg-card: #ffffff;
    --color-bg-alt: #eef1f5;

    --color-text-primary: #1a1a2e;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;

    --color-cashback: #00b894; /* Verde teal brillante */
    --color-cashback-light: #e6faf5;
    --color-cashback-dark: #009977;

    --color-accent: #6c5ce7; /* Viola elettrico */
    --color-accent-light: #f0eeff;

    --color-coral: #ff6b6b; /* Solo piccole dosi */
    --color-coral-light: #fff0f0;

    --color-border: #e2e6ed;
    --color-border-light: #f0f2f5;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    --font-size-xs: 0.75rem; /* 12px */
    --font-size-sm: 0.875rem; /* 14px */
    --font-size-base: 1rem; /* 16px */
    --font-size-lg: 1.125rem; /* 18px */
    --font-size-xl: 1.25rem; /* 20px */
    --font-size-2xl: 1.5rem; /* 24px */
    --font-size-3xl: 2rem; /* 32px */

    --line-height: 1.6;
    --line-height-tight: 1.25;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text-primary);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

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

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

ul,
ol {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* ── Typography ─────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: var(--line-height-tight);
    font-weight: 600;
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--font-size-3xl);
}
h2 {
    font-size: var(--font-size-2xl);
}
h3 {
    font-size: var(--font-size-xl);
}

p {
    color: var(--color-text-secondary);
}

/* ── Colors Utility ─────────────────────────────────────────────── */
.text-cashback {
    color: var(--color-cashback);
}
.text-accent {
    color: var(--color-accent);
}
.text-muted {
    color: var(--color-text-muted);
}

.bg-cashback {
    background: var(--color-cashback-light);
}
.bg-accent {
    background: var(--color-accent-light);
}

/* ── Accent highlight ───────────────────────────────────────────── */
.accent {
    color: var(--color-cashback);
}

/* ── Pill badges ───────────────────────────────────────────── */
.pill {
    display: inline-block;
    padding: 0.25em 0.65em;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background-color: #0d6efd;
    border-radius: 999px;
    white-space: nowrap;
    vertical-align: baseline;
}

.pill.green {
    background-color: #00b894;
}

.pill.red {
    background-color: #ff6b6b;
}

.pill.light {
    background-color: #eef1f5;
    color: #6b7280;
}

.pill.amber {
    background-color: #f59e0b;
}

.pill.blue {
    background-color: #0d6efd;
}

.pill.purple {
    background-color: #6c5ce7;
}
