/* =====================================================
   VERKTYGSGUIDEN CONSUMER - Themed Catalog
   Dark/Light theme via CSS custom properties
   ===================================================== */

/* ── Theme Variables ────────────────────────────────── */
:root {
    /* Base */
    --bg-body: #111;
    --text-primary: #e0e0e0;
    --text-secondary: #bbb;
    --text-muted: #888;
    --text-dim: #666;
    --text-faint: #555;
    --text-strong: #fff;
    --border-color: #333;
    --border-light: #2a2a2a;
    --accent: #5b9bd5;
    --accent-hover: #4a8bc4;
    --orange: #ffcc00;
    --orange-hover: #ffcc00;
    --link-brown: #8b5a2b;
    --link-brown-hover: #6f431e;
    --price-gold: #e8c84a;
    --check-green: #33A952;

    /* Header */
    --header-bg: #111;
    --header-border: #333;

    /* Sidebar */
    --sidebar-bg: #1a1a1a;
    --sidebar-border: #2a2a2a;
    --sidebar-scrollbar-track: #1a1a1a;
    --sidebar-scrollbar-thumb: #444;
    --sidebar-scrollbar-hover: #555;
    --cat-group-bg: #161616;
    --cat-group-text: #777;
    --cat-group-border: #2a2a2a;
    --cat-item-text: #ccc;
    --cat-item-border: #262626;
    --cat-item-hover-bg: #252525;
    --cat-item-hover-text: #fff;
    --cat-item-active-bg: #050505;
    --cat-item-active-text: #fff;
    --cat-count-bg: #333;
    --cat-count-text: #999;
    --cat-nodata-text: #555;
    --cat-nodata-count-bg: #222;
    --cat-nodata-count-text: #444;

    /* Filter panel */
    --filter-panel-bg: #1a1a1a;
    --filter-panel-border: rgba(91, 155, 213, 0.55);
    --filter-header-bg: #ffcc00;
    --filter-header-text: #090909;
    --filter-header-border: #090909;
    --filter-section-bg: #1a1a1a;
    --filter-section-border: #2a2a2a;
    --filter-toggle-bg: #202326;
    --filter-toggle-text: #e6eef6;
    --filter-toggle-border: rgba(91, 155, 213, 0.16);
    --filter-toggle-hover-bg: #27313a;
    --filter-toggle-hover-text: #fff;
    --filter-toggle-icon: #9fc4e8;
    --filter-content-bg: #1a1a1a;
    --filter-content-scrollbar-track: #1a1a1a;
    --filter-content-scrollbar-thumb: #444;
    --filter-content-scrollbar-hover: #555;
    --filter-checkbox-text: #bbb;
    --filter-checkbox-hover-text: #fff;
    --filter-range-label-text: #888;
    --filter-range-label-bg: #262626;
    --filter-actions-bg: linear-gradient(to bottom, #222, #1e1e1e);
    --filter-actions-border: #333;
    --filter-link-text: #888;
    --filter-link-sep: #444;
    --filter-search-bg: #222;
    --filter-search-border: #444;
    --filter-search-text: #e0e0e0;
    --filter-search-placeholder: #666;

    /* Toolbar */
    --toolbar-bg: #1a1a1a;
    --toolbar-border: #333;
    --toolbar-text: #888;
    --toolbar-sep: #444;
    --toggle-group-bg: rgba(255,255,255,0.08);
    --btn-text: #888;
    --btn-hover-bg: rgba(255,255,255,0.1);
    --btn-hover-text: #ccc;
    --search-bg: #222;
    --search-border: #444;
    --search-text: #e0e0e0;
    --search-placeholder: #666;
    --search-icon: #666;

    /* Content / Grid */
    --main-bg: #111;
    --grid-header-bg: #1a1a1a;
    --grid-header-border: #444;
    --grid-border: #2a2a2a;
    --grid-corner-bg: #1a1a1a;
    --row-header-bg: #1e1e1e;
    --row-header-bg-alt: #222;
    --row-header-text: #bbb;
    --cell-bg: #181818;
    --cell-bg-alt: #1d1d1d;
    --cell-hover: #282828;
    --cell-text: #ddd;
    --model-text: #e0e0e0;
    --unit-text: #666;
    --empty-cell: #444;

    /* Cards */
    --card-bg: #222;
    --card-image-bg: #2a2a2a;
    --card-shadow: rgba(0,0,0,0.2);
    --card-hover-shadow: rgba(0,0,0,0.5);
    --card-no-image: #555;
    --card-infoheader-bg: rgba(24,24,24,0.75);
    --card-infoheader-text: whitesmoke;
    --card-overlay-bg: rgba(0,0,0,0.75);
    --card-overlay-text: #ccc;

    /* Pager */
    --pager-bg: #1a1a1a;
    --pager-border: #333;
    --pager-btn-bg: #222;
    --pager-btn-text: #ccc;
    --pager-btn-border: #444;
    --pager-btn-hover-bg: #333;
    --pager-btn-hover-text: #fff;
    --pager-info: #888;
    --pager-ellipsis: #666;

    /* Scrollbar (content area) */
    --scrollbar-track: #1a1a1a;
    --scrollbar-thumb: #444;
    --scrollbar-hover: #666;

    /* Loading */
    --loading-bg: rgba(0,0,0,0.7);
    --loading-spinner-bg: #333;
    --loading-text: #ccc;

    /* Empty state */
    --empty-text: #666;
    --empty-hint: #555;

    /* Memo scrollbar */
    --memo-scrollbar: #444;

    /* Theme toggle */
    --theme-toggle-text: #888;
    --theme-toggle-hover: #e0e0e0;
}

/* ── Light Theme ───────────────────────────────────── */
[data-theme="light"] {
    --bg-body: #f2f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #444;
    --text-muted: #777;
    --text-dim: #999;
    --text-faint: #aaa;
    --text-strong: #000;
    --border-color: #ddd;
    --border-light: #e0e0e0;
    --price-gold: #b8860b;

    --header-bg: #fff;
    --header-border: #ddd;

    --sidebar-bg: #fff;
    --sidebar-border: #e0e0e0;
    --sidebar-scrollbar-track: #f5f5f5;
    --sidebar-scrollbar-thumb: #ccc;
    --sidebar-scrollbar-hover: #aaa;
    --cat-group-bg: #f7f7f7;
    --cat-group-text: #888;
    --cat-group-border: #e8e8e8;
    --cat-item-text: #333;
    --cat-item-border: #eee;
    --cat-item-hover-bg: #f0f4f8;
    --cat-item-hover-text: #111;
    --cat-item-active-bg: #050505;
    --cat-item-active-text: #fff;
    --cat-count-bg: #e8e8e8;
    --cat-count-text: #777;
    --cat-nodata-text: #bbb;
    --cat-nodata-count-bg: #f0f0f0;
    --cat-nodata-count-text: #ccc;

    --filter-panel-bg: #fff;
    --filter-panel-border: #a9cae6;
    --filter-header-bg: #ffcc00;
    --filter-header-text: #090909;
    --filter-header-border: #090909;
    --filter-section-bg: #fff;
    --filter-section-border: #dfeaf2;
    --filter-toggle-bg: #f4f9fd;
    --filter-toggle-text: #1c4c6d;
    --filter-toggle-border: #d9e9f5;
    --filter-toggle-hover-bg: #e8f3fb;
    --filter-toggle-hover-text: #12334b;
    --filter-toggle-icon: #4e89b5;
    --filter-content-bg: #fff;
    --filter-content-scrollbar-track: #f5f5f5;
    --filter-content-scrollbar-thumb: #ccc;
    --filter-content-scrollbar-hover: #aaa;
    --filter-checkbox-text: #444;
    --filter-checkbox-hover-text: #111;
    --filter-range-label-text: #666;
    --filter-range-label-bg: #f5f5f5;
    --filter-actions-bg: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
    --filter-actions-border: #ddd;
    --filter-link-text: #888;
    --filter-link-sep: #ccc;
    --filter-search-bg: #fff;
    --filter-search-border: #ddd;
    --filter-search-text: #333;
    --filter-search-placeholder: #999;

    --toolbar-bg: #fff;
    --toolbar-border: #ddd;
    --toolbar-text: #777;
    --toolbar-sep: #ddd;
    --toggle-group-bg: rgba(0,0,0,0.06);
    --btn-text: #777;
    --btn-hover-bg: rgba(0,0,0,0.08);
    --btn-hover-text: #333;
    --search-bg: #f5f5f5;
    --search-border: #ddd;
    --search-text: #333;
    --search-placeholder: #999;
    --search-icon: #999;

    --main-bg: #f2f3f5;
    --grid-header-bg: #fff;
    --grid-header-border: #ddd;
    --grid-border: #e0e0e0;
    --grid-corner-bg: #fff;
    --row-header-bg: #f7f8fa;
    --row-header-bg-alt: #f0f1f3;
    --row-header-text: #555;
    --cell-bg: #fff;
    --cell-bg-alt: #fafbfc;
    --cell-hover: #f0f4f8;
    --cell-text: #333;
    --model-text: #1a1a1a;
    --unit-text: #999;
    --empty-cell: #ccc;

    --card-bg: #fff;
    --card-image-bg: #f7f7f7;
    --card-shadow: rgba(0,0,0,0.08);
    --card-hover-shadow: rgba(0,0,0,0.18);
    --card-no-image: #ccc;
    --card-infoheader-bg: rgba(255,255,255,0.88);
    --card-infoheader-text: #333;
    --card-overlay-bg: rgba(255,255,255,0.92);
    --card-overlay-text: #555;

    --pager-bg: #fff;
    --pager-border: #ddd;
    --pager-btn-bg: #f5f5f5;
    --pager-btn-text: #555;
    --pager-btn-border: #ddd;
    --pager-btn-hover-bg: #e8e8e8;
    --pager-btn-hover-text: #111;
    --pager-info: #777;
    --pager-ellipsis: #999;

    --scrollbar-track: #f0f0f0;
    --scrollbar-thumb: #ccc;
    --scrollbar-hover: #aaa;

    --loading-bg: rgba(255,255,255,0.7);
    --loading-spinner-bg: #ddd;
    --loading-text: #555;

    --empty-text: #999;
    --empty-hint: #bbb;

    --memo-scrollbar: #ccc;

    --theme-toggle-text: #777;
    --theme-toggle-hover: #333;
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-body);
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── App Layout ─────────────────────────────────────── */
.app-layout {
    display: grid;
    grid-template-rows: 85px 1fr;
    grid-template-columns: 350px minmax(0, 1fr) 0;
    grid-template-areas:
        "header header header"
        "sidebar main adrail";
    height: 100vh;
    width: 100vw;
}

.app-layout.has-right-ads {
    grid-template-columns: 350px minmax(0, 1fr) 350px;
}

/* ── Header ─────────────────────────────────────────── */
.app-header {
    grid-area: header;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.app-header .logo img {
    height: 50px;
    opacity: 0.95;
}

.app-header .logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-spacer { flex: 1; }

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--theme-toggle-text);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 0;
}

