/* ============================================================
   DEVICE HUB — devhub-page (/devices/)
   ============================================================ */

.devhub-page { min-height: 100vh; }

/* Hero */
.devhub-hero {
    background: linear-gradient(135deg, #0a0a2e 0%, #1a1060 55%, #3a0ca3 100%);
    padding: var(--space-16) var(--space-6) var(--space-12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.devhub-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.devhub-hero-inner { position: relative; max-width: 680px; margin: 0 auto; }

.devhub-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin: 0 0 var(--space-3);
}

.devhub-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    margin: 0 0 var(--space-4);
}

.devhub-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin: 0 0 var(--space-6);
    line-height: 1.65;
}

.devhub-hero-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.devhub-hero-meta span {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.1);
    padding: 6px 14px;
    border-radius: var(--radius-full);
}

/* Filter bar */
.devhub-filter-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4) 0;
    position: sticky;
    top: var(--header-height, 70px);
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

.devhub-filter-inner {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    flex-wrap: wrap;
}

.devhub-search-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-full);
    padding: 8px 16px;
    min-width: 240px;
    transition: border-color var(--transition-fast);
}

.devhub-search-wrap:focus-within { border-color: var(--color-primary); }

.devhub-search-wrap svg {
    width: 15px;
    height: 15px;
    stroke: var(--text-muted);
    fill: none;
    flex-shrink: 0;
}

.devhub-search-wrap input {
    border: none;
    background: none;
    font-size: 0.87rem;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-body);
    width: 100%;
}

.devhub-search-wrap input::placeholder { color: var(--text-muted); }

.devhub-brand-filters {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.devhub-filter-btn {
    padding: 6px 14px;
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-full);
    background: none;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.devhub-filter-btn:hover,
.devhub-filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* Main */
.devhub-main { padding: var(--space-10) var(--space-6) var(--space-16); background: var(--bg-base); }

.devhub-no-results {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-muted);
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-6);
}

/* Device grid */
.devhub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

/* Device card */
.devhub-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.devhub-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
    text-decoration: none;
}

.devhub-card-accent { height: 5px; flex-shrink: 0; }

.devhub-card-body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; gap: var(--space-3); }

.devhub-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.devhub-card-emoji { font-size: 1.5rem; }

.devhub-card-year {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-subtle);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.devhub-card-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.devhub-card-brand {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0;
}

.devhub-card-specs { display: flex; flex-direction: column; gap: var(--space-2); }

.devhub-spec { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; }
.devhub-spec-label { color: var(--text-muted); font-weight: 600; }
.devhub-spec-value { font-weight: 600; color: var(--text-secondary); text-align: right; }

.devhub-card-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: auto; }

.devhub-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

.devhub-card-cta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
}

.devhub-card-cta svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    transition: transform var(--transition-fast);
}

.devhub-card:hover .devhub-card-cta svg { transform: translateX(4px); }

/* Coming soon */
.devhub-coming-soon {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.87rem;
    color: var(--text-secondary);
}

.devhub-coming-soon svg { width: 16px; height: 16px; stroke: var(--color-primary); fill: none; flex-shrink: 0; }
.devhub-coming-soon p { margin: 0; }
.devhub-coming-soon a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.devhub-coming-soon a:hover { text-decoration: underline; }

/* ============================================================
   DEVICE SPECIFIC PAGE — dsp-page
   ============================================================ */

.dsp-page { min-height: 100vh; }

/* Breadcrumb */
.dsp-breadcrumb {
    padding: var(--space-4) 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dsp-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.dsp-breadcrumb a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.dsp-breadcrumb .sep {
    color: var(--border-medium);
    font-size: 0.9rem;
}

.dsp-breadcrumb .current {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Hero */
.dsp-hero {
    background: linear-gradient(135deg, var(--bg-base) 0%, var(--bg-subtle) 100%);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-8) var(--space-6) var(--space-6);
}

.dsp-hero-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-8);
    align-items: stretch;
}


/* Hero content */
.dsp-brand-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: rgba(0,87,255,0.08);
    border: 1px solid rgba(0,87,255,0.2);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    margin-bottom: var(--space-4);
}

.dsp-hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin: 0 0 var(--space-4);
    line-height: 1.1;
}

.dsp-hero-sub {
    font-size: 0.97rem;
    color: var(--text-secondary);
    margin: 0 0 var(--space-6);
    line-height: 1.65;
    max-width: 560px;
}

