/* Product Section Styles */
.product-section-header {
    margin-bottom: 30px;
}

.section-title-wrapper {
    margin-bottom: 20px;
}

.section-main-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.selection-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.plan-item:hover {
    border-color: #00d2ff;
    background: #161b22;
}

/* Hiệu ứng khi được chọn */
.plan-item.active {
    border-color: #00d2ff;
    background: rgba(0, 210, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
}

.plan-item.active .price-text {
    color: #00d2ff;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.plan-info .body-text {
    color: #f0f6fc;
    font-weight: 500;
}

.plan-status {
    font-size: 10px;
    color: #8b949e;
    text-transform: uppercase;
}

.plan-item.active .plan-status {
    color: #00d2ff;
}

.price-text {
    font-weight: bold;
    font-size: 1.1rem;
}

.selection-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 5px 0;
}

/* Base Card Style */
.plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(22, 27, 34, 0.4);
    /* Nền mờ */
    backdrop-filter: blur(12px);
    /* Hiệu ứng kính mờ xịn */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Viền mảnh sang trọng */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng tia sáng quét ngang khi hover */
.plan-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.6s;
}

.plan-item:hover::after {
    left: 100%;
}

.plan-item:hover {
    transform: translateY(-3px) scale(1.01);
    background: rgba(30, 35, 45, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

/* --- TRẠNG THÁI ACTIVE CHO TỪNG GÓI (GIỐNG ẢNH MẪU) --- */

/* Gói Yearly - Màu Teal/Cyan */
.plan-item.yearly.active {
    border: 1.5px solid #00f2ff;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2), inset 0 0 10px rgba(0, 242, 255, 0.05);
    background: rgba(0, 242, 255, 0.03);
}

.plan-item.yearly.active .price-text {
    color: #00f2ff;
    text-shadow: 0 0 12px rgba(0, 242, 255, 0.5);
}

.plan-item.yearly .icon-box {
    color: #00f2ff;
}

/* Gói Lifetime - Màu Gold/Orange */
.plan-item.lifetime.active {
    border: 1.5px solid #ffca28;
    box-shadow: 0 0 30px rgba(255, 202, 40, 0.2), inset 0 0 10px rgba(255, 202, 40, 0.05);
    background: rgba(255, 202, 40, 0.03);
}

.plan-item.lifetime.active .price-text {
    color: #ffca28;
    text-shadow: 0 0 12px rgba(255, 202, 40, 0.5);
}

.plan-item.lifetime .icon-box {
    color: #ffca28;
}

/* Dấu tích xanh Luxury ở góc */
.plan-item.active::before {
    content: "✓";
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    background: #34c759;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(52, 199, 89, 0.6);
    z-index: 10;
}

/* Nội dung Text */
.plan-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.plan-details {
    display: flex;
    flex-direction: column;
}

.body-text {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
}

.plan-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    margin-top: 2px;
}

.price-text {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
}

.section-subtitle {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* Filter Tabs */
.filter-tabs-wrapper {
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-tab {
    padding: 10px 22px;
    background: rgba(30, 41, 59, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.filter-tab:hover {
    background: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
    color: #38bdf8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(14, 165, 233, 0.1) !important;
}

.filter-tab.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
    border-color: rgba(14, 165, 233, 0.5) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.1) !important;
    font-weight: 700 !important;
    transform: translateY(-2px) !important;
}

.view-options {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    padding: 8px 12px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

.view-btn {
    padding: 8px 16px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    color: #94a3b8 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.view-btn:hover {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    color: #38bdf8 !important;
    transform: translateY(-1px) !important;
}

.view-btn.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%) !important;
    border-color: rgba(14, 165, 233, 0.5) !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.15) !important;
    font-weight: 700 !important;
}

.view-btn i {
    font-size: 15px !important;
    transition: transform 0.3s ease !important;
}

.view-btn:hover i {
    transform: scale(1.1) !important;
}

.view-separator {
    width: 1px !important;
    height: 20px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    margin: 0 6px !important;
}

/* Product Grid */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 30px;
}

.product-item {
    flex: 0 0 calc(25% - 18px);
    max-width: calc(25% - 18px);
    animation: fadeIn 0.5s ease;
}

