/* ==========================================================================
   AGENCY WOOCOMMERCE SINGLE CORE SYSTEM (ĐỒNG BỘ MÀU SẮC BIẾN GỐC)
   ========================================================================== */

/* Khung lớn của trang sản phẩm */
.woocommerce div.product { 
    max-width: 1200px !important; 
    width: 100% !important; 
    padding: 0 15px !important; 
    box-sizing: border-box !important;
    margin: 0 auto !important; 
    clear: both; 
}

/* Thanh điều hướng Breadcrumb mặc định */
.woocommerce-breadcrumb { 
    padding-top: 160px !important; 
    max-width: 1200px !important; 
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    margin: 0 auto 20px auto !important; 
    font-family: var(--font-sans) !important; 
    font-weight: 300 !important; 
    font-size: 13px !important; 
    line-height: 1.5 !important; 
    color: var(--text-grey) !important; 
}

.woocommerce-breadcrumb a {
    color: var(--text-grey) !important;
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    color: var(--midori-accent) !important;
}

/* ==========================================================================
   RELATED PRODUCTS GRID SYSTEM
   ========================================================================== */
.related.products {
    margin: 60px auto 40px auto !important;
    max-width: 1200px !important;
    width: 100% !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

.related.products > h2 {
    font-family: var(--font-serif) !important;
    font-size: 32px !important; 
    color: var(--text-title) !important; 
    font-weight: 500 !important;
    margin-bottom: 35px !important;
    text-align: center !important;
}

.related.products .midori-product-grid {
    margin: 0 !important;
    padding: 0 !important;
}

/* Slide progress bar cho di động */
.esight-slider-progress {
    display: none;
    width: 120px !important;
    height: 4px !important;
    background-color: var(--midori-primary) !important;
    margin: 20px auto 0 auto !important;
    position: relative !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

.esight-slider-thumb {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    background-color: var(--midori-accent-dark) !important;
    border-radius: 4px !important;
    transition: transform 0.3s ease-out !important;
}

/* Responsive cấu trúc */
@media (max-width: 1024px) {
    body.single-product .container,
    body.single-product .site-content,
    body.single-product #content,
    body.single-product #primary,
    body.single-product .site-main {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .woocommerce-breadcrumb { 
        padding-top: 100px !important; 
    }
}

@media (max-width: 767px) {
    .related.products .midori-product-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 15px !important;
        padding-bottom: 15px !important;
    }
    .related.products .midori-product-grid::-webkit-scrollbar {
        display: none !important;
    }
    
    .related.products .midori-product-grid .midori-product-card {
        flex: 0 0 100% !important; 
        scroll-snap-align: start !important;
    }

    .esight-slider-progress {
        display: block !important;
    }
}