/* ==========================================================================
   TRANG CHI TIẾT SẢN PHẨM (SINGLE PRODUCT)
   ========================================================================== */
   
/* ==========================================================================
   FIX LỖI HEADER: ÉP NỀN TRẮNG VÀ CHỐNG ĐÈ MENU
   ========================================================================== */
.site-header {
    background-color: #ffffff !important; 
    border-bottom: 1px solid #eaeaea !important; /* Vạch kẻ mỏng ngăn cách */
    z-index: 9999 !important; /* Ép Header luôn nằm trên cùng mọi vật thể */
}

/* Đẩy nội dung sản phẩm xuống sâu hơn một chút để tránh dính Header */
.ap-single-product {
    padding-top: 180px !important; 
    background-color: #ffffff !important;
}

/* Hạ z-index của khối ảnh ghim dính để nó luồn ngoan ngoãn dưới Header khi cuộn */
.product-gallery .sticky-top {
    position: sticky;
    top: 140px; /* Cách đỉnh 140px (dưới Header) */
    z-index: 10;
}   

.ap-single-product {
    padding: 150px 0 100px;
    background-color: #ffffff;
}

/* Sửa lại tỉ lệ phân chia 2 cột */
.product-detail-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 60px; /* Thu hẹp gap một chút để có thêm không gian */
    align-items: flex-start;
}

/* Cột trái (Ảnh): Chiếm 55% */
.product-gallery {
    flex: 0 0 45%; 
    max-width: 45%;
}
.gallery-sticky-wrapper {
    position: sticky;
    top: 140px; 
    z-index: 10;
    position: relative; /* Thiết lập mỏ neo cho 2 nút bấm */
}

/* Khung chứa ảnh: trượt ngang mượt mà, ẩn thanh cuộn */
.ap-product-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Bắt ảnh khớp vào khung khi vuốt/cuộn */
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* Ẩn scrollbar IE/Edge */
    scrollbar-width: none;  /* Ẩn scrollbar Firefox */
}
.ap-product-slider::-webkit-scrollbar {
    display: none; /* Ẩn scrollbar Chrome/Safari */
}

/* Từng khung ảnh */
.ap-product-slider .slide-item {
    flex: 0 0 100%; /* Mỗi ảnh chiếm trọn 100% chiều ngang */
    scroll-snap-align: start;
}
.ap-product-slider img {
    width: 100%;
    height: auto;
    background-color: #f6f6f6;
    mix-blend-mode: multiply;
    border-radius: 4px;
    margin-bottom: 0; /* Xóa margin cũ */
    display: block;
}

/* --- TRANG TRÍ NÚT ĐIỀU HƯỚNG SLIDER --- */
.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px; /* Cách mép trái phải 20px */
    pointer-events: none; /* Chống đè chuột che mất ảnh */
}
.slider-nav .nav-btn {
    pointer-events: auto; /* Trả lại khả năng bấm cho nút */
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eaeaea;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #111;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.slider-nav .nav-btn:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: scale(1.05);
}