/* Title không làm vỡ layout */
.card-title {
    min-height: 48px;
    font-size: 15px;
    line-height: 1.4;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Card */
.product-card {
    background: #1a1d2e;
    border: 1px solid #2d3142;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #0ea5e9;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background: #0f1117;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Product Info */
.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1d2e;
}

.product-category {
    display: inline-block;
    padding: 6px 14px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;

    color: #c7d2fe;

    background: linear-gradient(135deg, #0f172a, #1e1b4b);

    border-radius: 999px;

    border: 1px solid rgba(99, 102, 241, 0.5);

    box-shadow:
        0 0 10px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(59, 130, 246, 0.2);

    width: fit-content;

    animation: glowPulse 2.5s infinite ease-in-out;
}

/* Animation tự phát sáng nhẹ */
@keyframes glowPulse {
    0% {
        box-shadow:
            0 0 8px rgba(99, 102, 241, 0.3),
            0 0 16px rgba(59, 130, 246, 0.2);
    }

    50% {
        box-shadow:
            0 0 16px rgba(99, 102, 241, 0.6),
            0 0 28px rgba(59, 130, 246, 0.4);
    }

    100% {
        box-shadow:
            0 0 8px rgba(99, 102, 241, 0.3),
            0 0 16px rgba(59, 130, 246, 0.2);
    }
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-author {
    font-size: 13px;
    color: #e5e7eb;
    font-weight: 600;
}

.meta-author i {
    color: #0ea5e9;
    font-size: 15px;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #9ca3af;
    font-size: 9px;
    font-weight: 400;
}

.meta-item i {
    font-size: 12px;
    color: #9ca3af;
}

.product-price-large {
    background: #0ea5e9;
    padding: 6px 14px;
    border-radius: 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.product-detail-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.5);
}

/* Responsive */
@media (max-width: 1200px) {
    .product-item {
        flex: 0 0 calc(33.333% - 16px);
        max-width: calc(33.333% - 16px);
    }
}

@media (max-width: 768px) {
    .filter-tabs-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs,
    .view-options {
        justify-content: center;
    }

    .section-main-title {
        font-size: 24px;
    }

    .product-grid {
        gap: 16px;
    }

    .product-item {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}

@media (max-width: 480px) {
    .product-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.product-item {
    background-color: transparent !important;
    /* Ghi đè mọi nền */
}

.product-item:hover {
    background-color: transparent !important;
    /* Ghi đè nền khi hover */
}

.product-image-landing {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* ép tỷ lệ 16:9 */
    overflow: hidden;
}

.product-image-landing img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* không méo ảnh */
    display: block;
}

@media (max-width: 768px) {
    .important-wrapper {
        flex-direction: column !important;
    }
}

.product-image-landing {
    position: relative;
    /* badge bám theo ảnh */
}

.usd-badge {
    position: absolute;
    top: 12px;
    right: 12px;

    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;

    border-radius: 50px;

    background: rgba(255, 59, 59, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border: 1px solid rgba(255, 100, 100, 0.4);

    box-shadow:
        0 4px 15px rgba(255, 59, 59, 0.35),
        inset 0 0 8px rgba(255, 120, 120, 0.3);

    z-index: 5;
    transition: 0.3s ease;
}

.product-card:hover .usd-badge {
    transform: scale(1.05);
}

/* CARD */
.product-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover nâng nhẹ card */
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

/* SHINE EFFECT */
.product-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;

    background: linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.15) 40%,
            rgba(255, 255, 255, 0.35) 50%,
            rgba(255, 255, 255, 0.15) 60%,
            transparent 100%);

    transform: skewX(-25deg);
    transition: 0.8s ease;
    pointer-events: none;
}

/* Khi hover -> chạy ánh sáng */
.product-card:hover::before {
    left: 130%;
}

/* CARD BODY */
.card-body {
    position: relative;
    padding: 20px;
    border-radius: 0 0 18px 18px;
    background: #16213e;
    overflow: hidden;
    transition: all 0.5s ease;
}

/* GRADIENT HOVER */
.card-body::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(120deg,
            #1b2a4a 0%,
            #6c5ce7 50%,
            #ff4d9d 100%);

    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

/* SHINE SWEEP */
.card-body::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;

    background: linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.15) 40%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0.15) 60%,
            transparent 100%);

    transform: skewX(-25deg);
    transition: left 0.9s ease;
    pointer-events: none;
    z-index: 1;
}

/* NỘI DUNG NẰM TRÊN */
.card-body>* {
    position: relative;
    z-index: 2;
}

/* KHI HOVER MỚI KÍCH HOẠT */
.product-card:hover .card-body::before {
    opacity: 1;
}

.product-card:hover .card-body::after {
    left: 130%;
}