/*
Theme Name: Urna Child
Theme URI: https://urnawp.com/
Author: Thembay
Description: This is a child theme for Urna
Version: 1.0.5
Author URI: https://thembay.com/
Template: urna
Text Domain: urna-child
*/

/* ═══════════════════════════════════════════
   1. GLOBAL / FOOTER
   ═══════════════════════════════════════════ */

/* Footer: ẩn cột Danh Mục */
.elementor-element-11f659cc {
    display: none !important;
}

/* Giảm khoảng cách trên trang con (trừ trang chủ) */
.page:not(.home) .site-main,
.page:not(.home) #main-container {
    padding-top: 10px !important;
}

.page:not(.home) .entry-content {
    margin-top: 0 !important;
}

/* Ẩn mục Guaranteed Safe Checkout */
.widget-text-safe-checkout,
.tbay-addon-safe-checkout,
.safe-checkout__content,
.elementor-element-b274a00 {
    display: none !important;
}

/* Ẩn bộ lọc Màu Sắc (pa_color) trong sidebar */
.woof_container_pa_color,
.widget_woof .woof_container_pa_color {
    display: none !important;
}

/* Checkout: Số điện thoại → bắt buộc (thêm sao đỏ, ẩn "tùy chọn") */
#billing_phone_field .optional {
    display: none !important;
}

#billing_phone_field label::after {
    content: " *";
    color: #e01020;
    font-weight: bold;
}

/* ═══════════════════════════════════════════
   2. SẢN PHẨM LOOP: NÚT WISHLIST
   ═══════════════════════════════════════════ */

/* Reset container Wishlist */
.product-block .button-wishlist .yith-wcwl-add-to-wishlist {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* Wrapper con YITH hiển thị block */
.product-block .button-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-add-button,
.product-block .button-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse,
.product-block .button-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Nút link (a) trong loop */
.product-block .group-buttons .button-wishlist .yith-wcwl-add-to-wishlist a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #e5e5e5 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    background-color: #fff !important;
    color: #555 !important;
    font-size: 0 !important;
    box-shadow: none !important;
    float: none !important;
}

/* Icon nút */
.product-block .group-buttons .button-wishlist .yith-wcwl-add-to-wishlist a i {
    font-size: 16px !important;
    line-height: 1 !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Feedback text ẩn, giữ icon */
.product-block .button-wishlist .yith-wcwl-add-to-wishlist span.feedback {
    font-size: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 38px !important;
}

.product-block .button-wishlist .yith-wcwl-add-to-wishlist span.feedback i {
    font-size: 16px !important;
    display: inline-block !important;
    line-height: 1 !important;
    color: var(--tb-theme-color) !important;
    margin: 0 !important;
}

/* Ẩn tất cả text dư thừa */
.product-block .button-wishlist .yith-wcwl-add-to-wishlist a>span,
.product-block .button-wishlist .yith-wcwl-add-to-wishlist span span,
.product-block .button-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse>a>span,
.product-block .button-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse>a>span {
    display: none !important;
}

/* Màu khi đã thích */
.product-block .group-buttons .button-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a,
.product-block .group-buttons .button-wishlist .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a {
    color: var(--tb-theme-color) !important;
}

/* Hover */
.product-block .group-buttons .button-wishlist .yith-wcwl-add-to-wishlist a:hover {
    background-color: var(--tb-theme-color) !important;
    border-color: var(--tb-theme-color) !important;
    color: #fff !important;
}

.product-block .group-buttons .button-wishlist .yith-wcwl-add-to-wishlist a:hover i {
    color: #fff !important;
    font-size: 16px !important;
    display: inline-block !important;
}

/* ═══════════════════════════════════════════
   3. SẢN PHẨM CHI TIẾT: NÚT WISHLIST
   ═══════════════════════════════════════════ */

/* Form cart nằm ngang */
.single-product div.product form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px;
}

.single-product div.product form.cart .group-button {
    display: inline-flex !important;
    align-items: center !important;
    margin-left: 5px;
}

