﻿* {
    box-sizing: border-box;
}

.home-product {
    background: linear-gradient(354deg, rgb(54 155 125) 0%, rgb(107 228 179) 100%);
    height: 570px;
}

.home-product-container {
    /* padding-bottom: 80px; */
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 0;
}

.home-product-title {
    display: flex;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1a1a1ab5;
    font-family: 'interB';
}

.home-product-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.home-pro-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    width: 100%;
    position: relative;
    gap: 32px;
}

.img-product {
    width: 50%;
    height: 100%;
    position: relative;
}

    .img-product img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0;
        transition: opacity 0.5s ease;
    }

        .img-product img.active {
            opacity: 1;
            z-index: 1;
        }

.product-detail {
    width: 50%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
}

.pro-detail {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    max-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

    .pro-detail.active {
        opacity: 1;
        z-index: 1;
    }

    .pro-detail .product-name {
        font-size: 1.5rem;
        color: #016B5C;
        font-weight: 600;
        margin-bottom: 0.5rem;
        font-family: 'interB';
    }

    .pro-detail .product-descript {
        font-size: 1rem;
        color: #4a4a4a;
        line-height: 1.5;
        font-family: interM;
    }

.product-detail-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    align-self: flex-end;
    padding-left: 20px;
}

.product-leftright {
    display: flex;
    gap: 0.5rem;
}

.product-button-left,
.product-button-right {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: #016B5C;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .product-button-left:hover,
    .product-button-right:hover {
        background-color: rgb(34 220 10 / 54%);
    }

    .product-button-left:disabled,
    .product-button-right:disabled {
        background-color: #016B5C;
        cursor: not-allowed;
    }

.product-leftright i {
    color: #ffffff;
    font-size: 1.1rem;
}

.btn-more {
    padding: 0.5rem 1.5rem;
    background-color: #016B5C;
    color: #ffffff;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

    .btn-more:hover {
        background-color: rgb(34 220 10 / 56%);
        color: #ffffff;
    }

.no-data {
    text-align: center;
    color: #888;
    font-size: 1rem;
    padding: 2rem;
}

/* Responsive Design */
/* Mobile & tablet */
@media (max-width: 1023px) {
    .home-product {
        height: 500px;
    }

    .home-product-content {
        padding-top: 0;
    }
}
/* Tablet (≤768px) */
@media (max-width: 768px) {
    .home-product-title {
        font-size: 2rem;
        padding-top: 1rem;
        margin-bottom: 1.5rem;
    }


    .home-product-container {
        padding-bottom: 60px;
    }

    .home-pro-content {
        flex-direction: column;
        height: auto;
        margin-top: 1.5rem;
        gap: 1rem;
    }

    .img-product,
    .product-detail {
        width: 100%;
        height: 200px;
    }

    .home-product-content {
        gap: 40px;
        padding-top: 0;
    }

    .product-detail {
    }

    .img-product img {
        max-height: 90%;
        max-width: 90%;
    }

    .pd-top {
        max-height: 50%;
    }

    .pro-detail {
        left: 0;
        padding: 0px 1rem;
        top: 0;
        transform: none;
        display: flex;
        flex-direction: column;
        justify-content: left;
        /* height: 100%; */
    }

        .pro-detail .product-name {
            font-size: 1.3rem;
        }

        .pro-detail .product-descript {
            font-size: 0.9rem;
            line-height: 1.4;
        }

    .product-detail-bottom {
        width: 100%;
        justify-content: center;
        align-self: center;
        margin-top: 1rem;
        /* gap: 1rem; */
    }

    .product-button-left,
    .product-button-right {
        width: 40px;
        height: 40px;
    }

    .product-leftright i {
        font-size: 1.2rem;
    }

    .btn-more {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .home-product-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .home-product-container {
        padding-bottom: 40px;
        padding: 0;
        padding-bottom: 30px;
    }

    .home-pro-content {
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .img-product,
    .product-detail {
    }

    .pd-bottom {
        margin-bottom: 10px;
    }

    .product-detail {
    }

    .img-product img {
        max-height: 85%;
        max-width: 85%;
    }

    .home-product {
        padding-top: 2rem;
        max-height: 100%;
        height: 80%;
    }

    .pro-detail .product-name {
        font-size: 1.1rem;
    }

    .pro-detail .product-descript {
        font-size: 0.8rem;
    }

    .product-detail-bottom {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .product-button-left,
    .product-button-right {
        width: 36px;
        height: 36px;
    }

    .product-leftright i {
        font-size: 1rem;
    }

    .btn-more {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}
