/* =========================================================
   KATALOG OBIEKTÓW — /objects/
========================================================= */

.zwp-object-archive {
    position: relative;
    scroll-margin-top: 90px;
    padding: 80px 0 94px;
    overflow: hidden;
    color: var(--gray-900, #0f172a);
    background:
        radial-gradient(
            circle at 6% 8%,
            rgba(232, 213, 163, 0.16),
            transparent 28%
        ),
        radial-gradient(
            circle at 95% 92%,
            rgba(135, 169, 107, 0.13),
            transparent 31%
        ),
        linear-gradient(
            180deg,
            #f8faf8 0%,
            #f2f6f3 100%
        );
}

.zwp-object-archive *,
.zwp-object-archive *::before,
.zwp-object-archive *::after {
    box-sizing: border-box;
}

.zwp-object-archive__container {
    position: relative;
    z-index: 1;
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

/* =========================================================
   NAGŁÓWEK
========================================================= */

.zwp-object-archive__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 34px;
    margin-bottom: 28px;
}

.zwp-object-archive__headings {
    max-width: 790px;
}

.zwp-object-archive__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 33px;
    padding: 7px 13px;
    margin-bottom: 14px;
    color: var(--agro-green-dark, #2d5a3d);
    background: rgba(74, 124, 89, 0.10);
    border: 1px solid rgba(74, 124, 89, 0.14);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.zwp-object-archive__title {
    margin: 0 0 13px;
    color: var(--gray-900, #0f172a);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 880;
    line-height: 1.1;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.zwp-object-archive__description {
    max-width: 720px;
    margin: 0;
    color: var(--gray-600, #475569);
    font-size: 1rem;
    line-height: 1.76;
}

.zwp-object-archive__summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 150px;
    padding: 17px 19px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 17px;
    box-shadow: 0 9px 23px rgba(15, 23, 42, 0.055);
}

.zwp-object-archive__summary strong {
    color: var(--agro-green-dark, #2d5a3d);
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}

.zwp-object-archive__summary span {
    color: var(--gray-500, #64748b);
    font-size: 0.72rem;
    font-weight: 820;
    text-transform: uppercase;
}

/* =========================================================
   FILTRY
========================================================= */

.zwp-object-filters {
    display: grid;
    grid-template-columns:
        minmax(150px, 0.85fr)
        minmax(190px, 1.08fr)
        minmax(190px, 1.08fr)
        minmax(120px, 0.62fr)
        auto;
    gap: 11px;
    align-items: end;
    padding: 18px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.23);
    border-radius: 19px;
    box-shadow: 0 12px 29px rgba(15, 23, 42, 0.06);
}

.zwp-object-filters__field {
    min-width: 0;
}

.zwp-object-filters__field label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 7px;
    color: var(--gray-600, #475569);
    font-size: 0.69rem;
    font-weight: 820;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.zwp-object-filters__field label i {
    color: var(--agro-green, #4a7c59);
}

.zwp-object-filters__field select {
    width: 100%;
    min-height: 45px;
    padding: 9px 38px 9px 12px;
    color: var(--gray-800, #1e293b);
    background: var(--gray-50, #f8fafc);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 11px;
    font: inherit;
    font-size: 0.79rem;
    font-weight: 720;
    cursor: pointer;
}

.zwp-object-filters__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zwp-object-filters__submit,
.zwp-object-filters__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    padding: 10px 15px;
    border-radius: 11px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 830;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.zwp-object-filters__submit {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--agro-green-dark, #2d5a3d),
            var(--agro-green, #4a7c59)
        );
    border: 1px solid var(--agro-green-dark, #2d5a3d);
    box-shadow: 0 10px 23px rgba(45, 90, 61, 0.18);
    cursor: pointer;
}

.zwp-object-filters__reset {
    color: var(--gray-600, #475569);
    background: #ffffff;
    border: 1px solid var(--gray-200, #e2e8f0);
}

.zwp-object-filters__submit:hover,
.zwp-object-filters__reset:hover {
    transform: translateY(-1px);
}

.zwp-object-filters__submit:hover {
    color: #ffffff;
    background: var(--agro-green-dark, #2d5a3d);
    box-shadow: 0 13px 28px rgba(45, 90, 61, 0.24);
}

.zwp-object-filters__reset:hover {
    color: var(--agro-green-dark, #2d5a3d);
    border-color: rgba(74, 124, 89, 0.30);
}

.zwp-object-filters select:focus-visible,
.zwp-object-filters button:focus-visible,
.zwp-object-filters a:focus-visible {
    outline: 3px solid var(--agro-gold, #c9a227);
    outline-offset: 2px;
}

/* =========================================================
   AKTYWNE FILTRY I INFORMACJA O WYNIKACH
========================================================= */

.zwp-object-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.zwp-object-active-filters__label {
    color: var(--gray-500, #64748b);
    font-size: 0.72rem;
    font-weight: 800;
}

.zwp-object-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    color: var(--agro-green-dark, #2d5a3d);
    background: rgba(74, 124, 89, 0.09);
    border: 1px solid rgba(74, 124, 89, 0.16);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 790;
    text-decoration: none;
}

.zwp-object-filter-chip span {
    font-size: 1rem;
    line-height: 1;
}

.zwp-object-filter-chip:hover {
    color: #ffffff;
    background: var(--agro-green, #4a7c59);
}

.zwp-object-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 2px;
    margin-bottom: 22px;
    color: var(--gray-500, #64748b);
    font-size: 0.75rem;
    font-weight: 720;
}

.zwp-object-results-info strong {
    color: var(--gray-800, #1e293b);
    font-weight: 860;
}

/* =========================================================
   SIATKA I KARTY OBIEKTÓW
========================================================= */

.zwp-object-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.zwp-object-card {
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 21px;
    box-shadow:
        0 13px 32px rgba(15, 23, 42, 0.065);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.zwp-object-card:hover {
    border-color: rgba(74, 124, 89, 0.30);
    box-shadow:
        0 21px 43px rgba(15, 23, 42, 0.11);
    transform: translateY(-5px);
}

.zwp-object-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.zwp-object-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5ede6;
}

.zwp-object-card__image,
.zwp-object-card__placeholder {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.zwp-object-card__image {
    object-fit: cover;
    transition: transform 0.55s ease;
}

.zwp-object-card:hover
.zwp-object-card__image {
    transform: scale(1.045);
}

.zwp-object-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--agro-green, #4a7c59);
    background:
        linear-gradient(
            135deg,
            #dfe8df,
            #edf3ee
        );
    font-size: 2.3rem;
}

.zwp-object-card__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(15, 23, 42, 0.28),
            transparent 52%
        );
    pointer-events: none;
}

.zwp-object-card__category,
.zwp-object-card__rating {
    position: absolute;
    z-index: 2;
    top: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 850;
    backdrop-filter: blur(7px);
}

.zwp-object-card__category {
    left: 14px;
    max-width: calc(100% - 104px);
    overflow: hidden;
    color: var(--agro-earth, #5c4033);
    background: rgba(232, 213, 163, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.38);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zwp-object-card__rating {
    right: 14px;
    gap: 5px;
    color: #ffffff;
    background: rgba(45, 90, 61, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.zwp-object-card__rating i {
    color: var(--agro-wheat, #e8d5a3);
}

.zwp-object-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 255px;
    padding: 22px;
}

.zwp-object-card__location {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--agro-green, #4a7c59);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.4;
}

.zwp-object-card__title {
    display: -webkit-box;
    min-height: 2.75em;
    margin: 0 0 11px;
    overflow: hidden;
    color: var(--gray-900, #0f172a);
    font-size: 1.18rem;
    font-weight: 860;
    line-height: 1.28;
    letter-spacing: -0.025em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.zwp-object-card:hover
.zwp-object-card__title {
    color: var(--agro-green-dark, #2d5a3d);
}

.zwp-object-card__excerpt {
    display: -webkit-box;
    margin-bottom: 18px;
    overflow: hidden;
    color: var(--gray-600, #475569);
    font-size: 0.82rem;
    line-height: 1.67;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.zwp-object-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 15px;
    margin-top: auto;
    color: var(--agro-green-dark, #2d5a3d);
    border-top: 1px solid var(--gray-200, #e2e8f0);
    font-size: 0.75rem;
    font-weight: 850;
}

.zwp-object-card__footer i {
    transition: transform 0.2s ease;
}

.zwp-object-card:hover
.zwp-object-card__footer i {
    transform: translateX(5px);
}

.zwp-object-card__link:focus-visible {
    outline: 3px solid var(--agro-gold, #c9a227);
    outline-offset: -4px;
    border-radius: 21px;
}

/* =========================================================
   PAGINACJA
========================================================= */

.zwp-object-pagination {
    display: flex;
    justify-content: center;
    margin-top: 39px;
}

.zwp-object-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.zwp-object-pagination li {
    margin: 0;
}

.zwp-object-pagination a,
.zwp-object-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 43px;
    min-height: 43px;
    padding: 8px 12px;
    color: var(--gray-700, #334155);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--gray-200, #e2e8f0);
    border-radius: 11px;
    font-size: 0.75rem;
    font-weight: 820;
    text-decoration: none;
}

.zwp-object-pagination a:hover,
.zwp-object-pagination .current {
    color: #ffffff;
    background: var(--agro-green, #4a7c59);
    border-color: var(--agro-green, #4a7c59);
}

.zwp-object-pagination .dots {
    color: var(--gray-400, #94a3b8);
    background: transparent;
    border-color: transparent;
}

/* =========================================================
   BRAK WYNIKÓW
========================================================= */

.zwp-object-empty {
    max-width: 720px;
    padding: 58px 30px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    box-shadow: 0 15px 34px rgba(15, 23, 42, 0.07);
    text-align: center;
}

.zwp-object-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 18px;
    color: var(--agro-green-dark, #2d5a3d);
    background: rgba(74, 124, 89, 0.10);
    border-radius: 19px;
    font-size: 1.55rem;
}

.zwp-object-empty h2 {
    margin: 0 0 10px;
    color: var(--gray-900, #0f172a);
    font-size: 1.6rem;
    font-weight: 860;
}

.zwp-object-empty p {
    margin: 0 0 21px;
    color: var(--gray-600, #475569);
    line-height: 1.7;
}

.zwp-object-empty a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--agro-green, #4a7c59);
    border-radius: 11px;
    font-size: 0.76rem;
    font-weight: 830;
    text-decoration: none;
}

/* =========================================================
   RESPONSYWNOŚĆ
========================================================= */

@media (max-width: 1100px) {
    .zwp-object-filters {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .zwp-object-filters__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

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

@media (max-width: 760px) {
    .zwp-object-archive {
        padding: 64px 0 76px;
    }

    .zwp-object-archive__container {
        width: min(100% - 28px, 1240px);
    }

    .zwp-object-archive__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .zwp-object-archive__summary {
        min-width: 0;
    }

    .zwp-object-filters {
        grid-template-columns: 1fr;
        padding: 15px;
        border-radius: 16px;
    }

    .zwp-object-filters__actions {
        grid-column: auto;
        align-items: stretch;
        flex-direction: column;
    }

    .zwp-object-filters__submit,
    .zwp-object-filters__reset {
        width: 100%;
    }

    .zwp-object-results-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .zwp-object-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .zwp-object-archive__container {
        width: min(100% - 20px, 1240px);
    }

    .zwp-object-card {
        border-radius: 18px;
    }

    .zwp-object-card__body {
        min-height: 235px;
        padding: 19px;
    }

    .zwp-object-pagination
    .prev span,
    .zwp-object-pagination
    .next span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zwp-object-card,
    .zwp-object-card__image,
    .zwp-object-card__footer i,
    .zwp-object-filters__submit,
    .zwp-object-filters__reset {
        transition: none;
    }

    .zwp-object-card:hover,
    .zwp-object-filters__submit:hover,
    .zwp-object-filters__reset:hover {
        transform: none;
    }
}