.single-product div.product form.cart .group-button .tbay-wishlist {
    display: inline-flex !important;
    align-items: center !important;
}

/* Nút wishlist trang chi tiết */
.single-product div.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px;
    height: 44px;
    border: 1px solid #e5e5e5 !important;
    cursor: pointer;
}

.single-product div.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a i {
    font-size: 18px !important;
    margin: 0 !important;
}

.single-product div.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a span {
    display: none !important;
}

/* Feedback + browse link trang chi tiết */
.single-product div.product .yith-wcwl-wishlistaddedbrowse>span.feedback,
.single-product div.product .yith-wcwl-wishlistexistsbrowse>span.feedback {
    font-size: 0 !important;
}

.single-product div.product .yith-wcwl-wishlistaddedbrowse>span.feedback i,
.single-product div.product .yith-wcwl-wishlistexistsbrowse>span.feedback i {
    font-size: 18px !important;
}

.single-product div.product .yith-wcwl-wishlistaddedbrowse>a,
.single-product div.product .yith-wcwl-wishlistexistsbrowse>a {
    display: none !important;
}

/* Nút delete_item + view-wishlist ẩn */
.single-product div.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.delete_item {
    font-size: 0 !important;
    color: var(--tb-theme-color) !important;
}

.single-product div.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.delete_item i {
    font-size: 18px !important;
}

.single-product div.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button a.view-wishlist,
.single-product div.product .yith-wcwl-add-to-wishlist .yith-wcwl-add-button span.separator {
    display: none !important;
}

/* ═══════════════════════════════════════════
   4. ICON LIÊN HỆ (Messenger, Zalo, Phone)
   ═══════════════════════════════════════════ */

/* Tắt animation rung */
.wp-elce .elce-phone-img-circle,
.wp-elce .elce-phone-circle-fill {
    animation: none !important;
    -webkit-animation: none !important;
}

/* Khoảng cách + vị trí */
.wp-elce .elce-contact {
    margin-bottom: -20px;
}

.wp-elce {
    bottom: 50px !important;
}

/* Đổi màu Messenger → xanh Zalo */
#elce-messenger .elce-phone-circle-fill {
    box-shadow: 0 0 0 0 #2196f3 !important;
    background-color: rgba(33, 150, 243, 0.7) !important;
}

#elce-messenger .elce-phone-img-circle {
    background-color: #2196F3 !important;
}

#elce-messenger .elce-phone-img-circle img {
    filter: brightness(0) invert(1);
}

/* ═══════════════════════════════════════════
   5. MOBILE (max-width: 991px)
   ═══════════════════════════════════════════ */

@media (max-width: 991px) {
    .footer-device-mobile {
        display: flex !important;
        z-index: 99999 !important;
    }

    .single-product .footer-device-mobile,
    .woocommerce-cart .footer-device-mobile,
    .woocommerce-checkout .footer-device-mobile {
        display: flex !important;
    }

    /* Vị trí nút liên hệ */
    body .wp-elce {
        bottom: 100px !important;
    }

    body .wp-elce .phone-bar a {
        bottom: 120px !important;
    }

    /* Tăng size icon header mobile */
    .topbar-device-mobile .mmenu-open i,
    .topbar-device-mobile .mini-cart i,
    .topbar-device-mobile .linear-icon-home3 {
        font-size: 28px !important;
    }

    /* Giỏ hàng popup: nằm trên thanh footer mobile */
    .tbay-offcanvas,
    .tbay-offcanvas-overlay {
        z-index: 9999999 !important;
    }
    /* Hiển thị cả 2 nút Thanh toán + Xem Giỏ Hàng */
    .mini_cart_content .buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    .mini_cart_content .buttons .button {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
    .mini_cart_content .buttons .button.checkout {
        background-color: var(--tb-theme-color, #c31d1d) !important;
        color: #fff !important;
        order: -1 !important;
    }
}