/* =========================================================
   THICHLAMBANH
   HOME PRODUCTS V5
========================================================= */


/* =========================================================
   ROOT
========================================================= */

:root{
    --tlb-hp-pink:#ed0754;
    --tlb-hp-pink-dark:#cf0048;

    --tlb-hp-text:#2f2025;
    --tlb-hp-muted:#827479;

    --tlb-hp-border:#f0e5e8;

    --tlb-hp-soft:#fff7f9;
    --tlb-hp-soft-2:#fffafb;
}


/* =========================================================
   RESET
========================================================= */

.tlb-home-products-wrap,
.tlb-home-products-wrap *,
.tlb-home-products-wrap *::before,
.tlb-home-products-wrap *::after{
    box-sizing:border-box;
}


/* =========================================================
   WRAPPER
========================================================= */

.tlb-home-products-wrap{
    width:100%;

    padding:
        12px
        20px
        0;

    font-family:
        "Be Vietnam Pro",
        Arial,
        sans-serif;
}


/* =========================================================
   THREE BLOCKS
========================================================= */

.tlb-home-products{
    width:min(1440px,100%);

    margin:0 auto;

    display:grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0,1fr)
        );

    gap:12px;
}


/* =========================================================
   SECTION BLOCK
========================================================= */

.tlb-home-product-block{
    position:relative;

    min-width:0;

    padding:
        17px
        16px
        15px;

    overflow:hidden;

    border:
        1px
        solid
        var(--tlb-hp-border);

    border-radius:14px;

    background:
        linear-gradient(
            145deg,
            #fff
            0%,
            #fffafa
            52%,
            #fff6f8
            100%
        );

    box-shadow:
        0
        3px
        14px
        rgba(68,27,42,.035);

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


.tlb-home-product-block:hover{
    border-color:#f4d5df;

    box-shadow:
        0
        8px
        25px
        rgba(79,27,46,.06);
}


/* subtle top decoration */

.tlb-home-product-block::before{
    content:"";

    position:absolute;

    top:0;
    left:0;

    width:100%;
    height:3px;

    opacity:.65;

    background:
        linear-gradient(
            90deg,
            var(--tlb-hp-pink),
            #ff9abc,
            transparent 75%
        );
}


/* =========================================================
   HEADING
========================================================= */

.tlb-home-product-heading{
    min-height:63px;

    display:flex;

    align-items:flex-start;
    justify-content:space-between;

    gap:12px;
}


.tlb-home-product-heading__copy{
    min-width:0;
}


/* =========================================================
   EYEBROW
========================================================= */

.tlb-home-product-eyebrow{
    display:block;

    margin-bottom:4px;

    color:#ae8c97;

    font-size:7px;
    line-height:1;

    font-weight:700;

    letter-spacing:.65px;
}


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

.tlb-home-product-heading h2{
    margin:0;

    color:
        var(--tlb-hp-pink);

    font-size:14px;
    line-height:1.25;

    font-weight:700;

    letter-spacing:-.2px;
}


/* =========================================================
   SUBTITLE
========================================================= */

.tlb-home-product-heading p{
    max-width:290px;

    margin:
        4px
        0
        0;

    color:
        var(--tlb-hp-muted);

    font-size:8px;
    line-height:1.45;

    font-weight:400;
}


/* =========================================================
   VIEW ALL
========================================================= */

.tlb-home-product-viewall{
    flex:0 0 auto;

    min-height:27px;

    padding:
        0
        8px;

    display:inline-flex;

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

    gap:5px;

    border:
        1px
        solid
        transparent;

    border-radius:6px;

    color:
        var(--tlb-hp-pink);

    background:
        transparent;

    font-size:7px;
    line-height:1;

    font-weight:600;

    white-space:nowrap;

    text-decoration:none;

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}


.tlb-home-product-viewall b{
    font-size:10px;
    line-height:1;

    font-weight:500;
}


.tlb-home-product-viewall:hover{
    border-color:#f6d5df;

    background:#fff3f7;

    transform:
        translateX(1px);
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.tlb-home-product-grid{
    display:grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0,1fr)
        );

    gap:9px;

    margin-top:4px;
}


/* combo has 3 wider cards */

