/* ============================================================================
   PKV Overview Page — /vergelijken/
   Clean editorial design: data-forward, authoritative, polished.
   Uses shared .pkv-page-header from base.css for consistent page headers.
   Depends on: vergelijker-v59/base.css (pkv-container, pkv-page-header, pkv-tab-nav)
   ============================================================================ */


/* ============================================================================
   1. HERO HEADER
   Specialized hero styling for the overview page header.
   ============================================================================ */

.pkv-page-header {
    background: linear-gradient(135deg, rgba(48, 119, 166, 0.95), rgba(15, 23, 42, 0.95));
    padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 1rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -2px rgba(0, 0, 0, 0.1);
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pkv-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.15;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    mix-blend-mode: overlay;
    pointer-events: none;
}

.pkv-page-header__content {
    position: relative;
    z-index: 1;
}

.pkv-page-header h1 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pkv-page-header .pkv-subtitle {
    color: rgba(255, 255, 255, 0.9);
    max-width: 60ch;
}

html.dark .pkv-page-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.95));
    border-color: rgba(255, 255, 255, 0.05);
}


/* ============================================================================
   2. OVERVIEW SECTIONS
   Grouped product sections with editorial left-accent titles.
   ============================================================================ */

.pkv-overview-section {
    margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.pkv-overview-section:last-child {
    margin-bottom: 0;
}

.pkv-overview-section__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
    padding-left: clamp(0.75rem, 1.5vw, 1rem);
    border-left: 3px solid var(--accent);
    line-height: 1.3;
}

/* Decorative fade line extending to the right */
.pkv-overview-section__title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}


/* ============================================================================
   4. FEATURED GRID + FEATURED CARDS
   2-column grid for GPU + CPU spotlights. Large, impactful cards.
   ============================================================================ */

.pkv-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.pkv-featured-card {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
    padding: clamp(2rem, 4vw, 2.75rem);
    min-height: 160px;
    background: rgba(255, 255, 255, 0.85);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

html.dark .pkv-featured-card {
    background: rgba(30, 30, 30, 0.75);
    background-image: linear-gradient(135deg, rgba(30, 30, 30, 0.4) 0%, rgba(var(--accent-rgb), 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        0 2px 4px -2px rgba(0, 0, 0, 0.15);
}

/* Left accent gradient bar via pseudo-element */
.pkv-featured-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent), var(--brand-primary-dark));
    border-radius: 0.875rem 0 0 0.875rem;
}

.pkv-featured-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(var(--accent-rgb), 0.1),
        0 16px 32px rgba(0, 0, 0, 0.04);
}

html.dark .pkv-featured-card:hover {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.25),
        0 8px 16px rgba(var(--accent-rgb), 0.15),
        0 16px 32px rgba(0, 0, 0, 0.12);
}

.pkv-featured-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* ============================================================================
   4a. FEATURED CARD — Icon
   64px gradient circle with SVG icon.
   ============================================================================ */

.pkv-featured-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.06));
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pkv-featured-card__icon svg {
    width: 28px;
    height: 28px;
}

.pkv-featured-card:hover .pkv-featured-card__icon {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.1));
    border-color: rgba(var(--accent-rgb), 0.25);
}


/* ============================================================================
   4b. FEATURED CARD — Body
   Title, count, popular product preview.
   ============================================================================ */

.pkv-featured-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pkv-featured-card__body h2 {
    font-size: clamp(1.125rem, 2vw + 0.25rem, 1.375rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    transition: color 0.15s ease;
}

.pkv-featured-card:hover .pkv-featured-card__body h2 {
    color: var(--accent);
}

.pkv-featured-card__count {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}


/* ============================================================================
   4c. FEATURED CARD — Popular product
   Inline preview: dashed border-top, image + product name.
   ============================================================================ */

.pkv-featured-card__popular {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.625rem;
    border-top: 1px dashed var(--border);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.pkv-featured-card__popular img {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.pkv-featured-card__popular span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}


/* ============================================================================
   4d. FEATURED CARD — CTA
   Accent-colored arrow that slides on hover.
   ============================================================================ */

.pkv-featured-card__cta {
    position: absolute;
    bottom: clamp(1.75rem, 3.5vw, 2.5rem);
    right: clamp(1.75rem, 3.5vw, 2.5rem);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    transition: color 0.15s ease, transform 0.15s ease;
}

.pkv-featured-card:hover .pkv-featured-card__cta {
    color: var(--accent-hover);
    transform: translateX(4px);
}


/* ============================================================================
   5. TYPE GRID
   Fluid grid for compact type cards — auto-fill adapts to viewport.
   ============================================================================ */

.pkv-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: clamp(1.125rem, 2.5vw, 1.75rem);
}


/* ============================================================================
   6. TYPE CARDS (Compact Grid Items)
   Flex row with icon circle and text body. Editorial hover effects.
   ============================================================================ */

.pkv-type-card {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.25rem);
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    box-shadow:
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        0 1px 2px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

html.dark .pkv-type-card {
    background: rgba(30, 30, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 2px 4px -1px rgba(0, 0, 0, 0.1),
        0 1px 2px -1px rgba(0, 0, 0, 0.08);
}

.pkv-type-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.25);
    border-left-color: var(--accent);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        0 6px 12px rgba(var(--accent-rgb), 0.08),
        0 12px 24px rgba(0, 0, 0, 0.04);
}

html.dark .pkv-type-card:hover {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.25),
        0 6px 12px rgba(var(--accent-rgb), 0.12),
        0 12px 24px rgba(0, 0, 0, 0.12);
}

