/* --- CSS GLOBAL --- */
        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0;padding: 0;}
        body { margin: 0; font-family: "Roboto", sans-serif; background: #fff; }
        .app-container { max-width: 640px; margin: 0 auto; background: #fff; min-height: 100vh; position: relative; }
        .hidden { display: none !important; }
        img { max-width: 100%;  }
        a { text-decoration: none; color: inherit; outline: none;}

        /* HEADER HOME */
        .header-home { 
  position: relative;
            padding: 90px 20px 40px;
    position: relative;
    overflow: hidden;z-index: 0;
        }
 .share-icon {

    cursor: pointer;
}
/* CSS MỚI CHO NÚT GIÁ */
.filter-item {
    display: flex;
    align-items: center;
    gap: 4px;
    /* Khoảng cách giữa chữ và icon */
}

.sort-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}
 .share-icon svg{width: 40px;
    height: 40px;}
        .header-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; }
        .header-overlay .bg-image{width: auto;
    height: 100%;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    filter: blur(2px) brightness(.9);}
    .header-overlay .linear-mask {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: -20px;
    z-index: 1;
}
.header-overlay .shadow-mask {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -20px;
    background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, .2)), to(rgba(0, 0, 0, .4)));
    background: linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .4));
    z-index: 2;
}
        .header-content { position: relative; z-index: 2; }
        .header-top { display: flex; justify-content: space-between; align-items: center; }
        .user-profile .logo img {
    height: 64px;
    width: 64px;

    object-fit: cover;
}
        
    .header-home .share-icon{position: absolute;
    top: 20px;
    right: 27px;
    cursor: pointer;
    }


        .video-badge { background: rgba(0,0,0,0.5); padding: 4px 12px; border-radius: 20px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; backdrop-filter: blur(4px); }
        .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;margin-bottom: 8px;position: relative;z-index: 9;
}

.user-info h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.shopee-video-count {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 12px;
    background: #ffffff3d;
    border-radius: 100px;
    gap: 6px;
    font-weight: 400;
    font-size: 20px;
    color: #fff;
}
.shopee-video-count img {
    width: 20px;
}
.description-text {
    color: #fff;
    line-height: 16px;
    white-space: pre-line;
    word-break: break-word;
    font-size: 12px;
    margin-bottom: 20px;
}
/* CSS MỚI CHO NÚT XÓA TÌM KIẾM */

        .clear-search-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    width: 27px;
    height: 27px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    z-index: 10;
    transition: background-color 0.2s;display: none;
}
.clear-search-btn img {
    width: 100%;
    height: 100%;
}
        .clear-search-btn.show { display: block; }
        

.header {margin: 0 auto;padding: 12px;gap: 20px;justify-content: space-between;align-items: center;display: flex;
    max-width: 640px;
    background-color: #fff;-webkit-transition: opacity .3s 
ease;
    transition: opacity .3s 
ease;
    }
    .header.head{z-index: 100;position: fixed;left: 0;opacity: 0;-webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .24);
    box-shadow: 0 0 6px rgba(0, 0, 0, .24);
    visibility: hidden;
    right: 0;
    top: 0;}
    .header.head.head_background{opacity: 1;visibility: visible;}

        /* SEARCH & TABS */
        .search-area {
    position: relative;
}
.search-area .search-box {
    padding: 14px;
    box-shadow: 0 2px 8px #0000001a;
    background: #fffffff2;
    border-radius: 8px;display: flex;
}
.search-area  svg {
    margin-right: 4px;
}
.logo-img {
    width: 55px;
    height: 55px;
 
    overflow: hidden;
}
.header_left {
    gap: 8px;
    flex: 1;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #000000de;
}
.header .share-icon {

    cursor: pointer;
}
.search-area  input, .search-area button {
    border: none;
    outline: none;
    background: none;
}
        /* FILTER BAR */
        .filter-bar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #0000000d;
}

