.header {
    height: var(--header-height);
    background-image: linear-gradient(var(--main-color1), var(--main-color2));
}

.header__navbar {
    display: flex;
    justify-content: space-between;
    height: 34px;
    margin: 0 -6px;
}

.header__nav-list {
    list-style: none;
    padding-left: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.header__nav-item {
    padding: 0 7px;
}

.header__nav-item,
.header__nav-item-link {
    display: flex;
    font-size: 1.3rem;
    color: var(--white-color);
    text-decoration: none;
    font-weight: 500;
    align-items: center;
}

.header__nav-item--hover:hover,
.header__nav-item-link:hover,
.header__nav-icon-link:hover {
    opacity: 0.8;
    cursor: pointer;
}

.header__nav-item--bold {
    font-weight: 600;
}

.header__nav-user {
    position: relative;
}

/* cầu nối liền mạch */

.header__nav-user::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 8px;
}

.header__nav-user-avt {
    height: 22px;
    width: 22px;
    border-radius: 50%;
    margin-right: 7px;
    border: 1px solid #ccc;
}

.header__nav-user:hover .header__nav-user-menu {
    display: block;
}

.header__nav-user-menu {
    position: absolute;
    padding: 0;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 150px;
    height: 120px;
    background-color: var(--white-color);
    list-style: none;
    z-index: 10;
    border-radius: 3px;
    box-shadow: 0 2px 10px #999;
    display: none;
}


/* cầu nối liền mạch tam giác */

.header__nav-user-menu::before {
    content: "";
    position: absolute;
    border-width: 20px 30px;
    border-style: solid;
    border-color: transparent transparent white transparent;
    right: 12px;
    top: -28px;
    z-index: -1;
}

.header__nav-user-item {
    height: 33.3333%;
}

.header__nav-user-item a {
    font-size: 1.4rem;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 12px 16px;
}

.header__nav-user-item a:first-child {
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
}

.header__nav-user-item a:last-child {
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.header__nav-user-item a:hover {
    background-color: var(--hover-color);
    color: lightseagreen;
}

.header__nav-item--separate {
    border-right: 2px solid var(--border-color);
    margin-right: -2px;
}

.header__nav-icon {
    font-size: 1.5rem;
    padding: 0 4px;
}

.header__nav-icon-link:first-child {
    padding-left: 4px;
}

.header__nav-icon-link {
    color: var(--white-color);
    text-decoration: none;
}

.header__qrcode {
    background-color: var(--white-color);
    width: 186px;
    position: absolute;
    top: 100%;
    left: 62%;
    z-index: 10;
    margin-top: 8px;
    border-radius: 5px;
    box-shadow: 0 0 1px #333;
    animation: fadeIn linear 0.3s;
    display: none;
}


/* cầu nối liền mạch */

.header__qrcode::before {
    display: block;
    content: "";
    position: absolute;
    top: -10px;
    width: 100%;
    height: 10px;
}

.header__show-qr:hover+.header__qrcode,
.header__qrcode:hover {
    display: block;
}

.header__qr {
    width: 100%;
    border-radius: 5px;
}

.header__apps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.header__app-img {
    height: 18px;
    margin: 0 7px;
}

.header__notifi {
    position: absolute;
    top: 100%;
    right: 71%;
    z-index: 10;
    margin-top: 8px;
    width: 404px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: var(--white-color);
    /* xđ vị trí tâm của scale 
    transform-origin: y x; */
    transform-origin: 85% top;
    animation: grow ease-in 0.3s;
    display: none;
}


/* cầu nối liền mạch tam giác */

.header__notifi::before {
    content: "";
    position: absolute;
    border-width: 20px 30px;
    border-style: solid;
    border-color: transparent transparent white transparent;
    right: 12px;
    top: -28px;
}


/* cách tạo tam giác : tạo 1 thẻ 0x0 border chính là 4 hình tam giác
border: 1 px solid;
border-color: red green blue yellow */

.header__show-note:hover .header__notifi,
.header__notifi:hover {
    display: block;
}

.header__notifi-header h3 {
    color: var(--light-title-color);
    margin: 0;
    margin-left: 20px;
    line-height: 40px;
    font-size: 1.5rem;
}

.header__notifi-list {
    padding-left: 0;
}

.header__notifi-item {
    display: flex;
    background-color: rgba(255, 102, 51, 0.1);
}

.header__notifi-item:hover {
    background-color: var(--hover-color);
}

.header__notifi-link {
    display: flex;
    padding: 12px;
    /* width: 100%; */
    text-decoration: none;
}

.header__notifi-img {
    width: 48px;
    background-size: contain;
}

.header__notifi-info {
    margin-left: 12px;
}

.header__notifi-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
}

