/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

.location-container {
    display: flex;
    align-items: center;
    font-family: Roboto, sans-serif;
    text-decoration: none;
    /* Bỏ gạch chân nếu là link */
    color: #333;
    width: fit-content;
}

a.lien-he-location {
    text-decoration: unset;
}

.location-icon {
    color: #fbb042;
    /* Màu cam giống trong hình */
    font-size: 15px;
    margin-right: 10px;
    margin-bottom: 5px;
}

span.location-text:hover {
    color: #fbb042;
}

.location-text {
    font-size: 13px;
    color: #333;
    border-right: 1px solid #333;
    padding-right: 20px;
}

/* 1. Đổi màu toàn bộ chữ và icon bên trong khi hover vào container */
.contact-info-page:hover * {
    color: #ffffff !important;
}


.contact-info-page:hover svg {
    fill: #ffffff !important;
}

/* 3. (Tùy chọn) Thêm hiệu ứng chuyển màu mượt mà */
.contact-info-page * {
    transition: all 0.3s ease-in-out !important;
}



.blocksy-parent-filter .parent-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.child-list {
    list-style: none;
    padding-left: 0;
}

.child-list li {
    margin-bottom: 6px;
}

[data-products=type-2] figure .ct-media-container {
    width: 100% !important;
    margin: 0 auto;
    height: 200px;
}

[data-products=type-2] figure .ct-media-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

h2.woocommerce-loop-product__title,
span.blocksy-product-sales,
span.blocksy-product-shipping {
    text-align: left;
}

span.blocksy-product-shipping {
    background: #F0F2F5;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
}

.blocksy-product-extra-info {
    width: 100%;
}

.woo-listing-top .woocommerce-ordering {
    margin-inline-start: unset !important;
}

/* Hide default WooCommerce sorting */
.woocommerce-ordering,
.woocommerce-result-count,
.woo-listing-top .woocommerce-ordering {
    display: none !important;
}

/* Show custom sorting */
.blocksy-custom-sorting {
    display: flex !important;
}

@media (max-width: 767px) {
    .archive main#main section {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding-inline: 15px;
    }

    .woocommerce-products-header {
        order: 1;
        width: 100%;
    }

    .woo-listing-top {
        order: 2;
        width: auto !important;
        margin-bottom: 10px !important;
        display: flex !important;
    }

    .blocksy-custom-sorting {
        order: 3;
        margin-bottom: 10px !important;
    }

    .woocommerce-notices-wrapper {
        order: 4;
        width: 100%;
    }

    .ct-products-container {
        order: 5;
        width: 100%;
    }

    .blocksy-blog-pagination {
        order: 6;
        width: 100%;
    }

    .archive-product-footer {
        display: block !important;
    }
}

.distanse {
    width: 90%;
    height: 1px;
    background: #dee2e6;
    margin: 6px auto 4px;
}

.blocksy-pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f3f4f6;
}

.blocksy-blog-pagination .page-numbers:hover:not(.disabled):not(.active) {
    border-color: #fbb042;
    color: #fbb042;
    background-color: #fff5f2;
}

[data-products=type-3] .product {
    overflow: hidden;
    box-shadow: var(--theme-box-shadow);
    border: 1px solid #f7f7f7;
    background: #f7f7f7;
    --horizontal-alignment: left;
    --text-horizontal-alignment: left;
    padding-bottom: 10px;
    border-radius: 6px;
}

/* [data-products=type-3] figure .ct-media-container {
    width: 100% !important;
    margin: 0 auto;
    height: 200px;
} */

/*[data-products=type-3] figure .ct-media-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}*/

h4.related-entry-title a {
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
}

h3.blocksy-contact-form-title {
    font-weight: 400;
    font-size: 20px;
    text-align: center;
}

.ff-default .ff-el-form-control:focus {
    background-color: #fff;
    border-color: #fbb042 !important;
}

/* .blocksy-contact-form-content {
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ccc;
} */

