/* ============================================================
   THM PRODUCT BOX
   Child theme: phongthuy
============================================================ */


/* ============================================================
   PRODUCT COLUMN
============================================================ */

.thm-product-card {
    position: relative;

    margin: 0 !important;
    padding: 0 !important;

    list-style: none;
}


/* ============================================================
   OUTER WRAPPER
   Badge được position theo wrapper này
============================================================ */

.thm-product-card-wrap {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: visible;
}


/* ============================================================
   CARD INNER
   Dùng margin để nền xám co vào
============================================================ */

.thm-product-card-inner {
    position: relative;

    display: flex;
    flex-direction: column;

    height: calc(100% - 14px);

    margin: 7px;

    overflow: hidden;

    background: #111214;

    border: 1px solid rgba(190, 145, 52, 0.28);;
    border-radius: 11px;

    box-shadow: none;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.thm-product-card-wrap:hover
.thm-product-card-inner {
    transform: translateY(-3px);

    border-color: rgba(190, 145, 52, 0.28);;

    box-shadow:
        0 9px 24px rgba(0, 0, 0, .065);
}


/* ============================================================
   BADGES
============================================================ */

.thm-product-badges {
    position: absolute;

    top: 10px;
    left: 0px;

    z-index: 20;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 4px;

    overflow: visible;

    pointer-events: none;
}


/* common */

.thm-product-badge {
    display: inline-flex;

    align-items: center;
    justify-content: flex-start;

    width: auto;
    height: 34px;

    padding:
        0
        18px
        0
        14px;

    color: #fff;

    font-size: 11px;
    line-height: 1;

    font-weight: 600;

    white-space: nowrap;

    background-repeat: no-repeat;
    background-position: left center;
    background-size: 100% 100%;

    text-shadow:
        0 1px 1px rgba(0, 0, 0, .08);
}


/* NEW */

.thm-product-badge-new {
    min-width: 103px;

    background-image:
        url('../images/new.svg');
}


/* SALE */

.thm-product-badge-sale {
    min-width: 88px;

    background-image:
        url('../images/sale.svg');
}


/* ============================================================
   PRODUCT IMAGE
============================================================ */

.thm-product-image {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    aspect-ratio: 1 / 1;

    margin: 0;
    padding: 0px;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #f0f1f2 0%,
            #f6f6f6 100%
        );

    text-decoration: none !important;
}


/* img */

.thm-product-image img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;

    margin: 0;

    object-fit: cover;

    transform: scale(1);

    transition:
        transform .35s ease;
}


/* image hover */

.thm-product-card-wrap:hover
.thm-product-image img {
    transform: scale(1.025);
}


/* ============================================================
   PRODUCT CONTENT
============================================================ */

.thm-product-content {
    display: flex;
    flex: 1;

    flex-direction: column;

    align-items: center;

    width: 100%;

    padding:
        14px
        14px
        17px;

    text-align: center;
}


/* ============================================================
   PRODUCT TITLE
============================================================ */