.header__notifi-desc {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.4rem;
    color: var(--text-color);
}

.header__notifi-footer {
    display: flex;
}

.header__notifi-footer-btn {
    text-decoration: none;
    color: var(--black-color);
    padding: 8px 16px;
    margin: auto;
}

.auth-form {
    width: 500px;
    background-color: var(--white-color);
    border-radius: 5px;
    overflow: hidden;
}

.auth-form__container {
    padding: 0 32px;
}

.auth-form__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-form__heading {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-color);
    padding: 12px 12px 0;
}

.auth-form__switch-btn {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    padding: 16px 0 0;
}

.auth-form__input {
    width: 100%;
    height: 40px;
    margin-top: 16px;
    padding: 0 12px;
    font-size: 1.4rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    outline: none;
}

.auth-form__input:focus {
    border-color: var(--primary-color);
}

.auth-form__policy {
    margin-top: 18px;
    padding: 0 12px;
}

.auth-form__policy-text {
    font-size: 1.2rem;
    line-height: 1.8rem;
    text-align: center;
}

.auth-form__text-link {
    font-style: italic;
    text-decoration: none;
    color: var(--primary-color);
}

.auth-form__control {
    margin-top: 80px;
    display: flex;
    justify-content: flex-end;
}

.btn.auth-form__back:hover {
    background-color: var(--hover-color);
}

