:root {
    --bg: #f4f8fc;
    --bg-deep: #e9f2f8;
    --panel: rgba(255, 255, 255, 0.84);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --card: rgba(255, 255, 255, 0.92);
    --text: #142f3f;
    --text-strong: #071f2d;
    --muted: #637b8c;
    --muted-2: #8aa0ae;
    --border: rgba(14, 45, 63, 0.12);
    --border-strong: rgba(14, 45, 63, 0.2);
    --tab-idle-bg: rgba(14, 45, 63, 0.06);
    --tab-idle-hover-bg: rgba(14, 45, 63, 0.1);

    --blue: #0ea5e9;
    --cyan: #22d3ee;
    --violet: #8b5cf6;
    --pink: #ec4899;
    --orange: #f97316;
    --red: #ff2d55;
    --green: #22c55e;
    --yellow: #facc15;

    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 18px 44px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 0 60px rgba(14, 165, 233, 0.16);

    --radius-2xl: 28px;
    --radius-xl: 22px;
    --radius-lg: 17px;
    --radius: 14px;

    --container: 1200px;

    --input-bg: #ffffff;

    --visual-min: 254px;
    --visual-min-partial: 192px;
    --visual-min-slim: 160px;
}

:root.density-normal {
    --visual-min: 188px;
    --visual-min-partial: 145px;
    --visual-min-slim: 119px;
}

:root.density-condensed {
    --visual-min: 136px;
    --visual-min-partial: 110px;
    --visual-min-slim: 94px;
}

:root[data-theme="dark"] {
    --bg: #030712;
    --bg-deep: #06111f;
    --panel: rgba(8, 18, 32, 0.76);
    --panel-strong: rgba(10, 22, 38, 0.92);
    --card: rgba(9, 22, 37, 0.9);
    --text: #d9e7f2;
    --text-strong: #ffffff;
    --muted: #97aaba;
    --muted-2: #70889b;
    --border: rgba(148, 184, 214, 0.14);
    --border-strong: rgba(148, 184, 214, 0.24);
    --tab-idle-bg: rgba(255, 255, 255, 0.06);
    --tab-idle-hover-bg: rgba(255, 255, 255, 0.1);

    --shadow-soft: 0 15px 39px rgba(0, 0, 0, 0.28);
    --shadow-card: 0 24px 56px rgba(0, 0, 0, 0.36);
    --shadow-glow: 0 0 76px rgba(139, 92, 246, 0.16);

    --input-bg: #091625;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    font-family:
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    line-height: 1.45;
    background:
        radial-gradient(circle at 16% 4%, rgba(14, 165, 233, 0.22), transparent 28rem),
        radial-gradient(circle at 82% 8%, rgba(139, 92, 246, 0.18), transparent 30rem),
        radial-gradient(circle at 72% 44%, rgba(236, 72, 153, 0.08), transparent 24rem),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    transition: background 0.25s ease, color 0.25s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.36;
    background-image:
        linear-gradient(rgba(148, 184, 214, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 184, 214, 0.08) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

html.tab-options-scroll-lock,
body.tab-options-scroll-lock {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: 14px;
}

.page {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 15px 0 34px;
}

.hero,
.deal-card,
.empty-state,
.error-box,
.ajax-error,
.noscript-box,
.loader {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
}

.page-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
}

.page-action-link,
.page-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid var(--border);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: color 0.18s, border-color 0.18s;
}

.page-action-link:hover,
.page-action-btn:hover {
    color: var(--text-strong);
    border-color: var(--border-strong);
}

.theme-icon {
    display: flex;
    width: 17px;
    height: 17px;
    line-height: 0;
}

.theme-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.mobile-hero-actions,
.mobile-panel-label,
.mobile-options-actions,
.mobile-search-submit {
    display: none;
}

.hero {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 17px;
    padding: 14px 17px 17px;
    border-radius: var(--radius-2xl);
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 14% 35%, rgba(139, 92, 246, 0.24), transparent 20rem),
        radial-gradient(circle at 8%  55%, rgba(14, 165, 233, 0.16), transparent 18rem);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

h1 {
    max-width: 680px;
    margin: 0;
    color: var(--text-strong);
    font-size: clamp(2.1rem, 4.7vw, 4rem);
    line-height: 0.92;
}

h1 span {
    background: linear-gradient(135deg, #f0abfc, #8b5cf6, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.intro {
    max-width: 650px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.38;
}

.search-box {
    grid-column: 1 / -1;
    position: relative;
    z-index: 1;
    padding: 17px 0 0 0px;
    border-radius: 19px;
    border: 0px;
}

.search-box label {
    display: block;
    margin: 0 0 8px 4px;
    color: var(--text-strong);
    font-weight: 900;
}

.tabs-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
    border-radius: var(--radius-xl);
    padding: 14px 17px 17px;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.tabs-panel .saved-searches {
    margin: -6px 0 0;
}

.content-filters-bar {
    padding-top: 14px;
}

@media (max-width: 660px) {
    .content-filters-bar {
        padding-top: 0;
    }
}

.content-filters-bar .search-box {
    grid-column: unset;
    padding: 0;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto) auto;
    gap: 10px;
    align-items: center;
}