.filter-bar .filter-item {
    flex: 1;
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    text-align: center;
    color: #0000008a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 14px 10px;
    position: relative;cursor: pointer;justify-content: center
}
.filter-item.active {
    color: #ee4d2d;
}
.filter-item:not(:last-child):after {
    width: 0;
    position: absolute;
    right: 0;
    height: 12px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 1px solid rgba(0, 0, 0, .09);
    -webkit-box-flex: 0;
    -ms-flex: none;
    flex: none;
    -ms-flex-positive: 0;
    flex-grow: 0;
    content: "";
}
        /* PRODUCT LIST */

        .content_main {
    position: relative;
    z-index: 22;
    margin-top: -20px;
    background: #fff;
    border-radius: 10px 10px 0 0;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid #0000000d;
    align-items: center;
    justify-content: center;
}
.tab-item {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #000000de;
    transition: color 0.3s, border-bottom 0.3s;
    flex: 1;
    text-align: center;
}
.tab-item.active {
    color: #ee4d2d;
    border-bottom: 2px solid #ee4d2d;
}


        .product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
        .product-card { background: white; border: 1px solid #00000017;
    border-radius: 6px;
    box-sizing: border-box; overflow: hidden; position: relative;  }
        .p-img-box { position: relative; padding-top: 100%; }
        .p-img-box img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
        .flag-badge { background: #d0011b; color: white; padding: 1px 3px; font-size: 9px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
        .discount-badge { background: #feeeea;
    color: #ee4d2d;
    font-weight: 600;
    font-size: 18px;
    padding: 3px 4px;
    z-index: 30;
    position: absolute;
    top: 0;
    right: 0;}
        
.p-cnt-box{padding: 14px;}
.p-cnt-box h3 {
    font-size: 20px;
    line-height: 24px;
    margin-bottom: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-weight: normal;
    color: #000;
}
.product-flag-image img {
    height: 20px;margin-right: 3px
}
.price_product {
    font-size: 27px;
    overflow: hidden;
    -webkit-box-flex: 0;
    -ms-flex-positive: 0;
    flex-grow: 0;
    -ms-flex-negative: 1;
    flex-shrink: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #ee4d2d;
    font-weight: 600;margin-bottom: 10px;
}
.count_product {
    color: #000000de;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.count_product span{text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    -webkit-box-flex: 0;
    -ms-flex-positive: 0;
    flex-grow: 0;gap: 1px;
    -ms-flex-negative: 1;
    flex-shrink: 1;display: flex;align-items: center;}
.count_product span svg{width: 15px;height: 15px;}
.suggested-products {
    border-top: 12px solid #f5f5f5;
}
.suggested-products-title {
    padding: 12px 12px 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #000000de;
}

        /* CATEGORY LIST */
        .cat-list-container { display: grid;
            padding: 12px;
            gap: 12px;
            flex-wrap: wrap;
            width: 100%;grid-template-columns: 1fr 1fr; }
        .cat-item { 
            box-sizing: border-box;
            min-width: 0;
            position: relative;
            overflow: hidden; }
        .cat-imgs {  width: 100%;
            position: relative;
            overflow: hidden;
            margin-bottom: 8px;display: grid;grid-template-columns: 2fr 1fr;grid-template-rows: 1fr 1fr;flex-shrink: 0;aspect-ratio: 3 / 2;}
        .cat-imgs img { width: 100%;
            height: 100%;
            object-fit: cover;display: block;}
                        .cat-imgs img:first-child {
                            grid-row: 1 / span 2;
                            grid-column: 1 / 2;
                        }
        .cat-info { flex: 1; }
        .cat-name { font-size: 14px;
            line-height: 16px;
            color: #000000de;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 400;
            margin-bottom: 4px; }
        .cat-count { font-size: 10px;
            line-height: 12px;
            color: #0000008a;
            font-weight: 400;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;}

        /* SHARE TOAST */
        #share-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: white; padding: 20px 30px; border-radius: 8px; z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; visibility: hidden; transition: 0.3s; text-align: center; font-size: 25px;}
        #share-toast.show { opacity: 1; visibility: visible; }
        #share-toast i { font-size: 30px; color: white; border: 2px solid white; border-radius: 50%; padding: 5px; }

        .loading { text-align: center; padding: 20px; color: #888; font-size: 13px; grid-column: span 2; }

        .cat-header{display: flex;align-items: center;justify-content: space-between;
    padding: 12px;gap: 20px;}
        .cat-header .header-left{gap: 8px;flex: 1;display: flex;align-items: center;}
                .cat-header .header-left .site-logo{width: 55px;}
                                .cat-header .header-left .site-name{font-weight: 500;
                                    font-size: 16px;text-align: left;
                                        -webkit-box-flex: 1;
                                        -ms-flex: 1;
                                        flex: 1;
                                        display: -webkit-box;
                                        -webkit-line-clamp: 1;
                                        -webkit-box-orient: vertical;
                                        overflow: hidden;
                                        text-overflow: ellipsis;}
                .cat-header .header-right{display: flex;
                    gap: 20px;}
                .cat-info-section{padding: 12px;}
                                .cat-info-section .cat-title{font-weight: 500;
                                    font-size: 20px;margin-bottom: 8px;}
                                                                        .cat-info-section .cat-count{font-weight: 400;
                                                                            font-size: 12px;color: #0000008a;}
                                                                                                                                        .suggestion-box {
                                                                                                                                            border-top: 12px solid #f5f5f5;
                                                                                                                                        }
.cat-header{max-width: 640px;margin: 0 auto;background: #fff;transition: .3s;}
.cat-header.head_background {
    z-index: 100;
    position: fixed;
    left: 0;
    -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .24);
    box-shadow: 0 0 6px rgba(0, 0, 0, .24);
    right: 0;
    top: 0;
}
.cat-header .header-right .icon-btn{cursor: pointer;}
.search-overlays{position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    z-index: 999;
    width: 100%;
    height: 100%;} 
.search-cnt{background-color: #f5f5f5;max-width: 640px;
    margin: 0 auto;min-height: 100vh;}
.search-header{display: flex;align-items: center;gap: 12px;
    padding: 10px 12px;
    background-color: #fff;box-shadow: 0 0 6px 0 rgba(0, 0, 0, .06);} 
.back-button{background: none;outline: none;border: none;cursor: pointer;} 
.search-input-w{flex: 1;display: flex;position: relative;border: 1px solid #ee4d2d;overflow: hidden;
    border-radius: 8px;}  
.search-input-w #search-input{flex: 1;height: 36px;border: none;outline: none;padding: 8px;}   
.search-input-w .search-buttonn{display: flex;align-items: center;justify-content: center;
    padding: 8px 12px;background-color: #ee4d2d;} 
.search-input-w .clear-icon-overlay{position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);cursor: pointer;display: none;}  
        .search-input-w .clear-icon-overlay.show{display: block;}   
                .badge-video {
                    position: absolute;
                    right: 7px;
                    bottom: 7px;
                    width: 34px;
                    height: 34px;
                    z-index: 30;
                    background-image: url(../assets/icon/play.svg);
                    background-size: cover;
                    background-repeat: no-repeat;
                }
@media(max-width: 768px) {

    #share-toast {
        font-size: 20px;
    }

    .shopee-video-count {
        font-size: 12px;
        padding: 3px 8px;
    }

    .user-info h1 {
        margin-bottom: 8px;
    }

     .share-icon {
        width: 24px;
        height: 24px;
    }

    .header-home {
        padding: 52px 12px 32px;
    }

    .user-profile {
        margin-bottom: 12px;
    }

    .user-profile .logo img {
        width: 30px;
        height: 30px;
    }

    .share-icon svg {
        width: 24px;
        height: 24px;
    }

    .filter-bar .filter-item {
        padding: 14px 4px;
    }

    .discount-badge {
        font-size: 12px;
    }

    .badge-video {
        width: 20px;
        height: 20px;
        right: 4px;
        bottom: 4px;
    }

    .product-grid,.cat-list-container {
        padding: 8px;
        gap: 8px;
    }



    .p-cnt-box {
        padding: 8px;
    }

    .product-flag-image img {
        height: 12px;
    }

    .p-cnt-box h3 {
        font-size: 12px;
        line-height: 14px;
        margin-bottom: 8px;
    }

    .price_product {
        font-size: 16px;
    }

    .count_product {
        font-size: 10px;
    }

    .search-container input[type="text"] {
        font-size: 14px;
    }


}                                                                                                                                                                                                                                                         .sugg-header {
                                                                                                                                                                                                                                                                                    padding: 12px 12px 0;
                                                                                                                                                                                                                                                                                    font-size: 14px;
                                                                                                                                                                                                                                                                                    line-height: 20px;
                                                                                                                                                                                                                                                                                    font-weight: 600;
                                                                                                                                                                                                                                                                                    color: #000000de;
                                                                                                                                                                                                                                                                                }