.theme-toggle:hover {
    color: var(--theme-toggle-hover);
    background: var(--toggle-group-bg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.manufacturer-select {
    background: var(--search-bg);
    color: var(--text-primary);
    border: 1px solid var(--search-border);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    min-width: 200px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.manufacturer-select:focus {
    outline: none;
    border-color: var(--accent);
}

.manufacturer-select option {
    background: var(--search-bg);
    color: var(--text-primary);
}

/* ── Sidebar ────────────────────────────────────────── */
.app-sidebar {
    grid-area: sidebar;
    background-color: var(--sidebar-bg);
    overflow-y: hidden;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sidebar-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-control-panel {
    flex: 0 0 auto;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    background: color-mix(in srgb, var(--sidebar-bg) 90%, var(--accent) 10%);
}

.sidebar-control-label {
    display: block;
    margin-bottom: 7px;
    color: var(--cat-header-text);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-control-label-red {
    margin: -14px -16px 12px;
    padding: 11px 16px;
    background: #510012;
    color: #fff;
}

.sidebar-control-panel .manufacturer-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
}

.supplier-volt-panel {
    margin-top: 12px;
}

.supplier-volt-title {
    margin-bottom: 8px;
    color: var(--cat-header-text);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.supplier-volt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.supplier-volt-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    border: 1px solid var(--search-border);
    border-radius: 6px;
    background: var(--search-bg);
    color: var(--text-primary);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.supplier-volt-button small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 10px;
    line-height: 1;
}

.supplier-volt-button:hover,
.supplier-volt-button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.supplier-volt-hint {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.sidebar-category-heading {
    flex: 0 0 auto;
    padding: 12px 16px;
    background: #050505;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Category Tree */
.category-tree {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
}

.category-group {
    margin: 0;
}

.category-group-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--cat-group-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 15px 6px;
    background: var(--cat-group-bg);
    border-bottom: 1px solid var(--cat-group-border);
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, font-size 0.15s ease, padding 0.15s ease;
    border-bottom: 1px solid var(--cat-item-border);
    color: var(--cat-item-text);
    font-size: 14px;
    user-select: none;
}

.category-item:hover {
    background-color: var(--cat-item-hover-bg);
    color: var(--cat-item-hover-text);
}

.category-item.active {
    background-color: var(--cat-item-active-bg);
    color: var(--cat-item-active-text);
    font-size: 16px;
    font-weight: 900;
    padding-top: 14px;
    padding-bottom: 14px;
    letter-spacing: 0;
}

.category-item .count {
    font-size: 11px;
    color: var(--cat-count-text);
    background: var(--cat-count-bg);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
    transition: background-color 0.2s ease;
}

.category-item.active .count {
    background: #ffcc00;
    color: #090909;
    font-weight: 900;
}

.category-item.no-data {
    color: var(--cat-nodata-text);
    font-style: italic;
}

.category-item.no-data .count {
    background: var(--cat-nodata-count-bg);
    color: var(--cat-nodata-count-text);
}

/* ── Filter Panel (within sidebar) ──────────────────── */
.filter-panel {
    flex: 0 0 auto;
    max-height: 45vh;
    border-top: 2px solid var(--filter-panel-border);
    border-bottom: 1px solid var(--filter-panel-border);
    background-color: var(--filter-panel-bg);
    display: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filter-panel.visible {
    display: block;
}

.filter-panel.filter-panel-inline {
    max-height: none;
    border-top: 0;
    border-bottom: 1px solid var(--filter-panel-border);
}

.filter-panel.filter-panel-inline .filter-panel-body.expanded {
    max-height: none;
    overflow: visible;
}

.filter-panel.collapsed {
    flex: 0 0 auto;
}

.filter-header {
    font-size: 14px;
    font-weight: 800;
    color: var(--filter-header-text);
    padding: 12px 15px;
    background: var(--filter-header-bg);
    border-bottom: 1px solid var(--filter-header-border);
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    border-left: none;
    border-right: none;
    cursor: pointer;
    text-align: left;
    appearance: none;
    letter-spacing: 0.01em;
    box-shadow: inset 4px 0 0 #090909;
}

.filter-header-icon {
    font-size: 16px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.filter-header-icon.collapsed {
    transform: rotate(-90deg);
}

.filter-panel-body {
    display: none;
}

.filter-panel-body.expanded {
    display: block;
    max-height: calc(45vh - 44px);
    overflow-y: auto;
}

.filter-section {
    background-color: var(--filter-section-bg);
    border-bottom: 1px solid var(--filter-section-border);
    transition: background-color 0.3s ease;
}

.filter-toggle {
    cursor: pointer;
    padding: 11px 15px;
    background-color: var(--filter-toggle-bg);
    border-bottom: 1px solid var(--filter-toggle-border);
    font-weight: 800;
    font-size: 14px;
    color: var(--filter-toggle-text);
    transition: all 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.filter-toggle:hover {
    background-color: var(--filter-toggle-hover-bg);
    color: var(--filter-toggle-hover-text);
}

.filter-toggle-icon {
    transition: transform 0.2s ease;
    font-size: 10px;
    color: var(--filter-toggle-icon);
}

.filter-toggle-icon.collapsed {
    transform: rotate(-90deg);
}

.filter-toggle-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

.filter-badge {
    background-color: var(--accent);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
}

.filter-content {
    padding: 10px 15px;
    display: none;
    background-color: var(--filter-content-bg);
    max-height: 280px;
    overflow-y: auto;
    transition: background-color 0.3s ease;
}

.filter-content.expanded {
    display: block;
    /* Show every option in the expanded filter — no inner scrollbar. */
    max-height: none;
    overflow: visible;
}

.filter-content.filter-content-choices.expanded {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: none;
    overflow: visible;
}

.filter-content::-webkit-scrollbar { width: 6px; }
.filter-content::-webkit-scrollbar-track { background: var(--filter-content-scrollbar-track); }
.filter-content::-webkit-scrollbar-thumb { background: var(--filter-content-scrollbar-thumb); border-radius: 3px; }
.filter-content::-webkit-scrollbar-thumb:hover { background: var(--filter-content-scrollbar-hover); }

.filter-checkbox-item {
    display: flex;
    align-items: center;
    padding: 4px 0;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--filter-checkbox-text);
}

.filter-checkbox-item:hover { color: var(--filter-checkbox-hover-text); }

.filter-checkbox-item input[type="checkbox"] {
    accent-color: var(--accent);
    margin: 0;
    cursor: pointer;
}

.filter-content-choices .filter-checkbox-item {
    justify-content: center;
    min-height: 34px;
    padding: 7px 8px;
    border: 1px solid var(--filter-toggle-border);
    border-radius: 4px;
    background: var(--filter-toggle-bg);
    text-align: center;
}

.filter-content-choices .filter-checkbox-item span {
    flex: 0 1 auto;
}

.filter-checkbox-item label {
    cursor: pointer;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-range-container { padding: 8px 0; }

.filter-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--filter-range-label-text);
    margin-bottom: 8px;
}

.filter-range-labels span {
    background: var(--filter-range-label-bg);
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.filter-range-slider {
    position: relative;
    height: 26px;
    --range-start: 0%;
    --range-end: 100%;
}

.filter-range-track,
.filter-range-fill {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 999px;
}

.filter-range-track {
    background: rgba(127, 127, 127, 0.22);
}

.filter-range-fill {
    left: var(--range-start);
    right: calc(100% - var(--range-end));
    background: var(--accent);
}

.filter-range-input {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    height: 26px;
    margin: 0;
    background: transparent;
    appearance: none;
    pointer-events: none;
    cursor: pointer;
}

.filter-range-input::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
}

.filter-range-input::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--filter-content-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    margin-top: -6px;
    pointer-events: auto;
}

.filter-range-input::-moz-range-track {
    height: 6px;
    background: transparent;
}

.filter-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--filter-content-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    pointer-events: auto;
}

.filter-range-input-min { z-index: 2; }
.filter-range-input-max { z-index: 3; }
.filter-range-input.active-thumb { z-index: 4; }

.filter-actions {
    padding: 12px 15px;
    background: var(--filter-actions-bg);
    border-top: 1px solid var(--filter-actions-border);
    display: flex;
    justify-content: center;
    gap: 15px;
    position: sticky;
    bottom: 0;
}

.filter-link {
    color: var(--filter-link-text);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.15s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
}

.filter-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.filter-link-sep {
    color: var(--filter-link-sep);
    font-size: 12px;
}

.filter-search-box {
    width: 100%;
    padding: 6px 10px;
    margin-bottom: 8px;
    border: 1px solid var(--filter-search-border);
    border-radius: 4px;
    font-size: 12px;
    background: var(--filter-search-bg);
    color: var(--filter-search-text);
    transition: border-color 0.15s ease;
}

.filter-search-box:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(91, 155, 213, 0.15);
}

.filter-search-box::placeholder { color: var(--filter-search-placeholder); }

/* ── Main Content Area ──────────────────────────────── */
.app-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--main-bg);
    transition: background-color 0.3s ease;
}

/* ── Right Ad Rail ──────────────────────────────────── */
.app-ad-rail {
    grid-area: adrail;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--sidebar-border);
}

