/* public\css\credit-cards\category-pages.css */
   
   /* Global Page Styles */
    .section-title { font-weight: 700; color: #212529; }
    #card-listings-container > *:not(:last-child) { margin-bottom: 1.25rem; }

/* Sleek, Low-Height Category Hero */
.category-hero-sleek {
    background-color: #f0fff8; /* Kept the light green background */
    padding: 1.5rem 0; /* Reduced padding for a slim profile */
    border-bottom: 1px solid #d6eee3;
}

.hero-sleek-icon {
    font-size: 3rem; /* Smaller, more subtle icon */
    color: #198754;
    opacity: 0.7;
    line-height: 1;
}

.hero-sleek-title {
    font-size: 1.5rem; /* Reduced title size for a sleeker look */
    font-weight: 700;
    color: #0b4f30;
    margin: 0;
}

.hero-sleek-subtitle {
    font-size: 1rem;
    color: #495057;
    margin-top: 0.1rem;
}

.category-hero-sleek .btn {
    padding: 0.5rem 1rem; /* Smaller buttons to fit the slim design */
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap; /* Prevents buttons from wrapping on small screens */
}

/* Responsive adjustments for mobile */
@media (max-width: 991.98px) {
    .category-hero-sleek {
       text-align: center;
    }
    .hero-sleek-icon {
        margin: 0 auto 0.75rem; /* Center icon above text on mobile */
    }
    .hero-sleek-title {
        font-size: 1.3rem;
    }
    .hero-sleek-subtitle {
        font-size: 0.95rem;
    }
}    


    /* Value Prop Section */
    .feature-box {
        background: #fff;
        padding: 2rem;
        border-radius: 12px;
        height: 100%;
        border: 1px solid #dee2e6;
        transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    }
    .feature-box:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    }
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    /* Pro Tip Section */
    .pro-tip-box {
        display: flex;
        align-items: center;
        background: #fff;
        border: 1px solid #dee2e6;
        padding: 2rem;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
    .pro-tip-icon {
        font-size: 2.5rem;
        margin-right: 1.5rem;
    }

    /* FAQ Section */
    .accordion-item {
        border-radius: 8px !important;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
    }
    .accordion-button {
        font-weight: 600;
    }
    .accordion-button:not(.collapsed) { 
        background-color: #e8f3ee; 
        color: #0b4f30;
        box-shadow: none;
    }

    /* for the new card style like finder page */

    /* --- Smart Card CSS (Finder Clone) --- */
    .smart-card-wrapper { 
        background: #fff; 
        border: 1px solid #e2e8f0; 
        border-radius: 12px; 
        overflow: hidden; 
        position: relative;
        transition: transform 0.2s, box-shadow 0.2s;
        margin-bottom: 1.5rem;
    }
    .smart-card-wrapper:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.08);
        border-color: #cbd5e1;
    }

    /* Grid Layout */
    .card-main-grid {
        display: grid;
        grid-template-columns: 160px 1fr 200px; /* Visual | Content | Actions */
        gap: 1.5rem;
        padding: 1.25rem;
        align-items: start;
    }

    /* Visual Column */
    .col-visual { display: flex; flex-direction: column; align-items: center; }
    .card-img-wrapper { 
        height: 100px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; 
    }
    .card-img-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }

    /* Mini Stats Grid */
    .mini-stats-grid { display: grid; grid-template-columns: 1fr; gap: 4px; width: 100%; }
    .mini-stat-box { 
        background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 4px; 
        padding: 2px 6px; display: flex; justify-content: space-between; align-items: center; 
    }
    .mini-stat-label { font-size: 0.65rem; color: #64748b; font-weight: 600; text-transform: uppercase; }
    .mini-stat-val { font-size: 0.75rem; font-weight: 700; color: #334155; }

    /* Content Column */
    .col-content { display: flex; flex-direction: column; }
    .product-title { font-size: 1.2rem; font-weight: 800; color: #0f172a; margin-bottom: 4px; text-decoration: none; line-height: 1.2; }
    .product-title:hover { color: #0d6efd; }
    .provider-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .provider-logo-small { height: 16px; width: auto; }
    .provider-name { font-size: 0.75rem; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

    /* The 2-Letter Fallback Badge (Matches Admin V2 Style) */
    .provider-logo-fallback {
        height: 20px;
        width: 20px;
        font-size: 0.55rem;
        flex-shrink: 0;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    /* Highlights */
    .value-highlight-box { 
        display: inline-flex; align-items: center; background: #ecfdf5; border: 1px solid #bbf7d0; 
        color: #15803d; padding: 4px 8px; border-radius: 4px; font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; width: fit-content;
    }
    .ratings-row { display: flex; gap: 12px; margin-bottom: 8px; font-size: 0.75rem; color: #64748b; }
    .best-for-line { font-size: 0.8rem; color: #475569; margin-bottom: 4px; }
    .bonus-text { font-size: 0.85rem; color: #334155; line-height: 1.4; margin-top: 4px; }
    .plain-features { font-size: 0.75rem; color: #64748b; margin-top: 8px; line-height: 1.4; }

    /* Actions Column */
    .col-actions { display: flex; flex-direction: column; justify-content: center; height: 100%; border-left: 1px solid #f1f5f9; padding-left: 1.5rem; gap: 10px; }

    /* Drawer */
    .details-drawer { border-top: 1px solid #e2e8f0; background: #fff; }
    .drawer-tabs { display: flex; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
    .drawer-tab { flex: 1; padding: 10px; text-align: center; font-size: 0.85rem; font-weight: 600; color: #64748b; border: none; background: transparent; border-bottom: 2px solid transparent; transition: all 0.2s; }
    .drawer-tab:hover { background: #e2e8f0; color: #0f172a; }
    .drawer-tab.active { background: #fff; color: #0d6efd; border-bottom-color: #0d6efd; }
    .drawer-content { padding: 1.5rem; }

    /* Badges */
    .badge-top-right { position: absolute; top: 0; right: 0; font-size: 0.6rem; text-transform: lowercase; letter-spacing: 0.5px; padding: 3px 10px; background-color: #f1f5f9; color: #64748b; border-bottom-left-radius: 4px; z-index: 10; font-weight: 600; }
    .badge-top-right.featured { background-color: #fffbeb; color: #b45309; border: 1px solid #fcd34d; border-top: 0; border-right: 0; }

    /* Responsive */
    @media (max-width: 991px) {
        .card-main-grid { grid-template-columns: 1fr; gap: 1rem; }
        .col-visual { flex-direction: row; align-items: center; gap: 1rem; border-bottom: 1px solid #f1f5f9; padding-bottom: 1rem; }
        .card-img-wrapper { width: 100px; height: 70px; margin-bottom: 0; }
        .mini-stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
        .col-actions { border-left: none; padding-left: 0; border-top: 1px solid #f1f5f9; padding-top: 1rem; flex-direction: row; }
    }

    /* for the new card style like finder page */


    /* Css for drawer */

    /* Drawer Transitions */
    .details-drawer {
        display: none; /* Hidden by default */
        border-top: 1px solid #e2e8f0;
        background-color: #fff;
        overflow: hidden;
    }

    .details-drawer.show {
        display: block; /* Show when active */
        animation: slideDown 0.3s ease-out forwards;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Tab Content */
    .tab-pane {
        animation: fadeIn 0.3s ease-in;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    /* Css for drawer */


    
    
    /* --- HORIZONTAL DISCOVERY RIBBON (NextGen Style) --- */
    .discovery-track-wrapper {
        width: 100%;
        overflow: hidden;
    }

    .discovery-ribbon-track {
        display: flex;
        overflow-x: auto;
        gap: 1.5rem; /* 24px gap */
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide in Firefox */
    }

    .discovery-ribbon-track::-webkit-scrollbar {
        display: none; /* Hide in Chrome/Safari */
    }

    /* Card Sizing Engine */
    .discovery-card {
        /* DEFAULT (Mobile): Shows 1 full card, and the edge of the next one (hinting to swipe) */
        flex: 0 0 calc(85% - 1.5rem); 
        scroll-snap-align: start;
        border-radius: 12px !important; 
        background: #ffffff;
        position: relative;
    }

    /* Tablet (Shows ~2.5 cards) */
    @media (min-width: 768px) {
        .discovery-card {
            flex: 0 0 calc(45% - 1.5rem); 
        }
    }

    /* Desktop (Exactly 4 Cards Edge-to-Edge) */
    @media (min-width: 992px) {
        .discovery-card {
            /* 100% divided by 4 cards = 25%. Minus the gap math. */
            flex: 0 0 calc(25% - 1.125rem); 
        }
    }

    /* --- NEXTGEN COMPACT STYLES (Ported from Featured Banner) --- */
    .nextgen-promos {
        color: #000;
        font-weight: 500;
        line-height: 1.3;
        -webkit-font-smoothing: antialiased;
    }
    .promo-label {
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.65rem;
    }

    /* NUCLEAR OVERRIDE AGAINST GLOBAL TRUNCATION (From your code) */
    .promo-raw-text, .promo-raw-text p, .promo-raw-text ul, .promo-raw-text li {
        display: inline !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #000 !important;
        list-style: none !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        word-wrap: break-word !important;
    }

    .nextgen-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 4px;
    }
    .nextgen-chip {
        border-radius: 4px;
        padding: 2px 6px;
        font-size: 0.65rem;
        line-height: 1.2;
        white-space: nowrap;
        border: 1px solid;
    }
    .chip-fee { background-color: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
    .chip-fee strong { color: #0284c7; }
    .chip-purch { background-color: #fdf4ff; color: #a21caf; border-color: #f5d0fe; }
    .chip-purch strong { color: #86198f; }
    .chip-cash { background-color: #f0fdf4; color: #047857; border-color: #bbf7d0; }
    .chip-cash strong { color: #059669; }

    /* Premium Light Yellow Value Box */
    .nextgen-value-display {
        background-color: #fffbeb;
        border: 1px solid #fde68a; 
        border-radius: 6px;
        padding: 4px 8px;
        text-align: center;
        box-shadow: 0 1px 2px rgba(245, 158, 11, 0.05);
    }
    .value-label {
        font-size: 0.6rem;
        text-transform: uppercase;
        color: #92400e; 
        font-weight: 700; 
        display: block;
        line-height: 1;
    }
    .value-amount {
        font-size: 1.05rem;
        font-weight: 800;
        line-height: 1;
        display: block;
        margin-top: 2px;
    }

    /* UI Polish */
    .discovery-scroll-btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-color: #cbd5e1;
        color: #475569;
        transition: all 0.2s ease;
    }

    .discovery-scroll-btn:hover {
        background-color: #f1f5f9 !important;
        color: #0f172a;
    }

    .transition-hover {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .transition-hover:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 20px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1) !important;
    }

    /* Utility: Clamps text to preserve symmetry */
    .line-clamp-2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;  
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .line-clamp-3 {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;  
        overflow: hidden;
        text-overflow: ellipsis;
    }



    /* ========================================================= */
    /* --- SMART FILTER CALCULATOR BAR --- */
    /* ========================================================= */

    /* STICKY WRAPPER */
    .sticky-calc-wrapper {
        position: sticky;
        top: 15px;
        z-index: 900;
        transition: top 0.3s;
    }

    /* CARD STYLING */
    #calculator-bar {
        border-radius: 12px;
        background: #f1f5f9; /* Premium Tinted Background */
        border: 1px solid #e2e8f0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025) !important;
        padding: 12px 16px !important;
    }

    /* SYMMETRY ENGINE: Safely Scoped to the Calculator */
    #calculator-bar .form-control, 
    #calculator-bar .input-group-text, 
    #calculator-bar .ts-control, 
    #calculator-bar .filter-pill {
        height: 38px !important;
        min-height: 38px !important;
        font-size: 0.9rem !important;
        display: flex;
        align-items: center;
        background-color: #ffffff !important; /* Force pure white to pop */
    }

    /* INPUTS */
    #calculator-bar .form-control:focus { box-shadow: none; border-color: #0d6efd; }

    /* TOGGLE PILLS */
    #calculator-bar .filter-pill {
        transition: all 0.2s ease;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border: 1px solid #e2e8f0 !important;
    }
    #calculator-bar .filter-pill:hover {
        background-color: #f8fafc !important;
        border-color: #cbd5e1 !important;
        transform: translateY(-1px);
    }

    /* SWITCH COLOR */
    #calculator-bar .form-check-input:checked { 
        background-color: #3b82f6; 
        border-color: #3b82f6; 
    }

    /* TOMSELECT OVERRIDES */
    #calculator-bar .ts-control { 
        border-radius: 6px !important; 
        border-color: #dee2e6; 
        padding-top: 0 !important; 
        padding-bottom: 0 !important;
    }
    #calculator-bar .ts-control > input { height: 100% !important; margin: 0 !important; }
    #calculator-bar .ts-dropdown { border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); z-index: 1050; } 
    
    


    /* ========================================================= */
    /* --- NEXT-GEN CARD MIDDLE COLUMN UI --- */
    /* ========================================================= */

    /* Rating Pills */
    .rating-pill {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
    }

    /* Premium Value Chip (1st Yr Value) */
    .nextgen-value-chip {
        background: #ecfdf5; 
        border: 1px solid #a7f3d0; 
        color: #065f46; 
        padding: 4px 10px; 
        border-radius: 6px; 
        font-size: 0.8rem; 
        font-weight: 500; 
        display: inline-flex; 
        align-items: center;
    }

    /* Base Premium Chip (Metal, FYF, Rewards) */
    .nextgen-badge-chip {
        padding: 4px 8px; 
        border-radius: 6px; 
        font-size: 0.7rem; 
        font-weight: 700; 
        border: 1px solid; 
        display: inline-flex; 
        align-items: center; 
        gap: 4px;
    }

    /* Metal Specific Chip */
    .metal-chip {
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
        border-color: #cbd5e1; 
        color: #334155;
    }

    /* Unified Offer Box */
    .nextgen-offer-box {
        background: #f8fbff; /* Very soft blue tint */
        border: 1px dashed #93c5fd; 
        border-radius: 8px; 
        padding: 10px 12px;
    }

    /* Offer Lines inside the Box */
    .offer-line {
        display: flex; 
        align-items: flex-start; 
        gap: 10px; 
        font-size: 0.8rem; 
        line-height: 1.4; 
        color: #334155;
    }

    .offer-icon {
        width: 24px; 
        height: 24px; 
        border-radius: 6px; 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        flex-shrink: 0; 
        font-size: 0.85rem;
    }

    .offer-text {
        flex: 1 1 auto;
        min-width: 0;
        word-wrap: break-word;
    }

    .offer-expiry {
        display: inline-block; 
        background: #fee2e2; 
        color: #991b1b; 
        padding: 1px 6px; 
        border-radius: 4px; 
        font-size: 0.65rem; 
        font-weight: 700; 
        margin-left: 6px;
        white-space: nowrap;
    }


    /* --- PREMIUM RANKING HEADERS --- */
    /* this css block for 3 pages: Best overall, top ranked cards and top promotions page */
    .premium-ranking-header {
        width: 100%;
        padding: 8px 20px;
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    /* 1. Gold (Top Ranked) */
    .premium-gold {
        background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
        color: #92400e;
        border-bottom: 1px solid #fde68a;
    }
    
    /* 2. Dark/Executive (Best Overall) */
    .premium-dark {
        background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
        color: #f8fafc;
        border-bottom: 1px solid #020617;
    }
    
    /* 3. Trusted Blue (Editor's Pick) */
    .premium-blue {
        background: linear-gradient(90deg, #f0f9ff 0%, #e0f2fe 100%);
        color: #0369a1;
        border-bottom: 1px solid #bae6fd;
    }
    
    /* 4. Alert Red (Promotions) */
    .premium-red {
        background: linear-gradient(90deg, #fef2f2 0%, #fee2e2 100%);
        color: #b91c1c;
        border-bottom: 1px solid #fecaca;
    }


    /* ========================================================= */
    /* --- NEXT-GEN CATEGORY HEADERS (Leaderboards) --- */
    /* ========================================================= */
    .nextgen-cat-header {
        position: relative;
        padding-top: 1rem;
    }

    /* The Floating Icon Box */
    .ng-icon-box {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        font-size: 1.5rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0,0,0,0.02);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Typography Tweaks */
    .ng-pretitle {
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 1.5px;
        color: #64748b;
        text-transform: uppercase;
        margin-bottom: 2px;
        display: block;
    }

    .ng-title {
        font-weight: 900;
        font-size: 1.75rem;
        color: #0f172a;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    /* Dynamic Gradient Accent Lines */
    .ng-accent-line {
        height: 4px;
        width: 60px;
        border-radius: 4px;
        margin-top: 1.25rem;
    }

    .grad-success { background: linear-gradient(90deg, #10b981 0%, #34d399 100%); box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2); }
    .grad-info    { background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%); box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2); }
    .grad-danger  { background: linear-gradient(90deg, #ef4444 0%, #f87171 100%); box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2); }
    .grad-primary { background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%); box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2); }
    .grad-dark    { background: linear-gradient(90deg, #1e293b 0%, #475569 100%); box-shadow: 0 2px 4px rgba(30, 41, 59, 0.2); }
    .grad-warning { background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2); }
