/* ============================================================
   TRAKANALYTICA DATA LAB — DATASETS PAGE
   Scope: datasets.php only
   Depends on: style.css, header.css, footer.css
   ============================================================ */

/* ══════════════════════════════════════════
   PAGE HERO
══════════════════════════════════════════ */
.ds-hero {
    position: relative;
    background:
        url('https://images.pexels.com/photos/5473307/pexels-photo-5473307.jpeg')
        center center / cover no-repeat;
    padding: 100px 0 80px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    min-height: 340px;
    display: flex;
    align-items: center;
}
.ds-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(8,14,32,0.82) 0%,
        rgba(22,70,150,0.72) 50%,
        rgba(8,14,32,0.78) 100%
    );
    pointer-events: none;
}
.ds-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}
.ds-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #e9d5ff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 100px;
    padding: 5px 14px;
    margin-bottom: 20px;
}
.ds-hero-tag .fa { font-size: 0.7rem; }
.ds-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.ds-hero h1 span {
    background: linear-gradient(135deg, #c4b5fd, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ds-hero-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.82);
    max-width: 600px;
    margin-bottom: 14px;
    line-height: 1.7;
}
.ds-hero-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #c4b5fd;
}

/* ══════════════════════════════════════════
   STICKY SEARCH BAR
══════════════════════════════════════════ */
.ds-search-bar {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 0;
    position: sticky;
    top: 64px;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(109,40,217,.06);
}
.ds-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ds-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.ds-search-wrap .fa {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.88rem;
}
.ds-search-input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1.5px solid var(--border-subtle);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-base);
    outline: none;
    transition: border-color .2s;
    font-family: 'DM Sans', sans-serif;
}
.ds-search-input:focus { border-color: var(--accent-primary); }

.ds-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.ds-sort-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.ds-sort-select {
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-base);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    outline: none;
}
.ds-sort-select:focus { border-color: var(--accent-primary); }

.ds-access-plan-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.ds-filter-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}
.ds-access-plan-select {
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: var(--bg-base);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    max-width: 240px;
}
.ds-access-plan-select:focus { border-color: var(--accent-primary); }

/* ══════════════════════════════════════════
   SUBSCRIPTION BANNER
══════════════════════════════════════════ */
.ds-subscription-banner {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(109,40,217,0.16);
}
.ds-sub-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.ds-sub-banner-text {
    flex: 1;
}
.ds-sub-banner-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ds-sub-banner-text p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.5;
    margin: 0;
}
.ds-sub-banner-text strong {
    color: #fbbf24;
    font-weight: 700;
}
.ds-btn-subscribe-now {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 12px 28px;
    background: #ffffff;
    color: #6d28d9;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
}
.ds-btn-subscribe-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.ds-btn-subscribe-now:active {
    transform: translateY(0);
}
.ds-btn-subscribe-now .fa {
    font-size: 0.85rem;
}

