/* Điều Hòa Nam Anh — product cards. */

/* =========================
   PRODUCT ITEM
========================= */

.product-small.box {
    position: relative;
    background: #fff;
    border: 1px solid var(--nam-anh-border);
    border-radius: 16px;
    overflow: hidden;
    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
	padding: 8px;
}

/* Hover card */
.product-small.box:hover {
    transform: translateY(-5px);
    border-color: rgba(8,119,209,.25);
    box-shadow: 0 12px 35px rgba(8,119,209,.13);
}

/* =========================
   IMAGE
========================= */

.product-small.box .box-image {
    position: relative;
    background: #f7fbff;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

/* Background nhẹ phía sau ảnh */
.product-small .box-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(234,245,255,.15) 0%,
        rgba(255,255,255,0) 70%
    );
    pointer-events: none;
}

/* Ảnh sản phẩm */
.product-small .box-image img {
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

/* Zoom ảnh khi hover */
.product-small:hover .box-image img:first-child {
    transform: scale(1.045);
}

/* =========================
   HOVER IMAGE
========================= */

.product-small.col .show-on-hover.back-image {
    transition: opacity .35s ease, transform .5s ease;
}

.product-small:hover .show-on-hover.back-image {
    transform: scale(1.03);
}

/* =========================
   SALE BADGE
========================= */

.badge-container {
    top: 12px;
    left: 12px;
    z-index: 5;
}

.badge-circle {
    width: auto;
    height: auto;
}

.badge-circle .badge-inner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--nam-anh-blue),
        var(--nam-anh-blue-dark)
    ) !important;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 5px 15px rgba(8,119,209,.28);
}

.badge-circle .onsale {
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.2px;
}

/* =========================
   PRODUCT CONTENT
========================= */

.product-small .box-text {
    padding: 15px 16px 18px;
    background: #fff;
}

/* =========================
   CATEGORY
========================= */

.product-small .product-cat {
    display: inline-flex;
    align-items: center;

    margin-bottom: 7px;

    color: var(--nam-anh-blue) !important;
    background: var(--nam-anh-blue-light);

    padding: 4px 9px;
    border-radius: 6px;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    line-height: 1.2;

    text-transform: uppercase;
}

/* =========================
   PRODUCT TITLE
========================= */

.product-small .product-title {
    margin: 0 0 9px;

    min-height: 42px;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;

    letter-spacing: -.15px;
}

.product-small .product-title a {
    color: var(--nam-anh-text);
    transition: color .2s ease;
}

.product-small:hover .product-title a {
    color: var(--nam-anh-blue);
}

/* =========================
   PRICE
========================= */

.product-small .price-wrapper {
    margin-top: 7px;
}

.product-small .price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

/* Giá cũ */
.product-small .price del {
    order: 1;

    color: #9aa5b1;
    font-size: 12px;
    font-weight: 500;
}

/* Giá bán */
.product-small .price ins {
    order: 0;

    text-decoration: none;

    color: var(--nam-anh-blue);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.product-small .price ins .woocommerce-Price-currencySymbol {
    font-size: 14px;
    font-weight: 700;
}

/* =========================
   CURRENCY
========================= */

.product-small .woocommerce-Price-amount {
    white-space: nowrap;
}

/* =========================
   CARD TOP LIGHT EFFECT
========================= */

.product-small.box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;

    height: 3px;

    background: linear-gradient(
        90deg,
        var(--nam-anh-blue),
        #4da8ef
    );

    border-radius: 0 0 5px 5px;

    opacity: 0;
    transform: scaleX(.5);

    transition:
        opacity .3s ease,
        transform .3s ease;

    z-index: 10;
}

.product-small.box:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 549px) {

    .product-small {
        border-radius: 12px;
    }

    .product-small .box-text {
        padding: 11px 11px 14px;
    }

    .product-small .product-title {
        font-size: 13px;
        line-height: 1.4;
        min-height: 37px;
    }

    .product-small .price ins {
        font-size: 15px;
    }

    .product-small .price del {
        font-size: 11px;
    }

    .product-small .product-cat {
        font-size: 9px;
        padding: 3px 7px;
    }

    .badge-container {
        top: 8px;
        left: 8px;
    }

    .badge-circle .badge-inner {
        width: 43px;
        height: 43px;
    }

    .badge-circle .onsale {
        font-size: 11px;
    }
}

/* =========================
   4 COLUMN DESKTOP
========================= */

@media (min-width: 850px) {

    .product-small .box-image {
        aspect-ratio: 1 / 1;
    }

}

/* =========================
   REMOVE UNNECESSARY SPACING
========================= */

.product-small .title-wrapper {
    margin-bottom: 0;
}

.product-small .price-wrapper {
    min-height: auto !important;
}

/* =========================
   SMOOTH CARD
========================= */

.product-small,
.product-small img,
.product-small .product-title a {
    -webkit-font-smoothing: antialiased;
}

