/* =========================================
   BỘ MÀU TỔNG THỂ - SIM SỐ NAM LONG
========================================= */
:root {
    --nl-primary: #EE0033; /* Đỏ chủ đạo #dc3545 - đổi sang #EE0033 đẹp hơn */
    --nl-primary-hover: #c82333; /* Đỏ đậm khi hover */
    --nl-secondary: #ffc107; /* Vàng làm điểm nhấn (vd: icon, nút VIP) */
    --nl-text-main: #333333;
    --nl-text-gray: #6c757d;
    --nl-bg-light: #f8f9fa;
    --nl-border: #e9ecef;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--nl-text-main);
    background-color: var(--nl-bg-light);
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
.top-bar {
    background-color: var(--nl-primary);
    color: #fff;
    font-size: 0.85rem;
    padding: 5px 0;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
}

.main-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo-text {
    color: var(--nl-primary);
    font-weight: 900;
    font-size: 1.8rem;
    text-transform: uppercase;
    margin: 0;
}

.search-box {
    border: 2px solid var(--nl-primary);
    border-radius: 10px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 10px 20px;
    outline: none;
}

.search-box button {
    background: var(--nl-primary);
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-weight: bold;
    transition: 0.3s;
}

.search-box button:hover {
    background: var(--nl-primary-hover);
}

.main-nav {
    background-color: #fff;
    border-top: 1px solid var(--nl-border);
    border-bottom: 2px solid var(--nl-primary);
}

.main-nav .nav-link {
    color: var(--nl-text-main);
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 20px !important;
    transition: 0.2s;
}

.main-nav .nav-link:hover {
    color: var(--nl-primary);
    background-color: var(--nl-bg-light);
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
    background-color: #212529;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.site-footer h5 {
    color: var(--nl-secondary);
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 20px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer ul li {
    margin-bottom: 10px;
}

.site-footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: 0.3s;
}

.site-footer a:hover {
    color: var(--nl-secondary);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #1a1e21;
    padding: 15px 0;
    margin-top: 30px;
    font-size: 0.9rem;
    color: #6c757d;
}

.footer-network-desc {
    color: #ced4da;
    margin-bottom: 14px;
}

.footer-brand-links {
    display: grid;
    gap: 12px;
}

.footer-brand-card {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    color: #212529 !important;
    display: grid;
    gap: 12px;
    grid-template-columns: 92px 1fr auto;
    min-height: 76px;
    padding: 12px;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.footer-brand-card:hover {
    border-color: var(--nl-secondary);
    box-shadow: 0 12px 24px rgba(0,0,0,0.22);
    color: #212529 !important;
    padding-left: 12px !important;
    transform: translateY(-2px);
}

.footer-brand-logo {
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    display: flex;
    height: 52px;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.footer-brand-logo img {
    display: block;
    max-height: 38px;
    max-width: 100%;
    object-fit: contain;
}

.footer-brand-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.footer-brand-copy strong {
    color: #212529;
    font-size: 15px;
    line-height: 1.2;
}

.footer-brand-copy small {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.35;
}

.footer-brand-card > i {
    color: var(--nl-primary);
    font-size: 14px;
}

@media (max-width: 575.98px) {
    .footer-brand-card {
        grid-template-columns: 82px 1fr;
    }

    .footer-brand-card > i {
        display: none;
    }
}

/* =========================================
   BỘ LỌC TÌM KIẾM (FILTER)
========================================= */
.filter-box {
    background-color: #fff;
    border-top: 3px solid var(--nl-primary);
    border-radius: 8px;
}

.filter-box select.form-select {
    cursor: pointer;
    font-weight: 500;
}

/* =========================================
   SIM CARD (THẺ SẢN PHẨM SIM)
========================================= */
.sim-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--nl-border);
    border-radius: 12px;
}

.sim-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    border-color: var(--nl-primary-hover);
}

.sim-number {
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.sim-number .highlight {
    color: var(--nl-primary); /* Bôi đỏ phần đuôi số đẹp */
}

.sim-price {
    font-size: 1.1rem;
}

.btn-buy-sim {
    background-color: transparent;
    color: var(--nl-primary);
    border: 2px solid var(--nl-primary);
    transition: all 0.3s;
}

.btn-buy-sim:hover {
    background-color: var(--nl-primary);
    color: #fff;
}

/* Label nhà mạng */
.network-label {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* ================= CSS CHO THẺ SIM ================= */
.sim-card {
    transition: all 0.3s ease-in-out;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    overflow: visible; /* Để tem nhà mạng tràn viền đẹp hơn */
}

.sim-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.15) !important;
    border-color: #ffca2c; 
}

/* Tem nhà mạng góc trái */
.network-label {
    position: absolute;
    top: 12px;
    left: -8px;
    padding: 5px 15px;
    border-radius: 0 20px 20px 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
    z-index: 2;
}

/* Tạo góc gập 3D cho tem */
.network-label::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    border-top: 6px solid #6c757d; /* Màu bóng râm */
    border-left: 8px solid transparent;
}

/* Số sim */
.sim-number {
    font-size: 1.5rem;
    letter-spacing: 1px;
}
.sim-number .highlight {
    font-size: 1.7rem; /* Đuôi sim to hơn 1 chút */
}

