/* An Việt Gift - Product Card v1.0.4 */

.products .product-small .box,
.products .product .box {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #E8E4DD;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(34, 34, 34, 0.035);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.products .product-small .box:hover,
.products .product .box:hover {
    transform: translateY(-2px);
    border-color: #DDD5C9;
    box-shadow: 0 8px 22px rgba(34, 34, 34, 0.075);
}

.products .product-small .box-image,
.products .product .box-image {
    background: #FFFFFF;
    overflow: hidden;
}

.products .product-small .box-image .image-cover,
.products .product .box-image .image-cover {
    padding-top: 100% !important;
}

.products .product-small .box-image img,
.products .product .box-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.products .product-small .box-text,
.products .product .box-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 14px;
}

/* Flatsome thường in category ngay trên title; card B2B không cần lặp lại. */
.products .box-text .category,
.products .box-text .product-cat,
.products .box-text .is-smaller.uppercase {
    display: none !important;
}

/* Dải B2B 2 tầng: ngắn, dễ quét mắt, không nặng chữ. */
.avg-card-strip {
    display: grid;
    grid-template-columns: .9fr 1.25fr;
    min-height: 48px;
    margin: -14px -14px 12px;
    overflow: hidden;
    border-bottom: 1px solid #E8E4DD;
    font-family: "Be Vietnam Pro", sans-serif;
}

.avg-card-strip-logo,
.avg-card-strip-moq {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 0;
    padding: 6px 8px;
    line-height: 1.15;
    text-align: center;
}

.avg-card-strip-logo {
    background: #C62127;
    color: #FFFFFF;
}

.avg-card-strip-moq {
    background: #2F3C45;
    color: #FFFFFF;
}

.avg-card-strip-logo strong,
.avg-card-strip-moq strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.avg-card-strip-logo small,
.avg-card-strip-moq small {
    display: block;
    margin-top: 3px;
    max-width: 100%;
    overflow: hidden;
    opacity: .82;
    font-size: 8.5px;
    font-weight: 500;
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.products .product-title,
.products .name.product-title,
.products .woocommerce-loop-product__title {
    margin: 0 0 10px !important;
    min-height: 44px;
    color: #222222;
    font-family: "Be Vietnam Pro", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.products .product-title a,
.products .name.product-title a,
.products .woocommerce-loop-product__title a {
    color: inherit;
}

.products .product-title a:hover,
.products .name.product-title a:hover {
    color: #C62127;
}

.products .price,
.products .star-rating {
    display: none !important;
}

.avg-card-data {
    margin-top: 0;
}

.avg-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 9px;
}

.avg-card-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #E8E4DD;
    border-radius: 999px;
    background: #FAF7F2;
    color: #4A4A4A;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avg-card-badge-tech {
    background: #FFFFFF;
    border-color: #E4D5B7;
    color: #8A651F;
}

.avg-card-leadtime {
    margin: 0;
    color: #666666;
    font-size: 11.5px;
    line-height: 1.45;
}

.avg-card-leadtime span {
    color: #666666;
}

.avg-card-leadtime strong {
    color: #333333;
    font-weight: 600;
}

.avg-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr);
    gap: 7px;
    width: 100%;
    margin-top: auto;
    padding-top: 13px;
}

.avg-card-detail,
.avg-card-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin: 0 !important;
    padding: 8px 6px;
    border-radius: 6px;
    font-family: "Be Vietnam Pro", sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none !important;
    letter-spacing: 0;
    text-transform: uppercase;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.avg-card-detail {
    border: 1px solid #C62127;
    background: #FFFFFF;
    color: #C62127 !important;
}

.avg-card-detail:hover {
    background: #FFF5F5;
    border-color: #A81B20;
    color: #A81B20 !important;
}

.avg-card-quote {
    border: 1px solid #C62127;
    background: #C62127;
    color: #FFFFFF !important;
}

.avg-card-quote:hover {
    border-color: #A81B20;
    background: #A81B20;
    color: #FFFFFF !important;
}

.avg-card-actions a::after,
.avg-card-actions button::after {
    display: none !important;
}

@media (max-width: 849px) {
    .products .product-small .box-text,
    .products .product .box-text {
        padding: 12px;
    }

    .avg-card-strip {
        margin: -12px -12px 11px;
    }

    .avg-card-actions {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 549px) {
    .products .product-small .box-text,
    .products .product .box-text {
        padding: 11px 10px 10px;
    }

    .avg-card-strip {
        grid-template-columns: .88fr 1.22fr;
        min-height: 44px;
        margin: -11px -10px 10px;
    }

    .avg-card-strip-logo,
    .avg-card-strip-moq {
        padding: 5px 5px;
    }

    .avg-card-strip-logo strong,
    .avg-card-strip-moq strong {
        font-size: 9.5px;
    }

    .avg-card-strip-logo small,
    .avg-card-strip-moq small {
        margin-top: 2px;
        font-size: 7.5px;
    }

    .products .product-title,
    .products .name.product-title,
    .products .woocommerce-loop-product__title {
        min-height: 40px;
        font-size: 13px;
    }

    /* Mobile ưu tiên thông tin mua hàng cốt lõi: ẩn badge chất liệu/công nghệ. */
    .avg-card-badges {
        display: none !important;
    }

    .avg-card-leadtime {
        margin-top: 2px;
        font-size: 10px;
    }

    /* Ảnh + tên sản phẩm đã dẫn tới trang chi tiết; mobile chỉ giữ CTA chính. */
    .avg-card-detail {
        display: none !important;
    }

    .avg-card-actions {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 9px;
    }

    .avg-card-quote {
        min-height: 37px;
        font-size: 10px;
    }
}