.auth-form__signin {
    background-color: #ddd;
    padding: 14px 36px;
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.auth-form__signin-icon {
    font-size: 1.8rem;
}

.auth-form__signin-fb {
    background-color: #3A5A98;
    color: var(--white-color);
}

.auth-form__signin-sms {
    background-color: #19b610;
    color: var(--white-color);
}

.auth-form__signin-gg {
    background-color: var(--white-color);
    color: #ff1e1e;
}

.auth-form__signin-fb .auth-form__signin-icon {
    color: var(--white-color);
}

.auth-form__signin-text {
    margin: 0 28px;
}

.auth-form__help {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.auth-form__help-link {
    font-size: 1.4rem;
    text-decoration: none;
    color: #666;
}

.auth-form__help-forgot {
    color: var(--primary-color);
}

.auth-form__help--separate {
    border: 1px solid var(--border-color);
    margin: 0 16px;
}

.header__contain {
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__mobile-search {
    padding: 0 12px;
    display: none;
}

.header__mobile-search-icon {
    font-size: 2.4rem;
    color: var(--white-color);
    cursor: pointer;
}

.header__logo {
    margin-right: 6px;
    margin-bottom: 6px;
}

.header__logo-img {
    width: 162px;
    height: 50px;
}

.header__logo-link {
    display: block;
    text-decoration: none;
    color: transparent;
    line-height: 0;
}

.header__search {
    width: 70%;
    height: 40px;
    background-color: var(--white-color);
    border-radius: 3px;
    display: flex;
    align-items: center;
}

.header__search-input-wrap {
    flex: 1;
    height: 100%;
    position: relative;
}

.header__search-input {
    height: 100%;
    width: 100%;
    border: none;
    outline: none;
    font-size: 1.4rem;
    border-radius: 3px;
    color: var(--text-color);
    padding: 0 16px;
}

.header__search-btn {
    background-color: var(--light-btn-primary-color);
    min-width: 60px;
}

.header__search-btn:hover {
    opacity: 0.9;
}

.header__search-btn-icon {
    font-size: 1.4rem;
    color: var(--white-color);
}

.header__search-input:focus+.header__search-history {
    display: block;
}

.header__search-history {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: var(--white-color);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 5px #ccc;
    display: none;
    z-index: 8;
}

.header__search-history-list {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.header__search-history-item {
    height: 36px;
    padding: 10px;
}

.header__search-history-item:hover {
    background-color: var(--hover-color);
}

.header__search-history-item a {
    text-decoration: none;
    font-size: 1.4rem;
    color: var(--text-color);
    display: block;
}

.header__cart {
    width: 10%;
    text-align: center;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.header__cart-icon {
    color: var(--white-color);
    font-size: 2.4rem;
    padding: 8px 8px 0;
    cursor: pointer;
}

.header__cart-count {
    position: absolute;
    top: 0;
    right: 35%;
    padding: 1px 7px;
    font-size: 1.3rem;
    line-height: 1.3rem;
    border-radius: 10px;
    border: 1px solid var(--light-btn-primary-color);
    color: var(--light-btn-primary-color);
    background-color: var(--white-color);
    cursor: pointer;
    display: none;
}

.header__cart-list {
    position: absolute;
    top: 100%;
    right: 30%;
    margin-top: 12px;
    background-color: var(--white-color);
    width: 400px;
    min-height: 260px;
    border-radius: 3px;
    box-shadow: 0 0 5px #999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    display: none;
    transform-origin: 95% top;
    animation: grow ease-in 0.3s;
}

/* cầu nối liền mạch tam giác */

.header__cart-list::before {
    content: "";
    position: absolute;
    border-width: 20px 25px;
    border-style: solid;
    border-color: transparent transparent var(--white-color) transparent;
    right: 1%;
    top: -32px;
}

/* when no cart */

.header__cart--no-cart .header__cart-icon:hover~.header__cart-list.no-cart,
.header__cart--no-cart .header__cart-list.no-cart:hover {
    display: flex;
}

.header__no-cart-img {
    width: 50%;
}

.header__no-cart-text {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-top: 28px;
    margin-bottom: 0;
}

/* when has cart */

.header__cart--has-cart .header__cart-icon:hover~.header__cart-list.has-cart,
.header__cart--has-cart .header__cart-count:hover~.header__cart-list.has-cart,
.header__cart--has-cart .header__cart-list.has-cart:hover {
    display: block;
    cursor: pointer;
}

.header__cart--has-cart .header__cart-count {
    display: block;
}

.header__cart-heading {
    text-align: left;
    margin: 12px;
    font-size: 1.6rem;
    color: var(--light-title-color);
    font-weight: 600;
}

.header__cart-list-item {
    padding-left: 0;
    list-style: none;
    max-height: calc(58px * 5);
    overflow-y: auto;
}

.header__cart-item {
    display: flex;
}

.header__cart-item:hover {
    background-color: var(--hover-color);
}

.header__cart-item-img {
    height: 42px;
    margin: 8px;
    border: 1px solid #ccc;
}

.header__cart-item-info {
    width: 100%;
    margin: auto;
}

.header__cart-item-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 22px;
}

.header__cart-item-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header__cart-item-price {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-right: 12px;
}

.header__cart-item-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 20px;
    margin: 0 16px;
}

.header__cart-item-number {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-color);
}

.header__cart-item-close {
    font-size: 1.2rem;
    font-weight: 6 00;
    color: var(--text-color);
}

.header__cart-item-close:hover {
    color: var(--primary-color);
}

.header__cart-see-cart {
    float: right;
    margin: 12px;
}

.header__cart-see-cart:hover {
    opacity: 0.9;
}

.header__sort-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    height: var(--sort-bar-height);
    margin: 0;
    padding-left: 0;
    list-style: none;
    background-color: var(--white-color);
    display: none;
}

.header__sort-item {
    flex: 1;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.header__sort-item:hover {
    cursor: pointer;
}

.header__sort-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.4rem;
}

.header__sort-item--active .header__sort-link {
    color: var(--primary-color);
}

.header__sort-link::before {
    content: "";
    position: absolute;
    left: 0;
    height: 60%;
    top: 50%;
    transform: translateY(-50%);
    border-left: 1px solid #ccc;
}

.header__sort-item:first-child .header__sort-link::before {
    display: none;
}

/* container */

.container {
    background-color: var(--contain-color);
    padding-top: 24px;
}

.category-heading {
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.8rem;
    margin: 8px 0;
}

.category-heading-icon {
    font-size: 1.6rem;
    margin-right: 4px;
}

.category-group {
    border-bottom: 1px solid #ccc;
    padding: 20px 0;
}

.category-group-title {
    color: var(--text-color);
    font-size: 1.5rem;
    padding: 0 0 10px;
}

.category-group-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-group-item {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    color: var(--text-color);
    padding: 8px 0;
}

.category-group-item-check {
    margin-right: 12px;
}

.category-group-filter {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    color: var(--text-color);
    padding: 8px 0;
    justify-content: space-between;
}

.category-group-filter-input {
    width: 76px;
    height: 24px;
    outline: none;
    border: 1px solid #999;
    padding: 8px;
}

.category-group-filter-btn {
    width: 100%;
    margin: 8px 0;
}

.rating-star {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.5rem;
    width: 70%;
    padding: 8px 0;
}

.rating-star .star-checked {
    color: #ffe400;
    font-weight: 900;
}

.rating-star .star-uncheck {
    color: #ffe400;
    font-weight: unset;
}

.category-group--margin {
    margin: 20px 0;
}

/* mobile category */

.mobile-category {
    display: none;
}

.mobile-category-list {
    display: flex;
    list-style: none;
    padding-left: 0;
    overflow-x: auto;
}

.mobile-category-list::-webkit-scrollbar {
    display: none;
}

.mobile-category-item {
    border-radius: 5px;
    flex-shrink: 0;
    margin: 0 5px;
}

.mobile-category-item:nth-of-type(5n + 1) {
    background-color: #6eabe7;
}

.mobile-category-item:nth-of-type(5n + 2) {
    background-color: #f5ba3c;
}

.mobile-category-item:nth-of-type(5n + 3) {
    background-color: #996ccc;
}

.mobile-category-item:nth-of-type(5n + 4) {
    background-color: #74ddcd;
}

.mobile-category-item:nth-of-type(5n + 5) {
    background-color: #6cd163;
}

.mobile-category-item-link {
    text-decoration: none;
    font-size: 1.4rem;
    padding: 1px 6px;
    user-select: none;
    -webkit-user-select: none;
    color: var(--white-color);
    height: 40px;
    line-height: 2rem;
    overflow: hidden;
    text-align: center;
    width: 100px;
    display: block;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* home filter */

.home-filter {
    background-color: var(--hover-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-radius: 3px;
}

.home-filter-control,
.home-filter-page {
    display: flex;
    align-items: center;
}

.home-filter-title {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-right: 10px;
}

.home-filter-btn {
    background-color: var(--white-color);
    min-width: 0;
    padding: 0 15px;
    margin: 0 5px;
}

.home-filter-sort {
    background-color: var(--white-color);
    width: 200px;
    margin: 0 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.home-filter-sort-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-radius: 3px;
    background-color: var(--white-color);
    margin: 0;
    list-style: none;
    padding: 0;
    display: none;
    z-index: 5;
}

.home-filter-sort:hover .home-filter-sort-list {
    display: block;
}

.home-filter-sort-item-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.4rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 10px 20px;
    border-top: 1px solid var(--hover-color);
}

.home-filter-sort-item-link:hover {
    color: var(--primary-color);
    background-color: var(--hover-color);
}

.home-filter-page-number {
    font-size: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    margin: 0 20px;
}

.home-filter-page-now {
    color: var(--primary-color);
}

.home-filter-page-control {
    border-radius: 3px;
    overflow: hidden;
}

.home-filter-page-btn {
    width: 36px;
    height: 36px;
    text-decoration: none;
    font-size: 1.4rem;
    color: var(--text-color);
    background-color: var(--white-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-filter-page-btn--disable {
    opacity: 0.4;
    cursor: default;
}

.home-product {
    margin: 8px 0;
}

/* Product Item Styles */
.home-product-item-link {
    display: block;
    text-decoration: none;
    background-color: var(--white-color);
    position: relative;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease-in-out;
    height: 100%;
}

.home-product-item-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 1px 20px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid var(--primary-color);
    z-index: 1;
}

.home-product-item__img {
    padding-top: 100%;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #f5f5f5;
    /* Placeholder bg */
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
    position: relative;
}

.home-product-item__info {
    padding: 8px;
}

.home-product-item__name {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.4rem;
    height: 2.8rem;
    margin: 0 0 8px;
    overflow: hidden;
    display: block;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Price */
.home-product-item__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.home-product-item__price-currency {
    font-size: 1rem;
    color: #ee4d2d;
    font-weight: 500;
}

.home-product-item__price-new {
    font-size: 1.6rem;
    color: #ee4d2d;
    font-weight: 500;
    margin-left: 1px;
}

.home-product-item__price-discount-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.home-product-item__price-old {
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.87);
    /* Maximum contrast for WCAG AAA */
    text-decoration: line-through;
    margin-right: 2px;
}

.home-product-item__price-badge {
    font-size: 0.9rem;
    color: #c8340a;
    /* Darker red for WCAG AA compliance */
    background-color: #fef3e9;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Action: Stars & Sold */
.home-product-item__action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
}

.home-product-item__rating-star {
    font-size: 0.8rem;
    transform-origin: left;
    display: flex;
    margin-right: 4px;
}

.home-product-item__rating-star i {
    color: #ffce3d;
    /* Shopee star color */
}

.home-product-item__sold {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-left: auto;
}

.home-product-item__origin {
    display: block;
    text-align: right;
    color: rgba(0, 0, 0, 0.65);
    font-size: 1.1rem;
    font-weight: 300;
    margin-top: 4px;
}

/* Badges */
.home-product-item__mall-badge {
    position: absolute;
    top: 10px;
    left: -4px;
    color: #fff;
    background-color: #d0011b;
    font-size: 1.0rem;
    font-weight: 500;
    line-height: 1.4rem;
    padding: 0 4px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    z-index: 2;
}

.home-product-item__mall-badge {
    color: #fff;
    background-color: #d0011b;
    font-size: 1.0rem;
    font-weight: 500;
    line-height: 1.4rem;
    padding: 0 4px;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    z-index: 2;
}

.home-product-item__mall-badge::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    border-top: 3px solid #9e0013;
    border-left: 3px solid transparent;
}

.home-product-item__star-badge {
    position: absolute;
    top: 10px;
    left: -4px;
    color: #fff;
    background-color: var(--accent-color);
    font-size: 1.0rem;
    font-weight: 500;
    padding: 0 4px;
    line-height: 1.4rem;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    z-index: 2;
}

.home-product-item__star-badge::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    /* Use dark variant of accent */
    border-top: 3px solid #be3f25;
    border-left: 3px solid transparent;
}

.home-product-item__star-plus-badge {
    position: absolute;
    top: 10px;
    left: -4px;
    color: #fff;
    background-color: var(--accent-color);
    font-size: 1.0rem;
    font-weight: 500;
    padding: 0 4px;
    line-height: 1.4rem;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    z-index: 2;
}

.home-product-item__star-plus-badge::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    border-top: 3px solid #be3f25;
    border-left: 3px solid transparent;
}

