:root {
    --page-bg: #fffaf7;
    --surface: #ffffff;
    --surface-alt: #fff3ef;
    --text: #1f1a17;
    --muted: #6f625a;
    --border: #eddcd4;
    --accent: #d45d79;
    --accent-strong: #bb4762;
    --accent-soft: #ffe6eb;
    --success-soft: #eefaf1;
    --shadow: 0 18px 45px rgba(84, 57, 45, 0.08);
    --radius: 24px;
    --radius-sm: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: linear-gradient(180deg, #fffaf7 0%, #fffdfb 100%);
    color: var(--text);
}

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

button {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
}

.topbar,
.page {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
}

.brand {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0;
}

.topbar-nav {
    display: none;
    gap: 22px;
    color: var(--muted);
}

.topbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 600;
}

.page {
    padding-bottom: 48px;
}

.hero {
    display: grid;
    gap: 18px;
    padding: 12px 0 14px;
}

.hero-copy,
.hero-panel,
.stat-card,
.offer-card,
.store-card,
.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 28px 22px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 4.2rem);
    line-height: 1.02;
}

.hero p {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.button-primary {
    background: var(--accent);
    color: #fff;
}

.button-primary:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.button-secondary {
    background: var(--surface-alt);
    border-color: var(--border);
}

.button-compact {
    min-height: 42px;
    padding: 0 14px;
}

.hero-panel {
    padding: 22px;
    background: linear-gradient(180deg, #fff7f3 0%, #fff 100%);
}

.hero-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.hero-gallery-card {
    position: relative;
    overflow: hidden;
    min-height: 140px;
    border-radius: 18px;
}

.hero-gallery-card img,
.offer-media img,
.store-cover img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-gallery-card::after,
.offer-media::after,
.store-cover::after,
.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(19, 14, 12, 0.04) 0%, rgba(19, 14, 12, 0.46) 100%);
}

.hero-gallery-card span {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 1;
    color: #fff;
    font-weight: 700;
}

.hero-panel-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero-panel-head span {
    color: var(--muted);
}

.hero-timeline {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    gap: 12px;
}

.hero-timeline li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.hero-timeline li:first-child {
    border-top: 0;
    padding-top: 0;
}

.stats-grid,
.store-grid,
.category-grid {
    display: grid;
    gap: 14px;
}

.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.stat-card {
    padding: 20px 16px;
}

.stat-card span,
.offer-description,
.store-card p,
.category-card span,
.expires,
.store-name {
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 1.5rem;
}

.stat-card p {
    margin: 8px 0 0;
    line-height: 1.45;
}

.section {
    margin-top: 34px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text);
    cursor: pointer;
}

.filter-chip.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.offers-list {
    display: grid;
    gap: 14px;
}

.offer-card {
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.offer-card.is-hidden {
    display: none;
}

.offer-media,
.store-cover,
.category-card {
    position: relative;
    overflow: hidden;
}

.offer-media {
    height: 176px;
    border-radius: 18px;
    margin-bottom: 16px;
}

.offer-topline,
.offer-footer,
.store-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.offer-main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: start;
    margin-top: 14px;
}

.offer-title {
    display: block;
    font-size: 1.05rem;
    line-height: 1.35;
}

.offer-description {
    margin: 10px 0 0;
    line-height: 1.5;
}

.discount-badge,
.promo-box,
.store-badge,
.cashback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 700;
}

.discount-badge {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.offer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff7df;
    color: #836117;
    font-size: 0.9rem;
    font-weight: 600;
}

.offer-footer {
    margin-top: 18px;
}

.promo-box {
    background: #f7f5f3;
    border: 1px dashed #c8b7ae;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.promo-box:hover {
    border-color: var(--accent);
    background: #fff3f5;
    transform: translateY(-1px);
}

.promo-box-muted {
    color: var(--muted);
    cursor: default;
}

.store-grid,
.category-grid {
    grid-template-columns: 1fr;
}

.store-card,
.category-card {
    padding: 18px;
}

.store-cover {
    height: 180px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.store-badge {
    background: var(--surface-alt);
    color: var(--accent-strong);
}

.cashback {
    background: var(--success-soft);
    color: #2f7a4a;
}

.store-card strong,
.category-card strong {
    display: block;
    margin-top: 18px;
    font-size: 1.05rem;
}

.store-card p {
    margin: 8px 0 0;
}

.store-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
}

.store-link {
    display: inline-flex;
    color: var(--accent-strong);
    font-weight: 700;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.store-link-muted {
    color: var(--muted);
}

.category-card {
    padding: 0;
    text-align: left;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
}

.category-card img {
    height: 170px;
}

.category-card-copy {
    padding: 16px 18px 18px;
}

.category-card strong {
    margin-top: 0;
    color: var(--text);
}

.category-card span {
    display: block;
    margin-top: 10px;
    margin-bottom: 0;
    color: var(--muted);
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    min-width: 220px;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(31, 26, 23, 0.92);
    color: #fff;
    text-align: center;
    box-shadow: 0 18px 45px rgba(31, 26, 23, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (min-width: 720px) {
    .topbar-nav {
        display: flex;
    }

    .hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
        align-items: stretch;
        padding-top: 18px;
    }

    .stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .store-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .topbar,
    .page {
        width: min(calc(100% - 56px), var(--container));
    }

    .hero-copy {
        padding: 44px;
    }

    .hero-panel {
        padding: 28px;
    }

    .offers-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
