/* assets/deals.css - Styles cho trang Góc Setup & Deals Thiết Bị */

.deals-hero {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.deals-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 223, 115, 0.1);
    border: 1px solid rgba(255, 223, 115, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #FFDF73;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.deals-hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: #FFDF73;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFDF73;
    animation: dealPulse 1.5s infinite;
}

@keyframes dealPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.deals-hero h1 {
    font-size: 2.8rem;
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
}

.deals-hero-desc {
    color: var(--text-dim, #94a3b8);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
}

/* Toolbar & Category Pills */
.deals-toolbar {
    margin: 30px auto 45px;
    max-width: 1100px;
}

.deals-search-box {
    position: relative;
    max-width: 550px;
    margin: 0 auto 25px;
}

.deals-search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim, #94a3b8);
    pointer-events: none;
}

.deals-search-box input {
    width: 100%;
    padding: 14px 45px 14px 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
    backdrop-filter: blur(10px);
}

.deals-search-box input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: #FFDF73;
    box-shadow: 0 0 20px rgba(255, 223, 115, 0.2);
}

.deals-search-box .clear-search-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim, #94a3b8);
    font-size: 1.3rem;
    cursor: pointer;
    text-decoration: none;
}

.deals-cat-pills {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.cat-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 223, 115, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

.cat-pill.active {
    background: #FFDF73;
    color: #0f172a;
    border-color: #FFDF73;
    font-weight: 700;
}

.cat-pill .pill-count {
    padding: 2px 7px;
    font-size: 0.72rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.cat-pill.active .pill-count {
    background: rgba(15, 23, 42, 0.25);
    color: #0f172a;
}

/* Deals Grid */
.deals-container {
    max-width: 1200px;
    margin: 0 auto;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

@media (min-width: 1200px) {
    .deals-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================================
   FUTURISTIC GLASSMORPHISM CARD (CẢM HỨNG THIẾT KẾ MẪU)
   - Viền kép phát sáng Neon, Kính mờ nhiều tầng (Frosted Glass)
   - Background Blur lấp đầy ảnh 1:1 nghệ thuật
   - Floating Neon Capsule thể hiện Giá / Giảm giá độc đáo
   ======================================================== */
.deal-card {
    position: relative;
    border-radius: 24px;
    background: #0b0f17;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.deal-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.deal-card.is-sticky {
    border-color: rgba(229, 169, 60, 0.45);
}

.deal-card.is-sticky:hover {
    border-color: rgba(255, 223, 115, 0.7);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 169, 60, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* 1. Lớp nền ảnh mờ nghệ thuật (Ambient Glow Background) */
.deal-card-bg {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 75%;
    background-size: cover;
    background-position: center;
    filter: blur(35px) brightness(0.4) saturate(1.5);
    opacity: 0.65;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.deal-card:hover .deal-card-bg {
    opacity: 0.85;
    transform: scale(1.08);
}

/* 2. Thanh Topbar bên trong Card */
.deal-card-topbar {
    position: relative;
    z-index: 2;
    padding: 14px 16px 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deal-top-cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 10px;
    border-radius: 99px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.deal-top-badges {
    display: flex;
    gap: 6px;
}

.deal-badge-star {
    font-size: 0.68rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 99px;
    background: linear-gradient(135deg, #FFDF73, #E5A93C);
    color: #0b0d10;
    box-shadow: 0 2px 10px rgba(229, 169, 60, 0.5);
    letter-spacing: 0.5px;
}

.deal-badge-pill {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 99px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

/* 3. Vùng hiển thị sản phẩm chính (1:1 Stage) */
.deal-stage-link {
    display: block;
    position: relative;
    z-index: 2;
    padding: 6px 14px 10px 14px;
    text-decoration: none;
}

.deal-stage-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deal-stage-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cắt chuẩn 1:1 lấp đầy viền cong */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.deal-card:hover .deal-stage-wrapper img {
    transform: scale(1.08);
}

/* 4. Viên thuốc nổi Neon (Floating Capsule) - Hiển thị giá tiền VNĐ không tràn */
.deal-floating-capsule {
    position: relative;
    z-index: 4;
    margin: -22px auto 0 auto;
    width: auto;
    min-width: 140px;
    max-width: 88%;
    padding: 6px 16px;
    border-radius: 99px;
    background: linear-gradient(135deg, rgba(20, 27, 45, 0.92) 0%, rgba(10, 15, 26, 0.98) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.deal-card.is-sticky .deal-floating-capsule {
    border-color: rgba(229, 169, 60, 0.45);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(229, 169, 60, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.deal-card:hover .deal-floating-capsule {
    transform: scale(1.05);
}

.capsule-price-main {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    line-height: 1.15;
}

.capsule-currency {
    font-size: 0.75rem;
    font-weight: 800;
    color: #34d399;
    vertical-align: super;
}

.capsule-amount {
    font-size: 1.25rem;
    font-weight: 900;
    color: #34d399;
    letter-spacing: -0.3px;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
    white-space: nowrap;
}

.capsule-price-old {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    opacity: 0.8;
}

.capsule-price-old del {
    color: #64748b;
}

/* 5. Tấm kính mờ đáy thẻ (Glass Bottom Sheet) */
.deal-glass-sheet {
    position: relative;
    z-index: 3;
    padding: 16px 16px 14px 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(11, 15, 23, 0.95) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: -12px;
    padding-top: 24px;
}

.deal-title {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: #f8fafc;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.deal-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.deal-title a:hover {
    color: #FFDF73;
}

.deal-highlight-desc {
    margin: 0 0 14px 0;
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 6. Hàng nút mua sàn TMĐT - Minimalist Dark Glassmorphism & Brand Gradient Hover */
.deal-action-shelf {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    width: 100%;
}

.deal-store-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.deal-btn-arrow {
    color: #94a3b8;
    transition: all 0.25s ease;
}

.deal-store-btn:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.deal-store-btn:hover .deal-btn-arrow {
    color: #ffffff;
    transform: translate(2px, -2px);
}

/* Hover Shopee: Cam Gradient rực rỡ đặc trưng Shopee (#ff5722 -> #ea580c) */
.deal-store-btn.btn-shopee:hover {
    background: linear-gradient(135deg, #ff5722 0%, #ea580c 100%);
    border-color: #ff5722;
    box-shadow: 0 6px 20px rgba(238, 77, 45, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Hover Lazada: Gradient Hồng - Xanh Neon đặc trưng Lazada (#f43f5e -> #0284c7) */
.deal-store-btn.btn-lazada:hover {
    background: linear-gradient(135deg, #f43f5e 0%, #0284c7 100%);
    border-color: #38bdf8;
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35), 0 0 15px rgba(2, 132, 199, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Hover TikTok Shop: Đen Cyber viền trắng neon (#000000 -> #18181b) */
.deal-store-btn.btn-tiktok:hover {
    background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Hover Other Store: Vàng Kim Gradient (#FFDF73 -> #E5A93C) */
.deal-store-btn.btn-other:hover {
    background: linear-gradient(135deg, #FFDF73 0%, #E5A93C 100%);
    border-color: #E5A93C;
    color: #0b0d10;
    box-shadow: 0 6px 20px rgba(229, 169, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.deal-store-btn.btn-other:hover .deal-btn-arrow {
    color: #0b0d10;
}

/* Hiệu ứng active nhẹ khi bấm */
.deal-store-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Empty State */
.deals-empty-state {
    text-align: center;
    padding: 70px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 30px 0;
}

/* Tips Section */
.deals-tips-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 70px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tips-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

.tips-icon {
    font-size: 2rem;
    margin-bottom: 14px;
}

.tips-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.tips-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-dim, #94a3b8);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .deals-hero h1 { font-size: 2rem; }
    .deals-grid { grid-template-columns: 1fr; }
}