.search-row--tabs {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.search-row--tabs .tab-edit-btn {
    white-space: nowrap;
}

.search-row input {
    width: 100%;
    min-width: 0;
    height: 41px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background-color: var(--input-bg);
    color: var(--text);
    outline: none;
}

.search-row input:focus {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.search-cat-select {
    height: 41px;
    padding: 0 29px 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background-color: var(--input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%2397aaba' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.search-cat-select:focus {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.search-row-actions {
    display: flex;
    gap: 7px;
    align-items: center;
}

.search-row-actions--tabs {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
}

#dealSearchBtn {
    display: none;
}

.tab-toolbar-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-toolbar-sort-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tab-toolbar-sort .custom-select,
.tab-toolbar-sort .sort-select {
    min-width: 0;
}

.tab-edit-btn {
    height: 41px;
    padding: 0 16px;
    border: 1px solid rgba(14, 165, 233, 0.38);
    border-radius: 14px;
    background: rgba(14, 165, 233, 0.08);
    color: #7dd3fc;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tab-edit-btn:hover {
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(14, 165, 233, 0.6);
    color: #e0f2fe;
}

@media (max-width: 860px) {
    .search-row--tabs {
        grid-template-columns: 1fr;
    }

    .search-row-actions--tabs {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .search-row--tabs .tab-edit-btn {
        width: 100%;
    }

    .tab-toolbar-sort {
        width: 100%;
        justify-content: space-between;
    }

    .tab-toolbar-sort .custom-select,
    .tab-toolbar-sort .sort-select {
        width: 100%;
    }
}

.btn-save-search {
    height: 41px;
    padding: 0 14px;
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 14px;
    background: transparent;
    color: #a78bfa;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-save-search:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.75);
    color: var(--text-strong);
}

.search-row button[type="submit"] {
    border: 1px solid rgba(139, 92, 246, 0.6);
    border-radius: 14px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
    height: 41px;
    padding: 0 19px;
    white-space: nowrap;
    transition: filter 0.2s ease;
}

.search-row button[type="submit"]:hover {
    filter: brightness(1.08);
}

.search-row button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: wait;
    filter: none;
}

.hero-stage {
    position: relative;
    z-index: 1;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 119px;
}

.hero-logo {
    width: 134px;
    height: auto;
    opacity: 1;
    margin-top: 10px;
    cursor: pointer;
    user-select: none;
}

@keyframes logo-refresh {
    0%   { transform: rotate(0deg) scale(1); }
    40%  { transform: rotate(200deg) scale(0.88); }
    100% { transform: rotate(360deg) scale(1); }
}

.hero-logo--spinning {
    animation: logo-refresh 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.prefs-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 0px;
    width: 100%;
}

.hero .prefs-bar {
    position: relative;
    z-index: 1;
}

/* #prefsBar fills remaining space in .search-prefs flex row */
.search-prefs > .prefs-bar {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 12px;
}

.prefs-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* Display group inside #prefsBar: takes full width of prefsBar */
#prefsBar > .prefs-group {
    flex: 1 1 0;
    min-width: 0;
}

.prefs-options {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    margin: 0 10px;
}

.search-prefs {
    grid-column: 1 / -1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    margin-top: 12px;
}

.sort-select {
    height: 41px;
    font-size: 14px;
    padding: 0 26px 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background-color: var(--input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.sort-select:focus {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.pref-check {
    display: inline-flex!important;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}

.pref-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pref-check-box {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 1.5px solid var(--border-strong);
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

.pref-check input:checked + .pref-check-box {
    background: #7c3aed;
    border-color: #7c3aed;
}

.pref-check input:checked + .pref-check-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

.pref-check-label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.15s;
}

.pref-check input:checked ~ .pref-check-label {
    color: var(--text-strong);
}

/* Display hide rules */
.hide-heat .deal-heat-bar { display: none; }
.hide-tags .deal-tags { display: none; }
.hide-detail .deal-detail { display: none; }
.hide-old-price .old-price { display: none; }
.hide-discount .deal-discount { display: none; }
.hide-rating .deal-rating { display: none; }
.hide-comments .deal-comments { display: none; }

.deals-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.deal-card {
    --heat-start: #0ea5e9;
    --heat-end: #2563eb;
    --heat-glow: #0ea5e9;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent),
        var(--card);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}


.deal-card:hover {
    box-shadow: var(--shadow-card), 0 0 29px rgba(139, 92, 246, 0.12);
}

.deal-card--hot {
    z-index: 0;
    border-color: rgba(255, 45, 85, 0.75);
    animation: hot-glow 2.6s ease-in-out infinite;
}

@keyframes hot-glow {
    0%, 100% {
        box-shadow: var(--shadow-soft),
                    0 0 0 1px rgba(255, 45, 85, 0.35),
                    0 0 34px rgba(255, 45, 85, 0.50),
                    0 0 85px rgba(255, 45, 85, 0.22);
    }
    50% {
        box-shadow: var(--shadow-card),
                    0 0 0 2px rgba(255, 45, 85, 0.65),
                    0 0 60px rgba(255, 45, 85, 0.85),
                    0 0 136px rgba(255, 45, 85, 0.40);
    }
}

.deal-link {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    gap: 17px;
    padding: 14px 15px 14px 17px;
}

.deal-visual {
    position: relative;
    border-radius: 17px;
    overflow: hidden;
    border: 1px solid var(--border);
    background:white;
}

:root[data-theme="light"] .deal-visual {
    background: #fff;
}

@media (min-width: 661px) {
    .deal-visual { min-height: var(--visual-min); }
    :root.hide-detail .deal-visual,
    :root.hide-tags .deal-visual { min-height: var(--visual-min-partial); }
    :root.hide-detail.hide-tags .deal-visual { min-height: var(--visual-min-slim); }
}

.deal-image {
    position: absolute;
    inset: 8px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


.deal-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.deal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.deal-temp {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}

.deal-heat-bar {
    position: relative;
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
}

.deal-heat-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #0ea5e9 0%,
        #22d3ee 6%,
        #22c55e 14%,
        #facc15 24%,
        #f97316 38%,
        #ff2d55 54%,
        #ff2d55 100%
    );
    background-repeat: no-repeat;
}

.deal-heat-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.deal-age {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 760;
    white-space: nowrap;
}

.deal-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--text-strong);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.18;
}

.current-price {
    font-size: 1.7rem;
    font-weight: 800;
}

.current-price i,
.old-price i {
    font-style: normal;
}

.old-price {
    color: var(--muted-2);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    font-weight: 600;
    font-size: 1.45em;
    margin: 0px 8px;
}

.deal-discount {
    font-weight: 700;
    font-size: 1.45em;
}

.deal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1.5px solid currentColor;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.15s;
}

.tag:hover {
    opacity: 0.75;
}

.tag--secondary {
    color: #64748B;
    border-color: #CBD5E122;
    background: #F8FAFC11;
}

.category-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    color: currentColor;
    line-height: 1;
}

.category-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    color: currentColor;
}

.category-icon svg[stroke]:not([stroke="none"]),
.category-icon svg [stroke]:not([stroke="none"]) {
    stroke: currentColor;
}

.category-icon svg[fill]:not([fill="none"]),
.category-icon svg [fill]:not([fill="none"]) {
    fill: currentColor;
}

.tag .category-icon {
    margin-left: -1px;
    font-size: 1.05em;
}


.deal-detail {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.deal-footer {
    margin-top: auto;
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    align-items: center;
    min-height: 44px;
}

.deal-footer-prices {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    padding: 3px 0;
}

.deal-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 900;
    border-left: 1px solid var(--border);
    padding: 3px 7px;
}

