/* ND369 — Woo shop helpers (zero price → Liên hệ, product list tweaks) */
/* =========================================
   STYLE CHO PH?N "LI?N H?" KHI GI? = 0
   ========================================= */
.contact-price,
.price.contact-price,
.woocommerce-Price-amount.contact-price {
    color: var(--text-color) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.contact-price a,
.price.contact-price a,
.woocommerce-Price-amount.contact-price a {
    color: var(--secondary-color) !important;
    font-weight: bold !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 18px !important;
}

.contact-price a:hover,
.price.contact-price a:hover,
.woocommerce-Price-amount.contact-price a:hover {
    color: var(--accent-color) !important;
    text-decoration: underline !important;
}

/* Style cho trang s?n ph?m */
.single-product .contact-price,
.single-product .price.contact-price {
    font-size: 24px !important;
    margin: 20px 0 !important;
}

.single-product .contact-price a,
.single-product .price.contact-price a {
    font-size: 28px !important;
}

/* Style cho danh s?ch s?n ph?m */
.woocommerce ul.products li.product .contact-price,
.woocommerce ul.products li.product .price.contact-price {
    font-size: 16px !important;
    margin: 10px 0 !important;
}

.woocommerce ul.products li.product .contact-price a,
.woocommerce ul.products li.product .price.contact-price a {
    font-size: 18px !important;
}

/* Sắp xếp (orderby) — viền + nền rõ */
.woocommerce .woocommerce-ordering,
.woocommerce-page .woocommerce-ordering {
    margin: 0 0 1.25em !important;
}

.woocommerce .woocommerce-ordering select.orderby,
.woocommerce-page .woocommerce-ordering select.orderby,
.woocommerce .woocommerce-ordering select,
.woocommerce-page .woocommerce-ordering select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 220px;
    max-width: 100%;
    padding: 10px 40px 10px 14px !important;
    border: 1px solid #c5d4e8 !important;
    border-radius: 8px !important;
    background-color: #f0f5fa !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23003366' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px 8px !important;
    color: #003366 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce .woocommerce-ordering select.orderby:hover,
.woocommerce-page .woocommerce-ordering select.orderby:hover,
.woocommerce .woocommerce-ordering select:hover,
.woocommerce-page .woocommerce-ordering select:hover {
    border-color: #004d99 !important;
}

.woocommerce .woocommerce-ordering select.orderby:focus,
.woocommerce-page .woocommerce-ordering select.orderby:focus,
.woocommerce .woocommerce-ordering select:focus,
.woocommerce-page .woocommerce-ordering select:focus {
    outline: none !important;
    border-color: #004d99 !important;
    box-shadow: 0 0 0 3px rgba(0, 77, 153, 0.15) !important;
}

/* Shop / archive: mobile vuốt ngang, card sau lấp ló */
@media (max-width: 900px) {
    body.woocommerce-shop .site-main,
    body.post-type-archive-product .site-main,
    body.tax-product_cat .site-main,
    body.tax-product_tag .site-main {
        overflow-x: hidden;
    }

    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .woocommerce ul.products.columns-4,
    .woocommerce ul.products[class*="columns-"] {
        display: flex !important;
        grid-template-columns: none !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 4px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        padding: 0 4px 12px !important;
        margin: 0 0 24px !important;
        scrollbar-width: none;
        list-style: none !important;
    }

    .woocommerce ul.products::-webkit-scrollbar,
    .woocommerce-page ul.products::-webkit-scrollbar {
        display: none;
    }

    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product,
    .woocommerce ul.products.columns-4 li.product,
    .woocommerce ul.products[class*="columns-"] li.product {
        flex: 0 0 78% !important;
        width: 78% !important;
        max-width: 78% !important;
        min-width: 0 !important;
        margin: 0 !important;
        float: none !important;
        clear: none !important;
        scroll-snap-align: start;
        height: auto !important;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-size: 15px !important;
    }

    .woocommerce ul.products li.product .contact-price,
    .woocommerce ul.products li.product .price.contact-price,
    .woocommerce ul.products li.product .contact-price a,
    .woocommerce ul.products li.product .price.contact-price a {
        font-size: 14px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product,
    .woocommerce ul.products.columns-4 li.product,
    .woocommerce ul.products[class*="columns-"] li.product {
        flex: 0 0 82% !important;
        width: 82% !important;
        max-width: 82% !important;
    }
}


