.latest-offers-section .section-body {
    margin-top: 26px;
}

.latest-offers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.latest-offers-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(270px, 384px));
    gap: 28px 24px;
    justify-content: center;
}

.latest-offers-grid--compact .latest-offer-card {
    width: 100%;
    max-width: 384px;
    margin: 0 auto;
}

/* The card reads its accent from --offer-accent-color when the page sets one (the marketing
   site maps it to the brand blue), otherwise from the theme's primary colour. */
.latest-offer-card {
    --offer-ink: #162744;
    --offer-muted: #5c6f8c;
    --offer-label: #56688a;
    --offer-line: rgba(18, 32, 56, 0.08);
    --offer-panel: #f5f7fb;
    --offer-accent: var(--offer-accent-color, var(--primary_color));

    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #ffffff;
    border: 1px solid var(--offer-line);
    border-radius: 22px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s ease;
}

.latest-offer-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--offer-accent) 22%, transparent);
}

.latest-offer-card__media {
    position: relative;
    display: block;
    padding: 10px 10px 0;
}

.latest-offer-card__frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2f8 0%, #e2e8f2 100%);
}

.latest-offer-card__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(15, 33, 62, 0.06);
    pointer-events: none;
}

.latest-offer-card__frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.latest-offer-card:hover .latest-offer-card__frame img {
    transform: scale(1.045);
}

.latest-offer-card__badge {
    position: absolute;
    top: 22px;
    left: 22px;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 44px);
    min-height: 26px;
    padding: 4px 11px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
    backdrop-filter: blur(10px) saturate(1.4);
    color: var(--offer-ink);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.09em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-offer-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 18px 20px 20px;
}

.latest-offer-card__heading {
    flex-grow: 1;
}

.latest-offer-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--offer-ink);
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.015em;
    transition: color 0.2s ease;
}

.latest-offer-card__title:hover,
.latest-offer-card__title:focus {
    color: var(--offer-accent);
}

.latest-offer-card__author {
    margin: 4px 0 0;
    color: var(--offer-muted);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.latest-offer-card__author-link {
    color: var(--offer-ink);
    font-weight: 600;
}

.latest-offer-card__author-link:hover,
.latest-offer-card__author-link:focus {
    color: var(--offer-accent);
}

.latest-offer-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    padding: 12px 0;
    border: 1px solid var(--offer-line);
    border-radius: 14px;
    background: var(--offer-panel);
}

.latest-offer-card__stat {
    min-width: 0;
    padding: 0 14px;
}

.latest-offer-card__stat--end {
    border-left: 1px solid var(--offer-line);
}

.latest-offer-card__label {
    display: block;
    margin-bottom: 6px;
    color: var(--offer-label);
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.latest-offer-card__value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    color: var(--offer-ink);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.latest-offer-card__value-accent {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--offer-accent) 10%, #ffffff);
    color: var(--offer-accent);
    font-size: 12px;
    font-weight: 700;
}

.latest-offer-card__refund {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
}

.latest-offer-card__refund::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
}

.latest-offer-card__refund.is-success {
    color: color-mix(in srgb, var(--earnings_color) 75%, #000);
}

.latest-offer-card__refund.is-warning {
    color: #b45309;
}

.latest-offer-card__refund.is-danger {
    color: #dc2626;
}

.latest-offer-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.latest-offer-card__epc {
    min-width: 0;
}

.latest-offer-card__epc-value {
    color: var(--offer-ink);
    font-size: 22px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.latest-offer-card__epc-value span {
    margin-left: 2px;
    color: var(--offer-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.latest-offer-card__cta {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: var(--primary_color);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.latest-offer-card__cta:hover,
.latest-offer-card__cta:focus-visible {
    color: #ffffff;
    background-color: color-mix(in srgb, var(--primary_color) 82%, #000);
    transform: translateY(-1px);
}

.latest-offer-card__cta:focus-visible {
    outline: 2px solid var(--offer-accent);
    outline-offset: 2px;
}

.latest-offer-card__cta i {
    display: inline-flex;
    font-size: 13px;
    transition: transform 0.25s ease;
}

.latest-offer-card__cta:hover i {
    transform: rotate(-20deg);
}

@media (prefers-reduced-motion: reduce) {
    .latest-offer-card,
    .latest-offer-card__frame img,
    .latest-offer-card__cta,
    .latest-offer-card__cta i {
        transition: none;
    }

    .latest-offer-card:hover,
    .latest-offer-card:hover .latest-offer-card__frame img {
        transform: none;
    }
}

@media (max-width: 1399.98px) {
    .latest-offers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .latest-offers-grid,
    .latest-offers-grid--compact {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .latest-offers-grid--compact .latest-offer-card {
        max-width: 440px;
    }
}

@media (max-width: 359.98px) {
    .latest-offer-card__footer {
        flex-direction: column;
        align-items: stretch;
    }
}
