/* Desktop: 2/10 for filters; four cards, each 2/10 of the same outer grid. */
@media (min-width: 1200px) {
    .xleb-catalog--catalog_02 .vue-posts.filter-layout-sidebar {
        grid-template-columns: minmax(0, calc((100% - 4 * var(--catalog-column-gap)) / 5)) minmax(0, 1fr);
        column-gap: var(--catalog-column-gap);
    }

    .xleb-catalog--catalog_02 .vue-posts.filter-layout-sidebar > .xleb-catalog-products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .xleb-catalog--catalog_02 .vue-posts.filter-layout-sidebar > .xleb-catalog-products > .xleb-catalog-card {
        grid-column: span 1 !important; /* Override native vc_col-lg-4 span. */
    }
}

/* Homepage category cards: 12 columns, 6 with tags, 4 without tags. */
@media (min-width: 992px) {
    body.home .catalog-categories--3.xleb-flex-row {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    body.home .catalog-categories--3 > .catalog-category--3 {
        grid-column: span 4;
        min-width: 0;
    }
    body.home .catalog-categories--3 > .catalog-category--3:has(.catalog-category__tag) {
        grid-column: span 6;
    }
}

/* The offers block reuses catalog cards, with four desktop cards per row. */
@media (min-width: 1200px) {
    .decfort-offers.xleb-catalog .vue-posts .xleb-catalog-products > .xleb-catalog-card {
        grid-column: span 3 !important;
    }
}

/* Types from editable xcat_badge terms; shared Decfort badge palette. */
.xleb-catalog-card .xleb-catalog-card__badge.rasprodazha {background:#28a745;color:#fff}
.xleb-catalog-card .xleb-catalog-card__badge.novinka {background:#de224e;color:#fff}

/* Keep the original responsive inset, on the left side of the image. */
.xleb-catalog-card .xleb-catalog-card__badges {left:var(--gapX3);right:auto}
@media (max-width:767px) {
    .xleb-catalog-card .xleb-catalog-card__badges {left:var(--gapX2)}
}

.xleb-catalog-card {position:relative}
.xleb-catalog-card > .df-catalog-card-link {display:contents;color:inherit;text-decoration:none}
.xleb-catalog-card > .df-card-wishlist {position:absolute;top:12px;right:12px;z-index:2;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;margin:0;border:0;background:transparent;color:#fff;cursor:pointer;filter:drop-shadow(0 1px 2px rgba(0,0,0,.45))}
.df-card-wishlist i {font-size:24px;line-height:1}
.xleb-catalog-card > .df-card-wishlist.is-saved {color:#de224e}
.xleb-catalog-card > .df-card-wishlist:disabled {cursor:wait;opacity:.6}
.xleb-catalog-card > .df-card-wishlist:focus-visible {outline:2px solid #de224e;outline-offset:4px;border-radius:2px}
.xleb-catalog-card__badges {max-width:calc(100% - 60px)}
/* Preserve the existing child-theme image geometry with the separate card link. */
.xleb-catalog-card > .df-catalog-card-link > .xleb-catalog-card__image {aspect-ratio:4/5;border-radius:var(--roundedS)}
