/* =========================================================
   KihCarpet — Popular Collections
========================================================= */

.kih-home-collections {
    padding: clamp(60px, 7vw, 95px) 0;
    overflow: hidden;
    background: #fff;
}


/* GRID */

.kih-home-collections .kih-home-collections__track {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(14px, 1.8vw, 24px);

    width: 100%;
}


/* CARD */

.kih-home-collections .kih-home-collection-card {
    display: block !important;

    min-width: 0;

    color: #fff !important;
    text-decoration: none !important;
}


/* MEDIA */

.kih-home-collections .kih-home-collection-card__media {
    position: relative !important;

    display: block;

    width: 100%;

    aspect-ratio: 4 / 5;

    overflow: hidden;

    background: #eaf2ec;

    border: 1px solid #dae8dd;
    border-radius: 22px;

    box-shadow:
        0 9px 29px
        rgba(26, 78, 40, .08);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.kih-home-collections
.kih-home-collection-card:hover
.kih-home-collection-card__media {
    transform: translateY(-5px);

    box-shadow:
        0 18px 42px
        rgba(26, 78, 40, .14);
}


/* IMAGE */

.kih-home-collections
.kih-home-collection-card__media img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    margin: 0 !important;

    object-fit: cover;

    transition:
        transform .55s
        cubic-bezier(.22, .61, .36, 1);
}


.kih-home-collections
.kih-home-collection-card:hover
.kih-home-collection-card__media img {
    transform: scale(1.045);
}


/* FALLBACK */

.kih-home-collections
.kih-home-collection-card__fallback {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            145deg,
            #dceee0,
            #a8ceb1
        );

    color: #278142;

    font-size: 50px;
}


/* DARK GRADIENT */

.kih-home-collections
.kih-home-collection-card__gradient {
    position: absolute !important;

    z-index: 1;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            to top,
            rgba(7, 31, 14, .90) 0%,
            rgba(7, 31, 14, .54) 26%,
            rgba(7, 31, 14, .08) 60%,
            transparent 100%
        );
}


/* TYPE LABEL */

.kih-home-collections
.kih-home-collection-card__type {
    position: absolute !important;

    z-index: 3;

    top: 15px;
    left: 15px;

    display: inline-flex;

    padding: 7px 12px;

    background:
        rgba(255, 255, 255, .91);

    border:
        1px solid
        rgba(255, 255, 255, .9);

    border-radius: 50px;

    color: #216f38 !important;

    font-size: 11px !important;
    font-weight: 750;

    line-height: 1;

    backdrop-filter: blur(8px);
}


/* CONTENT */

.kih-home-collections
.kih-home-collection-card__content {
    position: absolute !important;

    z-index: 4;

    right: 0;
    bottom: 0;
    left: 0;

    padding: 23px 20px 19px;
}


.kih-home-collections
.kih-home-collection-card__content h3 {
    margin: 0 0 11px !important;

    color: #fff !important;

    font-size:
        clamp(22px, 2vw, 30px) !important;

    font-weight: 750;

    line-height: 1.08;

    letter-spacing: -.025em;
}


.kih-home-collections
.kih-home-collection-card__content > div {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}


.kih-home-collections
.kih-home-collection-card__content span {
    color:
        rgba(255, 255, 255, .84) !important;

    font-size: 12px !important;
    font-weight: 600;
}


/* ARROW */

.kih-home-collections
.kih-home-collection-card__content b {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    background:
        rgba(255, 255, 255, .94);

    border-radius: 11px;

    color: #237d3e !important;

    font-size: 19px;
    font-weight: 500;

    transition:
        transform .2s ease;
}


.kih-home-collections
.kih-home-collection-card:hover
.kih-home-collection-card__content b {
    transform: translateX(3px);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .kih-home-collections
    .kih-home-collections__track {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;
    }

}


/* =========================================================
   MOBILE — native swipe
========================================================= */

@media (max-width: 767px) {

    .kih-home-collections {
        padding: 49px 0 55px;
    }


    .kih-home-collections
    .kih-home-collections__track {
        display: flex !important;

        grid-template-columns: none !important;

        gap: 11px;

        overflow-x: auto;
        overflow-y: hidden;

        width: auto;

        margin-left: -12px;
        margin-right: -12px;

        padding:
            0 12px 10px;

        scroll-snap-type:
            x mandatory;

        scroll-padding-left: 12px;

        -webkit-overflow-scrolling:
            touch;

        scrollbar-width: none;
    }


    .kih-home-collections
    .kih-home-collections__track::-webkit-scrollbar {
        display: none;
    }


    .kih-home-collections
    .kih-home-collection-card {
        flex:
            0 0
            min(78vw, 300px) !important;

        width:
            min(78vw, 300px);

        scroll-snap-align: start;
    }


    .kih-home-collections
    .kih-home-collection-card__media {
        width: 100%;

        border-radius: 18px;
    }


    .kih-home-collections
    .kih-home-collection-card__type {
        top: 12px;
        left: 12px;

        padding: 6px 10px;

        font-size: 10px !important;
    }


    .kih-home-collections
    .kih-home-collection-card__content {
        padding: 18px 16px 15px;
    }


    .kih-home-collections
    .kih-home-collection-card__content h3 {
        margin-bottom: 9px !important;

        font-size: 24px !important;
    }

}