/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://elementor.com/hello-theme/
 Description:  Hello Elementor Child Theme
 Author:       Elementor Team
 Author URI:   https://elementor.com/
 Template:     hello-elementor
 Version:      1.0.7
 Text Domain:  hello-elementor-child
*/

/* ==========================================================================
   1. GLOBAL WOOCOMMERCE ARCHIVE / SHOP GRID (3D PROTRUDING CARD DESIGN)
   ========================================================================== */

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 55px 24px !important;
    padding-top: 45px !important;
    margin: 0 0 40px 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px 16px 20px 16px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    position: relative !important;
    transition: transform .35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow .35s ease !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12) !important;
}

/* Ảnh Sản Phẩm Nổi 3D Trồi Lên Khung */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img {
    margin: -40px 0 0 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 22px -2px rgba(0, 0, 0, 0.16) !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    transition: transform .4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow .4s ease !important;
}

.woocommerce ul.products li.product:hover a.woocommerce-LoopProduct-link img {
    transform: scale(1.04) !important;
    box-shadow: 0 14px 26px -2px rgba(0, 0, 0, 0.22) !important;
}

/* Khối Thông Tin Dưới */
.woo-card-info-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    flex-grow: 1 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 4px 4px 0 4px !important;
}

/* Category Badge */
.woo-card-info-block .woo-loop-cat-badge {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #d97706 !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
}

/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
    transition: color .2s ease !important;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__title {
    color: #d97706 !important;
}

/* Chữ "Liên hệ để báo giá" */
.woocommerce ul.products li.product .price,
.woo-card-info-block .price-quote-text {
    font-size: 14px !important;
    color: #64748b !important;
    margin: 0 0 16px 0 !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
}

/* Nút Yêu Cầu Báo Giá */
.woo-card-btn-quote {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    background: #18181b !important;
    color: #ffffff !important;
    padding: 11px 16px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    margin-top: auto !important;
    transition: background-color .2s ease !important;
}

.woo-card-btn-quote:hover {
    background: #3f3f46 !important;
    color: #ffffff !important;
}

/* Ẩn nút mặc định của WooCommerce */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
    display: none !important;
}


/* ==========================================================================
   2. SINGLE PRODUCT PAGE LAYOUT
   ========================================================================== */

body.single-product {
    background-color: #f8fafc !important;
}

.single-product div.product {
    max-width: 1140px !important;
    margin: 30px auto 40px auto !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 30px 35px 35px 35px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08) !important;
    position: relative !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Breadcrumb Nằm Trong Khung Card Trên Cùng */
.single-product div.product .woocommerce-breadcrumb {
    width: 100% !important;
    flex: 0 0 100% !important;
    font-size: 13px !important;
    color: #94a3b8 !important;
    margin: 0 0 22px 0 !important;
    padding-bottom: 0 !important;
}

.single-product div.product .woocommerce-breadcrumb a {
    color: #64748b !important;
    text-decoration: none !important;
}

.single-product div.product .woocommerce-breadcrumb a:hover {
    color: #0284c7 !important;
}

/* Cột Ảnh Sản Phẩm Trái */
.single-product div.product div.images {
    width: 48% !important;
    flex: 0 0 48% !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.single-product div.product div.images img {
    border-radius: 8px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Cột Thông Tin Sản Phẩm Phải */
.single-product div.product div.summary {
    width: 48% !important;
    flex: 0 0 48% !important;
    padding-left: 30px !important;
    margin: 0 0 0 auto !important;
    box-sizing: border-box !important;
}

.single-product div.product .product_title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 12px 0 !important;
}

.single-product div.product .price,
.single-product div.product .price-quote-text {
    font-size: 16px !important;
    color: #6b7280 !important;
    display: block !important;
    margin-bottom: 15px !important;
}

/* Nút Yêu Cầu Báo Giá trong Single Product */
.single-product-quote-wrapper {
    margin: 15px 0 20px 0 !important;
}

.single-product-quote-btn {
    display: inline-block !important;
    background: #18181b !important;
    color: #ffffff !important;
    padding: 12px 28px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background-color .2s ease, transform .2s ease !important;
}

.single-product-quote-btn:hover {
    background: #3f3f46 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
}

.single-product div.product .product_meta {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 15px !important;
    font-size: 14px !important;
    color: #64748b !important;
}

.single-product div.product .product_meta .posted_in a {
    color: #d97706 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Social Share Icons */
.product-social-share {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 22px !important;
}

.product-social-share .share-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: opacity .2s ease, transform .2s ease !important;
}

.product-social-share .share-btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-2px) !important;
}

.product-social-share .share-fb { background-color: #1877f2 !important; }
.product-social-share .share-tw { background-color: #1da1f2 !important; }
.product-social-share .share-pin { background-color: #e60023 !important; }
.product-social-share .share-in { background-color: #0a66c2 !important; }

/* Related Products (Sản phẩm tương tự) */
.single-product .related.products {
    clear: both !important;
    width: 100% !important;
    max-width: 1140px !important;
    margin: 60px auto 40px auto !important;
    padding-top: 10px !important;
}

.single-product .related.products > h2 {
    text-align: center !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 25px !important;
}


/* ==========================================================================
   3. TOOLTIP HOVER CHO CLASS "congty"
   ========================================================================== */

.congty,
.congty .elementor-heading-title {
    position: relative !important;
    display: inline-block !important;
    cursor: pointer !important;
}

.congty::before,
.congty .elementor-heading-title::before {
    content: "Đại Phát Thành";
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #18181b;
    color: #ffffff;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    z-index: 999999;
}

.congty::after,
.congty .elementor-heading-title::after {
    content: "";
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #18181b transparent transparent transparent;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    z-index: 999999;
}

.congty:hover::before,
.congty:hover::after,
.congty .elementor-heading-title:hover::before,
.congty .elementor-heading-title:hover::after {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}


/* ==========================================================================
   4. DỊCH VỤ CAROUSEL MOBILE
   ========================================================================== */

@media (max-width: 767px) {
    .dichvu.e-con,
    .dichvu.e-grid.e-con {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        grid-template-columns: unset !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        gap: 16px !important;
        padding: 8px 16px 16px 16px !important;
        scroll-snap-type: x mandatory !important;
        align-items: stretch !important;
    }
    .dichvu.e-con::-webkit-scrollbar,
    .dichvu.e-grid.e-con::-webkit-scrollbar {
        display: none !important;
    }
    .dichvu.e-con > .dv1,
    .dichvu.e-con > .dv2,
    .dichvu.e-con > .dv3,
    .dichvu.e-grid.e-con > .dv1,
    .dichvu.e-grid.e-con > .dv2,
    .dichvu.e-grid.e-con > .dv3 {
        flex: 0 0 80vw !important;
        max-width: 80vw !important;
        min-width: 80vw !important;
        width: 80vw !important;
        min-height: unset !important;
        height: auto !important;
        scroll-snap-align: start !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   5. RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 50px 16px !important;
    }
    .single-product div.product {
        padding: 20px !important;
    }
    .single-product div.product div.images,
    .single-product div.product div.summary {
        width: 100% !important;
        flex: 0 0 100% !important;
        padding-left: 0 !important;
    }
    .single-product div.product div.summary {
        margin-top: 25px !important;
    }
}

@media (max-width: 576px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    .single-product-quote-btn {
        display: block !important;
        text-align: center !important;
    }
}
