/* Equal-height product cards on the home page slider and the shop grid. */
.product-item {
    display: flex;
    height: 100%;
}
.product-item .single-product {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}
.product-item .single-product .product-img {
    aspect-ratio: 5 / 6;
}
.product-item .single-product .product-img > a {
    height: 100%;
}
.product-item .single-product .product-img > a img {
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}
.product-item .single-product .product-content {
    display: flex;
    flex: 1;
    flex-direction: column;
}
.product-item .single-product .product-content .product-desc_info {
    display: flex;
    flex: 1;
    flex-direction: column;
}
.product-item .single-product .product-content .product-desc_info h3.product-name {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.4em;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-item .single-product .product-content .product-desc_info .price-box {
    margin-top: auto;
}

/* Bootstrap grid columns stretch by default, but ensure the shop grid columns do too. */
.shop-product-wrap.grid.row > [class*="col-"] {
    display: flex;
}

/* ------------------------------------------------------------------ */
/*  Product detail gallery — main image with thumbnails stacked below  */
/* ------------------------------------------------------------------ */
.pd-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pd-gallery-main {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ececec;
    background-color: #fafafa;
}

.product-details_img.pd-gallery .pd-gallery-main .single-img img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    -o-object-fit: contain;
    object-fit: contain;
}

.pd-gallery-main .single-img {
    aspect-ratio: 1 / 1;
}

.pd-gallery-main .tty-slick-text-btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: #fff;
    color: #211e1c;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%);
    transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.pd-gallery-main:hover .tty-slick-text-btn {
    opacity: 1;
    visibility: visible;
}

.pd-gallery-main .tty-slick-text-prev {
    left: 16px;
}

.pd-gallery-main .tty-slick-text-next {
    right: 16px;
}

.pd-gallery-main .tty-slick-text-btn:hover {
    background-color: #7c4435;
    color: #fff;
}

.pd-gallery-thumbs {
    position: relative;
    padding: 0 32px;
}

.pd-gallery-thumbs .slick-list {
    margin: 0 -6px;
}

.pd-gallery-thumbs .slick-slide > div {
    padding: 0 6px;
}

.pd-gallery-thumbs .slick-slide {
    outline: none;
}

.pd-gallery-thumbs .single-thumb {
    height: 92px !important;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-gallery-thumbs .single-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    -o-object-fit: cover;
    object-fit: cover;
}

.pd-gallery-thumbs .single-thumb:hover {
    opacity: 0.85;
}

.pd-gallery-thumbs .single-thumb.slick-current {
    opacity: 1;
    border-color: #7c4435;
    box-shadow: 0 2px 8px rgba(124, 68, 53, 0.25);
}

.pd-gallery-thumbs .tty-slick-text-btn {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    background-color: #fff;
    color: #211e1c;
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-50%);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.pd-gallery-thumbs .tty-slick-text-prev {
    left: 0;
}

.pd-gallery-thumbs .tty-slick-text-next {
    right: 0;
}

.pd-gallery-thumbs .tty-slick-text-btn:hover {
    background-color: #7c4435;
    border-color: #7c4435;
    color: #fff;
}

.pd-gallery-thumbs .slick-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 767px) {
    .pd-gallery-main {
        border-radius: 10px;
    }

    .pd-gallery-thumbs {
        padding: 0 26px;
    }

    .pd-gallery-thumbs .tty-slick-text-btn {
        width: 24px;
        height: 24px;
        font-size: 8px;
    }

    .pd-gallery-thumbs .single-thumb {
        height: 76px !important;
    }
}

@media (max-width: 575px) {
    .pd-gallery {
        gap: 12px;
    }

    .pd-gallery-main .tty-slick-text-btn {
        width: 36px;
        height: 36px;
        opacity: 1;
        visibility: visible;
    }

    .pd-gallery-thumbs .single-thumb {
        height: 64px !important;
    }
}