.app-ad-rail[hidden] {
    display: none;
}

.app-ad-rail-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.app-ad-slot {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: #fff;
    color: #17120c;
    text-decoration: none;
    border: 2px solid rgba(255, 204, 0, 0.46);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

button.app-ad-slot {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.app-ad-slot:hover,
.app-ad-slot:focus-visible {
    outline: none;
    border-color: var(--orange);
    transform: translateY(-2px);
}

.app-ad-slot img {
    width: 100%;
    height: 210px;
    display: block;
    object-fit: contain;
    background: #f7f3ed;
}

.app-ad-slot:nth-child(3n + 1) {
    min-height: 320px;
}

.app-ad-slot:nth-child(3n + 1) img {
    height: 250px;
}

.app-ad-slot-label {
    display: inline-flex;
    width: fit-content;
    padding: 4px 7px;
    background: #000;
    color: #ffcc00;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-ad-slot-copy {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.app-ad-slot-copy strong {
    color: #17120c;
    font-size: 18px;
    line-height: 1.18;
}

.app-ad-slot-copy small {
    color: #5b5148;
    font-size: 12px;
    line-height: 1.4;
}

.app-ad-slot-description {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-ad-slot-manual,
.app-ad-slot-manual:nth-child(3n + 1) {
    min-height: 0;
    gap: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
}

.app-ad-slot-manual img,
.app-ad-slot-manual:nth-child(3n + 1) img {
    height: auto;
    min-height: 0;
    object-fit: contain;
    background: #fff;
}

/* ── Toolbar ────────────────────────────────────────── */
.app-toolbar {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background: var(--toolbar-bg);
    border-bottom: 1px solid var(--toolbar-border);
    gap: 10px;
    min-height: 44px;
    flex-shrink: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.view-toggle-group {
    display: flex;
    gap: 2px;
    background: var(--toggle-group-bg);
    padding: 3px;
    border-radius: 6px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--btn-text);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.view-btn:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-text);
}

.view-btn.active {
    background: var(--accent);
    color: white;
}

.view-btn.active:hover { background: var(--accent-hover); }
.view-btn svg { pointer-events: none; }
.view-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.toolbar-nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-nav-actions:empty,
.toolbar-nav-btn[hidden] {
    display: none;
}

.toolbar-nav-btn {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--grid-border);
    border-radius: 6px;
    background: var(--cell-bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.toolbar-nav-btn:hover,
.toolbar-nav-btn:focus-visible {
    outline: none;
    border-color: var(--orange);
    color: var(--text-primary);
}

.toolbar-nav-btn-primary {
    border-color: #ffcc00;
    background: #ffcc00;
    color: #17120c;
}

.toolbar-nav-btn-primary:hover,
.toolbar-nav-btn-primary:focus-visible {
    border-color: #ffcc00;
    background: #ffcc00;
    color: #17120c;
}

/* "Jämför produkter" lives on the top menu, right of the category title. */
.compare-toolbar-btn {
    min-height: 32px;
    margin-left: 12px;
    padding: 0 14px;
    border: 1px solid #510012;
    border-radius: 6px;
    background: #510012;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.compare-toolbar-btn:hover,
.compare-toolbar-btn:focus-visible {
    background: #6c0c1d;
    border-color: #6c0c1d;
}

.compare-toolbar-btn[hidden] {
    display: none;
}

.compare-view-btn.ready:not(.active) {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-count-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    display: none;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(238, 90, 90, 0.3);
    animation: badgePulse 0.3s ease;
}

.filter-count-badge.active { display: flex; }
.filter-count-badge::before { content: "\26A1"; font-size: 10px; }

@keyframes badgePulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.toolbar-search {
    flex: 0 1 250px;
    position: relative;
}

.toolbar-search input {
    width: 100%;
    padding: 6px 12px 6px 32px;
    background: var(--search-bg);
    border: 1px solid var(--search-border);
    border-radius: 4px;
    color: var(--search-text);
    font-size: 13px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.toolbar-search input:focus {
    outline: none;
    border-color: var(--accent);
}

.toolbar-search input::placeholder { color: var(--search-placeholder); }

.toolbar-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--search-icon);
    pointer-events: none;
    font-size: 13px;
}

.toolbar-zoom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.toolbar-zoom label {
    font-size: 11px;
    color: var(--toolbar-text);
}

.toolbar-zoom input[type="range"] {
    width: 100px;
    accent-color: var(--accent);
    cursor: pointer;
}

.toolbar-info {
    font-size: 12px;
    color: var(--toolbar-text);
    margin-left: 10px;
    white-space: nowrap;
}

.toolbar-info .toolbar-category {
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.toolbar-info .toolbar-count {
    font-size: 12px;
    margin-left: 6px;
}

/* Image lightbox for forum post/comment images */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.82);
    cursor: zoom-out;
}

.image-lightbox.hidden {
    display: none;
}

.image-lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
    background: #fff;
}

.image-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #17120c;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

body.image-lightbox-open {
    overflow: hidden;
}

.pro-forum-comment-image {
    display: block;
    margin-top: 6px;
    max-width: 220px;
    max-height: 160px;
    object-fit: cover;
    border: 1px solid var(--grid-border, rgba(0, 0, 0, 0.12));
    border-radius: 6px;
}

/* Start-page rating nudge ("OBS! glöm inte att betygsätta") */
/* Round "ball" popup with the rating reminder text. Brand-red circle with a
   white inner ring and centred white text. */
.rating-nudge {
    position: fixed;
    z-index: 1100;
    width: 340px;
    height: 340px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #510012;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.92), 0 18px 50px rgba(0, 0, 0, 0.35);
    /* corner default = bottom-left, over the category menu (never over the product rows). */
    left: 24px;
    bottom: 24px;
    right: auto;
    top: auto;
}

.rating-nudge-text {
    padding: 0 44px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Static, decorative "pretend" rating section (not interactive). */
.rating-nudge-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rating-nudge-score {
    font-size: 15px;
    font-weight: 800;
}

.rating-nudge-stars {
    font-size: 26px;
    letter-spacing: 3px;
    color: #f5b301;
    line-height: 1;
}

.rating-nudge-star-empty {
    color: rgba(255, 255, 255, 0.4);
}

/* Corner (category pages): a bit smaller so it doesn't dominate the menu. */
.rating-nudge.rating-nudge-corner {
    width: 260px;
    height: 260px;
    gap: 7px;
}

.rating-nudge.rating-nudge-corner .rating-nudge-text {
    padding: 0 30px;
    font-size: 15px;
    line-height: 1.15;
}

.rating-nudge.rating-nudge-corner .rating-nudge-score {
    font-size: 13px;
}

.rating-nudge.rating-nudge-corner .rating-nudge-stars {
    font-size: 22px;
}

/* Hero (start page): placed just below the tagline; left/top set inline. */
.rating-nudge.rating-nudge-hero {
    left: auto;
    bottom: auto;
    transform: translateX(-50%);
}

.rating-nudge-close {
    position: absolute;
    top: 13%;
    right: 13%;
    z-index: 1;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #510012;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 600px) {
    .rating-nudge,
    .rating-nudge.rating-nudge-corner { left: 8px; bottom: 8px; width: 220px; height: 220px; gap: 6px; }
    .rating-nudge .rating-nudge-text,
    .rating-nudge.rating-nudge-corner .rating-nudge-text { font-size: 14px; padding: 0 26px; line-height: 1.15; }
    .rating-nudge .rating-nudge-rate-label,
    .rating-nudge.rating-nudge-corner .rating-nudge-rate-label { font-size: 11px; }
    .rating-nudge .rating-nudge-select,
    .rating-nudge.rating-nudge-corner .rating-nudge-select { width: 74px; padding: 4px 8px; font-size: 13px; }
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: var(--toolbar-sep);
    margin: 0 4px;
}

.compare-tray {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--toolbar-sep);
    background: var(--toolbar-bg);
    flex-wrap: wrap;
}

.compare-tray.visible {
    display: flex;
}

.compare-tray-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--toolbar-text);
}

.compare-tray-products {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 320px;
}

.compare-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border: 1px solid var(--grid-border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-size: 12px;
}

.compare-pill-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-pill-remove {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

.compare-tray-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.compare-action-btn {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}

.compare-action-btn.secondary {
    background: transparent;
    color: var(--toolbar-text);
    border-color: var(--grid-border);
}

.compare-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.compare-diff-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--toolbar-text);
}

