/* --- Layout chung --- */
.product-line-section {
    background-color: #fff;
    overflow: hidden; /* Ẩn thanh cuộn ngang thừa */
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #000;
}

.section-desc {
    color: #555;
    font-size: 16px;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Slider Wrapper --- */
.product-slider-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 60px; /* Chừa chỗ cho nút bấm */
}

.product-track {
    display: flex;
    align-items: center; /* Căn giữa theo chiều dọc */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Hiệu ứng trượt mượt */
    will-change: transform;
    cursor: grab;
}

.product-track:active {
    cursor: grabbing;
}

/* --- Product Item --- */
.product-line_item {
    /* Cấu hình chiều rộng:
       Trên Desktop muốn hiện 5 cái -> flex-basis khoảng 20%
       Tuy nhiên để scale đẹp ta để cứng width px hoặc % nhỏ hơn chút
    */
    flex: 0 0 20%;
    max-width: 20%;
    text-align: center;
    padding: 0 10px;
    opacity: 0.5; /* Mờ đi khi chưa active */
    transform: scale(0.8); /* Thu nhỏ lại */
    transition: all 0.5s ease;
    user-select: none;
    text-decoration: none; /* Bỏ gạch chân cho link */
    color: inherit; /* Giữ màu chữ mặc định */
}

.product-line_item .img-box img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    height: 250px; /* Chiều cao cố định ảnh */
}

.product-line_item .product-line_name {
    font-size: 18px;
    color: #888;
    margin-top: 20px;
    font-weight: normal;
    transition: color 0.3s;
}

/* --- Active Item (Sản phẩm chính giữa) --- */
.product-line_item.active {
    opacity: 1;
    transform: scale(1.15); /* Phóng to 1.15 lần */
    z-index: 10;
}

.product-line_item.active .product-line_name {
    color: #000;
    font-weight: bold;
    font-size: 24px; /* Chữ to hơn như mẫu */
}

/* --- Controls (Nút bấm) --- */
.slider-controls {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 20;
}

.control-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #000;
    padding: 10px;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.2);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .product-line_item {
        flex: 0 0 33.33%; /* Tablet hiện 3 cái */
        max-width: 33.33%;
    }
}

@media (max-width: 768px) {
    .section-desc {
        padding: 0 15px;
        font-size: 14px;
    }

    .section-title {
        font-size: 25px;
        font-weight: 400;
        text-transform: uppercase;
        margin-top: 20px;
        margin-bottom: 15px;
        color: #000;
}

    .product-line_item {
        flex: 0 0 60%; /* Mobile hiện 1 cái to rõ */
        max-width: 60%;
    }

    .product-line_item .img-box img {
        height: 200px;
    }

    .product-line_item.active .product-line_name {
        font-size: 20px;
    }
}
