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

:root {
    --primary-color: #e02424;
    --secondary-color: #000000;
    --accent-color: #f97316;
    --neon-yellow: #ffcc00;
    --neon-cyan: #00f5ff;
    --neon-pink: #ff2bd6;
    --light-color: #ffffff;
    --dark-color: #111827;
    --gray-color: #64748b;
    --light-gray: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

/* Header */
.header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: grid;
    align-items: center;
    grid-template-columns: auto 1fr auto auto;
    column-gap: 1rem;
    max-width: 100%;
    margin: 0;
    padding: 0 50px;
}

.header-search {
    position: relative;
    width: 350px;
    max-width: 580px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.header-search i {
    color: rgba(255, 255, 255, 0.85);
    width: 16px;
}

.header-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: white;
    font-weight: 800;
    min-width: 120px;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.search-suggest {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.98), rgba(6, 6, 10, 0.98));
    border: 1px solid rgba(0, 245, 255, 0.18);
    border-radius: 1rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    z-index: 9997;
}

.search-suggest-item {
    width: 100%;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    text-align: left;
}

.search-suggest-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.search-suggest-thumb {
    width: 44px;
    height: 34px;
    border-radius: 0.6rem;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.search-suggest-name {
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.search-suggest-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.68);
    font-weight: 700;
}

.search-suggest-empty {
    padding: 0.9rem 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 800;
}

.back-btn {
    position: fixed;
    left: 18px;
    bottom: 18px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(0, 245, 255, 0.22);
    background: rgba(0, 0, 0, 0.55);
    color: white;
    cursor: pointer;
    z-index: 9996;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
}

.back-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 204, 0, 0.35);
}

.logo a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    justify-content: center;
}

.main-nav {
    justify-self: center;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.cart-count {
    background-color: var(--accent-color);
    color: var(--dark-color);
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.user-sidebar-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 0, 0, 0.55);
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(10px);
}

.user-sidebar-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.55);
}

.user-sidebar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(255, 0, 0, 0.55), rgba(0, 0, 0, 0.8));
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.user-sidebar-username {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.user-sidebar-chevron {
    opacity: 0.85;
    font-size: 0.85rem;
}

.user-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9998;
}

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

.user-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(360px, 92vw);
    background: #070707;
    transform: translateX(104%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
}

.user-sidebar.open {
    transform: translateX(0);
}

.user-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.9), rgba(255, 0, 0, 0.85), rgba(255, 204, 0, 0.9));
    background-size: 100% 180%;
    animation: sidebarGlow 2.8s ease-in-out infinite;
}

@keyframes sidebarGlow {
    0% {
        background-position: 50% 0%;
    }

    50% {
        background-position: 50% 100%;
    }

    100% {
        background-position: 50% 0%;
    }
}

.user-sidebar-head {
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.user-sidebar-profile {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.user-sidebar-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, rgba(255, 204, 0, 0.35), rgba(255, 0, 0, 0.25), rgba(0, 0, 0, 0.95));
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.18), 0 10px 25px rgba(0, 0, 0, 0.5);
    color: white;
}

.user-sidebar-profile-name {
    font-weight: 800;
    color: white;
    letter-spacing: 0.2px;
}

