:root {
    --primary-color: #111111;
    /* Black */
    --hover-color: #333333;
    --text-color: #344054;
    --heading-color: #101828;
    --bg-color: #f9fafb;
    --white: #ffffff;
    --border-color: #eaecf0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    animation: fadeInPage 0.25s ease-out forwards;
}

@keyframes fadeInPage {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

body.page-exit {
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

/* --- Header --- */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--heading-color);
    font-weight: 700;
    font-size: 20px;
    text-decoration: none;
}

.logo .icon-box {
    background: var(--primary-color);
    color: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-weight: 900;
    font-size: 18px;
}

.search-bar {
    flex: 0 1 500px;
    display: flex;
    background: #f2f4f7;
    border-radius: 24px;
    border: 1px solid #e4e7ec;
    transition: 0.3s;
    align-items: center;
    overflow: hidden;
    height: 44px;
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.1);
}

.search-bar .search-icon {
    color: #667085;
    padding: 0 16px;
    font-size: 16px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: var(--heading-color);
    height: 100%;
    padding: 0 16px 0 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-actions .action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
}

.header-actions .action-item:hover {
    color: var(--primary-color);
}

.header-actions i {
    font-size: 20px;
}

.main-menu {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.nav-list {
    display: flex;
    list-style: none;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px 0;
    gap: 24px;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-list li a {
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.nav-list li a:hover {
    color: var(--primary-color);
    background: #f2f4f7;
}

/* --- Hero Banner --- */
.hero-banner {
    background: #111;
    border-radius: var(--radius-lg);
    margin-top: 24px;
    height: 400px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 60px;
    color: var(--white);
}

/* Background image with overlay */
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1542382156909-9ae37b3f56fd?q=80&w=2663&auto=format&fit=crop') center/cover;
    opacity: 0.6;
    z-index: 1;
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 18px;
    color: #e5e7eb;
    margin-bottom: 32px;
}

.hero-btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    display: inline-block;
    transition: 0.3s;
}

.hero-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

/* --- Layout --- */
main {
    min-height: 60vh;
    padding-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 48px 0 24px;
}

.section-title {
    background: #1a1a1a; /* Nền đen lịch lãm */
    color: #ffffff !important; /* Chữ trắng sáng */
    padding: 10px 20px; /* Tạo khung hộp đệm lót */
    font-size: 16px; /* Kích thước chữ vừa dặn */
    font-weight: 700;
    border-radius: 4px; /* Bo nhẹ cạnh viền cho hiện đại */
    display: inline-block; /* Ôm vừa khít chữ */
    margin: 0;
}

.view-all {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
}

.view-all:hover {
    color: var(--hover-color);
    text-decoration: underline;
}

/* --- Categories (Icon style) --- */
.category-icons {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 24px;
}

.category-icons::-webkit-scrollbar {
    display: none;
}

.cat-item {
    flex: 0 0 calc(100% / 6 - 14px);
    min-width: 140px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: 0.3s;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.cat-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.cat-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.cat-name {
    font-weight: 600;
    color: var(--heading-color);
    font-size: 15px;
}

/* Brand Logos */
.brand-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.brand-logos a {
    border: 1px solid var(--border-color);
    background: var(--white);
    padding: 8px 16px;
    border-radius: 24px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 48px;
    box-shadow: var(--shadow);
}

.brand-logos a:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.brand-logos img {
    max-height: 24px;
    object-fit: contain;
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid #f2f4f7;
    text-decoration: none;
    height: 100%;
}

/* Thẻ Discount % Đỏ rực - Ribbon kẹp mép Phải khung */
.discount-tag {
    position: absolute;
    top: 15px;
    right: -8px; /* Lấn ra ngoài bên Phải */
    left: auto; /* Reset left */
    background: #ba1e31;
    color: #ffffff;
    padding: 4px 8px; /* Thu nhỏ padding gọn gàng */
    font-size: 12px; /* Giảm size chữ nhẹ */
    font-weight: 800;
    border-radius: 4px 0 0 4px; /* Bo góc ngược lại - chỉ bo bên Trái */
    z-index: 5;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
}

.discount-tag::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0; /* Đặt ở mép phải của tag */
    border-width: 6px 8px 0 0; /* Tạo vát chéo lộn ngược cho bên Phải */
    border-style: solid;
    border-color: #831321 transparent transparent transparent;
    display: block;
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.product-image-cont {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    padding: 10px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.product-category-label {
    font-size: 12px;
    color: #667085;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-name {
    font-size: 16px;
    color: var(--heading-color);
    font-weight: 600;
    margin-bottom: 12px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 50px;
    line-height: 1.5;
}

.product-name:hover {
    color: var(--primary-color);
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}

.product-price {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 800;
}

.product-old-price {
    text-decoration: line-through;
    color: #98a2b3;
    font-size: 14px;
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    outline: none;
}

.btn:hover {
    background: var(--hover-color);
}

/* --- Modal & Toast --- */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.custom-toast {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--heading-color);
}
.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}
.toast-success { border-left-color: #12b76a; }
.toast-error { border-left-color: #d92d20; }
.toast-info { border-left-color: #4285f4; }
.custom-toast i { font-size: 20px; }
.toast-success i { color: #12b76a; }
.toast-error i { color: #d92d20; }
.toast-info i { color: #4285f4; }
.toast-message { font-size: 14px; font-weight: 600; color: var(--heading-color); }

/* --- Modal --- */
.modal {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    position: relative;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 16px;
    font-size: 28px;
    cursor: pointer;
    color: #98a2b3;
    transition: 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: #101828;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #667085;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--heading-color);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d5dd;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 15px;
    transition: 0.2s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 16px;
}

/* Product Details Page */
.product-detail-layout {
    display: flex;
    gap: 48px;
    margin-top: 24px;
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    align-items: flex-start;
}

.product-detail-image {
    flex: 1;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    width: 100%;
    max-height: 500px;
    background: var(--white);
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-detail-info {
    flex: 1;
}

.product-detail-cat {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

.product-detail-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 16px;
    line-height: 1.3;
}

.product-detail-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.product-detail-price {
    font-size: 36px;
    font-weight: 800;
    color: #d92d20;
}

.product-detail-oldprice {
    font-size: 20px;
    color: #98a2b3;
    text-decoration: line-through;
}

.product-buy-btn {
    background: #d92d20;
    color: #fff;
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    margin-bottom: 24px;
    transition: 0.3s;
}

.product-buy-btn:hover {
    background: #b42318;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(217, 45, 32, 0.3);
}

.product-desc-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 12px;
}

.product-description {
    font-size: 16px;
    color: #475467;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* --- Footer Sếp SGCE --- */
.sgce-footer {
    background: #ffffff;
    color: #4b5563;
    margin-top: 60px;
    border-top: 1px solid #e5e7eb;
}

/* 1. Dải tính năng Top */
.footer-features {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0; /* Giảm padding cho gọn */
}

.feature-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px; /* Giảm gap thưa bớt mỏi mắt */
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px; /* Thu hẹp khoảng cách icon và chữ */
    font-size: 13px; /* Chữ nhỏ xuống 13px */
    font-weight: 700;
    color: #262626; /* Đen chuẩn */
    text-transform: uppercase; /* Ép buộc In Hoa cho đồng bộ toàn diện */
}

.feature-item i {
    font-size: 18px; /* Icon nhỏ gọn vừa tầm mắt */
    color: #4b5563;
}

/* 2. Khối chính: 3-4 cột */
.footer-main {
    padding: 32px 0 16px; /* Co gọn khối chính */
}

.footer-main .footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #111827;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #4b5563;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #111827;
    text-decoration: underline;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* --- Responsive Layout --- */
@media (max-width: 992px) {
    .header-inner {
        padding: 12px 16px;
        height: 64px;
    }

    .hero-banner {
        height: 320px;
        padding: 40px;
        margin-top: 16px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .product-detail-layout {
        flex-direction: column;
        gap: 24px;
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .product-description {
        word-break: break-word;
        white-space: pre-wrap;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .hero-banner {
        height: 260px;
        padding: 24px;
    }

    .hero-content h1 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .hero-content p {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .hero-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    .cat-item {
        min-width: 110px;
        padding: 16px 8px;
    }

    .cat-icon {
        font-size: 24px;
    }

    .cat-name {
        font-size: 13px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        padding: 12px;
    }

    .product-image-cont {
        height: 140px;
    }

    .product-name {
        font-size: 14px;
        height: 42px;
    }

    .product-price {
        font-size: 16px;
    }

    .product-old-price {
        font-size: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Tối ưu Footer cho Mobile Đẹp & Gọn */
    .sgce-footer .feature-list {
        gap: 12px 16px; /* Gom chặt lại thành 2 cột 1 hàng khít */
        justify-content: flex-start;
    }

    .sgce-footer .feature-item {
        font-size: 11px; /* Chữ nhỏ xuống nữa để không tràn */
        gap: 6px;
        flex: 0 0 calc(50% - 8px); /* Chia đôi mảng cho đều 2 cột */
    }

    .sgce-footer .feature-item i {
        font-size: 15px; /* Giảm chùm Icon bự tản sắc */
    }

    .sgce-footer .footer-features {
        padding: 12px 0; /* Ép mỏng viền dư */
    }

    .sgce-footer .footer-main .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Lên 2 cột song song cho gọn gàng */
        gap: 24px;
    }

    .sgce-footer .footer-col h4 {
        font-size: 14px; /* Tiêu đề thu hẹp cho cân đối */
        margin-bottom: 12px;
    }

    .sgce-footer .footer-links a {
        font-size: 13px; /* Link chữ giảm 1 nấc cho thanh mảnh */
    }

    .header-actions span.user-greet {
        display: none;
    }

    /* Hide user greeting text on mobile to save space */
}

/* Product Description Expand */
.product-desc-box {
    position: relative;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.product-description {
    max-height: 180px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.product-description.expanded {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 10px;
}

.product-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--white));
    pointer-events: none;
}

.product-description.expanded::after {
    display: none;
}

.content-description {
    max-height: 800px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.content-description.expanded {
    max-height: none;
    overflow: visible;
}

.content-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, var(--white));
    pointer-events: none;
}

.content-description.expanded::after {
    display: none;
}

/* Force rich text content to be responsive and prevent wide pasted HTML from breaking the layout */
.rich-text-content {
    overflow-x: hidden;
    width: 100%;
}

.rich-text-content * {
    max-width: 100% !important;
    box-sizing: border-box;
    min-width: 0 !important; /* Ngăn container flex phình to theo nội dung */
}

.rich-text-content img,
.rich-text-content video,
.rich-text-content iframe,
.rich-text-content figure {
    width: 100% !important;
    height: auto !important;
}

/* Áp dụng cho TOÀN BỘ PC (Vỉ cột trái chỉ có 50% nên bắt buộc dẹp cột con) */
.rich-text-content [style*="flex-direction: row"],
.rich-text-content [style*="display: flex"] {
    flex-direction: column !important;
    flex-wrap: wrap !important;
}

.rich-text-content [style*="width: 1050px"],
.rich-text-content [style*="width:"] {
    width: 100% !important;
    flex-basis: 100% !important;
}

.product-description::-webkit-scrollbar {
    width: 6px;
}

.product-description::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.btn-readmore {
    display: block;
    margin: 16px auto 0;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-readmore:hover {
    background: #f2f4f7;
}

.cat-item-small:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Sidebar Menu for Mobile */
.mobile-menu-btn {
    display: flex;
    font-size: 24px;
    color: var(--heading-color);
    cursor: pointer;
    padding: 4px;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    bottom: 0;
    background: var(--white);
    z-index: 1000;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 18px;
    color: var(--heading-color);
    margin: 0;
}

.close-sidebar {
    font-size: 24px;
    cursor: pointer;
    color: #667085;
    transition: 0.2s;
}

.close-sidebar:hover {
    color: #d92d20;
}

.sidebar-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 15px;
    border-bottom: 1px solid #f2f4f7;
    padding-bottom: 10px;
}

.sidebar-nav a {
    font-size: 16px;
    font-weight: 600;
    color: var(--heading-color);
    display: block;
}

.sidebar-account {
    padding: 20px;
    background: #f9fafb;
    border-top: 1px solid var(--border-color);
}

.sidebar-account .action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-account .action-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-menu {
        display: none;
    }

    .header-actions>.action-item {
        display: none;
    }

    /* Hide desktop icons, handle via sidebar */
}

/* Product Gallery */
.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.product-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.product-gallery-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: 0.2s;
    background: #fff;
}

.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--primary-color);
}

/* Home Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-top: 24px;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%;
}

.slide {
    flex: 0 0 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: var(--heading-color);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.slider-prev {
    left: 16px;
}

.slider-next {
    right: 16px;
}
/* --- Floating Contact Buttons --- */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.contact-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #555555; /* Viền xám đen sang trọng */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #444444;
    font-size: 18px;
    font-weight: 800;
    transition: all 0.25s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-item.zalo {
    font-size: 11px; /* Chữ zalo nhỏ gọn vừa khít vòng tròn */
    letter-spacing: -0.5px;
    text-transform: none; /* Giữ nguyên chữ Zalo đúng font mốt */
}

.contact-item:hover {
    transform: translateY(-4px); /* Nhấc nhẹ khi hover rần rần */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    color: #111111;
    border-color: #111111;
}

@media (max-width: 640px) {
    .floating-contact {
        bottom: 20px;
        right: 15px;
        gap: 10px;
    }
    
    .contact-item {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .contact-item.zalo {
        font-size: 10px;
    }
}
@media (max-width: 768px) {
    .slider-container {
        height: 200px;
    }
}

/* User Dropdown Menu Animation */
.user-dropdown-menu {
    display: block !important; 
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #EAECF0;
    width: 210px;
    z-index: 1001;
    overflow: hidden;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* PC Mega Menu Dropdown Animation */
#desktopMegaMenu {
    display: block; 
    background: #fdfdfd; 
    box-shadow: 0 10px 15px rgba(0,0,0,0.05); 
    border-bottom-left-radius: 12px; 
    border-bottom-right-radius: 12px;
    
    max-height: 0;
    overflow: hidden;
    padding: 0; 
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, opacity 0.2s ease;
}

#desktopMegaMenu.active {
    max-height: 500px; 
    padding: 20px 0;
    border-top: 1px solid #e4e7ec; 
    opacity: 1;
}