.stars-wrap {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.stars-base,
.stars-fill {
    font-size: 1rem;
    letter-spacing: -0.08em;
    line-height: 1;
    display: block;
    white-space: nowrap;
}

.stars-base {
    color: rgba(148, 163, 184, 0.35);
}

.stars-fill {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--rating-percent);
    color: var(--muted);
    overflow: hidden;
}

.deal-rating b {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 700;
}

.deal-comments {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    border-left: 1px solid var(--border);
    padding: 3px 7px;
    font-size: 1rem;
}

.deal-share {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-left: 1px solid var(--border);
    padding: 3px 7px;
}

.loader {
    width: fit-content;
    margin: 15px auto 0;
    padding: 12px 15px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 600;
}

.loader[hidden] {
    display: none;
}

.loader span {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #a78bfa;
    animation: spin 0.8s linear infinite;
}

.empty-state,
.error-box,
.ajax-error,
.noscript-box {
    padding: 24px;
    border-radius: var(--radius-xl);
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 7px;
    color: var(--text-strong);
}

.empty-state p,
.noscript-box {
    margin: 0;
    color: var(--muted);
}

.error-box,
.ajax-error {
    margin-bottom: 14px;
    color: #fb7185;
}

.footer {
    padding: 24px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.footer a,
.footer .page-action-link {
    display: inline;
    min-height: auto;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    font-weight: 600;
    background: none;
    border: none;
    backdrop-filter: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.footer a:hover,
.footer .page-action-link:hover {
    opacity: 0.72;
    border-color: transparent;
    text-decoration: none;
}

.footer a[href="/concept/"] { color: #f0abfc; }
.footer a[href="/legal/"]   { color: #8b5cf6; }
.footer a[href="/politique-de-confidentialite/"] { color: #22c55e; }
.footer #contactBtn         { color: #38bdf8; }

:root[data-theme="light"] .footer a[href="/concept/"] { color: #c026d3; }
:root[data-theme="light"] .footer a[href="/legal/"]   { color: #7c3aed; }
:root[data-theme="light"] .footer a[href="/politique-de-confidentialite/"] { color: #15803d; }
:root[data-theme="light"] .footer #contactBtn         { color: #0284c7; }

#themeToggle {
    --theme-toggle-bg: linear-gradient(135deg, #f59e0b, #ea580c);
    --theme-toggle-border: rgba(251, 146, 60, 0.7);
    --theme-toggle-shadow: rgba(249, 115, 22, 0.38);
    position: fixed;
    right: 14px;
    bottom: 62px;
    z-index: 300;
    width: 39px;
    height: 39px;
    min-height: 0;
    padding: 0;
    justify-content: center;
    gap: 0;
    color: #fff7ed;
    background: var(--theme-toggle-bg);
    border: 1px solid var(--theme-toggle-border);
    box-shadow: 0 7px 20px var(--theme-toggle-shadow);
    backdrop-filter: none;
    transition: filter 0.18s, box-shadow 0.18s, transform 0.18s;
}

:root[data-theme="light"] #themeToggle {
    --theme-toggle-bg: linear-gradient(135deg, #111827, #312e81);
    --theme-toggle-border: rgba(49, 46, 129, 0.65);
    --theme-toggle-shadow: rgba(49, 46, 129, 0.34);
    color: #e0e7ff;
}

#themeToggle:hover {
    border-color: var(--theme-toggle-border);
    filter: brightness(1.1);
    box-shadow: 0 10px 27px var(--theme-toggle-shadow);
}

/* ── Header actions wrapper ── */
.header-actions {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Options button ── */
.options-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: border-color 0.15s, background 0.15s;
}

.options-btn:hover,
.options-btn[aria-expanded="true"] {
    border-color: var(--violet);
    background: var(--panel-strong);
}

/* ── User button ── */
.user-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--panel);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: border-color 0.15s, background 0.15s;
}

.user-btn:hover {
    border-color: var(--violet);
    background: var(--panel-strong);
}

.user-btn-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-btn-icon {
    display: flex;
    align-items: center;
    color: var(--muted);
}

.user-btn-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── User dropdown ── */
.user-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    z-index: 400;
    width: 220px;
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-dropdown[hidden] { display: none; }

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 2px 8px;
    border-bottom: 1px solid var(--border);
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
}

.user-dropdown-email {
    font-size: 14px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-account,
.user-dropdown-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.user-dropdown-account[hidden] { display: none; }

.user-dropdown-account:hover {
    border-color: var(--violet);
    color: var(--violet);
}

.user-dropdown-logout:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ── Account modal ── */
.account-modal-card {
    width: min(440px, calc(100vw - 32px));
}

.account-modal-tabs {
    margin-bottom: 18px;
}

.account-current-info {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--muted);
}

.account-current-info strong {
    color: var(--text-strong);
}

.account-msg {
    margin-top: 10px;
    padding: 9px 13px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.account-msg[hidden] { display: none; }

.account-msg--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #f87171;
}

.account-msg--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #4ade80;
}

.account-delete-btn {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.account-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.68);
    color: #fecaca;
}

.account-delete-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ── Auth modal ── */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.65);
    backdrop-filter: blur(6px);
}

.auth-modal[hidden] { display: none; }

.auth-modal-card {
    position: relative;
    width: min(400px, calc(100vw - 32px));
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    padding: 28px 26px 26px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(28px);
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.auth-modal-close:hover { color: var(--text-strong); }

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-deep);
    border-radius: 999px;
    padding: 3px;
}

