/* ===== Tilbud page styles ===== */
.nav-active {
    color: var(--text) !important;
    border-bottom-color: var(--primary) !important
}

/* Hero bar */
.tilbud-hero {
    background: radial-gradient(circle at 80% 50%, rgba(var(--primary-rgb), .1), transparent 55%), var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 40px 0
}

.tilbud-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap
}

.tilbud-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin-bottom: 6px
}

.tilbud-hero-sub {
    font-size: 15px;
    color: var(--muted)
}

/* Layout */
.tilbud-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    padding-top: 40px;
    padding-bottom: 80px;
    align-items: start
}

/* Sidebar */
.filter-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: sticky;
    top: 90px
}

.filter-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border)
}

.filter-sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text)
}

.filter-reset {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    padding: 0;
    transition: .15s
}

.filter-reset:hover {
    text-decoration: underline
}

.filter-group {
    border-bottom: 1px solid var(--border-soft)
}

.filter-group:last-of-type {
    border-bottom: none
}

.filter-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 16px 20px;
    transition: .15s
}

.filter-group-toggle:hover {
    color: var(--primary)
}

.chevron {
    width: 14px;
    height: 14px;
    color: var(--faint);
    transition: transform .2s
}

.filter-group-toggle[aria-expanded="false"] .chevron {
    transform: rotate(-90deg)
}

.filter-options {
    padding: 2px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px
}

.filter-options[hidden] {
    display: none
}

/* Checkboxes */
.filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 0;
    font-size: 14px;
    color: var(--muted);
    transition: .15s
}

.filter-check:hover {
    color: var(--text)
}

.filter-check input[type="checkbox"],
.filter-check input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: .15s
}

.filter-check input[type="radio"] {
    border-radius: 50%
}

.filter-check input:checked {
    background: var(--primary);
    border-color: var(--primary)
}

.filter-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: 2px solid var(--bg);
    border-top: none;
    border-left: none;
    transform: rotate(45deg)
}

.filter-check input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg)
}

.filter-check span {
    flex: 1
}

.filter-count {
    font-style: normal;
    font-size: 12px;
    color: var(--faint);
    background: var(--bg);
    padding: 2px 7px;
    border-radius: 999px;
    min-width: 24px;
    text-align: center
}

/* Price inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px
}

.price-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1
}

.price-field label {
    font-size: 11px;
    color: var(--faint);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em
}

.price-field input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px
}

.price-field input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px
}

.price-unit {
    font-size: 12px;
    color: var(--faint)
}

.price-dash {
    font-size: 18px;
    color: var(--faint);
    padding-top: 16px
}

/* Range slider */
.range-track-wrap {
    position: relative;
    height: 28px;
    margin-bottom: 14px
}

.range-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    border-radius: 999px
}

.range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 999px
}

.range-thumb {
    position: absolute;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
    pointer-events: none
}

.range-thumb::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg);
    box-shadow: var(--skygge-s);
    cursor: grab;
    transition: transform .15s
}

.range-thumb::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15)
}

.apply-price {
    width: 100%;
    justify-content: center;
    border-radius: 8px
}

/* Mobile filter toggle */
.filter-mobile-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    padding: 12px 18px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 16px;
    transition: .15s
}

.filter-mobile-toggle svg {
    width: 18px;
    height: 18px
}

.filter-mobile-toggle:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.filter-apply-mobile {
    display: none;
    width: calc(100% - 40px);
    justify-content: center;
    margin: 16px 20px
}

/* Sort bar */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap
}

/* display:flex ovenfor vinder over browserens [hidden] { display: none },
   samme faldgrube som .fav-badge/.fav-drop-banner/#loadMoreWrap allerede var
   ramt af (se CLAUDE.md invariant 11). Fangede favoritter.js' favSortBar,
   som blev sat .hidden = true på tom favoritliste, men stod synligt med
   "0 gemte cykler" og et virkningsløst "Fjern alle" alligevel. */
.sort-bar[hidden] {
    display: none;
}

.result-count {
    font-size: 14px;
    color: var(--muted)
}

.result-count strong {
    color: var(--text)
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.sort-label {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap
}

.sort-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.sort-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    padding: 7px 16px;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap
}

.sort-btn:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.sort-btn-active {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg)
}

.sort-btn-active:hover {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg)
}

/* View toggle */
.view-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden
}

.view-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 7px 10px;
    color: var(--faint);
    display: flex;
    align-items: center;
    transition: .15s
}

.view-btn svg {
    width: 18px;
    height: 18px
}

.view-btn:hover {
    color: var(--muted);
    background: var(--surface-alt)
}

.view-btn-active {
    color: var(--primary) !important;
    background: var(--primary-soft) !important
}

.view-btn:first-child {
    border-right: 1px solid var(--border)
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

/* .product-card, dens :hover-regel og .product-img bor i styles.css, ikke
   her — se forklaringen dér. Kun hover-scale-effekten på selve svg'en
   står tilbage i denne fil. */
.product-card:hover .product-img svg {
    transform: scale(1.06)
}

/* .product-photo er flyttet til styles.css, så forsiden og favoritsiden
   også får reglen — de loader ikke cykler.css. */

.product-badge-wrap {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-direction: column;
    align-items: flex-start
}

.product-badge-wrap .urgency-badge {
    font-size: 11px;
    padding: 3px 9px
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--deal);
    color: var(--paa-farve);
    padding: 3px 10px;
    border-radius: 999px
}
/* list-view stakker allerede prisrækken i en kolonne — der skal før-prisen
   ikke tvinges til fuld bredde. */
.product-grid.list-view .product-price-row .product-old {
    width: auto
}

/* List view */
.product-grid.list-view {
    grid-template-columns: 1fr
}

.product-grid.list-view .product-card {
    flex-direction: row;
    align-items: center
}

.product-grid.list-view .product-img {
    width: 160px;
    height: 110px;
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--border)
}

.product-grid.list-view .product-body {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px
}

.product-grid.list-view .product-title {
    flex: 1;
    min-width: 160px
}

.product-grid.list-view .product-price-row {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-top: 0;
    padding-top: 0
}

.product-grid.list-view .product-cta {
    width: auto;
    padding: 10px 20px;
    white-space: nowrap
}

/* No results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted)
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: block
}

.no-results h3 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text)
}

.no-results p {
    font-size: 15px;
    margin-bottom: 24px
}

/* Responsive */
@media(max-width:1024px) {
    .tilbud-layout {
        grid-template-columns: 220px 1fr;
        gap: 24px
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:768px) {
    .tilbud-layout {
        grid-template-columns: 1fr;
        padding-top: 20px
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        z-index: 200;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform .3s ease;
        overflow-y: auto
    }

    .filter-sidebar.sidebar-open {
        transform: translateX(0)
    }

    .filter-mobile-toggle {
        display: flex
    }

    .filter-apply-mobile {
        display: flex
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: var(--overlay);
        z-index: 199
    }

    .sidebar-overlay.active {
        display: block
    }

    .tilbud-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px
    }

    .sort-bar {
        flex-direction: column;
        align-items: flex-start
    }
}

@media(max-width:540px) {
    .product-grid {
        grid-template-columns: 1fr
    }

    .product-grid.list-view .product-card {
        flex-direction: column
    }

    .product-grid.list-view .product-img {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border)
    }

    .product-grid.list-view .product-body {
        flex-direction: column
    }

    .product-grid.list-view .product-price-row {
        align-items: flex-start;
        flex-direction: row
    }
}