.compare-toggle {
    border: 1px solid var(--grid-border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.compare-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.compare-toggle.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.compare-toggle-header {
    margin-top: 6px;
}

.compare-toggle-card {
    margin-top: 4px;
}

.compare-toggle-row {
    margin-left: 10px;
}

/* ── Content Views Container ────────────────────────── */
.content-area {
    flex: 1;
    overflow: auto;
    position: relative;
}

/* ── Start Page ─────────────────────────────────────── */
.start-page {
    min-height: 100%;
    background: var(--main-bg);
}

.start-index-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 18px;
}

.start-index-layout.no-start-ads {
    grid-template-columns: minmax(0, 1fr);
}

.start-index-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.start-hero-stage {
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(7, 7, 7, 0.88) 0%, rgba(7, 7, 7, 0.58) 46%, rgba(7, 7, 7, 0.18) 100%),
        url('/Content/Images/firefly-workshop-hero.png') center top/cover no-repeat;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.16);
}

.start-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.start-hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.46) 100%);
}

.start-hero-dmh-logo {
    position: absolute;
    /* Anchored at the same top as the hero content so the DMH logo lines up with
       the "Verktygsguiden" title. */
    top: 38px;
    right: 24px;
    z-index: 2;
    width: min(158px, 18vw);
    height: 62px;
    background: url('/Content/Logos/DMH_white.png') center / contain no-repeat;
}

.start-hero-content {
    position: relative;
    z-index: 1;
    min-height: 420px;
    display: flex;
    align-items: flex-start;
    padding: 38px 42px 42px;
}

.start-hero-copy {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.start-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.start-hero h1 {
    margin: 0;
    font-size: clamp(52px, 5.5vw, 96px);
    line-height: 0.9;
    letter-spacing: 0;
    color: #fff;
    max-width: 12ch;
}

.start-hero-title-block {
    display: grid;
    align-items: center;
    max-width: none;
}

.start-hero-title-block p {
    width: 100%;
    margin: 0;
    padding: 0 0 0 14px;
    border-left: 4px solid var(--orange);
    color: #fff;
    font-size: clamp(15px, 1.4vw, 20px);
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
}

.start-hero-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    /* Extra breathing room so the intro text, search and tagline sit clear of the title. */
    margin-top: 30px;
}

.start-hero-tagline {
    max-width: none;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 3.2vw, 48px);
    font-style: italic;
    font-weight: 900;
    line-height: 1.02;
    text-align: center;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.58);
}

.start-hero-action-row {
    display: grid;
    grid-template-columns: minmax(250px, 0.95fr) minmax(320px, 1.25fr);
    gap: 16px;
    align-items: stretch;
    max-width: 900px;
}

.start-info-tile {
    display: flex;
    align-items: center;
    min-height: 70px;
    padding: 16px 18px;
    color: #fff;
    background: rgba(17, 17, 17, 0.58);
    border-left: 4px solid var(--orange);
    font-size: clamp(15px, 1.4vw, 19px);
    font-weight: 800;
    line-height: 1.25;
    backdrop-filter: blur(10px);
}

.start-search {
    display: flex;
    gap: 10px;
    min-height: 70px;
    margin: 0;
}

.start-search-centered {
    width: 100%;
    align-self: stretch;
}

.start-search input {
    flex: 1;
    min-width: 0;
    padding: 0 18px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
}