.pkv-type-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* ============================================================================
   6a. TYPE CARD — Icon
   44px circle with accent gradient matching featured style.
   ============================================================================ */

.pkv-type-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.06));
    border: 1px solid rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pkv-type-card__icon svg {
    width: 20px;
    height: 20px;
}

.pkv-type-card:hover .pkv-type-card__icon {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.1));
    border-color: rgba(var(--accent-rgb), 0.2);
}


/* ============================================================================
   6b. TYPE CARD — Body
   Product type name + meta count.
   ============================================================================ */

.pkv-type-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pkv-type-card__body h3 {
    font-size: clamp(0.9375rem, 1.3vw + 0.2rem, 1.0625rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    transition: color 0.15s ease;
}

.pkv-type-card:hover .pkv-type-card__body h3 {
    color: var(--accent);
}

.pkv-type-card__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}


/* ============================================================================
   7. TRENDING GRID
   ============================================================================ */

.pkv-trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(1.125rem, 2.5vw, 1.75rem);
}


/* ============================================================================
   8. TRENDING PAIR CARDS
   Centered "Product A vs Product B" cards with gradient top border.
   ============================================================================ */

.pkv-trending-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.875rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 4px -1px rgba(0, 0, 0, 0.03),
        0 1px 2px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

html.dark .pkv-trending-pair {
    background: rgba(30, 30, 30, 0.75);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 2px 4px -1px rgba(0, 0, 0, 0.1),
        0 1px 2px -1px rgba(0, 0, 0, 0.08);
}

/* Gradient top accent bar */
.pkv-trending-pair::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--brand-primary-dark));
    border-radius: 10px 10px 0 0;
}

.pkv-trending-pair:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.25);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.06),
        0 6px 12px rgba(var(--accent-rgb), 0.08),
        0 12px 24px rgba(0, 0, 0, 0.04);
}

html.dark .pkv-trending-pair:hover {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.25),
        0 6px 12px rgba(var(--accent-rgb), 0.12),
        0 12px 24px rgba(0, 0, 0, 0.12);
}

.pkv-trending-pair:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* ============================================================================
   8a. TRENDING PAIR — Names
   Two product names with a "vs" pill divider.
   ============================================================================ */

.pkv-trending-pair__names {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.375rem;
    font-size: clamp(0.875rem, 1vw + 0.25rem, 0.9375rem);
    line-height: 1.4;
}

.pkv-trending-pair__names strong {
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.15s ease;
}

.pkv-trending-pair:hover .pkv-trending-pair__names strong {
    color: var(--accent);
}

/* VS pill badge */
.pkv-trending-pair__vs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.5rem;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    font-size: 0.6875rem;
    font-weight: 600;
    font-style: normal;
    border-radius: 9999px;
    line-height: 1.4;
}


/* ============================================================================
   8b. TRENDING PAIR — Meta
   View count or category label below names.
   ============================================================================ */

.pkv-trending-pair__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}


/* ============================================================================
   9. CARD REVEAL ANIMATION
   Cards enter with a subtle upward fade + scale via CSS keyframes.
   ============================================================================ */

@keyframes pkv-card-reveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pkv-type-card,
.pkv-featured-card,
.pkv-trending-pair {
    animation: pkv-card-reveal 0.4s ease both;
}

/* Staggered delays — type grid */
.pkv-type-grid> :nth-child(2) {
    animation-delay: 0.05s;
}

.pkv-type-grid> :nth-child(3) {
    animation-delay: 0.1s;
}

.pkv-type-grid> :nth-child(4) {
    animation-delay: 0.15s;
}

.pkv-type-grid> :nth-child(5) {
    animation-delay: 0.2s;
}

.pkv-type-grid> :nth-child(6) {
    animation-delay: 0.25s;
}

.pkv-type-grid> :nth-child(n+7) {
    animation-delay: 0.3s;
}

/* Staggered delays — featured grid */
.pkv-featured-grid> :nth-child(2) {
    animation-delay: 0.1s;
}

/* Staggered delays — trending grid */
.pkv-trending-grid> :nth-child(2) {
    animation-delay: 0.05s;
}

.pkv-trending-grid> :nth-child(3) {
    animation-delay: 0.1s;
}

.pkv-trending-grid> :nth-child(4) {
    animation-delay: 0.15s;
}

.pkv-trending-grid> :nth-child(n+5) {
    animation-delay: 0.2s;
}


/* ============================================================================
   10. RESPONSIVE LAYOUT
   Media queries only for grid column changes and structural shifts.
   ============================================================================ */

@media (max-width: 640px) {
    .pkv-featured-grid {
        grid-template-columns: 1fr;
    }

    /* CTA repositions inline on small screens */
    .pkv-featured-card__cta {
        position: static;
        margin-top: 0.5rem;
        display: inline-block;
    }

    .pkv-featured-card__cta:hover {
        transform: none;
    }
}


/* ============================================================================
   11. REDUCED MOTION
   Disable all transforms, transitions, and animations.
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {

    .pkv-type-card,
    .pkv-featured-card,
    .pkv-trending-pair {
        animation: none;
        transition: none;
    }

    .pkv-type-card:hover,
    .pkv-featured-card:hover,
    .pkv-trending-pair:hover {
        transform: none;
    }

    .pkv-featured-card:hover .pkv-featured-card__cta {
        transform: none;
    }

    .pkv-featured-card__icon,
    .pkv-type-card__icon,
    .pkv-featured-card__body h2,
    .pkv-type-card__body h3,
    .pkv-trending-pair__names strong,
    .pkv-featured-card__cta {
        transition: none;
    }
}