.tlb-home-product-block--combo
.tlb-home-product-grid{
    grid-template-columns:
        repeat(
            3,
            minmax(0,1fr)
        );
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.tlb-home-product-card{
    position:relative;

    min-width:0;

    overflow:hidden;

    border:
        1px
        solid
        #f1eaec;

    border-radius:9px;

    color:
        var(--tlb-hp-text);

    background:#fff;

    text-decoration:none;

    box-shadow:
        0
        2px
        8px
        rgba(48,23,31,.025);

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}


.tlb-home-product-card:hover{
    z-index:2;

    border-color:#f1c4d2;

    transform:
        translateY(-3px);

    box-shadow:
        0
        9px
        20px
        rgba(69,24,39,.08);
}


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

.tlb-home-product-image{
    position:relative;

    width:100%;
    height:126px;

    display:flex;

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

    overflow:hidden;

    background:
        linear-gradient(
            145deg,
            #fff 0%,
            #fffafb 100%
        );
}


.tlb-home-product-image::after{
    content:"";

    position:absolute;

    left:12px;
    right:12px;
    bottom:0;

    height:1px;

    background:#f6eff1;
}


.tlb-home-product-image img{
    display:block;

    width:100%;
    height:100%;

    padding:7px;

    object-fit:contain;

    transition:
        transform .25s ease;
}


.tlb-home-product-card:hover
.tlb-home-product-image img{
    transform:
        scale(1.055);
}


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

.tlb-home-product-block--combo
.tlb-home-product-image{
    height:139px;
}


/* =========================================================
   AVAILABLE BADGE
========================================================= */

.tlb-home-product-badge{
    position:absolute;

    z-index:4;

    top:7px;
    left:7px;

    min-height:18px;

    padding:
        0
        6px;

    display:flex;

    align-items:center;

    border-radius:999px;

    color:#147d49;

    background:
        rgba(235,249,241,.94);

    border:
        1px
        solid
        #d8f0e3;

    font-size:5.5px;

    font-weight:600;

    backdrop-filter:blur(4px);
}


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

.tlb-home-product-image.tlb-image-error::before{
    content:"Sản phẩm";

    display:grid;

    width:55px;
    height:55px;

    place-items:center;

    border-radius:50%;

    color:#d69bae;

    background:#fff1f5;

    font-size:7px;
}


/* =========================================================
   BODY
========================================================= */

.tlb-home-product-body{
    padding:
        9px
        9px
        10px;
}


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

.tlb-home-product-category{
    display:block;

    min-height:12px;

    overflow:hidden;

    color:#a29297;

    font-size:5.8px;
    line-height:1.25;

    text-overflow:ellipsis;

    white-space:nowrap;
}


/* =========================================================
   PRODUCT NAME
========================================================= */

.tlb-home-product-name{
    display:-webkit-box;

    min-height:35px;

    margin-top:3px;

    overflow:hidden;

    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;

    color:#34262b;

    font-size:8px;
    line-height:1.42;

    font-weight:600;
}


/* =========================================================
   BOTTOM
========================================================= */

.tlb-home-product-bottom{
    margin-top:7px;

    display:flex;

    flex-wrap:wrap;

    align-items:flex-end;
    justify-content:space-between;

    gap:5px;
}


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

.tlb-home-product-price{
    min-width:0;
}


.tlb-home-product-price b{
    color:
        var(--tlb-hp-pink);

    font-size:9.5px;
    line-height:1;

    font-weight:700;

    white-space:nowrap;
}


/* =========================================================
   STOCK
========================================================= */

.tlb-home-product-stock{
    display:inline-flex;

    align-items:center;

    gap:4px;

    color:#367e55;

    font-size:5.7px;
    line-height:1;

    font-weight:600;

    white-space:nowrap;
}


.tlb-home-product-stock i{
    width:5px;
    height:5px;

    display:block;

    border-radius:50%;

    background:#38a968;
}


.tlb-home-product-stock--out{
    color:#b7808f;
}


.tlb-home-product-stock--out i{
    background:#d4a1ae;
}


/* =========================================================
   ARROW
========================================================= */

.tlb-home-product-arrow{
    position:absolute;

    z-index:5;

    right:8px;
    top:8px;

    width:24px;
    height:24px;

    display:grid;

    place-items:center;

    border:
        1px
        solid
        #f0e2e7;

    border-radius:50%;

    color:
        var(--tlb-hp-pink);

    background:
        rgba(255,255,255,.92);

    font-size:9px;

    opacity:0;

    transform:
        translateX(-4px);

    transition:
        opacity .18s ease,
        transform .18s ease;
}


.tlb-home-product-card:hover
.tlb-home-product-arrow{
    opacity:1;

    transform:
        translateX(0);
}


/* =========================================================
   EMPTY
========================================================= */

.tlb-home-product-empty{
    grid-column:1/-1;

    min-height:160px;

    display:flex;

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

    border:
        1px
        dashed
        #eadde1;

    border-radius:9px;

    color:#a09296;

    background:
        rgba(255,255,255,.6);

    font-size:8px;

    text-align:center;
}


/* =========================================================
   DIFFERENT SECTION TONES
========================================================= */

.tlb-home-product-block--featured{
    background:
        linear-gradient(
            145deg,
            #fff
            0%,
            #fff9fb
            62%,
            #fff4f7
            100%
        );
}


.tlb-home-product-block--new{
    background:
        linear-gradient(
            145deg,
            #fff
            0%,
            #fffafb
            60%,
            #fff5f8
            100%
        );
}


.tlb-home-product-block--combo{
    background:
        linear-gradient(
            145deg,
            #fff
            0%,
            #fffaf8
            58%,
            #fff5f2
            100%
        );
}


/* =========================================================
   <= 1180
========================================================= */

@media(max-width:1180px){

    .tlb-home-products{
        grid-template-columns:
            1fr
            1fr;
    }


    .tlb-home-product-block--combo{
        grid-column:1/-1;
    }


    .tlb-home-product-block--combo
    .tlb-home-product-grid{
        grid-template-columns:
            repeat(
                4,
                minmax(0,1fr)
            );
    }


    .tlb-home-product-block--combo
    .tlb-home-product-card:nth-child(n+4){
        display:none;
    }

}


/* =========================================================
   <= 820
========================================================= */

@media(max-width:820px){

    .tlb-home-products-wrap{
        padding:
            10px
            12px
            0;
    }


    .tlb-home-products{
        grid-template-columns:1fr;

        gap:10px;
    }


    .tlb-home-product-block--combo{
        grid-column:auto;
    }


    .tlb-home-product-grid,
    .tlb-home-product-block--combo
    .tlb-home-product-grid{
        display:grid;

        grid-auto-flow:column;

        grid-auto-columns:
            minmax(
                145px,
                38%
            );

        grid-template-columns:none;

        overflow-x:auto;

        overscroll-behavior-x:contain;

        padding-bottom:5px;

        scroll-snap-type:x proximity;

        scrollbar-width:none;
    }


    .tlb-home-product-grid::-webkit-scrollbar{
        display:none;
    }


    .tlb-home-product-card{
        scroll-snap-align:start;
    }


    .tlb-home-product-block--combo
    .tlb-home-product-card:nth-child(n+4){
        display:block;
    }

}


/* =========================================================
   <= 520
========================================================= */

@media(max-width:520px){

    .tlb-home-product-block{
        padding:
            14px
            12px
            12px;

        border-radius:12px;
    }


    .tlb-home-product-heading{
        min-height:60px;
    }


    .tlb-home-product-heading h2{
        font-size:13px;
    }


    .tlb-home-product-heading p{
        max-width:230px;

        font-size:7.5px;
    }


    .tlb-home-product-viewall span{
        display:none;
    }


    .tlb-home-product-viewall{
        width:28px;

        padding:0;
    }


    .tlb-home-product-viewall b{
        font-size:13px;
    }


    .tlb-home-product-grid,
    .tlb-home-product-block--combo
    .tlb-home-product-grid{
        grid-auto-columns:
            minmax(
                138px,
                45%
            );

        gap:8px;
    }


    .tlb-home-product-image,
    .tlb-home-product-block--combo
    .tlb-home-product-image{
        height:120px;
    }


    .tlb-home-product-name{
        font-size:7.8px;
    }


    .tlb-home-product-price b{
        font-size:9px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media(prefers-reduced-motion:reduce){

    .tlb-home-products-wrap *,
    .tlb-home-products-wrap *::before,
    .tlb-home-products-wrap *::after{
        transition:none!important;

        animation:none!important;
    }

}