/* --- CỘT PHẢI (THÔNG TIN) --- */
/* Cột phải (Thông tin): Chiếm 45% */
.product-info {
    flex: 1; /* Chiếm phần còn lại */
    min-width: 350px; /* Đảm bảo không bị co quá nhỏ trên màn hình lỡ cỡ */
}
.prod-collection {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 20px;
}
.prod-title {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 3rem;
    font-weight: 100; /* Nét siêu mỏng */
    line-height: 1.1;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 15px;
}
.prod-sku {
    font-size: 13px;
    color: #555;
    letter-spacing: 1px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
}
.prod-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* --- CÁC NÚT CALL TO ACTION --- */
.prod-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 50px;
}
.btn-primary, .btn-secondary {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 22px 40px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 2px;
}
.btn-primary { background-color: #111; color: #fff; }
.btn-primary:hover { background-color: #444; }
.btn-secondary { background-color: transparent; color: #111; border: 1px solid #111; }
.btn-secondary:hover { background-color: #111; color: #fff; }

/* --- ACCORDION KẾ THỪA --- */
.prod-accordion { margin-top: 40px; }
.prod-accordion details { border-bottom: 1px solid #eaeaea; }
.prod-accordion summary {
    padding: 20px 0; font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; list-style: none; display: flex; justify-content: space-between;
    cursor: pointer; color: #111;
}
.prod-accordion summary::-webkit-details-marker { display: none; }
.prod-accordion summary::after { content: '+'; font-size: 20px; font-weight: 300; color: #888; }
.prod-accordion details[open] summary::after { content: '-'; }
.acc-content { padding-bottom: 20px; font-size: 14px; color: #555; line-height: 1.6; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 991px) {
    .product-detail-wrapper { flex-direction: column; gap: 40px; }
    .product-info { width: 100%; }
    .sticky-top { position: relative; top: 0; }
    .prod-title { font-size: 2.5rem; }
}

/* --- TRANG ĐIỂM CHO DANH SÁCH THÔNG SỐ KỸ THUẬT --- */
.tech-specs-list p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin: 0 !important;
    border-bottom: 1px solid #eaeaea;
}
.tech-specs-list p:last-child {
    border-bottom: none; /* Dòng cuối cùng ẩn vạch kẻ */
}
.tech-specs-list p span {
    color: #666;
    font-size: 13px;
}
.tech-specs-list p strong {
    color: #111;
    font-weight: 600;
    font-size: 13px;
    text-align: right;
    max-width: 60%; /* Giới hạn chiều rộng để chữ không tràn */
}

/* --- SẢN PHẨM LIÊN QUAN --- */
.related-products-section {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #eaeaea;
}
.related-title {
    font-size: 1.5rem;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: #111;
}

/* Slider ngang */
.ap-related-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
}
.related-item {
    flex: 0 0 250px; /* Mỗi sản phẩm rộng 250px */
    scroll-snap-align: start;
}
.rel-thumb img {
    background: #f6f6f6;
    width: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    margin-bottom: 15px;
}
.related-item h4 {
    font-size: 14px;
    margin: 0 0 5px;
    color: #111;
}
.rel-sku {
    font-size: 11px;
    color: #888;
}

/* --- TỐI ƯU GIAO DIỆN MOBILE (CHUẨN UX LUXURY) --- */
@media (max-width: 991px) {
    .ap-single-product {
        padding-top: 100px !important; /* Header mobile thường thấp hơn */
    }
    
    .product-detail-wrapper {
        gap: 20px; /* Thu hẹp khoảng cách ảnh và chữ */
    }

    /* Thu nhỏ khung ảnh để không che hết màn hình */
    .product-gallery {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px; /* Thêm tí khoảng thở 2 bên */
    }
    
    .ap-product-slider .slide-item {
        max-height: 400px; /* Ép ảnh không quá cao */
    }
    .ap-product-slider img {
        object-fit: contain; /* Đảm bảo không bị cắt mất chi tiết đồng hồ */
        max-height: 500px;
    }

    /* Cột nội dung: Dàn trải lại cho sang */
    .product-info {
        width: 100%;
        padding: 0 20px;
    }
    .prod-title {
        font-size: 2rem; /* Giảm size chữ cho vừa khung hình */
        margin-bottom: 10px;
    }
    .prod-actions {
        margin-bottom: 30px;
    }
    .btn-primary, .btn-secondary {
        padding: 18px 20px; /* Nút bấm vừa vặn hơn trên tay cầm */
    }
}

/* --- BỎ GẠCH CHÂN TIÊU ĐỀ SẢN PHẨM LIÊN QUAN --- */
.related-item a, 
.related-item a:hover, 
.related-item a:focus {
    text-decoration: none !important; /* Loại bỏ gạch chân */
    border: none !important;          /* Loại bỏ viền nếu có */
    outline: none !important;         /* Loại bỏ khung viền khi click */
}

.related-item h4 {
    text-decoration: none !important;
    border-bottom: none !important;   /* Đặc biệt khử cái gạch chân dưới h4 */
}