.user-sidebar-profile-sub {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

.user-sidebar-close {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    border-radius: 0.75rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.user-sidebar-close:hover {
    transform: rotate(6deg);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.user-sidebar-body {
    padding: 0.5rem 1.25rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.user-sidebar-action {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 0.95rem;
    border-radius: 0.9rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.user-sidebar-action:hover {
    transform: translateX(-2px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 204, 0, 0.25);
}

.user-sidebar-action i {
    width: 18px;
    color: rgba(255, 204, 0, 0.95);
}

.user-sidebar-foot {
    margin-top: auto;
    padding: 1rem 1.25rem 1.25rem 1.25rem;
}

.user-sidebar-logout {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 0, 0, 0.28);
    background: rgba(255, 0, 0, 0.12);
    color: white;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.user-sidebar-logout:hover {
    transform: translateY(-1px);
    background: rgba(255, 0, 0, 0.18);
    border-color: rgba(255, 204, 0, 0.35);
}

.sidebar-open {
    overflow: hidden;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s;
}

.btn-login {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

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

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

.btn-register:hover {
    background-color: #1d4ed8;
}

.btn-logout {
    background-color: transparent;
    color: white;
    border: 1px solid var(--danger-color);
}

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

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 3rem 0 1.25rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-col {
    min-width: 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.footer-brand-name {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1rem;
    max-width: 460px;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-item {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.footer-item i {
    width: 18px;
    margin-top: 0.2rem;
    color: var(--accent-color);
}

.footer-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.footer-link:hover {
    color: white;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.social-link i {
    width: 18px;
    color: white;
}

.social-link:hover {
    color: white;
}

.newsletter-form {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.65rem 0.8rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    outline: none;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-btn {
    padding: 0.65rem 1rem;
    border-radius: 0.6rem;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #c81e1e;
}

.footer-contact {
    margin-top: 0.9rem;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

/* Hero */
.hero {
    background-color: var(--secondary-color);
    color: white;
    padding: 0;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    height: 500px;
}

.hero-slide {
    display: none;
    height: 100%;
    padding: 4rem 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    align-items: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Overlay đen để chữ dễ đọc */
    z-index: 1;
}

.hero-slide.active {
    display: flex;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--light-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.hero-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: #ffcc00;
    /* Màu vàng khi active */
    border-color: #ffcc00;
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.explore-section {
    padding: 3rem 0;
}

.explore-section h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.explore-section p {
    color: var(--gray-color);
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.explore-card {
    display: block;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: radial-gradient(900px 180px at 20% 0%, rgba(255, 204, 0, 0.14), transparent 55%),
        radial-gradient(700px 220px at 80% 30%, rgba(0, 245, 255, 0.12), transparent 55%),
        linear-gradient(135deg, #0b0b10, #0f1018);
    border: 1px solid rgba(255, 204, 0, 0.14);
    text-decoration: none;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.explore-card h3 {
    margin-bottom: 0.5rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    text-shadow: 0 0 12px rgba(0, 245, 255, 0.2);
}

.explore-card span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.72);
    display: block;
    line-height: 1.5;
}

.explore-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 245, 255, 0.18) inset;
    border-color: rgba(0, 245, 255, 0.28);
}

.explore-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.explore-card:hover::before {
    transform: translateX(120%);
}

.explore-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 100% 4px;
    opacity: 0.08;
    pointer-events: none;
}

.scroll-reveal {
    opacity: 1;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .header .container {
        grid-template-columns: 1fr;
        row-gap: 1rem;
    }

    .main-nav {
        justify-self: start;
    }

    .header-search {
        width: 100%;
        max-width: 100%;
        justify-self: stretch;
    }

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

    .newsletter-form {
        flex-direction: column;
    }
}


/* --- BỘ LỌC NÂNG CAO --- */
.filter-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    width: 100%;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.price-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.price-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.price-btn.active {
    background: #ff4d4d;
    /* Màu đỏ ROG */
    color: white;
    border-color: #ff4d4d;
}

.price-btn:hover {
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.price-btn.active:hover {
    color: white;
}

/* --- CSS cho phần nhập giá thủ công --- */
.custom-price-filter {
    display: flex;
    align-items: center;
    margin-top: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.custom-price-filter input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 130px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.custom-price-filter input[type="number"]:focus {
    border-color: #ff4d4d;
}

/* Ẩn mũi tên lên xuống mặc định của input number */
.custom-price-filter input[type="number"]::-webkit-outer-spin-button,
.custom-price-filter input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-price-filter input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.btn-apply-price {
    padding: 8px 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-apply-price:hover {
    background: #ff4d4d;
    /* Đổi màu đỏ ROG khi hover */
}

/* Ẩn dấu tick mặc định trên các nút màu */
.color-option .tick-icon {
    display: none;
    margin-left: 6px;
    font-size: 0.9em;
}

/* Chỉ hiện dấu tick ở màu đang được thêm class 'selected' */
.color-option.selected .tick-icon {
    display: inline-block;
}

/* (Tùy chọn) Thêm viền nổi bật cho màu đang được chọn */
.color-option.selected {
    border: 2px solid #ff4646; /* Màu đỏ đặc trưng của ROG hoặc màu bạn thích */
    font-weight: bold;
}

/* ========================================================
   GIAO DIỆN BOT CHAT ZALO GIẢ LẬP
   ======================================================== */

#zalo-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000; /* Đảm bảo luôn nổi lên trên cùng */
}

/* Nút Zalo tròn nổi */
.zalo-chat-widget {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.zalo-icon-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zalo-icon-wrap img {
    width: 45px;
    height: 45px;
    z-index: 3;
    border-radius: 50%;
    object-fit: contain;
    background-color: #fff;
}

.zalo-animation-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #0068ff;
    border-radius: 50%;
    z-index: 1;
    animation: zalo-pulse 1.5s infinite;
}

.zalo-animation-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #0068ff;
    border-radius: 50%;
    z-index: 2;
    animation: zalo-ring 1.5s infinite;
}

/* Tooltip "Chat với chúng tôi" */
.zalo-tooltip {
    position: absolute;
    right: 70px;
    background: #0068ff;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.zalo-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #0068ff;
}

.zalo-chat-widget:hover .zalo-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

/* Animations */
@keyframes zalo-pulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(0.9); opacity: 1; }
}

@keyframes zalo-ring {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Khung chat chữ nhật */
.zalo-chat-box {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 350px;
    height: 450px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    
    /* Ẩn hiện mượt mà */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Kích hoạt hiển thị khung chat */
.zalo-chat-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.zalo-chat-header {
    background: #0068ff;
    color: white;
    padding: 10px 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zalo-chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    padding: 2px;
}

.zalo-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.zalo-header-info span {
    font-size: 0.8rem;
    color: #e5e7eb;
}

#zalo-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.zalo-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #e2e8f0;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bot-message {
    background: #fff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.user-message {
    background: #c6e2ff;
    color: #333;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.zalo-chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;
    border-radius: 0 0 10px 10px;
}

#zalo-chat-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 10px;
    font-size: 0.95rem;
}

#zalo-send-btn {
    background: transparent;
    border: none;
    color: #0068ff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 10px;
}

#zalo-send-btn:hover {
    color: #004ecc;
}