/* ======================================
   CHD Product Carousel
====================================== */

/* ======================================
   Product Section Loader
====================================== */

.chd-product-carousel{
    position:relative;
}

.chd-carousel-loader{
    position:absolute;
    inset:0;
    background:rgba(255,255,255,.82);
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:12px;
    z-index:50;
    opacity:0;
    visibility:hidden;
    transition:.3s ease;
}

.chd-product-carousel.is-loading .chd-carousel-loader{
    opacity:1;
    visibility:visible;
}

.chd-spinner{
    width:46px;
    height:46px;
    border:4px solid rgba(183,84,48,.18);
    border-top-color:#B75430;
    border-radius:50%;
    animation:chdSpin .8s linear infinite;
}

.chd-carousel-loader span{
    font-size:18px;
    color:#666;
    font-family:"Teachers", sans-serif;
    font-weight:500;
}

@keyframes chdSpin{
    to{
        transform:rotate(360deg);
    }
}

.chd-product-carousel{
    width:100%;
    position:relative;
    overflow:hidden;
}

/* ONLY target outer Swiper slides */
.chd-product-carousel > .swiper-wrapper > .swiper-slide{
    height:auto;
}

/* Product card */
.chd-product-carousel li.product{
    margin-bottom: 0;
    height: 100%;
    border: 1px solid #EAEAEA;
    border-radius: 16px;
    padding: 12px;
}
.chd-product-carousel li.product .property-image-wrap{
    border-radius: 12px;
    height: 192px;
    width: 100%;
    overflow:hidden;
}
.chd-product-carousel li.product .property-image-wrap img{
     object-fit: cover;
     width: 100%;
     height: 100%;
     border-radius: 12px;
     transition:
        transform .6s cubic-bezier(.22,.61,.36,1),
        filter .6s cubic-bezier(.22,.61,.36,1);
    transform:scale(1);
    filter:brightness(1);
}

.chd-product-carousel li.product:hover .property-image-wrap img{
    transform:scale(1.08);
    filter:brightness(1.05);
}  

/* Navigation */
.chd-product-carousel .swiper-button-next,
.chd-product-carousel .swiper-button-prev{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#fff;
    color:#222;
    box-shadow:0 6px 20px rgba(0,0,0,.15);
}

.chd-product-carousel .swiper-button-next:after,
.chd-product-carousel .swiper-button-prev:after{
    font-size:16px;
}

/* Pagination */
.chd-product-carousel .swiper-pagination{
    position:relative;
    margin-top:24px;
}

/* ======================================
   Mobile Peek
====================================== */

@media(max-width:767px){

    .chd-product-carousel{
        overflow:visible;
        padding-right:18px;
    }

}

/* ======================================
   Grid Mode
====================================== */

.chd-product-carousel.grid-mode{
    overflow:visible;
}

.chd-product-carousel.grid-mode > .swiper-wrapper{
    display:grid !important;
    transform:none !important;
    gap:24px;
    width:100%;
    height:auto !important;
}

.chd-product-carousel.grid-mode > .swiper-wrapper > .swiper-slide{
    width:100% !important;
    margin:0 !important;
    height:auto;
}

/* Desktop */
.chd-product-carousel .title-container{
    margin: 0 !important;
            margin-bottom: 16px !important;
    margin-top: 16px !important;
}
.chd-product-carousel .woocommerce-loop-product__title{
    font-size: 16px !important;
    color: #3F4945 !important;
    font-family: "Teachers", sans-serif !important;
    font-weight: 600 !important;
    line-height: 20px !important;
}
.chd-product-carousel .property-card-stats{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(1, 1fr);
    gap: 5px;
}
.chd-product-carousel .property-stat{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    gap: 1px;
}
.chd-product-carousel .price{
    display: none;
}
.chd-product-carousel li.product .button,
.chd-product-carousel li.product .add_to_cart_button,
.chd-product-carousel li.product .property-card-bottom a{
    margin-top: 0;
    background-color: #fff;
    border: 1px solid #CBCBCB;
    width: 100%;
    display: block;
    border-radius: 10px;
    padding: 10px;
    color: #3F4945;
    font-weight: 500;
    font-family: "Teachers", sans-serif !important;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.chd-product-carousel li.product .button:hover,
.chd-product-carousel li.product .property-card-bottom a:hover{
  color: #fff;
  border-color: #B75430;
  background-color: #B75430;
}
.chd-product-carousel li.product .property-card-bottom{
    display: block;
    clear: both;
    margin: 13px 0 3px;
}
.chd-product-carousel .swiper-button-next, .chd-product-carousel .swiper-button-prev{
    display: none;
}
@media(min-width:1024px){

    .chd-product-carousel.grid-mode[data-desktop-columns="5"]>.swiper-wrapper{
        grid-template-columns:repeat(5,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="4"]>.swiper-wrapper{
        grid-template-columns:repeat(4,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="3"]>.swiper-wrapper{
        grid-template-columns:repeat(3,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="2"]>.swiper-wrapper{
        grid-template-columns:repeat(2,1fr);
    }
    

}

/* Tablet */

@media(min-width:768px) and (max-width:1023px){

    .chd-product-carousel.grid-mode[data-desktop-columns="5"]>.swiper-wrapper{
        grid-template-columns:repeat(3,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="4"]>.swiper-wrapper{
        grid-template-columns:repeat(3,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="3"]>.swiper-wrapper{
        grid-template-columns:repeat(3,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="2"]>.swiper-wrapper{
        grid-template-columns:repeat(3,1fr);
    }

}

/* Mobile */

@media(max-width:767px){

    .chd-product-carousel.grid-mode[data-desktop-columns="5"]>.swiper-wrapper{
        grid-template-columns:repeat(2,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="4"]>.swiper-wrapper{
        grid-template-columns:repeat(2,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="3"]>.swiper-wrapper{
        grid-template-columns:repeat(2,1fr);
    }

    .chd-product-carousel.grid-mode[data-desktop-columns="2"]>.swiper-wrapper{
        grid-template-columns:repeat(2,1fr);
    }
    .chd-product-carousel .swiper-button-next, .chd-product-carousel .swiper-button-prev{
        display: flex;
    }

}