/* ─── OFFERS (Otodom listings) ───────────────────────────────────────────────
   Card grid for the live Otodom offers. Geometry and colour come from the
   tokens in main.css so the section sits with the rest of the page.
   ──────────────────────────────────────────────────────────────────────────── */

.offers__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-double);
    list-style: none;
    margin: 0;
    padding: 0;
}

.offer {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--clr-surface);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px hsl(11 57% 6% / 12%);
}

/* ─── MEDIA ─────────────────────────────────────────────────────────────── */

.offer__media {
    position: relative;
    margin: 0;
    background-color: var(--clr-surface-alt);
}

.offer__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.offer__badges {
    position: absolute;
    inset-block-start: var(--space-half);
    inset-inline-start: var(--space-half);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-quarter);
}

.offer__badge {
    padding: 0.2rem var(--space-half);
    border-radius: var(--radius-pill);
    background-color: var(--clr-surface);
    color: var(--clr-text);
    font-size: var(--font-size-small);
    font-weight: 600;
    line-height: 1.4;
}

.offer__badge--exclusive {
    background-color: var(--clr-brand);
    color: var(--clr-text-inverse);
}

/* ─── BODY ──────────────────────────────────────────────────────────────── */

.offer__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-half);
    padding: var(--space-normal);
    /* Pushes the price to the bottom so prices line up across the row. */
    flex: 1;
}

.offer__title {
    font-family: var(--font-display);
    font-size: var(--font-size-mid);
    line-height: var(--line-height-tight);
    margin: 0;
}

.offer__link {
    color: inherit;
    text-decoration: none;
}

/* Stretches the title link over the whole card — one hit area, one a11y name. */
.offer__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.offer__link:hover {
    color: var(--clr-brand);
}

.offer__link:focus-visible {
    outline: 2px solid var(--clr-brand);
    outline-offset: 2px;
}

.offer__location {
    margin: 0;
    color: var(--clr-muted);
    font-size: var(--font-size-small);
}

.offer__params {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-half) var(--space-normal);
    list-style: none;
    margin: 0;
    padding-block: var(--space-half);
    padding-inline: 0;
    border-block-start: 1px solid var(--clr-line);
    font-size: var(--font-size-small);
}

.offer__params:empty {
    display: none;
}

.offer__params li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-weight: 600;
}

.offer__param-label {
    color: var(--clr-muted);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.offer__price {
    margin: 0;
    margin-block-start: auto;
    color: var(--clr-brand);
    font-size: var(--font-size-mid);
    font-weight: 700;
    line-height: var(--line-height-tight);
}

.offer__price-unit {
    display: block;
    color: var(--clr-muted);
    font-size: var(--font-size-small);
    font-weight: 400;
}

.offers__more {
    margin: 0;
    margin-block-start: var(--space-section);
    text-align: center;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */

@media screen and (max-width: 56rem) {
    .offers__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 34rem) {
    .offers__grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .offer {
        transition: none;
    }

    .offer:hover {
        transform: none;
    }
}