.dsp-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.dsp-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    border: 1.5px solid var(--chip-color, var(--border-medium));
    color: var(--chip-color, var(--text-secondary));
    background: transparent;
}

.dsp-chip--neutral { border-color: var(--border-medium); color: var(--text-secondary); }

.dsp-hero-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: center;
}

.dsp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

/* Scope the button SVG so it uses the correct stroke icon, not the logo fill path */
.dsp-cta-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.dsp-cta-time {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Spec card */
.dsp-hero-spec-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.dsp-spec-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: linear-gradient(135deg, var(--chip-color, var(--color-primary)), rgba(0,0,0,0.3));
    color: #fff;
}

.dsp-spec-card-emoji { font-size: 1.8rem; }

.dsp-spec-card-header strong { display: block; font-size: 0.95rem; font-weight: 700; }
.dsp-spec-card-header span { font-size: 0.78rem; opacity: 0.8; }

.dsp-spec-list { 
    margin: 0; 
    padding: 0; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dsp-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border-light);
    gap: var(--space-4);
    flex-grow: 1;            /* <-- Added: Spreads rows out evenly to perfectly match the left column's height */
}

.dsp-spec-row:last-child { border-bottom: none; }

.dsp-spec-row dt {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dsp-spec-row dd {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    margin: 0;
}

.dsp-spec-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.dsp-spec-colors-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }

.dsp-color-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

/* Main layout */
.dsp-main { padding: var(--space-6) var(--space-6) var(--space-16); background: var(--bg-base); }

.dsp-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-10);
    align-items: start;
    max-width: var(--container-max);
    margin: 0 auto;
}

/* Content sections */
.dsp-section { margin-bottom: var(--space-10); }

.dsp-section h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 var(--space-5);
    letter-spacing: -0.02em;
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--border-light);
}

.dsp-section p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin: 0 0 var(--space-4); }

/* Warning */
.dsp-warning {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    background: rgba(255,154,0,0.08);
    border: 1px solid rgba(255,154,0,0.3);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.dsp-warning strong { color: var(--text-primary); }

/* Advantage grid */
.dsp-advantage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-5); }

.dsp-advantage {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.dsp-advantage-icon { font-size: 1.4rem; flex-shrink: 0; }
.dsp-advantage strong { display: block; font-size: 0.87rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.dsp-advantage p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* Prereq list */
.dsp-prereq-list { display: flex; flex-direction: column; gap: var(--space-3); }

.dsp-prereq-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
}

.dsp-prereq-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.dsp-prereq-icon { font-size: 1.2rem; flex-shrink: 0; }
.dsp-prereq-item strong { display: block; font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.dsp-prereq-item p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* Code block */
.dsp-code-block {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-4) 0;
}

.dsp-code-block code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-primary);
}

/* Info box */
.dsp-info-box {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
    background: rgba(0,87,255,0.05);
    border: 1px solid rgba(0,87,255,0.2);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: var(--space-4);
}

.dsp-info-box svg { width: 16px; height: 16px; stroke: var(--color-primary); fill: none; flex-shrink: 0; margin-top: 2px; }
.dsp-info-box p { margin: 0; }

/* Flash modes */
.dsp-mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }

.dsp-mode-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    position: relative;
}

.dsp-mode-card--recommended { border-color: var(--color-primary); }

.dsp-mode-badge {
    position: absolute;
    top: -10px;
    left: var(--space-4);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dsp-mode-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin: 0 0 var(--space-3); }
.dsp-mode-card p { font-size: 0.82rem; color: var(--text-secondary); margin: 0 0 var(--space-3); line-height: 1.55; }

.dsp-mode-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    background: var(--bg-subtle);
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

/* Error list */
.dsp-error-list { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-4); }

.dsp-error-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    background: var(--bg-surface);
    border-left: 4px solid var(--border-medium);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-4) var(--space-5);
}