.auth-tab {
    flex: 1;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.auth-tab.is-active {
    background: var(--panel-strong);
    color: var(--text-strong);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.auth-panel[hidden] { display: none; }

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 42px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text-strong);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
.auth-google-btn:hover { border-color: var(--violet); background: var(--panel-strong); }

.auth-google-btn.is-loading {
    opacity: 0.72;
    pointer-events: none;
    cursor: wait;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: var(--muted);
    font-size: 14px;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form input {
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-strong);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
.auth-form input:focus { border-color: var(--violet); }

.auth-submit {
    height: 42px;
    margin-top: 4px;
    border: none;
    border-radius: 10px;
    background: var(--violet);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s;
}
.auth-submit:hover { filter: brightness(1.1); }
.auth-submit:disabled { opacity: 0.6; cursor: default; }

.auth-error {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 14px;
}
.auth-error[hidden] { display: none; }

.auth-forgot-link {
    display: block;
    margin-top: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    padding: 0;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.auth-forgot-link:hover { color: var(--text); }

.auth-back-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    padding: 0;
    margin-bottom: 16px;
}
.auth-back-btn:hover { color: var(--text); }

.auth-forgot-intro {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.deal-age i {
    font-style: normal;
}

.footer.is-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    margin: 0;
    padding: 8px 17px;
    background: var(--panel);
    border: none;
    border-top: 1px solid var(--border);
    backdrop-filter: blur(22px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
}

.share-popup {
    position: fixed;
    z-index: 200;
    bottom: 51px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 17px;
    padding: 15px 15px 12px;
    backdrop-filter: blur(28px);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.share-popup[hidden] {
    display: none;
}

.share-popup-title {
    margin: 0 0 3px;
    font-weight: 900;
    font-size: 14px;
    color: var(--text-strong);
    padding-right: 24px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 37px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
}

.share-option:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.share-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.18);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.share-popup-close:hover {
    background: rgba(148, 163, 184, 0.32);
}

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0px 0px;
    padding-top: 0;
}

.filter-group {
    flex: 1 1 140px;
    min-width: 0;
}

.filter-group--price {
    flex: 1 1 220px;
    max-width: 100%;
}

.filter-group--sort {
    flex: 0 1 200px;
}

.filter-group--sort .custom-select,
.filter-group--sort .sort-select {
    width: 100%;
}

.filter-group select {
    height: 32px;
    padding: 0 26px 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background-color: var(--input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2397aaba' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.filter-group select:focus {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

/* ── Custom Select Component ── */
.custom-select {
    position: relative;
    display: block;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    width: 100%;
    height: 41px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background-color: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.custom-select--lg .custom-select-trigger {
    height: 46px;
    border-radius: 14px;
    font-size: 14px;
    padding: 0 12px 0 14px;
}

.custom-select-trigger:focus,
.custom-select.is-open .custom-select-trigger {
    outline: none;
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.custom-select.is-active .custom-select-trigger {
    background-color: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.6);
    color: rgb(167, 139, 250);
}

.custom-select-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-arrow {
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.18);
    color: #c4b5fd;
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.22);
    transition: transform 0.2s ease, background 0.18s, color 0.18s, box-shadow 0.18s;
}

.custom-select-trigger:hover .custom-select-arrow,
.custom-select-trigger:focus-visible .custom-select-arrow {
    background: rgba(139, 92, 246, 0.28);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.38);
}

.custom-select-arrow svg {
    display: block;
    width: 15px;
    height: 15px;
    color: inherit;
}

.custom-select.is-open .custom-select-arrow {
    transform: rotate(180deg);
    background: rgba(139, 92, 246, 0.34);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.44);
}

.custom-select-dropdown {
    position: fixed;
    min-width: 153px;
    max-height: 280px;
    overflow-y: auto;
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 5px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(28px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.custom-select-dropdown.opens-up {
    transform-origin: bottom center;
    transform: translateY(6px) scale(0.98);
}

.custom-select-dropdown.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.custom-select-dropdown::-webkit-scrollbar {
    width: 4px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 999px;
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 32px;
    padding: 4px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
    margin-bottom: 4px;
}

.custom-select-option-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-option .category-icon {
    font-size: 15px;
    opacity: 0.88;
}

.custom-select-option:hover {
    background: rgba(139, 92, 246, 0.1);
}

.custom-select-option.is-selected {
    color: var(--text-strong);
    background: rgba(139, 92, 246, 0.12);
}

.custom-select-check {
    flex: 0 0 14px;
    font-size: 14px;
    font-weight: 900;
    color: #a78bfa;
    visibility: hidden;
}

.custom-select-dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 2px currentColor;
    margin-top: 2px;
}

.custom-select-option.is-selected .custom-select-check {
    visibility: visible;
}

.custom-select-option--check .custom-select-check {
    visibility: visible;
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(139, 92, 246, 0.35);
    border-radius: 3px;
    text-align: center;
    line-height: 12px;
    color: transparent;
}

.custom-select-option--check.is-selected .custom-select-check {
    background: rgba(139, 92, 246, 0.85);
    border-color: #a78bfa;
    color: #fff;
}

.custom-select-option--select-all {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.custom-select-separator {
    height: 1px;
    background: var(--border-strong);
    margin: 4px 5px;
}

.custom-select-badge {
    flex: 0 0 auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(139, 92, 246, 0.85);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.custom-select-dropdown--multi {
    max-height: 343px;
}

.category-multi-select {
    display: block;
    min-width: 270px;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.55);
    backdrop-filter: blur(6px);
}

.page-loader[hidden] {
    display: none;
}

.page-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 27px 37px;
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    backdrop-filter: blur(28px);
    box-shadow: var(--shadow-card);
}

.page-loader-spinner {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: #a78bfa;
    animation: spin 0.8s linear infinite;
}

.page-loader-label {
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

/* ── Options popup ── */
.options-popup {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.options-popup[hidden] {
    display: none;
}

.options-popup-card {
    position: relative;
    width: min(520px, calc(100% - 32px));
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    max-height: 90vh;
    overflow-y: auto;
}

.options-popup-title {
    margin: 0 0 18px;
    font-size: 1.05rem;
    font-weight: 900;
    padding-right: 30px;
}

.options-selects {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.options-field {
    flex: 1 1 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.options-field-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.options-checks {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.options-checks .prefs-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.options-mobile-nav {
    display: none;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 4px;
}

.options-tabs-reset {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.options-reset-tabs-btn {
    height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(239, 68, 68, 0.36);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.options-reset-tabs-btn:hover,
.options-reset-tabs-btn:focus-visible {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.58);
    color: #fecaca;
}

.options-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.options-popup-close:hover {
    background: rgba(148, 163, 184, 0.32);
}

.propose-popup {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(6px);
}

.propose-popup[hidden] {
    display: none;
}

.propose-popup-card {
    position: relative;
    width: min(480px, calc(100% - 32px));
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(28px);
    box-shadow: var(--shadow-card);
}

.propose-popup-title {
    margin: 0 0 17px;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-strong);
    padding-right: 30px;
}

.propose-popup-subtitle {
    margin: -10px 0 15px;
    font-size: 14px;
    color: var(--muted);
}

.contact-email {
    margin: 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
}

.contact-email a {
    color: #a78bfa;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.propose-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.propose-form input {
    height: 43px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background-color: var(--input-bg);
    color: var(--text);
    font-size: 14px;
    outline: none;
    width: 100%;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.propose-form input:focus {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.propose-submit {
    height: 43px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.26);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.propose-submit:hover {
    filter: brightness(1.1);
}

.propose-submit:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.propose-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 27px;
    height: 27px;
    border: none;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.18);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    font-size: 1.1rem;
    line-height: 1;
}

.propose-popup-close:hover {
    background: rgba(148, 163, 184, 0.32);
}

.propose-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.propose-msg.is-success {
    display: block;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.propose-msg.is-error {
    display: block;
    background: rgba(251, 113, 133, 0.12);
    color: #fb7185;
    border: 1px solid rgba(251, 113, 133, 0.3);
}

/* ── Price range filter ── */
.price-range {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 41px;
    min-width: 0;
    max-width: 100%;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--input-bg);
    white-space: nowrap;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.price-range:focus-within {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.filter-group--price.is-active .price-range {
    background-color: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.6);
}

.filter-group--price.is-active .price-range-label,
.filter-group--price.is-active .price-range-sep,
.filter-group--price.is-active .price-range-input {
    color: rgb(167, 139, 250);
}

.price-range-label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    flex: 0 0 auto;
    margin-right: 2px;
}

.price-range-input {
    width: 52px;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    text-align: center;
    flex: 0 1 52px;
    -moz-appearance: textfield;
}

.price-range-input::-webkit-inner-spin-button,
.price-range-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.price-range-sep {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    flex: 0 0 auto;
}

/* ── Saved searches tabs ── */
.saved-searches {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 10px 4px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: fit-content;
    max-width: 100%;
    margin: 8px 0 4px;
}

.saved-searches::-webkit-scrollbar {
    display: none;
}

.saved-searches[hidden] {
    display: none;
}

.saved-search-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 13px;
    border: none;
    border-radius: 999px;
    background: var(--tab-idle-bg);
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    margin-right: 12px;
}

.saved-search-tab:hover:not(.is-active) {
    background: var(--tab-idle-hover-bg);
    color: var(--text);
}

.saved-search-tab.is-active {
    background: var(--violet);
    color: #fff;
}

.saved-search-tab.is-active[data-custom-bg="1"],
.tabs-mobile-trigger[data-custom-bg="1"] {
    background: var(--tab-bg);
}

.saved-search-tab.is-active[data-custom-text="1"],
.tabs-mobile-trigger[data-custom-text="1"] {
    color: var(--tab-text);
}

.saved-search-tab-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: normal;
}

.saved-search-tab-options {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.72;
    transition: background 0.12s, opacity 0.12s;
}

.saved-search-tab-options:hover {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
}

.saved-search-tab-options .tab-options-icon,
.tabs-mobile-tab-options .tab-options-icon {
    display: block;
    flex-shrink: 0;
}

.saved-search-tab[data-custom-color="1"] .saved-search-tab-options {
    color: currentColor;
}

.saved-search-new {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 10px 0 8px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--muted-2);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s;
    margin-left: 3px;
}

.saved-search-new:hover {
    color: var(--text);
}

.saved-search-new-icon {
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 400;
    opacity: 0.7;
}

.saved-search-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    border: 2px solid var(--bg);
}

.saved-search-badge[hidden] {
    display: none;
}

/* ── Mobile tab selector ── */
.tabs-mobile-trigger {
    display: none;
}

.tabs-mobile-dropdown {
    position: fixed;
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 5px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 3px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    min-width: 240px;
    max-height: 50vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.tabs-mobile-dropdown[hidden] { display: none; }
.tabs-mobile-dropdown::-webkit-scrollbar { display: none; }

.tabs-mobile-dropdown .saved-search-tab,
.tabs-mobile-dropdown .saved-search-new {
    display: flex;
    width: 100%;
    border-radius: 9px;
    text-align: left;
    font-size: 14px;
    height: 38px;
    padding: 0 12px;
    margin: 0;
    cursor: pointer;
}

.tabs-mobile-dropdown .saved-search-badge {
    position: static;
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
    border: none;
}

.tabs-mobile-dropdown .saved-search-tab-name {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabs-mobile-tab-options {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    padding: 0;
    opacity: 0.72;
    transition: background 0.15s, opacity 0.15s;
    margin-left: 8px;
}
.tabs-mobile-tab-options:hover {
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
}

.saved-search-tab[data-custom-color="1"] .tabs-mobile-tab-options {
    color: currentColor;
}

/* ── "Vous êtes à jour" separator ── */
.deals-uptodate {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    grid-column: 1 / -1;
}

.deals-uptodate-line {
    flex: 1;
    height: 1px;
    background: var(--border-strong);
}

.deals-uptodate-label {
    flex-shrink: 0;
}

/* ── Save search popup ── */
.save-search-popup {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(6px);
}

.save-search-popup[hidden] {
    display: none;
}

.save-search-popup-card {
    width: min(340px, calc(100vw - 32px));
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 22px 22px 20px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(28px);
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.save-search-popup-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
    color: var(--text-strong);
}

.save-search-popup-input {
    width: 100%;
    height: 41px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.save-search-popup-input:focus {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.save-search-popup-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.save-search-popup-actions button {
    height: 36px;
    padding: 0 16px;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s, background 0.15s;
}

.save-search-popup-actions button:first-child {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border-strong);
}

.save-search-popup-actions button:first-child:hover {
    color: var(--text);
}

.save-search-popup-actions button:last-child {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
}

.save-search-popup-actions button:last-child:hover {
    filter: brightness(1.1);
}

/* ── Tab options popup ── */
.tab-options-popup {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(6px);
    overscroll-behavior: contain;
}

.tab-options-popup[hidden] {
    display: none;
}

.tab-options-popup-card {
    width: min(1000px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: var(--panel-strong);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(28px);
    display: flex;
    flex-direction: column;
    gap: 13px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.tab-options-popup-title {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 900;
    color: var(--text-strong);
}

.tab-options-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 2px;
}

.tab-options-section-title {
    display: none;
}

.tab-options-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.tab-options-field input[type="text"],
.tab-options-field select {
    width: 100%;
    height: 41px;
    padding: 0 13px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
}

.tab-options-field input[type="text"]:focus,
.tab-options-field select:focus {
    border-color: rgba(139, 92, 246, 0.75);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.tab-options-field .filter-group,
.tab-options-field .filter-group--price,
.tab-options-field .custom-select,
.tab-options-field .custom-select-trigger,
.tab-options-field .category-multi-select {
    width: 100%;
}

.tab-options-field .filter-group--price {
    flex: none;
}

.tab-options-field .filter-group {
    display: block;
}

.tab-options-field .price-range {
    min-height: 41px;
}

.tab-options-color-grid {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tab-options-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tab-options-inline-row > .tab-options-field {
    flex: 1 1 130px;
    min-width: 0;
}

.tab-options-bg-swatch.is-active {
    border-color: rgba(167, 139, 250, 0.95);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}

.tab-options-color-grid input[type="color"] {
    display: none;
}

.tab-options-bg-palette {
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 7px;
}

.tab-options-bg-swatch {
    aspect-ratio: 1;
    min-height: 50px;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.tab-options-bg-swatch:hover {
    transform: translateY(-1px);
}

.tab-options-bg-swatch--1 { background: #7c3aed; }
.tab-options-bg-swatch--2 { background: #1d4ed8; }
.tab-options-bg-swatch--3 { background: #0ea5e9; }
.tab-options-bg-swatch--4 { background: #06b6d4; }
.tab-options-bg-swatch--5 { background: #14b8a6; }
.tab-options-bg-swatch--6 { background: #22c55e; }
.tab-options-bg-swatch--7 { background: #84cc16; }
.tab-options-bg-swatch--8 { background: #eab308; }
.tab-options-bg-swatch--9 { background: #f97316; }
.tab-options-bg-swatch--10 { background: #ef4444; }
.tab-options-bg-swatch--11 { background: #f43f5e; }
.tab-options-bg-swatch--12 { background: #ec4899; }
.tab-options-bg-swatch--13 { background: #d946ef; }
.tab-options-bg-swatch--14 { background: #8b5cf6; }
.tab-options-bg-swatch--15 { background: #64748b; }
.tab-options-bg-swatch--16 { background: #111827; }

.tab-options-order-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 216px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 5px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--input-bg);
}

.tab-options-order-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: rgba(148, 163, 184, 0.08);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    cursor: grab;
    user-select: none;
}

.tab-options-order-item.is-current {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.14);
    color: var(--text-strong);
}

.tab-options-order-item.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.tab-options-order-handle {
    flex: 0 0 auto;
    color: var(--muted);
    font-weight: 900;
    letter-spacing: -0.08em;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.tab-options-order-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-options-check {
    min-height: 32px;
}

.tab-options-msg {
    margin: 0;
    padding: 8px 11px;
    border-radius: 9px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
    font-size: 14px;
    font-weight: 600;
}

.tab-options-msg.is-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.tab-options-msg[hidden] {
    display: none;
}

/* ── Éditeur de mots-clés ──────────────────────────────────────────────── */
.tab-options-kw-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tab-options-kw-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tab-options-kw-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.tab-options-kw-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(124,58,237,.18);
}

.kw-mode-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.kw-mode-btn--include {
    background: rgba(34,197,94,.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,.35);
}

.kw-mode-btn--exclude {
    background: rgba(239,68,68,.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,.35);
}

.tab-options-kw-add-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    background: rgba(124,58,237,.15);
    color: #a78bfa;
    border: 1px solid rgba(124,58,237,.35);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.tab-options-kw-add-btn:hover {
    background: rgba(124,58,237,.25);
}

.tab-options-kw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}

.kw-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.kw-chip--include {
    background: rgba(34,197,94,.12);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,.3);
}

.kw-chip--exclude {
    background: rgba(239,68,68,.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,.3);
}

.kw-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
    padding: 0;
    border-radius: 50%;
    transition: opacity .15s;
}

.kw-chip-remove:hover {
    opacity: 1;
}

.tab-options-popup-actions {
    display: flex;
    gap: 8px;
}

.tab-options-popup-actions button {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}

#tabOptionsDeleteBtn {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.42);
}

#tabOptionsDeleteBtn:hover,
#tabOptionsDeleteBtn:focus-visible {
    background: rgba(239, 68, 68, 0.17);
    border-color: rgba(239, 68, 68, 0.62);
    color: #fecaca;
}

#tabOptionsResetBtn {
    background: rgba(234, 179, 8, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.35);
}

#tabOptionsResetBtn:hover,
#tabOptionsResetBtn:focus-visible {
    background: rgba(234, 179, 8, 0.18);
    border-color: rgba(234, 179, 8, 0.6);
    color: #fde68a;
}

#tabOptionsCancelBtn {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border-strong);
}

#tabOptionsConfirmBtn {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
}

.propose-btn {
    position: fixed;
    bottom: 14px;
    right: 14px;
    z-index: 300;
    display: inline-flex;
    align-items: center;
    padding: 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border: 1px solid rgba(139, 92, 246, 0.6);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 7px 20px rgba(124, 58, 237, 0.45);
    cursor: pointer;
    transition: padding 0.28s ease, box-shadow 0.18s, filter 0.18s, transform 0.18s;
}

.propose-btn-label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.28s ease;
}

.propose-btn:hover {
    gap: 7px;
    padding: 11px 15px;
    filter: brightness(1.1);
    box-shadow: 0 10px 27px rgba(124, 58, 237, 0.55);
}

.propose-btn:hover .propose-btn-label {
    max-width: 200px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 661px) {
    :root.density-normal .deals-list { gap: 12px; }
    :root.density-normal .deal-link { padding: 10px 12px 10px 14px; gap: 12px; grid-template-columns: 256px minmax(0, 1fr); }
    :root.density-normal .deal-body { gap: 6px; }
    :root.density-normal .deal-header { gap: 8px; }
    :root.density-normal .deal-title { font-size: 1rem; }
    :root.density-normal .deal-temp { font-size: 1.3rem; }
    :root.density-normal .current-price { font-size: 1.3rem; }
    :root.density-normal .old-price { font-size: 1.1rem; }
    :root.density-normal .deal-discount { font-size: 1.1rem; }
    :root.density-normal .deal-footer { min-height: 36px; }

    :root.density-condensed .deals-list { gap: 8px; }
    :root.density-condensed .deal-link { padding: 7px 8px 7px 10px; gap: 8px; grid-template-columns: 280px minmax(0, 1fr); }
    :root.density-condensed .deal-body { gap: 4px; }
    :root.density-condensed .deal-header { gap: 7px; }
    :root.density-condensed .deal-title { font-size: 0.88rem; }
    :root.density-condensed .deal-temp { font-size: 1rem; }
    :root.density-condensed .current-price { font-size: 1rem; }
    :root.density-condensed .old-price { font-size: 0.88rem; }
    :root.density-condensed .deal-discount { font-size: 0.88rem; }
    :root.density-condensed .deal-footer { min-height: 27px; }
}

@media (max-width: 860px) {
    .deal-link {
        grid-template-columns: 153px minmax(0, 1fr);
    }

    .deal-title,
    .deal-temp {
        font-size: 1.1rem;
    }
}

@media (max-width: 660px) {
    body {
        overscroll-behavior-y: contain;
    }

    .tabs-mobile-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        height: 30px;
        padding: 0 9px 0 12px;
        border-radius: 999px;
        border: none;
        background: var(--violet);
        color: #fff;
        font: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        max-width: 220px;
        position: relative;
    }

    .tabs-mobile-trigger svg {
        display: block;
        flex-shrink: 0;
    }

    .tabs-mobile-trigger-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: normal;
    }

    .tabs-panel .saved-searches {
        display: none;
    }

    .hero-copy {
        display: flex;
        align-items: center;
    }

    .hero-copy h1 {
        display: none;
    }

    .pull-indicator {
        position: fixed;
        top: 8px;
        left: 50%;
        margin-left: -18px;
        z-index: 400;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--panel-strong);
        border: 1px solid var(--border-strong);
        box-shadow: var(--shadow-card);
        backdrop-filter: blur(16px);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted-2);
        pointer-events: none;
        will-change: transform;
    }

    .pull-indicator.ptr-ready {
        color: #7c3aed;
        border-color: rgba(124, 58, 237, 0.5);
    }

    .pull-indicator.ptr-loading svg {
        animation: spin 0.7s linear infinite;
    }

    html {
        font-size: 80%;
    }

    .page {
        width: min(100% - 18px, var(--container));
        padding-top: 0px;
    }

    .hero {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 7px;
        padding: 10px;
        position: sticky;
        top: 0;
        z-index: 200;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        margin-bottom: 0;
        margin-left: -9px;
        width: calc(100% + 18px);
        overflow: clip;
        backdrop-filter: none;
        background: var(--bg);
    }

    .hero::after {
        display: none;
    }

    .deals-list {
        padding-top: 10px;
    }

    h1 {
        font-size: clamp(0.9rem, 4.5vw, 1.2rem);
        line-height: 1;
    }

    .hero-copy {
        order: 2;
        flex: 1 1 0;
        min-width: 0;
    }

    .hero-copy h1 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .intro {
        display: none;
    }

    :root.has-js .mobile-hero-actions {
        position: relative;
        z-index: 1;
        order: 3;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin-left: auto;
    }

    .header-actions {
        position: static;
        order: 3;
        gap: 4px;
        backdrop-filter: none;
    }

    .options-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        justify-content: center;
        backdrop-filter: none;
    }

    .options-btn-label {
        display: none;
    }

    .options-field-density {
        display: none;
    }

    .options-checks-columns {
        display: none;
    }

    .user-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        justify-content: center;
        backdrop-filter: none;
    }

    .user-btn-label {
        display: none;
    }

    .user-btn-avatar {
        width: 24px;
        height: 24px;
    }

    .options-mobile-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .mobile-hero-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        min-height: 0;
        padding: 0;
        border: 1px solid var(--border-strong);
        border-radius: 999px;
        background: var(--input-bg);
        color: var(--text);
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        box-shadow: 0 7px 17px rgba(15, 23, 42, 0.12);
    }

    .mobile-hero-toggle span {
        display: none;
    }

    .mobile-hero-toggle svg {
        width: 14px;
        height: 14px;
        flex: 0 0 auto;
    }

    .mobile-hero-toggle.is-active {
        color: #fff;
        border-color: rgba(139, 92, 246, 0.65);
        background: linear-gradient(135deg, #7c3aed, #4f46e5);
    }

    /* Panneau de recherche : masqué quand les filtres ne sont pas ouverts */
    :root.has-js .tabs-panel:not(:has(.content-filters-bar.is-open)) {
        display: none;
    }

    /* Panneau de filtres : sticky sous le hero quand ouvert */
    :root.has-js .tabs-panel:has(.content-filters-bar.is-open) {
        position: sticky;
        top: var(--hero-h, 0px);
        z-index: 199;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: -9px;
        width: calc(100% + 18px);
        margin-bottom: 0;
    }

    /* Filtres de contenu : masqués par défaut sur mobile */
    :root.has-js .content-filters-bar:not(.is-open) {
        display: none;
    }

    /* Options d'affichage : masquées par défaut sur mobile */
    :root.has-js .hero .search-prefs:not(.is-open) {
        display: none;
    }

    .hero .search-prefs.is-open {
        flex: 0 0 100%;
        width: 100%;
        order: 4;
        padding-top: 4px;
    }

    .search-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .search-cat-select,
    .category-multi-select {
        width: 100%;
    }

    .filter-group--price {
        grid-column: 1 / -1;
    }

    .filter-group--sort {
        grid-column: 1 / -1;
    }

    .price-range {
        gap: 4px;
        padding: 0 10px;
        width: 100%;
    }

    .price-range-input {
        flex: 1 1 0;
        width: 0;
    }

    .search-row button[type="submit"] {
        display: none;
    }

    .hero-stage {
        order: 1;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        align-self: center;
        justify-content: flex-start;
        min-height: 0;
        border-radius: 50%;
        overflow: hidden;
    }

    .hero-logo {
        width: 42px;
        height: 42px;
        object-fit: contain;
        margin-top: 0;
        border-radius: 50%;
    }

    .search-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 7px;
    }

    .filter-group {
        min-width: 0;
    }

    .mobile-search-actions {
        grid-column: 1 / -1;
        display: flex;
        gap: 7px;
    }

    .mobile-search-submit {
        flex: 1 1 0;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 32px;
        padding: 0 10px;
        border: 1px solid rgba(139, 92, 246, 0.6);
        border-radius: 10px;
        background: linear-gradient(135deg, #7c3aed, #4f46e5);
        color: #fff;
        font-size: 14px;
        font-weight: 950;
        cursor: pointer;
    }

    .mobile-save-search {
        height: auto;
        min-height: 32px;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .mobile-reset-search {
        flex-shrink: 0;
        min-height: 32px;
        padding: 0 10px;
        border: 1px solid var(--border-strong);
        border-radius: 10px;
        background: transparent;
        color: var(--muted);
        font: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
    }

    .search-row-actions {
        display: none;
    }

    .search-row-actions--tabs {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .search-row-actions--tabs #dealSearchBtn {
        display: flex;
        align-items: center;
        justify-content: center;
        width:128px;
        min-width: 0;
        order: 2;
        height: 41px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .search-row-actions--tabs .tab-toolbar-sort {
        flex: 1 1 0;
        min-width: 0;
        order: 1;
    }

    .search-row-actions--tabs .tab-toolbar-sort .custom-select,
    .search-row-actions--tabs .tab-toolbar-sort .custom-select-trigger,
    .search-row-actions--tabs .tab-toolbar-sort .sort-select {
        height: 41px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .search-row-actions--tabs .tab-toolbar-sort .custom-select,
    .search-row-actions--tabs .tab-toolbar-sort .sort-select {
        width: 100%;
    }

    .search-row-actions--tabs .mobile-search-actions {
        display: none;
    }

    .search-row--tabs .tab-edit-btn {
        display: none;
    }

    .search-clear-btn {
        display: flex;
    }

    .search-input-wrap input {
        padding-right: 34px;
    }

    /* #prefsBar en colonne dans le panneau options mobile */
    .hero .search-prefs > .prefs-bar {
        flex-direction: column;
        align-items: stretch;
        margin: 0;
    }

    .hero .search-prefs {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 7px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }

    .prefs-group,
    .prefs-group:last-child {
        width: 100%;
        margin: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-panel-label {
        display: block;
        color: var(--muted);
        font-size: 0.63rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .prefs-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pref-check {
        width: 100%;
    }

    :root.has-js .mobile-options-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
    }

    .mobile-menu-action {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 36px;
        padding: 0 10px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: rgba(148, 163, 184, 0.1);
        color: var(--text);
        font: inherit;
        font-size: 14px;
        font-weight: 800;
        text-align: center;
        cursor: pointer;
    }

    .mobile-menu-action-main {
        grid-column: 1 / -1;
        min-height: 42px;
        background: rgba(139, 92, 246, 0.16);
        border-color: rgba(139, 92, 246, 0.42);
        color: var(--text-strong);
    }

    #themeToggle,
    .propose-btn,
    .prefs-group--density {
        display: none;
    }

    .deal-link {
        grid-template-columns: 40% minmax(0, 1fr);
        padding: 0px;
        gap: 10px;
    }

    .deal-visual {
        min-height: 110px;
    }

    /* Toujours masqués sur mobile (trop chargé) */
    .deal-detail,
    .deal-tags,
    .deal-heat-bar,
    .deal-share,
    .deal-comments {
        display: none;
    }

    /* Réduction % masquée sur mobile */
    .deal-discount {
        display: none;
    }


    /* 1 étoile + note uniquement */
    .stars-wrap {
        display: none;
    }

    .deal-rating::before {
        content: "★";
        color: var(--muted);
        font-size: 1rem;
    }

    /* Police réduite pour tous les éléments de la carte */
    .deal-title { font-size: 14px; }
    .deal-temp { font-size: 15px; }
    .deal-age { font-size: 14px; font-weight: 500; }
    .deal-rating { padding:0px; border-left: 0px;}
    .current-price { font-size: 15px; }
    .old-price { font-size: 15px; margin: 0 3px; }
    .deal-rating b,
    .stars-base,
    .stars-fill { font-size: 15px; }
    .deal-comments { font-size: 15px; }

    /* Prix barré, étoiles, commentaires sur la même ligne */
    .deal-footer {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        min-height: 26px;
        gap: 0;
    }

    .deal-header{
        min-height: 26px;
    }

    .deal-image {
        inset: 2px 7px;
        height: 131px;
    }

    .deal-body {
        gap: 7px;
        padding: 7px 7px 7px 0;
    }

    .deal-footer-prices {
        flex: 1 1 0;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 4px;
        padding: 0;
    }

    .deal-card--big-price .deal-rating {
        display: none;
    }
}

/* ── Search input wrapper (for mobile clear button) ── */
.search-input-wrap {
    position: relative;
    min-width: 0;
}

.search-input-wrap input {
    width: 100%;
}

.search-clear-btn {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted-2);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.search-clear-btn:hover {
    color: var(--text);
}

/* ── Reset button (desktop) ── */
.btn-reset-search {
    height: 41px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.btn-reset-search:hover {
    background: rgba(139, 92, 246, 0.08);
    color: var(--text);
}

/* ── Desktop scrollbar ── */
@media (min-width: 661px) {
    .mobile-search-actions { display: none; }
    .mobile-save-search    { display: none !important; }

    html {
        scrollbar-width: thin;
        scrollbar-color: rgba(14, 45, 63, 0.25) transparent;
    }

    html::-webkit-scrollbar {
        width: 8px;
    }

    html::-webkit-scrollbar-track {
        background: transparent;
    }

    html::-webkit-scrollbar-thumb {
        background: rgba(14, 45, 63, 0.22);
        border-radius: 4px;
    }

    html::-webkit-scrollbar-thumb:hover {
        background: var(--muted-2);
    }
}

/* ── Sticky tabs bar (desktop only) ── */
.sticky-tabs-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    display: flex;
    justify-content: center;
    background: var(--panel-strong);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    padding: 5px 0;
    transform: translateY(-100%);
    transition: transform 0.22s ease, opacity 0.22s ease;
    opacity: 0;
    pointer-events: none;
}

.sticky-tabs-bar-inner {
    width: min(var(--container), calc(100% - 32px));
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticky-tabs-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 660px) {
    .sticky-tabs-bar {
        display: none !important;
    }
}

.sticky-scroll-top-btn {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sticky-scroll-top-btn:hover {
    background: var(--violet);
    color: #fff;
    border-color: var(--violet);
}

.sticky-tabs-mirror {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sticky-tabs-mirror::-webkit-scrollbar {
    display: none;
}

@media (max-width: 430px) {
    .brand {
        font-size: 18px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .intro {
        font-size: 14px;
    }

    .deal-visual {
        border-radius: 0px;
        height: 146px;
    }

    .deal-card {
        border-radius: 10px;
    }

    .footer{
        display: none;
    }

    .deal-title{
        font-size: 14px;
        font-weight: 400;
        -webkit-line-clamp: 4;
    }
    .deal-temp {
        font-size: 15px;
    }

    .current-price {
        font-size: 15px;
    }
}

@media (max-width: 660px) {
    .tab-options-bg-palette {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }

    .tab-options-bg-swatch {
        min-height: 36px;
    }

    .tab-options-popup-actions {
        flex-wrap: wrap;
    }

    .tab-options-popup-actions button {
        flex: 1 1 calc(50% - 4px);
    }
}
