.factory-section {
    width: 100%;
    box-sizing: border-box;
}

/* Phần Tiêu đề */
.factory-header {
    text-align: center;
    margin-bottom: 25px;
}

.factory-header .top-line {
    display: inline-block;
    width: 45px;
    height: 3px;
    background-color: var(--color-accent-light);
    border-radius: 2px;
    margin-bottom: 8px;
}

.factory-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-main);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

/* Khung bọc tổng thể ảnh và thumbnails */
.factory-display-container {
    position: relative;
    width: 100%;
}

/* Ảnh lớn */
.factory-main-image-wrap {
    width: 100%;
    height: 540px;
    border-radius: 24px;
    overflow: hidden;
    background-color: #f0f0f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.factory-main-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* 
 * NẰM ĐÈ NỬA TRONG NỬA NGOÀI (50% TRONG - 50% NGOÀI)
 * Căn mép dưới của ảnh lớn và dịch chuyển 50% chiều cao xuống dưới 
 */
.factory-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(50%);
    padding: 0 15px;
    z-index: 10;
}

/* Nút bấm tròn Prev / Next */
.factory-arrow-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-main);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    flex-shrink: 0;
	margin-bottom: 0;
	margin-right: 0;
}

.factory-arrow-btn:hover {
    background-color: var(--color-main);
    color: var(--color-white);
    transform: scale(1.08);
}

.factory-arrow-btn i {
    font-size: 14px;
    line-height: 1;
}

/* Dãy danh sách Thumbnails */
.factory-thumbnails-track {
    display: flex;
    gap: 16px;
    max-width: 900px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 6px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.factory-thumbnails-track::-webkit-scrollbar {
    display: none;
}

/* Từng thẻ thumbnail nhỏ */
.factory-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-white);
    border-radius: 14px;
    padding: 8px 14px 8px 8px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); /* Đổ bóng đậm hơn chút để nổi bật khi nhô ra ngoài */
    border: 2px solid transparent;
    transition: all 0.25s ease;
    min-width: 250px;
    max-width: 270px;
    flex: 0 0 auto;
}

.factory-card-item:hover {
    transform: translateY(-3px);
}

/* Trạng thái khi được chọn (Active) */
.factory-card-item.active {
    border-color: var(--color-accent-light);
    box-shadow: 0 0 0 1px var(--color-accent-light), 0 10px 25px rgba(20, 102, 93, 0.25);
}

.factory-card-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.factory-card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-main);
    text-transform: uppercase;
    line-height: 1.35;
    margin: 0;
}

/* RESPONSIVE DESIGN */
@media (max-width: 991px) {
    .factory-main-image-wrap {
        height: 420px;
    }
	
    .factory-header h2 {
        font-size: 22px;
    }
	
    .factory-card-item {
        min-width: 220px;
    }
}

@media (max-width: 768px) {
    .factory-section {
        margin-bottom: 40px;
    }
	
    .factory-main-image-wrap {
        height: 280px;
        border-radius: 16px;
    }
    
    /* Trên Mobile thì tách hẳn xuống dưới để không che ảnh */
    .factory-nav-wrapper {
        position: relative;
        transform: none;
        bottom: auto;
        margin-top: 15px;
        padding: 0;
    }
	
    .factory-arrow-btn {
        display: none;
    }
	
    .factory-thumbnails-track {
        width: 100%;
        justify-content: flex-start;
        padding: 4px;
    }
	
    .factory-header h2 {
        font-size: 18px;
    }
}