.home-product-item__ad-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(255, 212, 36, 0.9);
    padding: 2px 4px;
    font-size: 1rem;
    font-weight: 500;
    border-bottom-left-radius: 2px;
}

.home-product-pagination {
    margin-top: 52px;
    margin-bottom: 60px;
    padding-left: 0;
}

.footer {
    border-top: 4px solid var(--primary-color);
    padding-top: 120px;
}

.main-footer {
    background-color: #f9f9f9;
}

.main-footer-info {
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding-bottom: 20px;
    padding-top: 10px;
}

.footer__heading {
    font-size: 1.2rem;
    color: var(--text-color);
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 20px;
}

.footer-list {
    padding: 0;
    list-style: none;
    margin-top: 16px;
}

.footer-item {
    margin-bottom: 12px;
}

.footer-item__link {
    text-decoration: none;
    font-size: 1.2rem;
    color: #737373;
    display: flex;
    align-items: center;
}

.footer-item__link:hover {
    color: var(--primary-color);
}

.footer-item-icon {
    font-size: 1.6rem;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Payment & Shipping Logos Grid */
.footer__payment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer__payment-item {
    margin-bottom: 8px;
    background-color: white;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    overflow: hidden;
    padding: 4px;
    width: 60px;
    /* Fixed width for grid effect */
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__payment-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Download App Section */
.footer__download {
    display: flex;
    margin-top: 16px;
}

.footer__download-qr {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 2px solid #f9f9f9;
    margin-right: 12px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.footer__download-apps {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.footer__download-app-img {
    height: 20px;
}

/* Footer Bottom */
.footer__bottom {
    background-color: #f5f5f5;
    padding: 42px 0 37px 0;
    margin-top: 36px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    color: #737373;
}

.footer__text {
    margin: 0;
    text-align: center;
    /* Default center, or adjust as needed */
}

.footer__text-wrapper {
    margin-top: 8px;
    text-align: center;
}

.footer__text-link {
    text-decoration: none;
    color: #737373;
    padding: 0 5px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.footer__text-link:last-child {
    border-right: none;
}

/* Cleaned up unused styles */

.other-footer {
    background-color: #eee;
    padding: 40px 0;
}

.other-footer-heading {
    display: flex;
    justify-content: center;
    text-align: center;
}

.other-footer-link {
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--footer-color);
}

.other-footer-info {
    font-size: 1.2rem;
    color: var(--text-color);
    text-align: center;
}

.other-footer-title {
    margin: 25px 0;
}

.other-footer-more {
    margin: 8px 10px 0;
}

/* =========================================
   PREMIUM FOOTER STYLES
   ========================================= */

.footer-premium {
    background: linear-gradient(135deg, #1a1c20 0%, #0f1012 100%);
    color: #b0b3b8;
    padding-top: 60px;
    padding-bottom: 30px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    border-top: 1px solid #333;
    margin-top: 40px;
}

.footer-premium .footer-content {
    max-width: 1200px;
}

/* Brand Section */
.footer-brand h2.brand-logo {
    color: #fff;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    font-size: 1.3rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Social Links */
.social-links-premium {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Disclaimer */
.footer-disclaimer {
    margin-top: 25px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
}

.footer-disclaimer p {
    font-size: 1.1rem;
    color: #888;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.footer-disclaimer strong {
    color: #ddd;
    font-weight: 600;
}

/* Headings */
.footer-heading-premium {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-left: 0;
}

.footer-heading-premium.small-margin-top {
    margin-top: 25px;
}

/* Links */
.footer-links-premium {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-premium li {
    margin-bottom: 12px;
}

.footer-links-premium a {
    color: #b0b3b8;
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.footer-links-premium a:hover {
    color: #fff;
    padding-left: 5px;
}

/* App Buttons */
.app-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.app-btn-img {
    height: 30px;
    cursor: pointer;
    transition: transform 0.2s;
    filter: grayscale(100%);
    opacity: 0.8;
}

.app-btn-img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Divider */
.footer-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 40px 0 25px;
}

/* Bottom Bar */
.footer-bottom-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-premium .copyright {
    font-size: 1.3rem;
    margin: 0;
}

.payment-icons-premium {
    display: flex;
    gap: 15px;
    font-size: 2.4rem;
    color: #666;
}

.payment-icons-premium i {
    transition: color 0.3s;
}

.payment-icons-premium i:hover {
    color: #fff;
}

/* Mobile Responsiveness adjustments for Footer */
@media (max-width: 739px) {
    .footer-premium {
        padding-top: 30px;
        text-align: center;
    }

    .social-links-premium {
        justify-content: center;
        margin-bottom: 30px;
    }

    .footer-heading-premium {
        margin-top: 20px;
    }

    .footer-lines-premium a:hover {
        padding-left: 0;
    }

    .app-buttons {
        justify-content: center;
    }

    .footer-bottom-premium {
        flex-direction: column-reverse;
        text-align: center;
    }
}

/* =========================================
   PREMIUM HEADER & DARK MODE OVERRIDES
   ========================================= */

:root {
    --bg-dark: #0f1012;
    --bg-card: #1a1c20;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --accent-color: #ee4d2d;
    --header-height-premium: 80px;
    --glass-bg: rgba(26, 28, 32, 0.85);
    --border-dark: rgba(255, 255, 255, 0.1);
}

body,
.app {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary);
}

.container {
    background-color: var(--bg-dark) !important;
}

/* --- Header Premium --- */
.header-premium {
    height: var(--header-height-premium);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transition: all 0.3s ease;
}

.header-container {
    height: 100%;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.header-logo .logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-logo .logo-img {
    height: 45px;
    /* Adjust height to fit header */
    width: auto;
    object-fit: contain;
}

/* Removed text logo styles since we use image now */

/* Search */
.header-search-premium {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input-premium {
    width: 100%;
    height: 44px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 22px;
    padding: 0 20px 0 45px;
    color: #fff;
    font-size: 1.4rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input-premium:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(238, 77, 45, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.6rem;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.action-item {
    position: relative;
    cursor: pointer;
}

.action-icon {
    font-size: 2.2rem;
    color: var(--text-primary);
    transition: color 0.2s;
}

.action-item:hover .action-icon {
    color: var(--accent-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid var(--bg-dark);
}

.user-action {
    display: flex;
    gap: 15px;
}

.action-link,
.action-btn {
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
}

.action-link {
    color: var(--text-primary);
}

.action-link:hover {
    color: white;
}

.action-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #d73211;
}

/* --- Dark Mode Content Overrides --- */

/* App Container Spacing for fixed header */
:root {
    --header-height-premium: 120px;
}

/* App Container Spacing for fixed header */
/* App Container Spacing for fixed header */
.container {
    margin-top: calc(var(--header-height-premium) + 40px);
    padding-top: 20px;
}

/* Category Filter Dark Mode */
.category {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 16px;
    position: sticky;
    top: 150px;
    /* Explicitly set to clear header (120px) + gap */
    z-index: 10;
    max-height: calc(100vh - 160px);
    overflow-y: auto;

    /* Hide scrollbar for clean look but allow scrolling */
    scrollbar-width: thin;
    scrollbar-color: var(--border-dark) transparent;
}

/* Custom Scrollbar for Sidebar */
.category::-webkit-scrollbar {
    width: 4px;
}

.category::-webkit-scrollbar-track {
    background: transparent;
}

.category::-webkit-scrollbar-thumb {
    background-color: transparent;
    /* Initially hidden */
    border-radius: 4px;
}

.category:hover::-webkit-scrollbar-thumb {
    background-color: var(--border-dark);
    /* Show on hover */
}

.category-heading {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-dark);
    font-size: 1.6rem;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.category-heading-icon {
    margin-right: 8px;
    color: var(--text-secondary);
}

.category-group-title {
    color: var(--text-primary) !important;
}

.category-group-item {
    color: var(--text-secondary) !important;
    font-size: 1.4rem;
}

.category-group-item-check {
    accent-color: var(--accent-color);
}

/* Home Filter (Sort Bar) Fixes */
.home-filter {
    background-color: #2a2c30 !important;
    /* Explicit dark background */
    border-radius: 4px;
    padding: 12px 22px;
    margin-bottom: 20px;
    border: 1px solid var(--border-dark);
    position: sticky;
    top: 150px;
    /* Match sidebar */
    z-index: 9;
}

.home-filter-title {
    color: var(--text-secondary) !important;
}

.home-filter-btn {
    background-color: #2a2c30;
    color: var(--text-primary) !important;
}

.home-filter-btn:hover {
    background-color: var(--accent-color);
    color: white !important;
}

.btn.btn--primary.home-filter-btn {
    background-color: var(--accent-color);
    color: white !important;
}

/* Fix Dropdown Text */
.select-input__link,
.home-filter-sort-item-link {
    color: var(--text-primary) !important;
}

.select-input__link:hover,
.home-filter-sort-item-link:hover {
    color: var(--accent-color) !important;
}

.home-filter-page-number {
    color: var(--text-primary) !important;
}



.home-product-item-link {
    background-color: var(--bg-card) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-dark);
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: block;
    /* Ensure it behaves as a block */
}

.home-product-item-link:hover,
.home-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
    z-index: 2;
}

.home-product-item__name {
    color: var(--text-primary) !important;
}

.home-product-item__price-old {
    color: #666;
}

.home-product-item__price-current {
    color: var(--accent-color);
}

.home-product-item__action {
    color: var(--text-secondary);
}

/* Fix for sold count visibility */
.home-product-item__sold {
    color: var(--text-secondary) !important;
}

/* Fix for origin/shop location visibility */
.home-product-item__origin {
    color: var(--text-secondary) !important;
}

/* Sort Bar Dark Mode (Hidden in desktop redesign typically, but if present) */
.home-filter {
    background-color: var(--bg-card);
    border-radius: 4px;
    padding: 12px 22px;
}

.home-filter-title {
    color: var(--text-secondary);
}

.home-filter-btn {
    background-color: #2a2c30;
    color: var(--text-primary);
}

.select-input {
    background-color: #2a2c30;
    color: var(--text-primary);
}

.select-input-list {
    background-color: var(--bg-card);
    border-color: var(--border-dark);
}

/* Dark Mode Pagination Overrides */
.pagination-item__link {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border-color: var(--border-dark) !important;
}

.pagination-item__link:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
    border-color: var(--accent-color) !important;
}

.pagination-item--active .pagination-item__link {
    background-color: var(--accent-color) !important;
    color: white !important;
    border-color: var(--accent-color) !important;
}

.pagination-item .pagination-item__link--disable {
    color: var(--text-secondary) !important;
    background-color: transparent !important;
    border-color: var(--border-dark) !important;
}

/* Fix Sort Dropdown Background */
.home-filter-sort {
    background-color: #2a2c30 !important;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 200px;
}

.home-filter-sort-btn {
    color: var(--text-primary) !important;
}

.home-filter-sort-list {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-dark);
}

.home-filter-sort-item-link {
    color: var(--text-primary) !important;
}

.home-filter-sort-item-link:hover {
    color: var(--accent-color) !important;
}

/* Fix Home Filter Pagination Background */
.home-filter-page-btn {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    border-left: 1px solid var(--border-dark);
}

.home-filter-page-btn:first-child {
    border-left: none;
}

.home-filter-page-btn--disable {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
}

.home-filter-page-btn:hover {
    background-color: var(--accent-color) !important;
    color: white !important;
}

/* Helper Classes */
.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* Modal Styles for Video and Gallery */
.video-modal,
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active,
.gallery-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-content,
.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-modal-close,
.gallery-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
}

.video-modal video {
    width: 100%;
    border-radius: 8px;
    max-height: 80vh;
}

/* Indicators on Product Card */
.video-indicator,
.gallery-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 1.2rem;
    z-index: 2;
    cursor: pointer;
    transition: background 0.2s;
}

.video-indicator:hover,
.gallery-indicator:hover {
    background: rgba(255, 87, 34, 0.9);
    /* Thopee Orange */
}

/* Specific position for video if gallery exists also */
/* Move video indicator to bottom-right to avoid overlapping Mall/Star badges at top-left */
.video-indicator {
    top: auto;
    bottom: 8px;
    right: 8px;
    left: auto;
}

/* Pagination Alignment */
.home-product__pagination {
    justify-content: flex-end !important;
    /* Align to right */
    display: flex;
    align-items: center;
}


/* Gallery Styles */
.gallery-modal-content img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: none;
    /* Hide all by default, JS will show active */
}

.gallery-modal-content img.active {
    display: block;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    z-index: 10002;
}

.gallery-prev {
    left: -50px;
}

.gallery-next {
    right: -50px;
}

@media (max-width: 739px) {
    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .video-modal-close,
    .gallery-modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        font-size: 20px;
    }
}

/* Responsive Header Sizing Fixes (Ported from index.html) */
/* Desktop Sizing (Min Width 740px) */
@media (min-width: 740px) {
    .header-premium {
        height: 60px;
        /* Compact height for Desktop */
        display: flex;
        align-items: center;
    }

    .header-container {
        height: 100%;
    }

    .header-main {
        height: 100%;
        display: flex;
        align-items: center;
    }

    .logo-img {
        width: 100px !important;
        height: auto;
    }

    .header-search-premium {
        height: 32px !important;
    }

    .search-input-premium {
        height: 32px !important;
        font-size: 1.25rem !important;
    }

    .search-wrapper {
        height: 100% !important;
    }

    .search-icon {
        line-height: 32px !important;
        font-size: 1.2rem !important;
    }

    .action-icon {
        font-size: 1.6rem !important;
    }

    .action-link {
        font-size: 1.3rem !important;
    }
}

/* Mobile Sizing (Max Width 739px) */
@media (max-width: 739px) {
    .header-premium {
        height: auto !important;
        /* Allow auto height for stacking */
        padding: 10px 0;
        min-height: 50px;
    }

    .header-main {
        flex-wrap: nowrap;
        /* Keep logo and items in one row primarily */
        align-items: center;
    }

    .header-logo {
        flex: 1;
        /* Allow logo to take available space */
        text-align: left;
    }

    .logo-img {
        width: 90px !important;
        /* Slightly smaller logo on mobile */
        height: auto;
    }

    /* Hide desktop search on mobile if it breaks layout, usage of mobile search icon implies toggle */
    .header-search-premium {
        display: none;
        /* Often hidden on mobile headers in favor of search icon */
    }

    .action-item {
        margin: 0 5px;
    }

    .action-icon {
        font-size: 1.8rem !important;
        /* Readable size for touch */
    }
}