/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;600;800&display=swap');

/* --- 1. CORE VARIABLES & FONTS --- */
:root {
    --primary: #6c5ce7;
    /* Tím hiện đại */
    --secondary: #a29bfe;
    --accent: #00cec9;
    /* Màu xanh ngọc nhấn */
    --dark: #2d3436;
    --light: #dfe6e9;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background-color: #f7f9fc;
    overflow-x: hidden;
}

/* --- 2. GLASSMORPHISM NAVBAR --- */
.navbar-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.nav-link {
    font-weight: 600;
    color: var(--dark) !important;
    margin: 0 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar: allow more items without overflow */
.navbar-glass .nav-wrap {
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 4px;
}

.navbar-glass .nav-wrap .nav-item {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .navbar-glass .nav-wrap {
        row-gap: 8px;
    }
}

/* Tet banner decoration */
.hero-section {
    --tet-red: #d5302a;
    --tet-gold: #f7c948;
}

.hero-section .tet-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.tet-lantern {
    position: absolute;
    width: 46px;
    height: 58px;
    background: radial-gradient(circle at 30% 30%, #ffb199 0%, #ff6b6b 45%, #d63031 100%);
    border-radius: 18px 18px 22px 22px;
    box-shadow: 0 10px 25px rgba(214, 48, 49, 0.35);
    animation: tet-sway 3.2s ease-in-out infinite;
    transform-origin: top center;
}

.tet-lantern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 16px;
    height: 10px;
    transform: translateX(-50%);
    background: var(--tet-gold);
    border-radius: 8px 8px 4px 4px;
}

.tet-lantern::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 18px;
    height: 10px;
    transform: translateX(-50%);
    background: var(--tet-gold);
    border-radius: 4px 4px 8px 8px;
    box-shadow: 0 6px 12px rgba(247, 201, 72, 0.35);
}

.tet-lantern.l1 {
    left: 22px;
    top: 18px;
    transform: rotate(-6deg);
}

.tet-lantern.l2 {
    right: 26px;
    top: 32px;
    transform: rotate(8deg);
    animation-delay: 0.6s;
}

.tet-coin {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    background: radial-gradient(circle at 35% 35%, #fff3c4 0%, #f7c948 55%, #f59f00 100%);
    box-shadow: 0 12px 24px rgba(245, 159, 0, 0.35);
    animation: tet-float 4s ease-in-out infinite;
}

.tet-coin.c1 {
    left: 120px;
    top: 10px;
    opacity: 0.5;
}

.tet-coin.c2 {
    right: 140px;
    bottom: 18px;
    opacity: 0.35;
    animation-delay: 1s;
}

.tet-blossom {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 60%);
    filter: blur(1px);
    animation: tet-pulse 3.6s ease-in-out infinite;
}

.tet-blossom.b1 {
    left: 8%;
    bottom: 10%;
}

.tet-blossom.b2 {
    right: 6%;
    top: 20%;
    animation-delay: 0.8s;
}

.hero-section .tet-ribbon {
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: min(780px, 90vw);
    height: 18px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 215, 0, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
    border-radius: 999px;
    opacity: 0.6;
    animation: tet-glow 2.8s ease-in-out infinite;
}

@keyframes tet-sway {
    0% {
        transform: rotate(-6deg) translateY(0);
    }

    50% {
        transform: rotate(4deg) translateY(4px);
    }

    100% {
        transform: rotate(-6deg) translateY(0);
    }
}

@keyframes tet-float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes tet-pulse {
    0% {
        opacity: 0.35;
        transform: scale(0.95);
    }

    50% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 0.35;
        transform: scale(0.95);
    }
}

@keyframes tet-glow {
    0% {
        opacity: 0.35;
    }

    50% {
        opacity: 0.75;
    }

    100% {
        opacity: 0.35;
    }
}

@media (max-width: 768px) {
    .tet-lantern {
        width: 34px;
        height: 44px;
    }

    .tet-coin {
        width: 40px;
        height: 40px;
    }

    .tet-coin.c1 {
        left: 76px;
    }

    .tet-coin.c2 {
        right: 70px;
        bottom: 12px;
    }

    .hero-section .tet-ribbon {
        height: 12px;
    }
}

