/* ZieloneDrzewko.pl 2.48
 * Kompaktowe sekcje produktowe strony głównej - około 20% mniejsze,
 * z układem 5/4/3/2 kolumn i poziomym swipe na małym ekranie.
 */

.home-products,
.products-section,
.product-section,
.section-products,
.home-product-section,
[data-home-products] {
    padding-top: 18px;
    padding-bottom: 24px;
}

.home-products .products-grid,
.products-section .products-grid,
.product-section .products-grid,
.section-products .products-grid,
.home-product-section .products-grid,
[data-home-products] .products-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.home-products .product-card,
.products-section .product-card,
.product-section .product-card,
.section-products .product-card,
.home-product-section .product-card,
[data-home-products] .product-card,
.products-grid .product-card,
.product-slider .product-card {
    min-width: 0;
    border-radius: 14px;
}

.home-products .product-card__image,
.products-section .product-card__image,
.product-section .product-card__image,
.section-products .product-card__image,
.home-product-section .product-card__image,
[data-home-products] .product-card__image,
.products-grid .product-card__image,
.product-slider .product-card__image,
.product-card .thumb,
.product-card .image,
.product-card .photo {
    width: 100%;
    max-height: 225px;
    object-fit: contain;
}

.home-products .product-card__body,
.products-section .product-card__body,
.product-section .product-card__body,
.section-products .product-card__body,
.home-product-section .product-card__body,
[data-home-products] .product-card__body,
.products-grid .product-card__body,
.product-slider .product-card__body,
.product-card .content,
.product-card .details {
    padding: 12px 13px;
}

.home-products .product-card__title,
.products-section .product-card__title,
.product-section .product-card__title,
.section-products .product-card__title,
.home-product-section .product-card__title,
[data-home-products] .product-card__title,
.products-grid .product-card__title,
.product-slider .product-card__title,
.product-card .title,
.product-card h3,
.product-card h4 {
    margin-bottom: 8px;
    font-size: .98rem;
    line-height: 1.25;
}

.home-products .product-card__price,
.products-section .product-card__price,
.product-section .product-card__price,
.section-products .product-card__price,
.home-product-section .product-card__price,
[data-home-products] .product-card__price,
.products-grid .product-card__price,
.product-slider .product-card__price,
.product-card .price {
    font-size: 1.38rem;
    line-height: 1.1;
}

.home-products .product-card__button,
.products-section .product-card__button,
.product-section .product-card__button,
.section-products .product-card__button,
.home-product-section .product-card__button,
[data-home-products] .product-card__button,
.products-grid .product-card__button,
.product-slider .product-card__button,
.product-card .btn,
.product-card button {
    min-height: 42px;
    padding: 8px 12px;
    font-size: .93rem;
}

.products-section .section-header,
.home-product-section .section-header,
.product-section .section-header,
.section-products .section-header,
[data-home-products] .section-header {
    margin-bottom: 15px;
}

.products-section .section-header h2,
.home-product-section .section-header h2,
.product-section .section-header h2,
.section-products .section-header h2,
[data-home-products] .section-header h2 {
    margin-bottom: 0;
    font-size: clamp(28px, 2.35vw, 37px);
    line-height: 1.08;
}

@media (max-width: 1380px) {
    .home-products .products-grid,
    .products-section .products-grid,
    .product-section .products-grid,
    .section-products .products-grid,
    .home-product-section .products-grid,
    [data-home-products] .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1050px) {
    .home-products .products-grid,
    .products-section .products-grid,
    .product-section .products-grid,
    .section-products .products-grid,
    .home-product-section .products-grid,
    [data-home-products] .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .home-products .products-grid,
    .products-section .products-grid,
    .product-section .products-grid,
    .section-products .products-grid,
    .home-product-section .products-grid,
    [data-home-products] .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .home-products .product-card__image,
    .products-section .product-card__image,
    .product-section .product-card__image,
    .section-products .product-card__image,
    .home-product-section .product-card__image,
    [data-home-products] .product-card__image,
    .products-grid .product-card__image {
        max-height: 190px;
    }
}

@media (max-width: 560px) {
    .home-products .products-grid,
    .products-section .products-grid,
    .product-section .products-grid,
    .section-products .products-grid,
    .home-product-section .products-grid,
    [data-home-products] .products-grid {
        grid-auto-flow: column;
        grid-auto-columns: minmax(238px, 78vw);
        grid-template-columns: none;
        gap: 11px;
        margin-right: -16px;
        padding: 2px 16px 10px 0;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline mandatory;
        scrollbar-width: thin;
    }

    .home-products .product-card,
    .products-section .product-card,
    .product-section .product-card,
    .section-products .product-card,
    .home-product-section .product-card,
    [data-home-products] .product-card {
        scroll-snap-align: start;
    }

    .home-products .product-card__image,
    .products-section .product-card__image,
    .product-section .product-card__image,
    .section-products .product-card__image,
    .home-product-section .product-card__image,
    [data-home-products] .product-card__image,
    .products-grid .product-card__image {
        max-height: 205px;
    }
}