.start-search button {
    min-width: 128px;
    border: none;
    border-radius: 0;
    padding: 0 26px;
    background: var(--orange);
    color: #17120c;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.start-search button:hover,
.start-search button:focus-visible {
    outline: none;
    background: #ffcc00;
}

.start-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.start-stat-row > div {
    min-width: 118px;
    padding: 10px 0;
    background: transparent;
    backdrop-filter: blur(8px);
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.start-stat-row strong {
    color: #fff;
    font-size: 21px;
}

.start-stat-row span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.start-carousel-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 42px 30px;
}

.start-hero-stage .start-section-header span {
    color: rgba(255, 255, 255, 0.7);
}

.start-hero-stage .start-section-header h2 {
    color: #fff;
}

.start-carousel-viewport {
    overflow: hidden;
    border-top: 1px solid var(--grid-border);
    border-bottom: 1px solid var(--grid-border);
    background: rgba(255, 255, 255, 0.94);
}

.start-carousel-track {
    display: flex;
    width: max-content;
    /* No horizontal padding and a per-card trailing margin (instead of gap) so the
       track width is an exact multiple of the card pitch — translateX(-50%) then lands
       precisely on the duplicated copy and the loop has no seam stutter/gray sliver. */
    padding: 18px 0;
    animation: startCarousel 42s linear infinite;
}

.start-carousel-viewport:hover .start-carousel-track {
    animation-play-state: paused;
}

@keyframes startCarousel {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.latest-product-card {
    position: relative;
    flex: 0 0 240px;
    margin-right: 14px;
    min-height: 252px;
    border: 1px solid var(--grid-border);
    background: color-mix(in srgb, var(--cell-bg) 94%, #fff 6%);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.latest-product-card:hover,
.latest-product-card:focus-visible {
    outline: none;
    transform: translateY(-3px);
    border-color: var(--orange);
}

.latest-product-media {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.latest-product-image {
    max-width: 100%;
    max-height: 126px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.latest-product-placeholder {
    color: #777;
    font-size: 12px;
    font-weight: 800;
}

.latest-product-logo {
    position: absolute;
    right: 10px;
    bottom: 10px;
    max-width: 82px;
    max-height: 34px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.84);
    padding: 4px 6px;
}

.latest-product-copy {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 13px 14px 16px;
}

.latest-product-copy strong {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.25;
}

.latest-product-copy small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.35;
}

.latest-product-new {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    background: var(--orange);
    color: #17120c;
    font-size: 11px;
    font-weight: 900;
}

.start-ad-rail {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.start-ad-placement {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: #fff;
    color: #17120c;
    text-decoration: none;
    border: 2px solid rgba(255, 204, 0, 0.46);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.start-ad-placement:hover {
    border-color: var(--orange);
}

.start-ad-placement img {
    width: 100%;
    min-height: 130px;
    max-height: 190px;
    display: block;
    object-fit: cover;
}

.start-ad-label {
    display: inline-flex;
    width: fit-content;
    padding: 4px 7px;
    background: #000;
    color: var(--orange);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.start-ad-copy {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.start-ad-copy strong {
    color: #17120c;
    font-size: 18px;
    line-height: 1.18;
}

.start-ad-copy span {
    color: #5b5148;
    font-size: 12px;
}

.start-ad-copy small {
    color: #4c443d;
    font-size: 12px;
    line-height: 1.45;
}

.start-ad-placement:nth-child(3n + 1) {
    min-height: 320px;
}

.start-ad-placement:nth-child(3n + 1) img {
    max-height: 240px;
}

.start-workspace {
    padding: 0 0 18px;
}

.start-main-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.start-section-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.start-section-header span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.start-section-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    color: var(--text-primary);
}

.start-section-header-plate {
    width: 100%;
    padding: 14px 16px;
    background: #510012;
    color: #fff;
}

.start-section-header-plate span,
.start-section-header-plate h2,
.start-section-header-plate p {
    color: #fff;
}

.start-section-header-plate p {
    margin: 0;
}

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

.start-category-chip,
.start-feature-row,
.start-filter-chip {
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.start-category-chip {
    padding: 16px;
    border: 1px solid var(--grid-border);
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(255, 204, 0, 0.12), transparent 60%),
        var(--cell-bg);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.start-category-chip strong {
    font-size: 15px;
    color: var(--text-primary);
}

.start-category-chip span {
    font-size: 12px;
    color: var(--text-muted);
}

.start-category-chip:hover,
.start-feature-row:hover,
.start-filter-chip:hover {
    transform: translateY(-2px);
    border-color: var(--orange);
}

.start-feature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.start-feature-row {
    border: 1px solid var(--grid-border);
    background: var(--cell-bg);
    border-radius: 0;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.start-feature-rank {
    width: 36px;
    height: 36px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 204, 0, 0.12);
    color: var(--orange);
    font-weight: 700;
}

.start-feature-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.start-feature-copy strong {
    color: var(--text-primary);
    font-size: 15px;
}

.start-feature-copy small {
    color: var(--text-muted);
    font-size: 12px;
}

.start-feature-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.start-selected-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 0;
    background: rgba(255, 204, 0, 0.08);
}

.start-selected-filter button {
    border: none;
    background: transparent;
    color: var(--orange);
    cursor: pointer;
    font-weight: 700;
}

.pro-forum-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.pro-forum-column,
.pro-forum-empty-column {
    min-width: 0;
    min-height: 520px;
}

.pro-forum-header p {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.pro-forum-compose {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    padding: 14px;
    border: 1px solid var(--grid-border);
    background: var(--cell-bg);
}

.pro-forum-compose textarea,
.pro-forum-compose input,
.pro-forum-search input,
.pro-forum-comment-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--grid-border);
    border-radius: 0;
    background: var(--input-bg, var(--cell-bg));
    color: var(--text-primary);
    font: inherit;
}

.pro-forum-compose textarea {
    resize: vertical;
    min-height: 86px;
    padding: 12px;
}

.pro-forum-compose textarea::placeholder {
    color: color-mix(in srgb, var(--text-muted) 72%, transparent);
}

.pro-forum-compose-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pro-forum-compose-grid input,
.pro-forum-search input,
.pro-forum-comment-form input {
    min-height: 38px;
    padding: 0 10px;
}

.pro-forum-search input {
    min-height: 46px;
    padding: 0 14px;
    border-width: 2px;
    box-shadow: inset 4px 0 0 var(--orange);
    font-weight: 700;
}

.pro-forum-search input::placeholder {
    color: color-mix(in srgb, var(--text-secondary) 86%, transparent);
    font-weight: 800;
}

.pro-forum-file {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--grid-border);
    background: var(--input-bg, var(--cell-bg));
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.pro-forum-file input {
    min-height: 0;
    padding: 0;
    border: 0;
    font-size: 12px;
}

.pro-forum-compose-actions,
.pro-forum-search,
.pro-forum-comment-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pro-forum-compose-actions span {
    flex: 1;
    min-width: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.pro-forum-compose-actions button,
.pro-forum-search button,
.pro-forum-comment-form button,
.pro-forum-more {
    min-height: 38px;
    border: 0;
    border-radius: 0;
    background: var(--orange);
    color: #17120c;
    font-weight: 900;
    cursor: pointer;
}

.pro-forum-compose-actions button,
.pro-forum-search button,
.pro-forum-comment-form button {
    padding: 0 16px;
}

.pro-forum-search {
    margin-top: 12px;
    align-items: stretch;
}

.pro-forum-feed {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.pro-forum-post {
    border: 1px solid var(--grid-border);
    background: var(--cell-bg);
}

.pro-forum-post-main {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
}

.pro-forum-post-image {
    width: 132px;
    height: 132px;
    object-fit: cover;
    background: var(--cell-bg-alt);
}

.pro-forum-post-copy {
    min-width: 0;
}

.pro-forum-post-meta,
.pro-forum-post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pro-forum-post-meta strong {
    color: var(--text-primary);
    font-size: 13px;
}

.pro-forum-post-meta span {
    color: var(--text-muted);
    font-size: 11px;
}

.pro-forum-post-title {
    display: inline-flex;
    width: fit-content;
    margin-top: 6px;
    padding: 4px 7px;
    background: #000;
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
}

.pro-forum-post p {
    margin: 8px 0 10px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pro-forum-post-actions button {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.pro-forum-comments {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--grid-border);
}

.pro-forum-comment-list {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.pro-forum-comment {
    padding: 9px 10px;
    background: var(--cell-bg-alt);
}

.pro-forum-comment strong,
.pro-forum-comment span {
    display: inline-block;
}

.pro-forum-comment strong {
    margin-right: 8px;
    color: var(--text-primary);
    font-size: 12px;
}

.pro-forum-comment span,
.pro-forum-comment-empty,
.pro-forum-empty {
    color: var(--text-muted);
    font-size: 12px;
}

.pro-forum-comment p {
    margin: 5px 0 0;
    font-size: 13px;
}

.pro-forum-comment-form {
    align-items: stretch;
}

.pro-forum-comment-form input[name="authorName"] {
    flex: 0 0 128px;
}

.pro-forum-comment-form input[name="body"] {
    flex: 1;
}

.pro-forum-more {
    width: 100%;
    font-size: 20px;
}

.pro-forum-empty {
    padding: 18px;
    border: 1px solid var(--grid-border);
    background: var(--cell-bg);
}

.pro-forum-empty-column {
    border-left: 1px solid var(--grid-border);
    opacity: 0.35;
}

/* ══════════════════════════════════════════════════════
   VERTICAL GRID VIEW
   Legacy: RecordWidth=240, HeaderAreaWidth=150
   ══════════════════════════════════════════════════════ */
.vertical-grid-container {
    overflow: auto;
    height: 100%;
    padding: 0;
}

.vertical-grid {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.vertical-grid th,
.vertical-grid td {
    border: 1px solid var(--grid-border);
    padding: 6px 10px;
    font-size: 13px;
    vertical-align: middle;
}

/* ── Corner cell ──────────────────────────────────── */
.vertical-grid .vg-corner {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 20;
    background: var(--grid-corner-bg);
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    border-bottom: 2px solid var(--grid-header-border);
}

/* ── Product column headers ───────────────────────── */
.vertical-grid .vg-product-col {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--grid-header-bg);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 8px;
    border-bottom: 2px solid var(--grid-header-border);
    width: 240px;
    min-width: 240px;
}

/* Product header: image + logo + model stacked */
.vg-product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.vg-product-image {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 140px;
    padding: 5px;
}

.vg-product-image img {
    max-width: 180px;
    max-height: 130px;
    object-fit: contain;
    border-radius: 3px;
}

.vg-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    padding: 2px;
}

.vg-logo img {
    max-width: 120px;
    max-height: 36px;
    object-fit: contain;
    opacity: 0.85;
}

.vg-model-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--model-text);
    text-align: center;
    line-height: 1.3;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vg-manufacturer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

/* ── Row headers (spec names) ─────────────────────── */
.vertical-grid .vg-row-header {
    position: sticky;
    left: 0;
    z-index: 5;
    background: var(--row-header-bg);
    color: var(--row-header-text);
    font-weight: 500;
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    padding: 7px 12px;
}

.vg-unit {
    color: var(--unit-text);
    font-weight: 400;
}

/* ── Data cells ───────────────────────────────────── */
.vertical-grid .vg-cell {
    background: var(--cell-bg);
    color: var(--cell-text);
    text-align: center;
    font-size: 13px;
    padding: 7px 10px;
}

.vertical-grid .vg-cell-center {
    text-align: center;
}

.vertical-grid .vg-cell-bold {
    font-weight: 700;
    font-size: 14px;
}

/* Alternating row colors */
.vertical-grid tbody tr:nth-child(even) .vg-cell {
    background: var(--cell-bg-alt);
}

.vertical-grid tbody tr:nth-child(even) .vg-row-header {
    background: var(--row-header-bg-alt);
}

/* Hover highlight */
.vertical-grid tbody tr:hover .vg-cell {
    background: var(--cell-hover);
}

.vertical-grid tbody tr:hover .vg-row-header {
    background: var(--cell-hover);
    color: var(--text-strong);
}

/* Special rows */
.vg-row-price .vg-row-header {
    font-weight: 700;
    color: var(--price-gold);
}

.vg-row-link .vg-row-header {
    color: var(--orange);
}

.compare-grid-container {
    overflow: auto;
    height: 100%;
}

.compare-row-different .vg-row-header {
    color: var(--accent);
    font-weight: 700;
}

.compare-cell-different {
    background: rgba(255, 204, 0, 0.12) !important;
}

.compare-grid .vg-cell {
    text-align: center;
}

.compare-grid .vg-row-header,
.compare-grid .vg-corner,
.compare-grid .compare-product-col {
    text-align: center;
}

.compare-diff-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
}

/* ══════════════════════════════════════════════════════
   CELL TEMPLATE STYLES (shared across views)
   ══════════════════════════════════════════════════════ */

/* Empty cell dash */
.cell-empty {
    color: var(--empty-cell);
    font-style: italic;
}

/* Price: gold color, bold */
.cell-price {
    font-weight: 700;
    color: var(--price-gold);
    white-space: nowrap;
}

/* Checkmark */
.cell-check {
    color: var(--check-green);
    font-size: 16px;
    font-weight: 700;
}

/* Unchecked X */
.cell-uncheck {
    color: var(--text-faint);
    font-size: 14px;
}

/* Bold text (legacy: "BoldCell" / TextStyling / Fetstil) */
.cell-bold {
    font-weight: 700;
    font-size: 14px;
}

/* Model name in the row grid: bold (original 14px size). */
.hg-td-model .cell-bold {
    font-size: 14px;
    font-weight: 800;
}

/* Memo (scrollable long text, legacy: 90px panel) */
.cell-memo {
    max-height: 90px;
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
    padding: 2px 0;
}

.cell-memo::-webkit-scrollbar { width: 4px; }
.cell-memo::-webkit-scrollbar-thumb { background: var(--memo-scrollbar); border-radius: 2px; }

/* Image cell (legacy: 200px container, centered) */
.cell-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4px;
}

.cell-image img {
    max-width: 180px;
    max-height: 120px;
    object-fit: contain;
    border-radius: 3px;
}

/* Logo cell (legacy: max 140x60, centered) */
.cell-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
}

.cell-logo img {
    max-width: 140px;
    max-height: 60px;
    object-fit: contain;
}

/* URL link button ("Länk till produkten") */
.cell-link-btn {
    display: inline-block;
    background-color: var(--link-brown);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    border: none;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.cell-link-btn:hover {
    background-color: var(--link-brown-hover);
    color: #fff;
    text-decoration: none;
}

/* Star rating */
.cell-rating {
    color: var(--price-gold);
    font-size: 16px;
    letter-spacing: 2px;
}

/* ══════════════════════════════════════════════════════
   PAGER
   ══════════════════════════════════════════════════════ */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    background: var(--pager-bg);
    border-top: 1px solid var(--pager-border);
    flex-shrink: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.pager button {
    background: var(--pager-btn-bg);
    color: var(--pager-btn-text);
    border: 1px solid var(--pager-btn-border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 36px;
}

.pager button:hover {
    background: var(--pager-btn-hover-bg);
    color: var(--pager-btn-hover-text);
    border-color: var(--accent);
}

.pager button.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.pager button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pager .pager-info {
    font-size: 12px;
    color: var(--pager-info);
    margin: 0 10px;
}

.pager .pager-ellipsis {
    color: var(--pager-ellipsis);
    font-size: 14px;
    padding: 0 4px;
}

/* ══════════════════════════════════════════════════════
   CARD VIEW (legacy: ConsumerCards.aspx)
   4-column grid, image + overlay, hover zoom
   ══════════════════════════════════════════════════════ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px;
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 7px;
    box-shadow: 0 4px 8px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--card-bg);
    cursor: pointer;
    height: 380px;
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px var(--card-hover-shadow);
}

/* Image area */
.card .card-image-area {
    width: 100%;
    height: 100%;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: var(--card-image-bg);
}

.card .card-image-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.card:hover .card-image-area img {
    transform: scale(1.15);
}

.card .card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--card-no-image);
    font-size: 48px;
    width: 100%;
    height: 100%;
}

/* Top info bar (always visible) */
.card .card-infoheader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: var(--card-infoheader-bg);
    padding: 10px 12px;
    text-align: center;
    backdrop-filter: blur(2px);
}

.card .card-infoheader-text {
    color: var(--card-infoheader-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

/* Hover overlay (details) */
.card .card-overlay {
    position: absolute;
    top: 38px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-overlay-bg);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 15px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card .card-overlay-logo {
    max-width: 100px;
    max-height: 36px;
    object-fit: contain;
    opacity: 0.9;
}

.card .card-overlay-model {
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

.card .card-overlay-price {
    color: var(--price-gold);
    font-size: 16px;
    font-weight: 700;
}

.card .card-overlay-desc {
    color: var(--card-overlay-text);
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
    max-height: 56px;
    overflow: hidden;
}

.card .card-overlay-link {
    display: inline-block;
    background-color: var(--link-brown);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 4px;
    transition: background-color 0.2s;
}

.card .card-overlay-link:hover {
    background-color: var(--link-brown-hover);
    color: #fff;
}

.guide-package-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    margin: 4px 0 0 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 204, 0, 0.14);
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.guide-package-badge-3 {
    background: #211a14;
    color: #ffcc00;
}

.card.guide-package-small,
.card.guide-package-large {
    border: 1px solid rgba(255, 204, 0, 0.32);
}

.card.guide-package-large {
    box-shadow: 0 10px 26px rgba(255, 204, 0, 0.2), 0 4px 8px var(--card-shadow);
}

.card.guide-package-none {
    cursor: default;
}

/* ══════════════════════════════════════════════════════
   HORIZONTAL GRID VIEW (legacy: ConsumerGrid2.aspx)
   Products as rows, specs as columns, sortable
   ══════════════════════════════════════════════════════ */
.horizontal-grid-container {
    overflow: auto;
    height: 100%;
}

.cross-category-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--grid-border);
    background: var(--cell-bg);
}

.cross-category-header span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.cross-category-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1.2;
}

.cross-category-header strong {
    color: var(--text-primary);
    font-size: 13px;
    white-space: nowrap;
}

.cross-category-header + .horizontal-grid-container {
    height: calc(100% - 78px);
}

.horizontal-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.horizontal-grid th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--grid-header-bg);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 13px;
    padding: 10px 12px;
    text-align: center;
    border-bottom: 2px solid var(--grid-header-border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background-color 0.15s;
}

.horizontal-grid th:hover {
    background: var(--cell-hover);
    color: var(--text-strong);
}

.horizontal-grid th .sort-icon {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.4;
}

.horizontal-grid th .sort-icon.active {
    opacity: 1;
    color: var(--accent);
}

.horizontal-grid th.sorted {
    color: var(--accent);
}

.horizontal-grid td {
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 400;
    color: var(--cell-text);
    border-bottom: 1px solid var(--grid-border);
    background: var(--cell-bg);
    vertical-align: middle;
    text-align: center;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fixed column widths */
.horizontal-grid .hg-th-img { width: 100px; cursor: default; }
.horizontal-grid .hg-td-img { width: 100px; text-align: center; }
.horizontal-grid .hg-td-mfr { width: 120px; }
.horizontal-grid .hg-td-model { white-space: normal; overflow-wrap: anywhere; hyphens: auto; }
.horizontal-grid .hg-td-price { white-space: nowrap; }
.horizontal-grid .hg-td-link { text-align: center; }

/* Compare gets its own fixed column so the buttons align vertically across rows. */
.horizontal-grid .hg-th-compare,
.horizontal-grid .hg-td-compare { width: 1%; white-space: nowrap; text-align: center; }
.horizontal-grid .hg-td-compare .compare-toggle { margin: 0; }

.horizontal-grid tbody tr {
    transition: background-color 0.1s;
}

.horizontal-grid tbody tr.product-row {
    cursor: pointer;
}

.horizontal-grid tbody tr:nth-child(even) td {
    background: var(--cell-bg-alt);
}

.horizontal-grid tbody tr:hover td {
    background: var(--cell-hover);
}

/* Brand-red styling applies ONLY to Lilla paketet (small) and Stora paketet (large)
   rows. No package / Grundpaket rows stay white as before. */
.horizontal-grid tbody tr.guide-package-small td,
.horizontal-grid tbody tr.guide-package-large td {
    background: #510012;
    color: #fff;
    font-weight: 700;
    border-bottom-color: #510012;
}

/* Inner spans/links carry their own colours (gold price, muted "Övrigt"/guide text,
   accent links) — force them all to bold white on package rows too. */
.horizontal-grid tbody tr.guide-package-small td .cell-price,
.horizontal-grid tbody tr.guide-package-large td .cell-price,
.horizontal-grid tbody tr.guide-package-small td .guide-row-message,
.horizontal-grid tbody tr.guide-package-large td .guide-row-message,
.horizontal-grid tbody tr.guide-package-small td a,
.horizontal-grid tbody tr.guide-package-large td a {
    color: #fff;
    font-weight: 700;
}

.horizontal-grid tbody tr.guide-package-small:hover td,
.horizontal-grid tbody tr.guide-package-large:hover td {
    background: #6c0c1d;
}

/* Only image + logo stay white (framed in brand red) within colored rows; the model
   column and all other property cells are brand red with white text. */
.horizontal-grid tbody tr.guide-package-small td.hg-td-img,
.horizontal-grid tbody tr.guide-package-small td.hg-td-mfr,
.horizontal-grid tbody tr.guide-package-large td.hg-td-img,
.horizontal-grid tbody tr.guide-package-large td.hg-td-mfr {
    background: #fff;
    color: #17120c;
    border-top: 2px solid #510012;
    border-bottom: 2px solid #510012;
}

.horizontal-grid tbody tr.guide-package-small:hover td.hg-td-img,
.horizontal-grid tbody tr.guide-package-small:hover td.hg-td-mfr,
.horizontal-grid tbody tr.guide-package-large:hover td.hg-td-img,
.horizontal-grid tbody tr.guide-package-large:hover td.hg-td-mfr {
    background: #efefef;
}

.horizontal-grid tbody tr.guide-package-small td.hg-td-img,
.horizontal-grid tbody tr.guide-package-large td.hg-td-img {
    border-left: 2px solid #510012;
}

.horizontal-grid tbody tr.guide-package-small td.hg-td-mfr,
.horizontal-grid tbody tr.guide-package-large td.hg-td-mfr {
    border-right: 2px solid #510012;
}

/* Package products: taller rows. */
.horizontal-grid tbody tr.guide-package-small td {
    padding-top: 22px;
    padding-bottom: 22px;
}

.horizontal-grid tbody tr.guide-package-large td {
    padding-top: 34px;
    padding-bottom: 34px;
}

/* Product image in horizontal row */
.hg-product-img {
    max-width: 80px;
    max-height: 70px;
    object-fit: contain;
    border-radius: 3px;
    vertical-align: middle;
}

/* Manufacturer logo in horizontal row */
.hg-logo-img {
    max-width: 90px;
    max-height: 36px;
    object-fit: contain;
    opacity: 0.85;
    vertical-align: middle;
}

.guide-package-small .hg-product-img {
    max-height: 110px;
}

.guide-package-large .hg-product-img {
    max-width: 150px;
    max-height: 150px;
}

.guide-package-large .hg-td-img {
    width: 150px;
}

.guide-row-message {
    margin-top: 7px;
    max-width: 42ch;
    color: #5b5148;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    /* Wrap/hyphenate so "Övrigt" fits the column, clamped to the row height. */
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vg-product-col.guide-package-small,
.vg-product-col.guide-package-large {
    box-shadow: inset 0 -3px 0 rgba(255, 204, 0, 0.42);
}

.vg-product-col.guide-package-large {
    background: color-mix(in srgb, var(--grid-header-bg) 82%, #ffcc00 18%);
}

.horizontal-grid td a {
    color: var(--accent);
    text-decoration: none;
}

.horizontal-grid td a.cell-link-btn {
    color: #fff;
}

.horizontal-grid td a:hover {
    text-decoration: underline;
}

.horizontal-grid td a.cell-link-btn:hover {
    color: #fff;
    text-decoration: none;
}

/* ══════════════════════════════════════════════════════
   PRODUCT DETAIL POPUP
   ══════════════════════════════════════════════════════ */
body.product-popup-open {
    overflow: hidden;
}

.product-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
}

.product-popup-overlay.hidden {
    display: none;
}

.product-popup {
    position: relative;
    width: min(1180px, calc(100vw - 32px));
    max-height: calc(100vh - 44px);
    overflow: auto;
    color: #251f17;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.98), transparent 36%),
        radial-gradient(circle at 78% 92%, rgba(255, 204, 0, 0.2), transparent 42%),
        linear-gradient(180deg, #fff 0%, #fff 42%, #fbf5eb 74%, #efdcc1 100%);
    border: 1px solid rgba(130, 96, 54, 0.28);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .product-popup {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.98), transparent 36%),
        radial-gradient(circle at 78% 92%, rgba(255, 204, 0, 0.2), transparent 42%),
        linear-gradient(180deg, #fff 0%, #fff 42%, #fbf5eb 74%, #efdcc1 100%);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.product-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b3c2c;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(105, 78, 44, 0.18);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.product-popup-close:hover,
.product-popup-close:focus-visible {
    color: #140f0a;
    background: #fff;
    border-color: var(--orange);
    outline: none;
}

.product-popup-hero {
    display: grid;
    grid-template-columns: 500px minmax(0, 1fr);
    gap: 42px;
    padding: 32px 44px 28px;
    border-bottom: 1px solid rgba(130, 96, 54, 0.14);
}

.product-popup-media {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.product-popup-image {
    width: 100%;
    max-width: 500px;
    max-height: 410px;
    object-fit: contain;
    /* Multiply lets white-background product photos blend into the white panel.
       No drop-shadow: the shadow framed rectangular (non-cut-out) photos. */
    mix-blend-mode: multiply;
}

.product-popup-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 160px;
    color: #8a7254;
    border: 1px dashed rgba(130, 96, 54, 0.24);
    border-radius: 12px;
    font-size: 13px;
}

.product-popup-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 76px 0 34px;
}

.product-popup-nav-btn {
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid rgba(105, 78, 44, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #493a29;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.product-popup-nav-btn:hover,
.product-popup-nav-btn:focus-visible {
    outline: none;
    border-color: var(--orange);
    background: #fff;
    color: #17120c;
}

.product-popup-nav-btn-primary {
    border-color: #ffcc00;
    background: #ffcc00;
    color: #17120c;
}

.product-popup-nav-btn-primary:hover,
.product-popup-nav-btn-primary:focus-visible {
    border-color: #ffcc00;
    background: #ffcc00;
    color: #17120c;
}

.toolbar-henrik-btn {
    min-height: 32px;
    padding: 0 14px;
    border: 1px solid rgba(255, 204, 0, 0.4);
    border-radius: 6px;
    background: rgba(255, 204, 0, 0.12);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toolbar-henrik-btn:hover,
.toolbar-henrik-btn:focus-visible {
    outline: none;
    border-color: var(--orange);
    background: var(--orange);
    color: #17120c;
}

.product-popup-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding-right: 38px;
}

.product-popup-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.product-popup-title-block {
    min-width: 0;
}

.product-popup-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 4px 7px;
    background: #000;
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-popup-summary h2 {
    margin: 0;
    color: #16110b;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.product-popup-logo {
    display: block;
    flex: 0 0 auto;
    max-width: 188px;
    max-height: 86px;
    object-fit: contain;
    margin: 0 auto;
    filter: none;
}

.product-popup-badge {
    width: fit-content;
    margin: 14px 0 0;
}

.product-popup-title-block .guide-package-badge {
    margin-left: 0;
    margin-top: 12px;
}

.product-popup-price {
    margin-top: 16px;
    color: var(--price-gold);
    font-size: 26px;
    font-weight: 800;
}

.product-popup-inline-description {
    max-width: 720px;
    margin-top: 12px;
    color: #332719;
    font-size: 14px;
    line-height: 1.55;
}

.product-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.product-popup-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    color: #fff;
    background: var(--link-brown);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.product-popup-source:hover {
    background: var(--link-brown-hover);
    color: #fff;
    text-decoration: none;
}

.product-popup-link-box {
    border-radius: 8px;
    min-height: 44px;
    padding: 0 20px;
}

.product-popup-section {
    padding: 26px 34px;
    border-bottom: 1px solid rgba(130, 96, 54, 0.14);
}

.product-popup-section:last-child {
    border-bottom: 0;
}

.product-popup-section h3 {
    margin: 0 0 16px;
    color: #2b2117;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-popup-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-popup-spec {
    min-width: 0;
    padding: 13px 14px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(130, 96, 54, 0.16);
    border-radius: 12px;
}

.product-popup-spec-label {
    color: #806748;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-popup-spec-value {
    color: #281f15;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.product-popup-empty-value {
    color: #9b8364;
}

.product-popup-spec-value .cell-link-btn {
    display: inline-flex;
    margin-top: 2px;
}

.compatibility-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.compatibility-item {
    min-width: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(80, 110, 78, 0.2);
    border-radius: 8px;
}

.compatibility-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.compatibility-name {
    color: #2b2117;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-decoration: none;
}

a.compatibility-name:hover,
.compatibility-name-link:hover {
    color: #7a4b19;
    text-decoration: underline;
}

.compatibility-name-link {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.compatibility-meta {
    margin-top: 6px;
    color: #6f604e;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.compatibility-badge {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(80, 110, 78, 0.12);
    color: #42603c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Battery/machine compatibility cards: white box with a thumbnail next to the model. */
.compatibility-item-media {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
}

.compatibility-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(80, 110, 78, 0.16);
    border-radius: 6px;
}

.compatibility-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.compatibility-thumb-placeholder {
    color: #9a8a6f;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
}

.compatibility-body {
    flex: 1 1 auto;
    min-width: 0;
}

.product-popup-text {
    color: #332719;
    font-size: 14px;
    line-height: 1.65;
    white-space: normal;
}

.product-popup-ai {
    padding: 16px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(130, 96, 54, 0.2);
    border-radius: 14px;
}

.product-popup-ai-empty {
    color: #776248;
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(130, 96, 54, 0.16);
}

.product-popup-ai-loading,
.product-popup-ai-source {
    background: rgba(255, 248, 235, 0.72);
    border-color: rgba(255, 204, 0, 0.28);
}

.product-popup-ai-label {
    color: #2b2117;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-popup-ai p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   LOADING OVERLAY
   ══════════════════════════════════════════════════════ */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--loading-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-overlay.hidden { display: none; }

.loading-spinner {
    border: 5px solid var(--loading-spinner-bg);
    border-top: 5px solid var(--accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--loading-text);
    font-size: 14px;
    margin-top: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Empty State ────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--empty-text);
    gap: 12px;
    padding: 40px;
}

.empty-state-icon { font-size: 48px; opacity: 0.5; }
.empty-state-text { font-size: 16px; }
.empty-state-hint { font-size: 13px; color: var(--empty-hint); }

/* ── "Ny 2025" badge ────────────────────────────────── */
.badge-new {
    display: inline-block;
    background: var(--check-green);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* ── Scrollbars ─────────────────────────────────────── */
.app-sidebar::-webkit-scrollbar,
.category-tree::-webkit-scrollbar,
.app-ad-rail::-webkit-scrollbar,
.filter-panel-body::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-track,
.category-tree::-webkit-scrollbar-track,
.app-ad-rail::-webkit-scrollbar-track,
.filter-panel-body::-webkit-scrollbar-track { background: var(--sidebar-scrollbar-track); }
.app-sidebar::-webkit-scrollbar-thumb,
.category-tree::-webkit-scrollbar-thumb,
.app-ad-rail::-webkit-scrollbar-thumb,
.filter-panel-body::-webkit-scrollbar-thumb { background: var(--sidebar-scrollbar-thumb); border-radius: 3px; }
.app-sidebar::-webkit-scrollbar-thumb:hover,
.category-tree::-webkit-scrollbar-thumb:hover,
.app-ad-rail::-webkit-scrollbar-thumb:hover,
.filter-panel-body::-webkit-scrollbar-thumb:hover { background: var(--sidebar-scrollbar-hover); }

.content-area::-webkit-scrollbar,
.vertical-grid-container::-webkit-scrollbar,
.horizontal-grid-container::-webkit-scrollbar { width: 8px; height: 8px; }
.content-area::-webkit-scrollbar-track,
.vertical-grid-container::-webkit-scrollbar-track,
.horizontal-grid-container::-webkit-scrollbar-track { background: var(--scrollbar-track); }
.content-area::-webkit-scrollbar-thumb,
.vertical-grid-container::-webkit-scrollbar-thumb,
.horizontal-grid-container::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
.content-area::-webkit-scrollbar-thumb:hover,
.vertical-grid-container::-webkit-scrollbar-thumb:hover,
.horizontal-grid-container::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }

.app-ad-slot-large-package,
.app-ad-slot-large-package:hover,
.app-ad-slot-large-package:focus-visible {
    border-color: transparent;
    box-shadow: none;
    background: #fff;
    transform: none;
}

.app-ad-slot-large-package img {
    background: #fff;
}

.start-ad-placement,
.start-ad-placement:hover {
    border-color: transparent;
    box-shadow: none;
    background: #fff;
}

.table-ad-row td,
.horizontal-grid tbody tr.table-ad-row:hover td,
.horizontal-grid tbody tr.table-ad-row:nth-child(even) td {
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid var(--grid-border);
}

.table-ad-banner {
    display: block;
    width: 100%;
    min-height: 96px;
    border: 1px solid rgba(30, 38, 46, 0.08);
    background: #fff;
    overflow: hidden;
}

.table-ad-banner img {
    display: block;
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    background: #fff;
}

.pro-forum-search-back,
.pro-forum-empty-back {
    border: 0;
    background: #050505;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.pro-forum-search-back {
    min-height: 42px;
    padding: 0 16px;
}

.pro-forum-empty-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: 12px;
    padding: 0 14px;
}

.pro-forum-comment-reply {
    margin-left: 28px;
    border-left: 3px solid #ffcc00;
}

.pro-forum-comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.pro-forum-comment-actions button,
.pro-forum-post-actions button {
    border: 0;
    background: #050505;
    color: #fff;
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.pro-forum-comment-form input[readonly] {
    background: #f3f3f3;
    color: #555;
}

.product-popup-hero {
    grid-template-columns: minmax(360px, 500px) minmax(0, 1fr) minmax(220px, 260px);
}

.product-popup-summary {
    padding-right: 0;
}

.product-popup-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-self: center;
    min-width: 0;
}

.product-popup-side-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.product-popup-side-logo-empty {
    background: #fff;
}

.product-popup-logo-fallback {
    color: #1f2933;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.product-popup-buy-box,
.product-popup-rating-box {
    display: grid;
    gap: 10px;
    padding: 15px;
    border: 1px solid rgba(212, 143, 32, 0.32);
    border-radius: 8px;
    background: #fff6d8;
}

.product-popup-rating-box {
    background: #fff;
    border-color: rgba(31, 41, 51, 0.12);
}

.product-popup-side-label {
    color: #3c3324;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.product-popup-side-body {
    display: grid;
    gap: 8px;
    color: #5a4a30;
    font-size: 13px;
    line-height: 1.35;
}

.buy-retailer-link {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid rgba(155, 102, 16, 0.24);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.38);
    color: #4d3504;
    font-weight: 800;
    text-decoration: none;
}

.buy-retailer-link:hover {
    border-color: rgba(155, 102, 16, 0.48);
    background: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.buy-retailer-logo-link {
    min-height: 68px;
    padding: 10px;
    background: #fff;
    border-color: transparent;
    box-shadow: none;
}

.buy-retailer-logo-link img {
    max-width: 162px;
    max-height: 52px;
    object-fit: contain;
    filter: none;
}

.buy-retailer-logo-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.buy-retailer-logo-link.logo-load-failed span {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
}

.buy-retailer-link-disabled {
    justify-content: flex-start;
    color: #76664d;
}

/* Retailer "limpa": full-width yellow bar below the active properties. */
.product-popup-retailer-section .product-popup-buy-bar {
    padding: 16px 18px;
}

.product-popup-buy-bar .retailer-bar-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    color: inherit;
}

/* Fixed-size tiles keep every logo contained and centred over the yellow bar,
   regardless of the source logo's proportions. */
.product-popup-buy-bar .buy-retailer-logo-link {
    flex: 0 0 auto;
    width: 178px;
    height: 72px;
    min-height: 0;
}

.product-popup-buy-bar .buy-retailer-logo-link img {
    max-width: 100%;
    max-height: 100%;
}

.product-popup-buy-bar .buy-retailer-link {
    flex: 0 1 auto;
    min-width: 140px;
}

.product-popup-buy-bar .buy-retailer-link-disabled {
    justify-content: center;
}

.product-hover-card {
    position: fixed;
    z-index: 12000;
    width: min(560px, calc(100vw - 32px));
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.product-hover-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.product-hover-card-inner {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 96px;
    gap: 18px;
    align-items: center;
    padding: 20px;
    border: 2px solid #510012;
    border-radius: 14px;
    background: #fffdf8;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    color: #17120c;
}

.product-hover-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 136px;
    background: #fff;
}

.product-hover-media img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.product-hover-copy h3 {
    margin: 8px 0 0;
    color: #17120c;
    font-size: 26px;
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.product-hover-context {
    width: fit-content;
}

.product-hover-price {
    margin-top: 10px;
    font-size: 19px;
}

.product-hover-section-label {
    margin-top: 12px;
    color: #5d4b34;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.product-hover-copy p {
    margin: 5px 0 0;
    color: #332719;
    font-size: 13px;
    line-height: 1.42;
}

.product-hover-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #fff;
}

.product-hover-logo img {
    max-width: 92px;
    max-height: 64px;
    object-fit: contain;
}

.rating-control-row select {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(31, 41, 51, 0.18);
    border-radius: 7px;
    background: #fff;
    color: #17120c;
    font: inherit;
    font-weight: 700;
}

.rating-summary {
    color: #554b41;
    font-size: 13px;
    font-weight: 700;
}

.rating-stars {
    display: flex;
    gap: 2px;
    color: #b5b8bc;
    font-size: 20px;
    line-height: 1;
}

.rating-stars .filled {
    color: #ffcc00;
}

.pro-forum-category-column {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.pro-forum-category-list {
    display: grid;
    gap: 10px;
}

.pro-forum-category-list .start-category-chip {
    width: 100%;
    text-align: left;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1400px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .start-index-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .start-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1300px) {
    .app-layout.has-right-ads {
        grid-template-columns: 350px minmax(0, 1fr) 0;
    }

    .app-ad-rail {
        display: none;
    }
}

@media (max-width: 1000px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .start-index-layout {
        grid-template-columns: 1fr;
    }

    .start-ad-rail {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .start-hero-action-row {
        grid-template-columns: 1fr;
    }

    .start-hero-copy {
        width: 100%;
    }

    .start-hero-band {
        grid-template-columns: 1fr;
        max-width: 680px;
    }

    .start-hero-tagline {
        max-width: 620px;
        margin: 0;
        text-align: left;
        font-size: clamp(30px, 6vw, 48px);
    }

    .pro-forum-section {
        grid-template-columns: 1fr;
    }

    .pro-forum-empty-column {
        display: none;
    }
}

@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "header"
            "main"
            "adrail";
        width: 100%;
        max-width: 100vw;
        height: 100dvh;
        overflow: hidden;
    }
    .app-layout.has-right-ads {
        grid-template-columns: 1fr;
    }
    .app-header {
        min-height: 64px;
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .app-header .logo {
        min-width: 0;
        flex: 0 1 auto;
    }

    .app-header .logo img {
        height: 34px;
        max-width: 150px;
        object-fit: contain;
    }

    .header-spacer {
        flex: 1 1 auto;
        min-width: 0;
    }

    .manufacturer-select {
        flex: 0 1 172px;
        min-width: 0;
        max-width: 172px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .henrik-toggle-btn {
        width: 34px;
        height: 34px;
    }

    .app-sidebar { display: none; }

    .app-ad-rail {
        display: block;
        grid-area: adrail;
        max-height: 126px;
        padding: 8px 10px;
        overflow-x: auto;
        overflow-y: hidden;
        border-top: 1px solid var(--sidebar-border);
        border-left: 0;
        background: var(--sidebar-bg);
    }

    .app-ad-rail-inner {
        display: flex;
        gap: 10px;
        min-width: max-content;
    }

    .app-ad-slot {
        width: 220px;
        min-width: 220px;
        min-height: 96px;
    }

    .app-ad-slot img {
        max-height: 86px;
        object-fit: contain;
    }

    .app-main {
        min-width: 0;
        overflow: hidden;
    }

    .app-toolbar {
        flex-wrap: wrap;
        align-items: center;
        min-height: 0;
        padding: 8px 10px;
        gap: 8px;
    }

    .toolbar-search,
    .toolbar-henrik-btn,
    .toolbar-nav-actions {
        order: 3;
        flex: 1 1 auto;
    }

    .toolbar-nav-actions {
        flex-wrap: wrap;
    }

    .toolbar-nav-btn {
        flex: 1 1 auto;
    }

    .toolbar-info {
        margin-left: 0;
        white-space: normal;
    }

    .toolbar-zoom {
        margin-left: 0;
    }

    .content-area {
        min-width: 0;
    }

    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .start-index-layout {
        padding: 12px;
    }

    .start-hero-content {
        min-height: 380px;
        padding: 28px;
    }

    .product-popup-overlay {
        padding: 14px;
    }

    .product-popup-hero {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px 22px 22px;
    }

    .product-popup-nav-actions {
        padding: 18px 60px 0 22px;
    }

    .product-popup-summary {
        padding-right: 0;
    }

    .product-popup-heading-row {
        flex-direction: column;
        gap: 14px;
    }

    .product-popup-logo {
        max-width: 138px;
        max-height: 64px;
    }

    .product-popup-section {
        padding: 22px;
    }

    .product-popup-spec-grid {
        grid-template-columns: 1fr;
    }

    .compatibility-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .card-grid { grid-template-columns: 1fr; }

    .app-header .logo img {
        max-width: 126px;
    }

    .manufacturer-select {
        flex-basis: 132px;
        max-width: 132px;
    }

    .toolbar-zoom {
        display: none;
    }

    .start-hero {
        min-height: 0;
    }

    .start-hero-content {
        min-height: 420px;
        padding: 22px 16px;
        align-items: flex-start;
    }

    .start-hero-dmh-logo {
        top: 18px;
    }

    .start-carousel-section {
        padding: 0 16px 22px;
    }

    .start-hero h1 {
        font-size: 40px;
        line-height: 0.95;
        max-width: 15ch;
    }

    .start-hero-tagline {
        font-size: 28px;
        line-height: 1.05;
    }

    .start-search {
        flex-direction: column;
        min-height: 0;
    }

    .start-search input {
        min-height: 52px;
    }

    .start-search button {
        min-height: 52px;
        width: 100%;
    }

    .start-ad-rail,
    .start-category-grid {
        grid-template-columns: 1fr;
    }

    .pro-forum-compose-grid,
    .pro-forum-post-main {
        grid-template-columns: 1fr;
    }

    .pro-forum-post-image {
        width: 100%;
        height: 190px;
    }

    .pro-forum-comment-form {
        display: grid;
    }

    .pro-forum-comment-form input[name="authorName"] {
        flex-basis: auto;
    }

    .pro-forum-search {
        grid-template-columns: 1fr;
    }

    .pro-forum-search-back,
    .pro-forum-search button {
        width: 100%;
    }

    .start-feature-row {
        grid-template-columns: 32px minmax(0, 1fr);
    }

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