/* --- 3. HERO SECTION & TYPING EFFECT --- */
.hero-section {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(255, 255, 255, 0.22), transparent 60%),
        radial-gradient(900px 500px at 95% 20%, rgba(0, 206, 201, 0.25), transparent 55%),
        linear-gradient(135deg, #5b4ae6 0%, #9b90ff 55%, #7f8cff 100%);
    color: white;
    padding: 30px 0 15px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 60%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07) 6px, rgba(255, 255, 255, 0) 6px, rgba(255, 255, 255, 0) 18px);
    opacity: 0.25;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    right: -120px;
    bottom: -160px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 65%);
    filter: blur(2px);
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .hero-section {
        padding: 56px 0 40px;
    }
}

.hero-section h1 {
    text-shadow: 0 8px 24px rgba(20, 20, 60, 0.25);
}

.hero-section .lead {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.hero-section .typing-text {
    position: relative;
    display: inline-block;
    padding: 0 6px 2px;
}

.hero-section .typing-text::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 8px;
    background: rgba(0, 206, 201, 0.35);
    z-index: -1;
    border-radius: 6px;
}

.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Floating shapes background */
.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* --- 4. CATEGORY ICONS (Floating) --- */
.cat-box {
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: 0.4s;
    border: 1px solid transparent;
}

.cat-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.2);
}

.cat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    background: -webkit-linear-gradient(var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- 5. PRODUCT CARDS (Hover Zoom) --- */
.product-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img-wrap {
    overflow: hidden;
    height: 200px;
    position: relative;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.product-card:hover .card-img-wrap img {
    transform: scale(1.1);
}

.badge-custom {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* --- 6. BLOG SECTION (SEO OPTIMIZED UI) --- */
.blog-card {
    border: none;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: 0.3s;
}

.blog-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.blog-thumb {
    width: 35%;
    min-height: 150px;
    object-fit: cover;
}

.blog-content {
    padding: 15px;
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.blog-title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.4;
    color: var(--dark);
    text-decoration: none;
    margin-bottom: 8px;
    display: block;
}

.blog-title:hover {
    color: var(--primary);
}

.blog-excerpt {
    font-size: 0.9rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 7. SIDEBAR TOOLS --- */
.tool-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 90px;
}

.tool-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px dashed #eee;
    color: #555;
    text-decoration: none;
    transition: 0.2s;
}

.tool-item:hover {
    background: #f8f9fa;
    color: var(--primary);
    padding-left: 15px;
}

.tool-item i {
    width: 30px;
}

/* --- ĐỒNG BỘ GIAO DIỆN TIKTOK GIỐNG SẢN PHẨM --- */

/* 1. Khung Card */
.tiktok-deal-card {
    border: none;
    border-radius: 16px;
    /* Bo góc giống Product */
    overflow: hidden;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    /* Đổ bóng nhẹ */
    transition: 0.3s;
    height: 100%;
    /* Để card cao bằng nhau trong cùng 1 hàng */
    display: flex;
    flex-direction: column;
}

.tiktok-deal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 2. Khung chứa ảnh (Quan trọng: Phải set chiều cao cố định) */
.tiktok-img-wrap {
    overflow: hidden;
    height: 200px;
    /* QUAN TRỌNG: Giống hệt .card-img-wrap của sản phẩm */
    position: relative;
    width: 100%;
    background-color: #f8f9fa;
}

.tiktok-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cắt ảnh vừa khung, không bị méo */
    transition: 0.5s;
}

.tiktok-deal-card:hover .tiktok-img-wrap img {
    transform: scale(1.1);
    /* Hiệu ứng zoom khi di chuột */
}

/* 3. Phần nội dung chữ bên dưới */
.tiktok-deal-card .p-3 {
    padding: 1rem !important;
    /* Tăng padding lên chút cho thoáng giống Product */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Title của deal */
.tiktok-deal-card h6 {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

/* 4. Nút Mua Ngay */
.tiktok-deal-card .btn-danger {
    margin-top: auto;
    /* Đẩy nút xuống dưới cùng */
    border-radius: 5px;
    font-weight: 600;
}

/* 5. Badge giảm giá cho Tiktok Deals */
.deal-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(255, 65, 108, 0.4);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}