.dsp-error-item--error { border-left-color: var(--color-danger); }
.dsp-error-item--warning { border-left-color: #9A5F00; }

.dsp-error-code {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--bg-subtle);
    color: var(--color-danger);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.dsp-error-item p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.dsp-error-more { font-size: 0.85rem; color: var(--text-muted); }
.dsp-error-more a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.dsp-error-more a:hover { text-decoration: underline; }

/* Guide CTA */
.dsp-guide-cta {
    background: linear-gradient(135deg, #003FBF, #0057FF);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    margin-top: var(--space-4);
}

.dsp-guide-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.dsp-guide-cta h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 var(--space-2);
}

.dsp-guide-cta p {
    font-size: 0.87rem;
    color: rgba(255,255,255,0.78);
    margin: 0;
    line-height: 1.5;
}

.dsp-guide-cta .btn-primary {
    background: #fff;
    color: var(--color-primary);
    flex-shrink: 0;
    box-shadow: none;
}

.dsp-guide-cta .btn-primary:hover { background: #f0f0f0; color: var(--color-primary-dark); }

/* Sidebar */
.dsp-sidebar { display: flex; flex-direction: column; gap: var(--space-5); position: sticky; top: calc(var(--header-height, 70px) + var(--space-6)); }

.dsp-sidebar-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dsp-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-subtle);
    margin: 0;
}

.dsp-sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.dsp-sidebar-link:last-child { border-bottom: none; }
.dsp-sidebar-link:hover { color: var(--color-primary); background: var(--bg-subtle); text-decoration: none; }
.dsp-sidebar-link svg { width: 12px; height: 12px; stroke: currentColor; fill: none; flex-shrink: 0; }

.dsp-sidebar-specs { margin: 0; padding: 0; }

.dsp-sidebar-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border-light);
    gap: var(--space-3);
}

.dsp-sidebar-spec-row:last-child { border-bottom: none; }
.dsp-sidebar-spec-row dt { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.dsp-sidebar-spec-row dd { font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); text-align: right; margin: 0; }

.dsp-related-links { display: flex; flex-direction: column; }

.dsp-related-link {
    padding: var(--space-3) var(--space-5);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.dsp-related-link:last-child { border-bottom: none; }
.dsp-related-link:hover { color: var(--color-primary); background: var(--bg-subtle); text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .dsp-hero-inner { grid-template-columns: 1fr; }
    .dsp-hero-spec-card { max-width: 480px; }
    .dsp-layout { grid-template-columns: 1fr; }
    
    /* Hide the sidebar completely on tablet/mobile so it doesn't stack at the bottom */
    .dsp-sidebar { display: none; } 
}

@media (max-width: 768px) {
    .dsp-mode-grid { grid-template-columns: 1fr; }
    .dsp-advantage-grid { grid-template-columns: 1fr; }
    .devhub-filter-inner { flex-direction: column; align-items: stretch; }
    .devhub-search-wrap { min-width: unset; }
}

@media (max-width: 480px) {
    .devhub-grid { grid-template-columns: 1fr; }
    .dsp-hero-actions { flex-direction: column; align-items: stretch; }
    .dsp-guide-cta-inner { flex-direction: column; }
    .dsp-guide-cta .btn-primary { width: 100%; justify-content: center; }
}

/* ============================================================
   DEVICE IMAGE CAROUSEL
   ============================================================ */

.dsp-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    /* Changed from 16/9 to 4/3 to give the box more vertical room */
    aspect-ratio: 4 / 3;     
    /* Increased from 280px to allow the image to scale up beautifully */
    max-height: 380px;       
    margin-top: var(--space-5);
    width: 100%;
}

/* Track — only active slide is visible */
.dsp-carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.dsp-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsp-carousel-slide.is-active {
    opacity: 1;
    position: relative;
}

.dsp-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;       /* show full device, no cropping */
    object-position: center;
    display: block;
}

/* Prev / Next arrow buttons */
.dsp-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
    padding: 0;
}

.dsp-carousel-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.dsp-carousel-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-primary);
}

.dsp-carousel-btn--prev { left: 8px; }
.dsp-carousel-btn--next { right: 8px; }

/* Dot indicators */
.dsp-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dsp-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.dsp-carousel-dot.is-active {
    background: #fff;
    transform: scale(1.3);
}

/* Dark mode */
[data-theme="dark"] .dsp-carousel-btn {
    background: rgba(30,30,40,0.9);
}

[data-theme="dark"] .dsp-carousel-btn:hover { background: var(--bg-surface); }
[data-theme="dark"] .dsp-carousel-btn svg { stroke: var(--text-primary); }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {
    .dsp-carousel {
        aspect-ratio: 4 / 3;
        max-height: 200px;
        margin-top: var(--space-4);
    }
}