.thm-product-title {
    display: -webkit-box;

    width: 100%;
    min-height: 41px;

    margin:
        0
        0
        9px !important;

    overflow: hidden;

    color: #fff; 

    font-size: 14px;
    font-weight: 600;

    line-height: 1.45;

    text-align: center;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* link */

.thm-product-title a {
    color: #fff !important;

    text-decoration: none !important;

    transition: color .2s ease;
}

.thm-product-title a:hover {
    color: #a77c39 !important;
}


/* ============================================================
   PRICE
============================================================ */

.thm-product-price {
    width: 100%;

    margin:
        auto
        0
        9px;

    color: #bd8d42;

    font-size: 14px;
    font-weight: 500;

    line-height: 1.3;

    text-align: center;
}


/* amount */

.thm-product-price .amount {
    color: #bd8d42 !important;

    font-weight: 500;
}


/* sale price */

.thm-product-price ins {
    color: #bd8d42 !important;

    text-decoration: none !important;
}


/* old price */

.thm-product-price del {
    margin-right: 5px;

    color: #aaa !important;

    font-size: 11px;

    opacity: .8;
}

.thm-product-price del .amount {
    color: #aaa !important;
}


/* currency */

.thm-product-price
.woocommerce-Price-currencySymbol {
    font-size: .92em;
}


/* ============================================================
   RATING WRAPPER
============================================================ */

.thm-product-rating {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 18px;

    gap: 6px;

    white-space: nowrap;
}


/* ============================================================
   WOOCOMMERCE RATING
============================================================ */

.thm-product-rating
.star-rating {
    float: none !important;

    display: inline-block;

    width: 5.4em;
    height: 1em;

    margin: 0 !important;

    color: #bd8d42;

    font-size: 13px;

    line-height: 1;
}


/* stars */

.thm-product-rating
.star-rating::before,
.thm-product-rating
.star-rating span::before {
    color: #bd8d42;
}


/* ============================================================
   EMPTY STARS
============================================================ */

.thm-empty-stars {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 0;

    margin: 0;

    color: #bd8d42;

    font-size: 17px;
    font-weight: 400;

    line-height: 1;
}

.thm-empty-stars span {
    display: inline-block;

    margin: 0;
    padding: 0;
}


/* ============================================================
   REVIEW COUNT
============================================================ */

.thm-review-count {
    display: inline-block;

    color: #aaa;

    font-size: 11px;
    font-weight: 400;

    line-height: 1;

    white-space: nowrap;
}


/* ============================================================
   RELATED PRODUCTS
   tránh Flatsome style ghi đè
============================================================ */

.single-product
.thm-related-slider
.thm-product-card {
    margin: 0 !important;
    padding: 0 !important;
}

.single-product
.thm-related-slider
.thm-product-card-inner {
    height: calc(100% - 14px);
}


/* ============================================================
   DESKTOP
============================================================ */

@media only screen and (min-width: 850px) {

    .products.row
    > .thm-product-card {
        flex-basis: 25%;
        max-width: 25%;
    }

}


/* ============================================================
   TABLET
============================================================ */

@media only screen
and (min-width: 550px)
and (max-width: 849px) {

    .products.row
    > .thm-product-card {
        flex-basis: 33.333333%;
        max-width: 33.333333%;
    }


    .thm-product-card-inner {
        height: calc(100% - 12px);

        margin: 6px;
    }


    /* badge */

    .thm-product-badges {
        top: 12px;
        left: 1px;
    }

    .thm-product-badge {
        height: 31px;

        padding:
            0
            15px
            0
            12px;

        font-size: 10px;
    }

    .thm-product-badge-new {
        min-width: 100px;
    }

    .thm-product-badge-sale {
        min-width: 82px;
    }


    /* content */

    .thm-product-content {
        padding:
            12px
            10px
            14px;
    }

    .thm-product-title {
        min-height: 39px;

        font-size: 13px;
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media only screen and (max-width: 549px) {

    .thm-product-badges{
        left: -7px;
    }
    .thm-product-badge i {
        font-size: 9px!important;
        top: 5px!important;
        left: 15px!important;
    }

    /* --------------------------------------
       PRODUCT COLUMN
    -------------------------------------- */

    .products.row
    > .thm-product-card {
        flex-basis: 50%;
        max-width: 50%;
    }


    /*
     * Không dùng padding ở product item.
     * Khoảng cách giữa card đến từ margin
     * của chính .thm-product-card-inner.
     */

    .thm-product-card {
        padding: 0 !important;
    }


    /* --------------------------------------
       INNER CARD
    -------------------------------------- */

    .thm-product-card-inner {
        height: calc(100% - 8px);

        margin: 4px;

        border-radius: 8px;
    }


    /* --------------------------------------
       BADGE
    -------------------------------------- */

    .thm-product-badges {
        top: 8px;
        left: -7px;

        gap: 3px;
    }


    .thm-product-badge {
        height: 26px;

        padding:
            0
            11px
            0
            9px;

        font-size: 9px;
        font-weight: 600;
    }


    .thm-product-badge-new {
        min-width: 88px;
    }


    .thm-product-badge-sale {
        min-width: 70px;
    }


    /* --------------------------------------
       IMAGE
    -------------------------------------- */

    .thm-product-image {
        aspect-ratio: 1 / 1;

        padding: 0px;
    }


    /* --------------------------------------
       CONTENT
    -------------------------------------- */

    .thm-product-content {
        padding:
            9px
            7px
            11px;
    }


    /* --------------------------------------
       TITLE
    -------------------------------------- */

    .thm-product-title {
        min-height: 34px;

        margin-bottom: 6px !important;

        font-size: 11px;
        font-weight: 600;

        line-height: 1.4;

        -webkit-line-clamp: 2;
    }


    /* --------------------------------------
       PRICE
    -------------------------------------- */

    .thm-product-price {
        margin-bottom: 6px;

        font-size: 12px;
    }


    .thm-product-price del {
        margin-right: 3px;

        font-size: 9px;
    }


    /* --------------------------------------
       RATING
    -------------------------------------- */

    .thm-product-rating {
        min-height: 15px;

        gap: 3px;
    }


    .thm-product-rating
    .star-rating {
        width: 5.4em;

        font-size: 9px;
    }


    .thm-empty-stars {
        font-size: 12px;
    }


    .thm-review-count {
        font-size: 8.5px;
    }

}


/* ============================================================
   MOBILE NHỎ
   320px - 375px
============================================================ */

@media only screen and (max-width: 374px) {

    .thm-product-card-inner {
        margin: 3px;
    }


    .thm-product-badges {
        top: 7px;
        left: -7px;
    }

    .thm-product-badge i {
        position: absolute;
        top: 7px;
        font-style: normal;
        font-size: 12px;
    }

    .thm-product-badge i {
        font-size: 9px;
        top: 5px;
        left: 15px;
    }
    .thm-product-badge {
        height: 24px;

        padding:
            0
            9px
            0
            8px;

        font-size: 8px;
    }


    .thm-product-badge-new {
        min-width: 82px;
    }


    .thm-product-badge-sale {
        min-width: 66px;
    }


    .thm-product-content {
        padding:
            8px
            5px
            10px;
    }


    .thm-product-title {
        min-height: 32px;

        font-size: 10px;
    }


    .thm-product-price {
        font-size: 11px;
    }


    .thm-product-rating
    .star-rating {
        font-size: 8px;
    }


    .thm-empty-stars {
        font-size: 11px;
    }


    .thm-review-count {
        font-size: 8px;
    }

}
.thm-product-badge i {
    position: absolute;
    top: 7px;
    font-style: normal;
    font-size: 12px;
}


.star-rating span:before, .star-rating:before, .woocommerce-page .star-rating:before {
    color: #bd8d42;
}

.thm-review-section {
    font-family: 'Roboto';
}

.thm-pr-qa {
    font-family: 'Roboto';
} 