@media (max-width: 767px) {
    .custom-woo-categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hot-sale-left img {
        height: 40px !important;
    }

    .hot-sale-countdown .cd-item {
        padding: 6px 6px;
        min-width: 50px;
    }

    .hot-sale-countdown .cd-item span {
        display: block;
        font-size: 18px;
    }

    .hot-sale-countdown .cd-item .distance {
        margin: 2px auto 2px !important;
    }

    .hot-sale-header {
        flex-direction: column;
    }

    .blocksy-blog-pagination {
        margin-top: 30px !important;
    }

    .blocksy-subcategories-list {
        flex-wrap: nowrap !important;
        /* Không cho wrap xuống dòng */
        overflow-x: auto;
        /* Cho phép scroll ngang */
        -webkit-overflow-scrolling: touch;
        /* Scroll mượt hơn trên iOS */
        padding-bottom: 10px;
        /* Khoảng trống dưới để dễ thấy scrollbar hoặc finger scroll */
        gap: 12px;
        /* Giữ khoảng cách giữa các item (tùy chỉnh nếu cần) */
    }

    .blocksy-subcategories-list>li {
        flex-shrink: 0;
        /* Không cho các item co lại */
    }

    /* Ẩn scrollbar nếu muốn đẹp hơn (vẫn scroll được bằng chạm) */
    .blocksy-subcategories-list::-webkit-scrollbar {
        display: none;
    }

    .blocksy-subcategories-list {
        -ms-overflow-style: none;
        /* IE và Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .hot-sale-right {
        flex-wrap: nowrap !important;
        /* Không xuống dòng */
        overflow-x: auto;
        /* Cho cuộn ngang */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Ẩn thanh cuộn Firefox */
        -ms-overflow-style: none;
        /* Ẩn thanh cuộn IE/Edge */
    }

    .hot-sale-right::-webkit-scrollbar {
        display: none;
        /* Ẩn thanh cuộn Chrome/Safari */
    }

    /* Quan trọng: không cho mỗi ô sản phẩm bị co lại */
    .hot-sale-right>* {
        flex-shrink: 0;
    }

    /* Nếu muốn mỗi ô vẫn giữ chiều cao đồng đều */
    .hot-sale-right>* {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .aps-testimonial-badge-image {
        display: none !important;
    }

    /* [data-products=type-3] figure .ct-media-container {
        height: 120px !important;
    } */

    .blocksy-product-extra-info {
        display: block !important;
    }
}

/* Quick Add to Cart Overlay for Subcat Products */
.subcat-product-item {
    position: relative;
    overflow: hidden;
}

.subcat-product-item figure {
    position: relative;
    width: 100%;
    margin: 0 0 15px 0;
    overflow: hidden;
}

.subcat-product-item .ct-woo-card-extra {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 15px;
    right: 15px;
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    --theme-icon-size: 14px;
    --theme-icon-color: currentColor;
    --theme-button-border: none;
    --theme-button-shadow: none;
    --theme-button-transform: none;
}

@media (any-hover: none) {
    .subcat-product-item .ct-woo-card-extra[data-type="type-2"] {
        bottom: 15px;
        opacity: 1;
    }
}

@media (any-hover: hover) {
    .subcat-product-item:hover .ct-woo-card-extra[data-type="type-2"] {
        opacity: 1;
        bottom: 15px;
    }
}

.subcat-product-item .ct-woo-card-extra :is(a, button) {
    justify-content: center;
    padding: 5px;
    border-radius: 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    background-color: #ffffff00;
    color: #fbb042;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subcat-product-item .ct-woo-card-extra :is(a, button):hover {
    background-color: #ffffff00;
    color: #fbb042;
}

.subcat-product-item .ct-woo-card-extra :is(a, button).loading svg {
    display: none;
}

.subcat-product-item .ct-woo-card-extra :is(a, button).added_to_cart,
.subcat-product-item .ct-woo-card-extra :is(a, button)[data-button-state="active"] {
    color: var(--theme-button-text-hover-color, #fff);
    background-color: var(--theme-button-background-hover-color, #fbb042);
}

/* Tooltip styles */
.subcat-product-item .ct-woo-card-extra .ct-tooltip {
    display: flex;
    align-items: center;
    z-index: 200;
    width: auto;
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: normal;
    color: #fff;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
    border-radius: 3px;
    pointer-events: none;
    background: #363f42;
    transition: opacity .2s cubic-bezier(0.455, 0.03, 0.515, 0.955), transform .2s cubic-bezier(0.455, 0.03, 0.515, 0.955), visibility .2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.subcat-product-item .ct-woo-card-extra .ct-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* .subcat-product-item .ct-woo-card-extra :is(a, button):hover .ct-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-50px);
} */

.subcat-product-item .ct-woo-card-extra :is(a, button) {
    position: relative;
}

.archive .price {
    color: #fbb042;
}

.ct-woo-card-extra svg.ct-icon {
    width: 20px;
    height: 20px;
}

.page-id-2697 .ct-container-full {
    padding-top: 30px;
}

.archive h2.woocommerce-loop-product__title a {
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
    height: 43px;
}

[data-products] .product .woocommerce-loop-product__title,
.archive-product-footer {
    padding: 0px 10px;
}

.archive-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.archive-price-wrapper .price,
.archive-price-wrapper .sale-price {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.3 !important;
    align-items: flex-start !important;
    flex: 1;
}

.archive-price-wrapper ins {
    text-decoration: none !important;
    display: block !important;
}

.archive-price-wrapper del {
    font-size: 13px !important;
    color: #999 !important;
    font-weight: 400 !important;
    display: block !important;
    line-height: 1 !important;
}

.archive-product-sales {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    flex-shrink: 0;
}

.blocksy-product-extra-info span.sale-price {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.3 !important;
    align-items: flex-start !important;
}

.related h2.woocommerce-loop-product__title a {
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: -webkit-box;
    height: 40px;
}

/* MISA Webform Custom Styling */
/* .misa-webform-container {
    max-width: 800px;
    margin: 20px auto 0;
    font-family: var(--theme-font-family, sans-serif);
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
} */

.misa-webform-container h3,
.misa-webform-container strong {
    font-size: 18px;
    margin-bottom: 20px;
    display: block;
    color: #333;
}

div#crmWebToEntityForm {
    margin-top: -40px;
}

/* Override MISA Table Layout */
.misa-webform-container table {
    width: 100% !important;
    background: transparent !important;
    max-width: 100% !important;
    display: block !important;
    /* Force table to behave like block */
}

.misa-webform-container tbody {
    display: block !important;
    padding: 10px;
}

.misa-webform-container tr {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

/* Ensure hidden rows remain hidden */
.misa-webform-container tr[style*="display:none"],
.misa-webform-container tr[style*="display: none"] {
    display: none !important;
}

.misa-webform-container td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
}

/* Hide empty Spacer rows/cols if any */
.misa-webform-container td:empty {
    display: none !important;
}

/* Labels */
.misa-webform-container td:first-child {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    font-family: var(--theme-font-family, sans-serif) !important;
}

/* Input Fields */
.misa-webform-container input[type="text"],
.misa-webform-container input[type="email"],
.misa-webform-container input[type="tel"],
.misa-webform-container select,
.misa-webform-container textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px !important;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    height: 45px !important;
    box-shadow: none;
    font-family: var(--theme-font-family, sans-serif) !important;
}

.misa-webform-container textarea {
    height: 120px !important;
    resize: vertical;
}

.misa-webform-container input:focus,
.misa-webform-container select:focus,
.misa-webform-container textarea:focus {
    border-color: #fbb042 !important;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(251, 176, 66, 0.1);
    outline: none;
}

/* Submit Button Container */
.misa-webform-container tr:last-child {
    margin-top: 10px;
    margin-bottom: 0 !important;
}

/* Submit Button */
.misa-webform-container input[type="submit"] {
    background: #fbb042 !important;
    color: #fff !important;
    border: none !important;
    padding: 0 40px !important;
    height: 50px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: 0 4px 15px rgba(251, 176, 66, 0.3);
    margin-top: 10px;
}

.misa-webform-container input[type="submit"]:hover {
    background: #e69b30 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 176, 66, 0.4);
}

.misa-webform-container input[type="submit"]:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.misa-webform-container input[type="reset"] {
    display: none !important;
}

/* Form Title (The 'Form123' row) - hide it if ugly or style it */
.misa-webform-container tr:first-child td[colspan="2"] {
    display: none !important;
    /* Hiding the default MISA title row usually looks better */
}