/* Ensure all top banner slider images have the same aspect ratio and fit correctly */
.block-sliders.auto-height .item-content .content-image img {
    width: 100% !important;
    aspect-ratio: 1470 / 827 !important;
    object-fit: cover !important;
    height: auto !important;
    min-height: auto !important;
}

/* Mobile */
@media (max-width: 767px) {
    .site-header .site-logo img {
        max-height: 55pt !important;
    }

    .block-sliders.auto-height .item-content .content-image img {
        min-height: 350px !important;
    }
}

.intro-icon-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.banner-image {
    width: 100%;
    /* height: 350px; */
    /* Change this height as needed */
    overflow: hidden;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fix: gallery page single-image cards (theme uses position:absolute for 2-img hover) */
.gallery-item .post-image {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Prevent hover from hiding the single image */
.products-list.grid .product-wapper:hover .products-thumb .gallery-item .post-image {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Gallery Image Popup Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.show {
    display: flex;
    opacity: 1;
}

.gallery-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.gallery-modal.show .gallery-modal-content {
    transform: scale(1);
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 60px;
    font-weight: 200;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    z-index: 100000;
}

.gallery-modal-close:hover,
.gallery-modal-close:focus {
    color: #cb8161;
    /* matching the theme gold/amber color */
    text-decoration: none;
}

@media (max-width: 767px) {
    .gallery-modal-content {
        max-width: 95%;
        max-height: 80%;
    }

    .gallery-modal-close {
        top: 15px;
        right: 20px;
        font-size: 50px;
    }
}

/* Fixed-size, uniform image box for all product cards */
.products-thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.product-thumb-hover.gallery-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 square ratio - change to 75% for 4:3, 66.6% for 3:2 etc */
    overflow: hidden;
}

.product-thumb-hover.gallery-item a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.product-thumb-hover.gallery-item .post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    /* crops to fill, keeps aspect ratio, no stretching */
    object-position: center;
    display: block;
}