/* Nút đặt mua */
.btn-buy-sim {
    background: linear-gradient(45deg, #ffca2c, #f39c12);
    color: #000;
    border: none;
    transition: 0.3s;
}
.btn-buy-sim:hover {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: #fff;
    transform: scale(1.03);
}

/* =========================================
   SLIDER - TRÌNH CHIẾU
========================================= */
/* Tùy chỉnh khung Slider */
.nl-slider-container {
    width: 100%;
    overflow: hidden;
}

/* Bo góc ảnh và tạo viền mờ tiệp với Dark Mode */
.nl-slider-container .carousel-inner {
    border-radius: 12px;
    border: 1px solid var(--nl-divider); 
}

/* Tùy chỉnh chấm tròn điều hướng dưới đáy slider */
.nl-slider-container .carousel-indicators {
    margin-bottom: 0.5rem;
}

.nl-slider-container .carousel-indicators [data-bs-target] {
    background-color: var(--nl-accent); /* Dùng màu vàng đặc trưng */
    opacity: 0.4;
    width: 10px;
    height: 10px;
    border-radius: 50%; /* Biến thành hình tròn */
    margin: 0 5px;
}

/* Hiệu ứng kéo dài khi chấm tròn đang active (đang xem) */
.nl-slider-container .carousel-indicators .active {
    opacity: 1;
    width: 30px;
    border-radius: 5px; /* Thành hình thoi dài hiện đại */
    transition: all 0.4s ease;
}

/* =========================================
   HOME NETWORK QUICK LINKS
========================================= */
.home-network-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    padding: 18px;
}

.section-kicker {
    letter-spacing: .04em;
}

.home-network-all {
    align-items: center;
    color: var(--nl-primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.home-network-all:hover {
    color: var(--nl-primary-hover);
}

.home-network-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-network-card {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #111827;
    display: grid;
    gap: 12px;
    grid-template-columns: 46px 1fr auto;
    min-height: 92px;
    padding: 14px;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.home-network-card:hover {
    border-color: var(--network-color);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    color: #111827;
    transform: translateY(-2px);
}

.home-network-icon {
    align-items: center;
    background: var(--network-soft);
    border: 1px solid var(--network-border);
    border-radius: 8px;
    color: var(--network-color);
    display: inline-flex;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.home-network-icon i {
    font-size: 20px;
}

.home-network-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.home-network-content strong {
    font-size: 16px;
    line-height: 1.2;
}

.home-network-content small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.home-network-count {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 9px;
    white-space: nowrap;
}

.home-network-card-viettel {
    --network-color: #dc2626;
    --network-soft: #fef2f2;
    --network-border: #fecaca;
}

.home-network-card-mobifone {
    --network-color: #2563eb;
    --network-soft: #eff6ff;
    --network-border: #bfdbfe;
}

.home-network-card-vinaphone {
    --network-color: #0891b2;
    --network-soft: #ecfeff;
    --network-border: #a5f3fc;
}

@media (max-width: 991.98px) {
    .home-network-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .home-network-section {
        padding: 14px;
    }

    .home-network-card {
        grid-template-columns: 42px 1fr;
        min-height: 84px;
    }

    .home-network-icon {
        height: 42px;
        width: 42px;
    }

    .home-network-count {
        grid-column: 2;
        justify-self: start;
    }
}


/* =========================================
   PHÂN TRANG - KẾ THỪA
========================================= */
.pagination-custom .page-link {
    color: #212529;
    background-color: #fff;
    border: 1px solid #dee2e6;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    transition: all 0.3s ease;
}
.pagination-custom .page-item.active .page-link {
    background-color: #dc3545; /* Đỏ đô nổi bật thương hiệu */
    border-color: #dc3545;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}
.pagination-custom .page-link:hover {
    background-color: #212529; /* Hover sang màu nền tối sang trọng */
    color: #fff;
    border-color: #212529;
}

/* =========================================
   BỔ SUNG CSS CHO GIAO DIỆN MOBILE V2
========================================= */
/* Custom Colors */
.text-purple { color: #6f42c1; }
.bg-purple { background-color: #6f42c1; }
.border-purple { border-color: #6f42c1 !important; }

/* Ẩn thanh cuộn ngang của Filter Pills trên Mobile */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Fix width của Bottom Nav Items */
.w-20 { width: 20%; }

/* ================= HIỆU ỨNG HOVER CARD SIM ================= */
.hover-sim-card {
    transition: all 0.3s ease-in-out;
    border: 1px solid #eaeaea !important; /* Viền xám nhạt mặc định */
}

.hover-sim-card:hover {
    transform: translateY(-5px); /* Trượt lên 5px */
    border-color: #ffc107 !important; /* Bo viền vàng thần tài */
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.15) !important; /* Đổ bóng vàng nhẹ */
}

/* ================= TEM NHÀ MẠNG (RIBBON) ================= */
.network-label {
    position: absolute;
    top: 12px;
    left: -6px; /* Đẩy ra ngoài viền card một chút */
    padding: 4px 12px;
    font-size: 10px;
    border-radius: 0 4px 4px 0;
    z-index: 10;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

/* Tạo nếp gấp chéo 3D cho góc trái của tem */
.network-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    border-top: 6px solid rgba(0, 0, 0, 0.6); /* Màu tối tạo cảm giác bóng râm */
    border-left: 6px solid transparent;
}