/* Two plain-language facts: what you keep, and what happens if you need more */
.ds-sub-banner-points {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.2);
}
.ds-sub-banner-point {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.95);
}
.ds-sub-banner-point .fa {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}
.ds-sub-banner-point strong { color: #fde68a; font-weight: 700; }

/* ══════════════════════════════════════════
   FLOATING SUBSCRIBE BAR
   Keeps the Subscribe button reachable while
   scrolling through a long dataset list.
══════════════════════════════════════════ */
.ds-subscription-sticky {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 500;
    background: #0f172a;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
    padding: 14px 16px 14px 20px;
    max-width: calc(100vw - 40px);
    transform: translateX(-50%);
    animation: dsSubStickyIn .3s ease .1s both;
}
@keyframes dsSubStickyIn {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ds-subscription-sticky-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.ds-subscription-sticky-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ds-subscription-sticky-title {
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    white-space: nowrap;
}
.ds-subscription-sticky-sub {
    font-size: 0.74rem;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
}
.ds-btn-subscribe-sticky {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fbbf24;
    color: #1e293b;
    border: none;
    padding: 11px 20px;
    border-radius: 9px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    transition: transform .15s, background .15s;
    flex-shrink: 0;
}
.ds-btn-subscribe-sticky:hover { transform: translateY(-1px); background: #f59e0b; }

@media (max-width: 640px) {
    .ds-subscription-sticky { left: 12px; right: 12px; bottom: 12px; transform: none; max-width: none; }
    @keyframes dsSubStickyIn {
        from { opacity: 0; transform: translateY(16px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .ds-subscription-sticky-inner { justify-content: space-between; }
    .ds-btn-subscribe-sticky { flex: 1; justify-content: center; }
}

/* ══════════════════════════════════════════
   SUBSCRIPTION PRICE DISPLAY
══════════════════════════════════════════ */
.ds-price-subscription {
    display: inline-block;
    padding: 4px 12px;
    background: #d4fc79;
    color: #374151;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ds-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1.5px solid var(--border-medium);
    border-radius: 10px;
    background: white;
    color: var(--accent-primary);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

/* ══════════════════════════════════════════
   LAYOUT: SIDEBAR + LIST
══════════════════════════════════════════ */
.ds-layout {
    padding: 32px 0 56px;
    background: var(--bg-base);
    min-height: 60vh;
}
.ds-layout-inner {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

/* ── SIDEBAR ── */
.ds-sidebar {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 120px;
}

.ds-sidebar-close-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.ds-sidebar-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
.ds-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 2px 4px;
}

.ds-sidebar-section {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-subtle);
}
.ds-sidebar-section:last-of-type { border-bottom: none; }

.ds-sidebar-heading {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.ds-sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ds-sidebar-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: left;
    transition: background .15s, color .15s;
    font-family: 'DM Sans', sans-serif;
}
.ds-sidebar-link:hover {
    background: rgba(109,40,217,.06);
    color: var(--accent-primary);
}
.ds-sidebar-link.active {
    background: rgba(109,40,217,.09);
    color: var(--accent-primary);
    font-weight: 700;
}
.ds-sidebar-link-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.78rem;
    background: #f3f4f6;
    color: #6b7280;
}
.ds-sidebar-link-icon.cat-health   { background: #fef2f2; color: #ef4444; }
.ds-sidebar-link-icon.cat-economic { background: #f0fdf4; color: #16a34a; }
.ds-sidebar-link-icon.cat-survey   { background: #eff6ff; color: #3b82f6; }
.ds-sidebar-link-icon.cat-training { background: #ede9fe; color: #7c3aed; }
.ds-sidebar-link-icon.cat-free     { background: #f0fdf4; color: #059669; }

.ds-sidebar-count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 1px 8px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}
.ds-sidebar-link.active .ds-sidebar-count {
    background: rgba(109,40,217,.12);
    color: var(--accent-primary);
}

/* Radio filter lists */
.ds-sidebar-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ds-check-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.86rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 8px;
    transition: background .12s;
    font-weight: 500;
}
.ds-check-label:hover { background: rgba(109,40,217,.05); }
.ds-check-label input[type="radio"] {
    accent-color: var(--accent-primary);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.ds-check-label em {
    margin-left: auto;
    font-style: normal;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Free datasets sidebar link special */
.cat-free-link { color: #059669; }
.cat-free-link.active { background: rgba(5,150,105,.1); color: #059669; }
.cat-free-link:hover  { background: rgba(5,150,105,.08); color: #059669; }

/* Clear button */
.ds-clear-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 18px 18px;
    padding: 8px 14px;
    border: 1.5px solid var(--border-subtle);
    border-radius: 9px;
    background: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color .15s, color .15s;
    font-family: 'DM Sans', sans-serif;
}
.ds-clear-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* ── RESULT BAR ── */
.ds-result-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.ds-result-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}
.ds-result-count strong { color: var(--text-primary); font-weight: 800; }

.ds-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ds-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px 3px 12px;
    background: rgba(109,40,217,.09);
    color: var(--accent-primary);
    border-radius: 20px;
}
.ds-active-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    opacity: .7;
}
.ds-active-tag button:hover { opacity: 1; }

/* ── LIST HEADER ── */
.ds-list-header {
    display: grid;
    grid-template-columns: 1fr 140px 130px 80px 90px 180px;
    gap: 8px;
    padding: 4px 24px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
}

/* ── DATASET CARDS ── */
.ds-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ds-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 140px 130px 80px 90px 180px;
    gap: 8px;
    padding: 18px 20px 18px 26px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    align-items: center;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ds-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(15,23,42,.09);
    border-color: var(--border-medium);
}

/* Floating accent capsule (replaces a flush left border) — colour keys to plan */
.ds-row::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 4px;
    background: var(--border-subtle);
}
.ds-row[data-price="free"]::before         { background: #10b981; }
.ds-row[data-price="standard"]::before     { background: #3b82f6; }
.ds-row[data-price="bundle"]::before       { background: #7c3aed; }
.ds-row[data-price="subscription"]::before { background: #f59e0b; }
.ds-row[data-price="premium"]::before      { background: #ec4899; }

/* A quiet gold ring calls out premium datasets without shouting */
.ds-row:has(.ds-badge-premium) {
    border-color: #f3d9a4;
    background: linear-gradient(180deg, #fffcf5 0%, var(--bg-elevated) 60px);
}


/* Name cell */
.ds-row-name {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}
.ds-row-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
    transition: transform .18s ease;
}
.ds-row:hover .ds-row-icon { transform: scale(1.06) rotate(-2deg); }
.ds-row-icon.health   { background: linear-gradient(145deg, #fef2f2, #fde3e3); color: #ef4444; box-shadow: 0 4px 10px rgba(239,68,68,.18); }
.ds-row-icon.economic { background: linear-gradient(145deg, #f0fdf4, #dcfce7); color: #16a34a; box-shadow: 0 4px 10px rgba(22,163,74,.18); }
.ds-row-icon.survey   { background: linear-gradient(145deg, #eff6ff, #dbeafe); color: #3b82f6; box-shadow: 0 4px 10px rgba(59,130,246,.18); }
.ds-row-icon.training { background: linear-gradient(145deg, #ede9fe, #ddd6fe); color: #7c3aed; box-shadow: 0 4px 10px rgba(124,58,237,.18); }

.ds-row-info { min-width: 0; flex: 1; }
.ds-row-title {
    font-size: 0.93rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ds-row-desc {
    font-size: 0.81rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ds-row-meta {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.ds-row-meta span {
    font-size: 0.71rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ds-row-meta .fa { font-size: 0.66rem; opacity: .75; }

/* Category pill */
.ds-row-cat { min-width: 0; }
.ds-cat-pill {
    display: inline-block;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.ds-cat-pill.cat-health   { background: #fef2f2; color: #dc2626; }
.ds-cat-pill.cat-economic { background: #f0fdf4; color: #16a34a; }
.ds-cat-pill.cat-survey   { background: #eff6ff; color: #2563eb; }
.ds-cat-pill.cat-training { background: #ede9fe; color: #7c3aed; }

/* Type + format cells */
.ds-row-type {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.ds-row-na { color: var(--text-muted); }

.ds-fmt-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 9px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Price cell */
.ds-row-price {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--accent-primary);
    white-space: nowrap;
}
.ds-row-price.free {
    display: inline-flex;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Actions */

.ds-row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.ds-btn-view,
.ds-btn-preview {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity .15s, background .15s, transform .15s, box-shadow .15s;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    text-decoration: none;
}
.ds-btn-view {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    color: #fff;
}
.ds-btn-view:hover { opacity: .92; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(124,58,237,.28); }
.ds-btn-preview {
    background: var(--bg-base);
    color: var(--accent-primary);
    border: 1.5px solid var(--border-medium);
}
.ds-btn-preview:hover { background: rgba(109,40,217,.07); transform: translateY(-1px); }

.ds-btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    background: var(--bg-base);
    color: #6b7280;
    border: 1.5px solid var(--border-medium);
    transition: opacity .15s, background .15s, transform .15s, color .15s, border-color .15s;
    flex-shrink: 0;
}
.ds-btn-copy:hover { background: rgba(109,40,217,.07); color: var(--accent-primary); border-color: var(--accent-primary); transform: translateY(-1px); }
.ds-btn-copy.copied { color: #059669; border-color: #6ee7b7; background: #ecfdf5; }

/* Toast notification */
.ds-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(10px);
    background: #1f2937;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 9999;
}
.ds-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Badges */
.ds-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ds-badge-premium  { background: #f5f3ff; color: #7c3aed; }
.ds-badge-popular  { background: #fff7ed; color: #ea580c; }
.ds-badge-beginner { background: #f0fdf4; color: #16a34a; }
.ds-badge-new      { background: #eff6ff; color: #2563eb; }

/* Plan pill — names which pricing plan a dataset belongs to */
.ds-plan-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.63rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
}
.ds-plan-pill:hover  { opacity: .8; }
.ds-plan-pill:active { transform: scale(0.96); }
.plan-free      { background: #ecfdf5; color: #059669; border-color: #6ee7b7; }
.plan-standard  { background: #eff6ff; color: #2563eb; border-color: #93c5fd; }
.plan-bundle    { background: #f5f3ff; color: #7c3aed; border-color: #c4b5fd; }
.plan-monthly   { background: #fffbeb; color: #d97706; border-color: #fcd34d; }
.plan-premium   { background: #fdf2f8; color: #db2777; border-color: #f9a8d4; }

/* ══════════════════════════════════════════
   VALUE STRIP
══════════════════════════════════════════ */
.ds-value-strip {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
    padding: 56px 0;
}
.ds-value-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}
.ds-value-label { flex-shrink: 0; }
.ds-value-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    margin-bottom: 10px;
}
.ds-value-heading {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.15;
}
.ds-value-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-bottom: 20px;
}
.ds-value-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255,255,255,.9);
    font-weight: 600;
}
.ds-value-check .fa { color: #a3e635; }
.ds-value-cta {
    font-size: 0.9rem;
    color: rgba(255,255,255,.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ══════════════════════════════════════════
   FINAL CTA
══════════════════════════════════════════ */
.ds-final-cta {
    background: #0d0d22;
    padding: 80px 0;
    overflow: hidden;
}
.ds-final-cta-inner {
    position: relative;
    text-align: center;
}
.ds-final-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109,40,217,.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.ds-final-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}
.ds-final-cta p {
    font-size: 1.05rem;
    color: rgba(255,255,255,.65);
    margin-bottom: 32px;
}
.ds-final-cta-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.ds-btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--accent-primary);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .15s;
}
.ds-btn-white:hover { opacity: .88; color: var(--accent-primary); }
.ds-btn-ghost-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: rgba(255,255,255,.85);
    border: 2px solid rgba(255,255,255,.3);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .15s;
}
.ds-btn-ghost-white:hover { border-color: rgba(255,255,255,.6); color: #fff; }

/* ══════════════════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1100px) {
    .ds-layout-inner {
        grid-template-columns: 210px 1fr;
    }
    .ds-list-header,
    .ds-row {
        grid-template-columns: 1fr 120px 110px 70px 80px 160px;
    }
}

@media (max-width: 900px) {
    .ds-mobile-filter-btn { display: flex; }

    .ds-layout-inner {
        grid-template-columns: 1fr;
    }

    .ds-sidebar {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 500;
        border-radius: 0;
        overflow-y: auto;
        top: 0;
    }
    .ds-sidebar.open { display: block; }
    .ds-sidebar-close { display: flex; }

    .ds-list-header { display: none; }
    .ds-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px 16px 16px 22px;
    }
    .ds-row-cat,
    .ds-row-type,
    .ds-row-fmt { display: none; }

    .ds-row-price { font-size: 1rem; }
    .ds-row-actions { justify-content: flex-start; }
}

@media (max-width: 600px) {
    .ds-hero { padding: 68px 0 52px; min-height: 260px; }
    .ds-search-row { flex-direction: column; align-items: stretch; }
    .ds-sort-wrap { justify-content: flex-end; }
}
/* ══════════════════════════════════════════
   BUNDLE BANNER
══════════════════════════════════════════ */
.ds-bundle-banner {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(8,145,178,0.18);
}
.ds-bundle-banner .ds-sub-banner-text h3 {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ds-bundle-banner .ds-sub-banner-text p  { color: rgba(255,255,255,0.9); margin-top: 4px; }
.ds-bundle-banner .ds-sub-banner-text strong { color: #fde68a; }
.ds-price-bundle {
    display: inline-block;
    background: #e0f2fe;
    color: #0e7490;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #bae6fd;
}

/* Plain-language "how it works" strip inside the banner */
.ds-bundle-howto {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.2);
}
.ds-bundle-howto-step {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255,255,255,.95);
}
.ds-bundle-howto-arrow {
    color: rgba(255,255,255,.5);
    font-size: 13px;
}
.ds-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}
@media (max-width: 700px) {
    .ds-bundle-howto { flex-direction: column; align-items: flex-start; gap: 10px; }
    .ds-bundle-howto-arrow { display: none; }
}

/* ══════════════════════════════════════════
   BUNDLE ROW CHECKBOX
   A big, clearly-labeled checkbox is easier to
   spot and understand than a small text button.
══════════════════════════════════════════ */
.ds-list-pane.bundle-mode .ds-row { cursor: pointer; }

.ds-bundle-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}
.ds-bundle-checkbox:hover { border-color: #0e7490; }
.ds-bundle-checkbox input[type="checkbox"] {
    /* Keep it in the DOM and accessible, but hide the native box
       in favor of the custom one so it looks the same everywhere. */
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.ds-bundle-checkbox-box {
    width: 19px;
    height: 19px;
    border-radius: 5px;
    border: 2px solid #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    font-size: 11px;
    transition: all .15s;
}
.ds-bundle-checkbox-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
}
.ds-bundle-checkbox.is-selected {
    border-color: #0e7490;
    background: #ecfeff;
}
.ds-bundle-checkbox.is-selected .ds-bundle-checkbox-box {
    background: #0e7490;
    border-color: #0e7490;
    color: #fff;
}
.ds-bundle-checkbox.is-selected .ds-bundle-checkbox-label { color: #0e7490; }
.ds-bundle-checkbox.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.ds-row.ds-bundle-selected {
    background: #f0fdff;
    border-color: #99e4ef;
    box-shadow: 0 0 0 2px rgba(8,145,178,.15);
}
.ds-row.ds-bundle-selected::before { background: #0891b2; }
.ds-row.ds-bundle-selected .ds-price-bundle {
    background: #0e7490;
    color: #fff;
    border-color: #0e7490;
}

/* ══════════════════════════════════════════
   BUNDLE FLOATING SELECTION BAR
══════════════════════════════════════════ */
.ds-bundle-sticky {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 500;
    background: #0f172a;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
    padding: 16px 20px;
    max-width: calc(100vw - 40px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(16px);
    transition: opacity .2s ease, transform .2s ease;
}
.ds-bundle-sticky.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.ds-bundle-sticky-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.ds-bundle-sticky-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.ds-bundle-sticky-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ds-bundle-sticky-count {
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
}
.ds-bundle-sticky-sep { color: rgba(255,255,255,.35); }
.ds-bundle-sticky-total {
    color: #fbbf24;
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
}
.ds-bundle-sticky-dots {
    display: flex;
    gap: 6px;
}
.ds-bundle-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    transition: background .15s;
}
.ds-bundle-dot.is-filled { background: #fbbf24; }
.ds-bundle-sticky-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.ds-btn-sticky-clear {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.25);
    color: rgba(255,255,255,.85);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    transition: background .15s;
}
.ds-btn-sticky-clear:hover { background: rgba(255,255,255,.08); }
.ds-btn-bundle-buy-sticky {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fbbf24;
    color: #1e293b;
    border: none;
    padding: 11px 22px;
    border-radius: 9px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    transition: opacity .15s, transform .15s, background .15s;
}
.ds-btn-bundle-buy-sticky:hover:not(:disabled) { transform: translateY(-1px); background: #f59e0b; }
.ds-btn-bundle-buy-sticky:disabled { background: rgba(255,255,255,.15); color: rgba(255,255,255,.6); cursor: not-allowed; }

@media (max-width: 640px) {
    .ds-bundle-sticky { left: 12px; right: 12px; bottom: 12px; transform: translateY(16px); max-width: none; }
    .ds-bundle-sticky.is-visible { transform: translateY(0); }
    .ds-bundle-sticky-inner { justify-content: space-between; width: 100%; }
    .ds-bundle-sticky-actions { flex: 1; }
    .ds-btn-bundle-buy-sticky { flex: 1; justify-content: center; }
}

/* Bundle page grid: no checkbox column, wider actions column for Select + View Content */
.ds-list-pane.bundle-mode .ds-list-header,
.ds-list-pane.bundle-mode .ds-row {
    grid-template-columns: 1fr 140px 130px 80px 100px 230px;
}
@media (max-width: 900px) {
    .ds-list-pane.bundle-mode .ds-row {
        grid-template-columns: 1fr;
    }
    .ds-list-pane.bundle-mode .ds-row-actions {
        width: 100%;
    }
    .ds-list-pane.bundle-mode .ds-bundle-checkbox {
        flex: 1;
        justify-content: center;
    }
}
/* ── PAGINATION ── */
.ds-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 4px 6px;
    margin-top: 6px;
    border-top: 1px solid var(--border-subtle);
}
.ds-pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.ds-pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ds-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.ds-page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.ds-page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    cursor: default;
}
.ds-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.ds-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
@media (max-width: 600px) {
    .ds-pagination { justify-content: center; text-align: center; }
    .ds-pagination-controls { justify-content: center; }
}