.details-container {
    border-radius: 20px;
    display: flex;
    gap: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    margin-top: 100px;
    padding-top: 30px;
}

/* --- Cột bên trái: Arrow và Product Info --- */
.left-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 30%;
}

.img-back {
    width: 51px;
    height: 51px;
}


.back-arrow:hover {
    background-color: #eee;
}

.product-main-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.product-main-info .product-image-large {
    width: 292px;
    /* Kích thước ảnh lớn trong cột trái */
    object-fit: cover;
    border-radius: 15px;
    border: 1px solid #ddd;
}

.product-text-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: flex-end;
}

.product-text-info h2 {
    font-weight: 800;
    font-size: 20px;
    line-height: 27px;
    color: #101088;
    margin: 0
}

.product-text-info p {
    font-style: normal;
    font-weight: 200;
    font-size: 12px;
    line-height: 16px;
    color: #000000;
    margin: 0
}

.product-specs {
    width: 100%;
    border-collapse: collapse;
}

.title-product-specs {
    font-weight: 700;
    font-size: 18px;
    line-height: 25px;
    color: #000000;
}

.info-product-specs {
    font-weight: 200;
    font-size: 18px;
    line-height: 25px;
    color: #000000;
}

.contact-button {
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    color: #372E21;
    background: linear-gradient(90deg, #E0DBD0 0%, #C8B395 100%);
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 15px;
    padding: 7px 18px;
    text-decoration: none;
}

.box-contact {
    width: 100%;
    display: flex;
    justify-content: center;
}

.contact-button:focus,
.contact-button:active,
.contact-button:hover,
.contact-button:visited,
.contact-button:link {
    color: #372E21;
    text-decoration: none;
}

/* --- Cột giữa: Main Display Image --- */
.middle-column {
    flex: 2;
    /* Chiếm nhiều không gian hơn */
    min-width: 450px;
    /* Chiều rộng tối thiểu cho ảnh chính */
    max-width: 600px;
    /* Giới hạn chiều rộng tối đa */
    overflow: hidden;
    border-radius: 20px;
}

.middle-column img {
    object-fit: cover;
    width: 600px;
    height: 400px;
    display: block;
    border-radius: 20px;
}

/* --- Cột phải: Vertical Carousel --- */
.right-column {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vertical-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 690px;
    overflow: hidden;
    padding: 10px 0;
    /* Padding cho mũi tên */
    opacity: 50%;
}

.vertical-carousel-items {
    position: absolute;
    /* Quan trọng: Để các items chồng lên nhau và dịch chuyển toàn bộ block */
    top: 0;
    /* Quan trọng: Bắt đầu từ top 0 */
    left: 0;
    /* Quan trọng: Bắt đầu từ left 0 */
    width: 100%;
    /* Chiếm toàn bộ chiều rộng của wrapper */
    display: flex;
    flex-direction: column;
    /* Xếp chồng các ảnh dọc */
    gap: 20px;
    /* Khoảng cách giữa các ảnh nhỏ */
    transition: transform 0.5s ease-in-out;
    /* Hiệu ứng cuộn mượt mà */
    transform: translateY(0);
    /* Quan trọng: Đảm bảo vị trí ban đầu là 0 */
    align-items: center;
}

.vertical-carousel-item {
    /* Đảm bảo không có margin/padding nào ở đây làm lệch tính toán */
    flex-shrink: 0;
    /* Ngăn item co lại khi không đủ chỗ */
}

.vertical-carousel-item img {
    width: 160px;
    /* Kích thước ảnh nhỏ */
    height: 214px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid transparent;
    /* Viền mặc định trong suốt */
    transition: border-color 0.2s;
    cursor: pointer;
}

.vertical-carousel-item img.active {
    border-color: #333;
    /* Viền đen khi active */
}

.vertical-arrow {
    cursor: pointer;
    margin: 10px 0;
}

.img-arrow {
    width: 35px;
    height: 35px;
    transform: rotate(90deg);
}

.box-slide {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.product-image-wrapper-slide .img-slide {
    max-width: 200px !important;
    object-fit: cover;
    border-radius: 20px;
}


/* Product Carousel & Grid */
#productCarousel,
#productCarouselSlide {
    position: relative;
    padding: 0 60px;
}

#productCarouselSlide {
    width: 820px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 20px;
}

.product-grid-slide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px;
}

.product-image-wrapper,
.product-image-wrapper-slide {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.product-name {
    font-weight: 700;
    font-size: 18px;
    line-height: 25px;
    color: #000000;
}

.product-spec {
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #000000;
}

.view-detail-btn {
    background: #101088;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 15px;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    color: #FFFFFF;
    padding: 7px 17px;
    border: none;
}

.view-detail-btn:focus,
.view-detail-btn:active,
.view-detail-btn:hover,
.view-detail-btn:visited,
.view-detail-btn:link {
    color: #FFFFFF;
    text-decoration: none;
    background: #101088;

}

/* Custom Carousel Controls (Mũi tên) */
.custom-control-prev,
.custom-control-next {
    width: 50px;
    /* Kích thước của nút mũi tên */
    height: 50px;
    background: none !important;
    border: 1px solid #000 !important;
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* Luôn hiển thị */
    transition: background-color 0.3s ease;
}

.custom-control-prev {
    left: 0;
    /* Đặt mũi tên trái ở lề trái */
}

.custom-control-next {
    right: 0;
    /* Đặt mũi tên phải ở lề phải */
}

.custom-control-prev:hover,
.custom-control-next:hover,
.custom-control-prev-slide:hover,
.custom-control-next-slide:hover {
    background-color: rgba(255, 255, 255, 1);
    /* Nền trắng mờ hơn khi hover */
}

.custom-control-prev-icon,
.custom-control-next-icon,
.custom-control-prev-icon-slide,
.custom-control-next-icon-slide {
    /* Đảm bảo màu icon là màu đen (#000) */
    background-image: url('../../img/icon-left.png') !important;
    width: 30px !important;
    /* Kích thước icon */
    height: 30px !important;
}

/* Đảo ngược icon cho mũi tên phải và đổi màu sang đen */
.custom-control-prev-icon,
.custom-control-prev-icon-slide {
    background-image: url('../../img/icon-left.png') !important;
    transform: scaleX(-1);
}

.title-explore {
    font-weight: 700;
    font-size: 30px;
    line-height: 64px;
    text-align: center;
    letter-spacing: -0.25px;
    color: #000000;
}

.box-explore {
    margin: 80px auto;
    max-width: 1400px;
    width: 100%;
}

.product-card .product-image-wrapper-slide img.active-thumbnail {
    border: 2px solid black;
    /* Ví dụ màu viền xanh dương */
    box-shadow: 0 0 5px rgba(5, 5, 5, 0.5);
    /* Tùy chọn: thêm bóng */
    transition: all 0.2s ease-in-out;
    /* Hiệu ứng chuyển đổi mượt mà */
    padding: 2px;
    /* Khoảng đệm nhỏ để viền không che ảnh */
    box-sizing: border-box;
    /* Đảm bảo padding không làm tràn */
}

.product-carousel-custom {
    position: relative;
    /* Để định vị các nút điều hướng */
    overflow: hidden;
    /* Ẩn phần ảnh bị tràn ra ngoài */
}

.product-carousel-inner-custom {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(100% / 3 - 10px);
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    opacity: 0.4;
}

/* Ẩn thanh cuộn mặc định cho Webkit (Chrome, Safari) */
.product-carousel-inner-custom::-webkit-scrollbar {
    display: none;
}

/* Căn chỉnh các ảnh trong product-card */
.product-carousel-inner-custom .product-card {
    flex-shrink: 0;
    /* Ngăn các card co lại */
    width: auto;
    /* Để grid tự quản lý chiều rộng */
    /* Đảm bảo chiều rộng của card phù hợp với grid-auto-columns */
}

/* Các nút điều hướng - có thể giữ nguyên style Bootstrap */
.custom-control-prev-slide,
.custom-control-next-slide {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 40px;
    /* Hoặc kích thước phù hợp */
    height: 40px;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.15s ease;
    border: 1px solid #000;
}

.custom-control-prev-slide:hover,
.custom-control-next-slide:hover {
    opacity: 1;
}

.custom-control-prev-slide {
    left: 5px;
    /* Vị trí bên trái */
}

.custom-control-next-slide {
    right: 5px;
    /* Vị trí bên phải */
}

.box-btn-back {
    display: none;
}

@media (max-width: 1400px) {
    .box-btn-back {
        display: flex;
        justify-content: flex-end;
    }

    .btn-back {
        display: none;
    }

    .img-back {
        width: 35px;
        height: 35px;
    }

    .details-container {
        justify-content: center;
    }

    .product-image-wrapper-slide .img-slide {
        max-width: 130px !important;
        height: 120px;
    }

    .product-image-wrapper-slide {
        height: 120px;
    }

    #productCarouselSlide {
        width: 600px;
    }

    .product-image-wrapper {
        height: 110px;
        justify-content: flex-start;
    }

    .product-image-wrapper img {
        width: 130px;
    }

    .product-name {
        font-size: 15px;
    }

    .product-spec {
        font-size: 12px;
    }

    .custom-control-prev,
    .custom-control-next {
        display: none;
    }

    #productCarousel {
        padding: 0 30px;
    }


}

@media (max-width: 1055px) {
    .details-container {
        margin-top: 84px;
        padding-top: 0;
        flex-direction: column-reverse;
        position: relative;
    }

    .middle-column {
        min-width: 450px;
        max-width: unset;
        width: 100%;
        border-radius: 0;
    }

    .middle-column img {
        width: 100%;
        border-radius: 0;
        height: 700px;
    }

    .right-column {
        margin-top: 30px;
    }

    .box-btn-back {
        display: none;
    }

    .btn-back {
        display: flex;
        position: absolute;
        top: 30px;
        right: 50px;
    }

    .left-column {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
        width: 100%;
        justify-content: space-around;
    }

    .product-grid {
        justify-items: center;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .product-main-info .product-image-large {
        width: 180px;
    }

    .left-column {
        padding: 0 25px;
        flex-direction: column;
    }

    .product-main-info {
        flex-direction: row-reverse;
        align-items: flex-start;
    }

    .product-text-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .custom-control-prev-slide,
    .custom-control-next-slide {
        display: none;
    }

    #productCarouselSlide {
        padding: 0 30px;
        width: 100%;
    }

    .right-column {
        width: 100%;
    }

    .product-grid {
        justify-items: center;
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
    }

    .middle-column {
        min-width: unset;
    }

    .middle-column img {
        height: auto;
    }

    .product-image-wrapper-slide .img-slide {
        border-radius: 0;
        max-width: 100px !important;
    }
}