@font-face {
    font-family: 'Onest';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../vendor/onest/5.2.8/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Onest';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../vendor/onest/5.2.8/onest-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Theme: Bootstrap variables */

:root,
[data-bs-theme=light] {
    --app-accent: #5b3fd9;
    --app-accent-hover: #4a2fc2;
    --app-accent-rgb: 91, 63, 217;
    --app-ink: #16181d;
    --app-muted: #5d6371;
    --app-surface: #f3f5f8;
    --app-page: #f3f5f8;
    --app-coral: #d63e1a;
    --app-price-drop: #15803d;
    --app-line: #e8ebf0;
    --app-surface-hover: #e7ebf1;
    --app-success: #15803d;
    --app-success-dot: #22c55e;
    --app-favorite: #e5484d;
    --app-favorite-soft: #fff0f0;
    --app-favorite-border: #f6c4c6;

    /* Design tokens: three radii, three shadows. */
    --app-radius-sm: 0.5rem;
    --app-radius: 0.75rem;
    --app-radius-lg: 1rem;
    --app-radius-pill: 999px;
    --app-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --app-shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
    --app-shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);

    --bs-body-font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-color: var(--app-ink);
    --bs-body-color-rgb: 22, 24, 29;
    --bs-emphasis-color: var(--app-ink);
    --bs-secondary-color: var(--app-muted);
    --bs-secondary-bg: var(--app-surface);
    --bs-tertiary-bg: #f8f9fb;
    --bs-border-color: var(--app-line);
    --bs-border-radius: var(--app-radius);
    --bs-border-radius-sm: var(--app-radius-sm);
    --bs-border-radius-lg: var(--app-radius-lg);
    --bs-border-radius-xl: var(--app-radius-lg);
    --bs-border-radius-pill: var(--app-radius-pill);
    --bs-primary: var(--app-accent);
    --bs-primary-rgb: var(--app-accent-rgb);
    --bs-primary-bg-subtle: #ebe6fd;
    --bs-primary-border-subtle: #cfc4fa;
    --bs-primary-text-emphasis: #3b2596;
    --bs-link-color: #5b3fd9;
    --bs-link-color-rgb: 91, 63, 217;
    --bs-link-hover-color: #3b2596;
    --bs-link-hover-color-rgb: 59, 37, 150;
    --bs-focus-ring-color: rgba(var(--app-accent-rgb), 0.25);
    --bs-box-shadow-sm: var(--app-shadow-sm);
}

body {
    -webkit-font-smoothing: antialiased;
    /* The page is light grey, content lies on white cards. */
    background-color: var(--app-page);
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
}

[x-cloak] {
    display: none !important;
}

/* One visible focus style for keyboard users. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--app-accent);
    outline-offset: 2px;
    box-shadow: none;
}

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: var(--app-radius);
    --bs-btn-padding-x: 1rem;
}

.btn-sm {
    --bs-btn-border-radius: var(--app-radius-sm);
}

/* Text buttons look like the links of the site: no underline until hovered. */
.btn-link {
    --bs-btn-font-weight: 600;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-lg {
    --bs-btn-border-radius: var(--app-radius);
}

.btn-primary {
    --bs-btn-bg: var(--app-accent);
    --bs-btn-border-color: var(--app-accent);
    --bs-btn-hover-bg: var(--app-accent-hover);
    --bs-btn-hover-border-color: var(--app-accent-hover);
    --bs-btn-active-bg: var(--app-accent-hover);
    --bs-btn-active-border-color: var(--app-accent-hover);
    --bs-btn-disabled-bg: var(--app-accent);
    --bs-btn-disabled-border-color: var(--app-accent);
    --bs-btn-focus-shadow-rgb: var(--app-accent-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--app-accent);
    --bs-btn-border-color: var(--app-accent);
    --bs-btn-hover-bg: var(--app-accent);
    --bs-btn-hover-border-color: var(--app-accent);
    --bs-btn-active-bg: var(--app-accent-hover);
    --bs-btn-active-border-color: var(--app-accent-hover);
    --bs-btn-focus-shadow-rgb: var(--app-accent-rgb);
}

.btn-light {
    --bs-btn-bg: var(--app-surface);
    --bs-btn-border-color: var(--app-surface);
    --bs-btn-hover-bg: var(--app-surface-hover);
    --bs-btn-hover-border-color: var(--app-surface-hover);
}

.form-control,
.form-select {
    border-radius: var(--app-radius);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--app-accent);
    box-shadow: 0 0 0 0.2rem rgba(var(--app-accent-rgb), 0.15);
}

.form-check-input {
    border-color: #c3c9d3;
}

.form-check-input:checked {
    background-color: var(--app-accent);
    border-color: var(--app-accent);
}

.card {
    --bs-card-border-color: var(--app-line);
    --bs-card-border-radius: var(--app-radius-lg);
    --bs-card-inner-border-radius: calc(var(--app-radius-lg) - 1px);
}

.list-group {
    --bs-list-group-border-color: var(--app-line);
    --bs-list-group-active-bg: var(--app-accent);
    --bs-list-group-active-border-color: var(--app-accent);
    --bs-list-group-action-hover-bg: var(--app-surface);
    --bs-list-group-border-radius: var(--app-radius-lg);
}

/* Lists lying on the grey page look like the cards around them. */
.list-group:not(.list-group-flush):not(.position-absolute) {
    box-shadow: var(--app-shadow-sm);
}

.dropdown-menu {
    --bs-dropdown-border-color: var(--app-line);
    --bs-dropdown-border-radius: var(--app-radius-lg);
    --bs-dropdown-link-active-bg: var(--app-accent);
    box-shadow: var(--app-shadow-lg);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--app-accent);
}

/* Page tabs (favorites, my listings, wizard steps): a white bar, the current tab filled with the accent; one row that scrolls sideways on phones. */
.nav-segmented {
    position: relative;
    flex-wrap: nowrap;
    gap: 0.25rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.3125rem;
    overflow-x: auto;
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    scrollbar-width: none;
}

.nav-segmented::-webkit-scrollbar {
    display: none;
}

.nav-segmented .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border: 0;
    border-radius: var(--app-radius);
    color: var(--app-ink);
    font-weight: 500;
    white-space: nowrap;
}

.nav-segmented .nav-link:hover {
    background: var(--app-surface);
    color: var(--app-ink);
}

.nav-segmented .nav-link.active {
    background: var(--app-accent);
    color: #fff;
}

.nav-count {
    min-width: 1.375rem;
    padding: 0.0625rem 0.375rem;
    border-radius: var(--app-radius-pill);
    background: var(--app-surface);
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.nav-segmented .nav-link.active .nav-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

@media (max-width: 575.98px) {
    .nav-segmented {
        width: 100%;
    }

    .nav-segmented .nav-link {
        padding-inline: 0.625rem;
    }
}

/* Tables on the grey page sit on a white card. */
.table-card {
    padding: 0.25rem 1rem;
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

.table-card .table {
    --bs-table-bg: transparent;
}

.table-card tbody tr:last-child > * {
    border-bottom: 0;
}

/* A hint or a counter with an action above a list. */
.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.625rem 0.75rem 0.625rem 1rem;
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

/* A secondary action lying on the grey page. */
.btn-white {
    --bs-btn-color: var(--app-ink);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--app-line);
    --bs-btn-hover-color: var(--app-ink);
    --bs-btn-hover-bg: var(--app-surface);
    --bs-btn-hover-border-color: var(--app-line);
    --bs-btn-active-color: var(--app-ink);
    --bs-btn-active-bg: var(--app-surface-hover);
    --bs-btn-active-border-color: var(--app-line);
}

.pagination {
    --bs-pagination-active-bg: var(--app-accent);
    --bs-pagination-active-border-color: var(--app-accent);
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    vertical-align: -0.25em;
}

/* Page titles and the line under them */

h5, .h5, h6, .h6 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.625rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--app-radius-pill);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    color: #3b404a;
    font-size: 0.8125rem;
    font-weight: 500;
}

.meta-chip .icon {
    width: 0.9375rem;
    height: 0.9375rem;
    color: var(--app-muted);
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.375rem;
    }
}

/* Bootstrap colors brought to the site palette: soft backgrounds with dark text of the same hue. */

.badge {
    font-weight: 600;
}

.text-bg-success {
    background-color: #e3f4e8 !important;
    color: #166534 !important;
}

.text-bg-warning {
    background-color: #fff1d0 !important;
    color: #7a4f00 !important;
}

.text-bg-danger {
    background-color: #fde7e7 !important;
    color: #9f1d1d !important;
}

.text-bg-secondary,
.text-bg-light {
    background-color: #eceff3 !important;
    color: #4b5160 !important;
}

.text-bg-primary {
    background-color: var(--app-accent) !important;
    color: #fff !important;
}

.alert {
    --bs-alert-border-color: transparent;
    --bs-alert-border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-sm);
}

.alert-info {
    --bs-alert-bg: var(--bs-primary-bg-subtle);
    --bs-alert-color: var(--bs-primary-text-emphasis);
    --bs-alert-link-color: var(--bs-primary-text-emphasis);
}

.alert-success {
    --bs-alert-bg: #e3f4e8;
    --bs-alert-color: #14532d;
    --bs-alert-link-color: #14532d;
}

.alert-warning {
    --bs-alert-bg: #fff4d6;
    --bs-alert-color: #6b4500;
    --bs-alert-link-color: #6b4500;
}

.alert-danger {
    --bs-alert-bg: #fde7e7;
    --bs-alert-color: #8a1c1c;
    --bs-alert-link-color: #8a1c1c;
}

.alert-secondary {
    --bs-alert-bg: #fff;
    --bs-alert-color: var(--app-ink);
}

/* Secondary buttons: white with a thin line instead of dark grey. */
.btn-outline-secondary {
    --bs-btn-color: var(--app-ink);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--app-line);
    --bs-btn-hover-color: var(--app-ink);
    --bs-btn-hover-bg: var(--app-surface);
    --bs-btn-hover-border-color: #d5dae2;
    --bs-btn-active-color: var(--app-ink);
    --bs-btn-active-bg: var(--app-surface-hover);
    --bs-btn-active-border-color: #d5dae2;
    --bs-btn-disabled-color: var(--app-muted);
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: var(--app-line);
}

/* Option switches (condition, rating): the chosen option in the accent color. */
.btn-check:checked + .btn-outline-secondary,
.btn-check:checked + .btn-outline-warning,
.btn-check:checked + .btn-outline-primary {
    border-color: var(--app-accent);
    background-color: var(--app-accent);
    color: #fff;
}

.btn-outline-warning,
.btn-outline-danger {
    --bs-btn-bg: #fff;
}

.btn-outline-danger {
    --bs-btn-color: #b42318;
    --bs-btn-border-color: #f3c3c0;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #b42318;
    --bs-btn-hover-border-color: #b42318;
}

/* Header */

.site-header {
    position: relative;
    z-index: 10;
    background: #fff;
    box-shadow: 0 1px 0 var(--app-line), 0 6px 20px rgba(16, 24, 40, 0.05);
}

.site-header .navbar {
    min-height: 72px;
}

.site-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--app-ink);
}

.site-brand:hover {
    color: var(--app-ink);
}

.site-brand-dot {
    color: var(--app-accent);
}

.city-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 0;
    border-radius: var(--app-radius-sm);
    background: var(--app-surface);
    color: var(--app-ink);
    font-size: 0.875rem;
    white-space: nowrap;
}

.city-chip:hover {
    background: var(--app-surface-hover);
}

.site-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #3b404a;
    font-size: 0.9375rem;
}

.site-nav .nav-link:hover {
    color: var(--app-ink);
}

/* Round counter: a circle for one digit, a pill for longer numbers; never stretched by a flex row. */
.count-badge {
    display: inline-flex;
    flex: none;
    align-self: center;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    border-radius: var(--app-radius-pill);
    background: var(--app-coral);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.count-badge-danger {
    background: var(--app-coral);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #ebe6fd;
    color: #3b2596;
    font-weight: 600;
    font-size: 0.9375rem;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Search bar */

/* A filled field with a magnifier; the accent outline appears on focus. */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    height: 3.25rem;
    padding: 0.3125rem 0.3125rem 0.3125rem 1rem;
    border: 2px solid transparent;
    border-radius: 0.875rem;
    background: var(--app-surface);
    transition: border-color 0.15s, background-color 0.15s;
}

.search-bar:focus-within {
    border-color: var(--app-accent);
    background: #fff;
}

.search-bar > .icon {
    color: var(--app-muted);
}

.search-bar .form-control {
    align-self: stretch;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 1.0625rem;
    box-shadow: none;
}

.search-bar .btn {
    align-self: stretch;
    padding: 0 1.75rem;
    border-radius: 0.625rem;
    font-size: 1rem;
}

.search-history-query {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    padding: 0.625rem 0 0.625rem 1rem;
    border: 0;
    background: none;
    color: var(--app-ink);
    text-align: start;
}

.search-history-query .icon {
    color: var(--app-muted);
}

.search-history-subscribe {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--app-muted);
}

.search-history-subscribe:hover {
    background: var(--app-surface-hover);
    color: var(--app-accent);
}

.search-history-subscribe.active,
.search-history-subscribe:disabled {
    color: var(--app-accent);
    opacity: 1;
}

.search-history-subscribe.active .icon {
    fill: currentColor;
}

.search-history .btn-close {
    flex: none;
    width: 0.625rem;
    height: 0.625rem;
    background-size: 0.625rem;
}

/* Category tiles */

.category-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    height: 100%;
    min-height: 4.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--app-radius);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    color: var(--app-ink);
    transition: box-shadow 0.15s;
}

.category-tile:hover {
    box-shadow: var(--app-shadow);
    color: var(--app-ink);
}

.category-tile-name {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.25;
}

.category-tile-count {
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.category-tile-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--app-radius);
    background: #dfe7f5;
    color: #1d3f86;
    font-size: 1.125rem;
}

.tone-1 { background: #dfe7f5; color: #1d3f86; }
.tone-2 { background: #e6efe4; color: #2b5d2a; }
.tone-3 { background: #f3e7dc; color: #7a4414; }
.tone-4 { background: #e9e4f3; color: #4a2f86; }
.tone-5 { background: #f1e9d6; color: #6b5212; }
.tone-6 { background: #dcebee; color: #1e5660; }
.tone-7 { background: #efe0e3; color: #7c2638; }
.tone-8 { background: #e3e8ec; color: #334250; }
.tone-9 { background: #eee8dd; color: #5c4a2a; }

/* Listing card */

.listing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
    height: 100%;
    padding: 0.5rem 0.5rem 0.75rem;
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.listing-card:hover {
    box-shadow: var(--app-shadow-lg);
    transform: translateY(-2px);
}

.listing-card > :not(.position-relative) {
    padding-inline: 0.5rem;
}

.listing-card-photo {
    display: block;
    border-radius: var(--app-radius);
    overflow: hidden;
    background: var(--app-surface);
}

.listing-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    align-items: center;
    justify-content: center;
}

.photo-placeholder .icon {
    width: 30%;
    max-width: 3.5rem;
    height: auto;
    opacity: 0.7;
}

.photo-placeholder-label {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* Too small for a caption: chat and "My listings" thumbnails. */
.ratio > .photo-placeholder .photo-placeholder-label {
    display: none;
}

.listing-card-photo > .photo-placeholder .photo-placeholder-label {
    display: block;
}

.listing-card:hover .listing-card-photo img {
    transform: scale(1.03);
}

.listing-card-title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.listing-card-title a {
    color: var(--app-ink);
}

.listing-card:hover .listing-card-title a {
    color: var(--app-accent);
}

.listing-card-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 1.1875rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.listing-card-meta {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--app-muted);
}

.listing-card-old-price {
    color: var(--app-muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

/* "New" and "Price reduced" in the photo corner, the number of photos at the bottom. */
.listing-badge,
.listing-card-photos {
    position: absolute;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--app-radius-sm);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    pointer-events: none;
}

.listing-badge {
    top: 0.5rem;
}

.listing-badge-fresh {
    background: var(--app-coral);
}

.listing-badge-drop {
    background: var(--app-price-drop);
}

.listing-card-photos {
    bottom: 0.5rem;
    padding-inline: 0.4375rem;
    background: rgba(22, 24, 29, 0.62);
    font-weight: 600;
}

.listing-card-photos .icon {
    width: 0.875rem;
    height: 0.875rem;
}

.favorite-toggle {
    /* Above the card's stretched link. */
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--app-ink);
}

.favorite-toggle:hover {
    background: #fff;
    color: var(--app-favorite);
}

.favorite-toggle.active {
    color: var(--app-favorite);
}

.favorite-toggle.active .icon,
.btn-favorite.active .icon,
.btn-following .icon {
    fill: currentColor;
}

/* "Add to favorites" on the listing page: neutral, red when hovered or added. */
.btn-favorite {
    --bs-btn-color: var(--app-ink);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--app-line);
    --bs-btn-hover-color: var(--app-favorite);
    --bs-btn-hover-bg: var(--app-favorite-soft);
    --bs-btn-hover-border-color: var(--app-favorite-border);
    --bs-btn-active-color: var(--app-favorite);
    --bs-btn-active-bg: var(--app-favorite-soft);
    --bs-btn-active-border-color: var(--app-favorite-border);
    --bs-btn-disabled-color: var(--app-muted);
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: var(--app-line);
    --bs-btn-focus-shadow-rgb: 229, 72, 77;
}

/* "Following" a seller: soft accent instead of a grey button. */
.btn-following {
    --bs-btn-color: var(--bs-primary-text-emphasis);
    --bs-btn-bg: var(--bs-primary-bg-subtle);
    --bs-btn-border-color: var(--bs-primary-border-subtle);
    --bs-btn-hover-color: var(--bs-primary-text-emphasis);
    --bs-btn-hover-bg: #ddd4fc;
    --bs-btn-hover-border-color: var(--bs-primary-border-subtle);
    --bs-btn-active-color: var(--bs-primary-text-emphasis);
    --bs-btn-active-bg: #ddd4fc;
    --bs-btn-active-border-color: var(--bs-primary-border-subtle);
    --bs-btn-disabled-color: var(--bs-primary-text-emphasis);
    --bs-btn-disabled-bg: var(--bs-primary-bg-subtle);
    --bs-btn-disabled-border-color: var(--bs-primary-border-subtle);
    --bs-btn-focus-shadow-rgb: var(--app-accent-rgb);
}

/* Breadcrumbs */

.crumbs-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    font-size: 0.875rem;
    list-style: none;
    white-space: nowrap;
    scrollbar-width: none;
}

.crumbs-list::-webkit-scrollbar {
    display: none;
}

.crumbs-item {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.25rem;
}

/* A thin arrow between steps. */
.crumbs-item + .crumbs-item::before {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    margin: 0 0.375rem 0 0.125rem;
    border-top: 1.5px solid #9aa1ad;
    border-right: 1.5px solid #9aa1ad;
    transform: rotate(45deg);
}

.crumbs-item a {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--app-radius-sm);
    color: var(--app-muted);
}

.crumbs-item a:hover {
    background: #fff;
    color: var(--app-accent);
}

.crumbs-home {
    width: 2rem;
    height: 2rem;
    justify-content: center;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

.crumbs-home .icon {
    width: 1rem;
    height: 1rem;
}

.crumbs-current {
    flex-shrink: 1;
    min-width: 0;
    padding: 0.25rem 0.5rem;
    overflow: hidden;
    color: var(--app-ink);
    font-weight: 600;
    text-overflow: ellipsis;
}

/* Subcategories above the catalog: white chips with the number of listings; one scrolling row on phones. */
.subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.subcategory {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0.875rem;
    border-radius: var(--app-radius-pill);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    color: var(--app-ink);
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    transition: box-shadow 0.15s;
}

.subcategory:hover {
    box-shadow: var(--app-shadow);
    color: var(--app-accent);
}

.subcategory.is-empty {
    color: var(--app-muted);
}

@media (max-width: 767.98px) {
    .subcategories {
        flex-wrap: nowrap;
        margin-inline: calc(var(--bs-gutter-x) * -0.5);
        padding: 0 calc(var(--bs-gutter-x) * 0.5) 0.25rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .subcategories::-webkit-scrollbar {
        display: none;
    }
}

/* Sections */

.section-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-link {
    font-weight: 600;
    white-space: nowrap;
}

.surface {
    padding: 1.5rem;
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

@media (min-width: 768px) {
    .auth-card {
        padding: 2rem;
    }
}

/* Home page: greeting with recent searches, round categories, recently viewed */

.home-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2.25rem 2.5rem;
    border-radius: 1.5rem;
    background: var(--app-accent);
    color: #fff;
}

.home-hero-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
}

.home-hero-title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.home-hero-text {
    margin: 0;
    font-size: 1.0625rem;
    opacity: 0.92;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-hero {
    --bs-btn-color: var(--app-accent);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #fff;
    --bs-btn-hover-color: var(--app-accent-hover);
    --bs-btn-hover-bg: #f1eefe;
    --bs-btn-hover-border-color: #f1eefe;
    --bs-btn-active-color: var(--app-accent-hover);
    --bs-btn-active-bg: #f1eefe;
    --bs-btn-active-border-color: #f1eefe;
    --bs-btn-padding-y: 0.75rem;
    --bs-btn-padding-x: 1.25rem;
    font-weight: 700;
}

.btn-hero-outline {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.55);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.12);
    --bs-btn-hover-border-color: #fff;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(255, 255, 255, 0.18);
    --bs-btn-active-border-color: #fff;
    --bs-btn-padding-y: 0.75rem;
    --bs-btn-padding-x: 1.25rem;
}

.home-hero .btn:focus-visible {
    outline-color: #fff;
}

.home-recent {
    display: flex;
    flex: 0 0 24rem;
    flex-direction: column;
    gap: 0.875rem;
    padding: 1.25rem;
    border-radius: 1.125rem;
    background: #fff;
    color: var(--app-ink);
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
}

.home-recent-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
}

.home-recent-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.home-recent-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--app-radius-pill);
    background: var(--app-surface);
    color: var(--app-ink);
    font-size: 0.875rem;
}

.home-recent-item:hover {
    background: var(--app-surface-hover);
    color: var(--app-ink);
}

.home-recent-item span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.home-recent-item .icon {
    color: var(--app-muted);
}

.home-recent-hint {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    color: var(--app-muted);
    font-size: 0.8125rem;
}

.home-categories {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.home-category {
    display: flex;
    flex: 0 0 6.25rem;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    color: var(--app-ink);
    text-align: center;
}

.home-category:hover {
    color: var(--app-accent);
}

.home-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    transition: transform 0.15s;
}

.home-category:hover .home-category-icon {
    transform: scale(1.06);
}

.home-category-icon .icon {
    width: 1.875rem;
    height: 1.875rem;
}

.home-category-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.section-title-sm {
    font-size: 1.5rem;
}

.home-viewed {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.viewed-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.25rem;
    padding: 0.375rem 0.375rem 0.75rem;
    border-radius: 0.875rem;
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    color: var(--app-ink);
    transition: box-shadow 0.2s;
}

.viewed-card:hover {
    box-shadow: var(--app-shadow);
    color: var(--app-ink);
}

.viewed-card-photo {
    margin-bottom: 0.25rem;
    border-radius: 0.625rem;
    overflow: hidden;
}

.viewed-card-photo img {
    object-fit: cover;
}

.viewed-card-price {
    padding-inline: 0.375rem;
    font-size: 1rem;
    font-weight: 800;
}

.viewed-card-title {
    padding-inline: 0.375rem;
    overflow: hidden;
    color: var(--app-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
    .home-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.25rem;
        border-radius: 1.25rem;
    }

    .home-hero-title {
        font-size: 1.5rem;
    }

    .home-hero-text {
        font-size: 0.9375rem;
    }

    /* The post button is in the bottom navigation on phones. */
    .home-hero-actions,
    .home-recent-hint {
        display: none;
    }

    .home-recent {
        flex-basis: auto;
        gap: 0.5rem;
        padding: 0;
        background: none;
        color: #fff;
        box-shadow: none;
    }

    .home-recent-title {
        font-size: 0.875rem;
        font-weight: 400;
        opacity: 0.92;
    }

    .home-recent-item,
    .home-recent-item:hover {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
    }

    .home-recent-item .icon {
        color: inherit;
    }

    .home-categories,
    .home-viewed {
        margin-inline: calc(var(--bs-gutter-x) * -0.5);
        padding-inline: calc(var(--bs-gutter-x) * 0.5);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .home-categories::-webkit-scrollbar,
    .home-viewed::-webkit-scrollbar {
        display: none;
    }

    .home-categories {
        justify-content: flex-start;
    }

    .home-category {
        flex-basis: 5.25rem;
    }

    .home-category-icon {
        width: 3.75rem;
        height: 3.75rem;
    }

    .home-category-icon .icon {
        width: 1.625rem;
        height: 1.625rem;
    }

    .home-category-name {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .section-title-sm {
        font-size: 1.1875rem;
    }

    .home-viewed {
        display: flex;
        gap: 0.625rem;
        padding-bottom: 0.25rem;
    }

    .viewed-card {
        flex: 0 0 7.75rem;
    }
}

/* All categories: quick jump, then root categories as cards laid out in columns */

.category-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-jump-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3125rem 0.875rem 0.3125rem 0.3125rem;
    border-radius: var(--app-radius-pill);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    color: var(--app-ink);
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
}

.category-jump-item:hover {
    box-shadow: var(--app-shadow);
    color: var(--app-ink);
}

.category-jump-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.category-jump-icon .icon {
    width: 1.125rem;
    height: 1.125rem;
}

/* Cards of different height stack without gaps. */
.category-columns {
    column-count: 3;
    column-gap: 1.25rem;
}

.category-card {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    break-inside: avoid;
    scroll-margin-top: 1rem;
}

.category-card-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem;
    border-radius: var(--app-radius);
    color: var(--app-ink);
}

.category-card-head:hover {
    background: var(--app-surface);
    color: var(--app-ink);
}

.category-card-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--app-radius);
}

.category-card-icon .icon {
    width: 1.625rem;
    height: 1.625rem;
}

.category-card-title {
    margin: 0;
    font-size: 1.1875rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.category-card-count {
    color: var(--app-muted);
    font-size: 0.8125rem;
}

.category-card-list {
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
}

.category-card-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.4375rem 0.5rem;
    border-radius: var(--app-radius-sm);
    color: var(--app-ink);
    font-weight: 600;
    font-size: 0.9375rem;
}

.category-card-link:hover {
    background: var(--app-surface);
    color: var(--app-accent);
}

.category-card-link-count {
    flex-shrink: 0;
    color: var(--app-muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

.category-card-leaves {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.125rem 0.5rem 0.5rem;
}

.category-card-leaf {
    padding: 0.25rem 0.625rem;
    border-radius: var(--app-radius-pill);
    background: var(--app-surface);
    color: #3b404a;
    font-size: 0.8125rem;
}

.category-card-leaf:hover {
    background: var(--app-surface-hover);
    color: var(--app-ink);
}

@media (max-width: 991.98px) {
    .category-columns {
        column-count: 2;
    }
}

@media (max-width: 767.98px) {
    .category-columns {
        column-count: 1;
    }

    .category-jump {
        flex-wrap: nowrap;
        margin-inline: calc(var(--bs-gutter-x) * -0.5);
        padding: 0 calc(var(--bs-gutter-x) * 0.5) 0.25rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .category-jump::-webkit-scrollbar {
        display: none;
    }
}

/* Footer */

.site-footer {
    margin-top: auto;
    padding: 2.5rem 0 1.75rem;
    border-top: 1px solid var(--app-line);
    background: #fff;
    color: var(--app-muted);
    font-size: 0.875rem;
}

.site-footer-tagline {
    max-width: 20rem;
    margin: 0.5rem 0 0;
    line-height: 1.5;
}

.site-footer-heading {
    color: var(--app-ink);
    font-weight: 700;
}

.site-footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--app-line);
}

.site-footer-links a {
    color: var(--app-muted);
    text-decoration: none;
}

.site-footer-links a:hover {
    color: var(--bs-primary);
}

/* Captcha */

.captcha-image {
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius-sm);
}

/* Cookie banner */

.cookie-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    padding-bottom: 1rem;
    pointer-events: none;
}

.cookie-banner-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--app-line);
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-lg);
    font-size: 0.9375rem;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .cookie-banner-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Information pages */

.page-content h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.page-content li + li {
    margin-top: 0.25rem;
}

/* Chat */

.chat-bubble {
    max-width: 75%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--app-radius-lg);
}

.chat-bubble-mine {
    background: var(--bs-primary-bg-subtle);
}

.chat-bubble-other {
    background: var(--bs-secondary-bg);
}

.chat-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-messages {
    height: 55vh;
}

.chat-head {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    background: #fff;
}

.chat-back {
    display: inline-flex;
    margin-left: -0.25rem;
    color: var(--app-ink);
}

.chat-back .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.chat-listing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    color: var(--app-ink);
}

.chat-listing:hover {
    background: var(--app-surface-hover);
    color: var(--app-ink);
}

.chat-listing-photo {
    flex: none;
    width: 3.5rem;
    height: 2.75rem;
    overflow: hidden;
    border-radius: var(--app-radius-sm);
}

.chat-listing-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-listing-photo .photo-placeholder {
    height: 100%;
}

.chat-listing-photo .photo-placeholder-label {
    display: none;
}

.chat-listing-title {
    display: block;
    overflow: hidden;
    font-size: 0.9375rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chat-listing-price {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
}

.chat-compose {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.chat-compose textarea {
    min-height: 2.5rem;
    max-height: 8rem;
    resize: none;
    field-sizing: content;
}

.chat-compose-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
}

/* On phones an open conversation takes the whole screen like a messenger: the input stays at the bottom. */
@media (max-width: 991.98px) {
    .chat-window {
        position: fixed;
        inset: 0;
        z-index: 1045;
        height: 100dvh !important;
        border: 0;
        border-radius: 0;
    }

    .chat-window .chat-messages {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }

    .chat-window .card-footer {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }

    body:has(.chat-window) {
        overflow: hidden;
    }
}

@media (max-width: 1199.98px) {
    .site-nav {
        padding: 0.75rem 0;
    }

    /* In the collapsed menu a dropdown opens below its item across the full width, not beside it. */
    .site-nav .nav-item.dropdown {
        flex-wrap: wrap;
    }

    /* Long one-line notification texts must be cut, not widen the menu beyond the screen. */
    .site-header .navbar-collapse,
    .site-nav,
    .site-nav .nav-item {
        min-width: 0;
    }

    .site-nav .dropdown-menu {
        min-width: 0;
        flex-basis: 100%;
        width: 100% !important;
        margin: 0.25rem 0 0.5rem;
        box-shadow: none;
    }

    .search-bar .btn {
        padding: 0 1.25rem;
    }
}

/* Page not found */

.not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 40rem;
    margin: 1.5rem auto 3rem;
    text-align: center;
}

.not-found-code {
    display: flex;
    align-items: center;
    font-size: clamp(4.5rem, 16vw, 7.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--app-ink);
}

.not-found-zero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.8em;
    height: 0.8em;
    margin: 0 0.06em;
    border-radius: 50%;
    background: var(--bs-primary-bg-subtle);
    color: var(--app-accent);
}

.not-found-zero .icon {
    width: 0.45em;
    height: 0.45em;
    vertical-align: 0;
}

.not-found-title {
    margin: 1.25rem 0 0.5rem;
    font-size: 1.625rem;
    font-weight: 700;
}

.not-found-text {
    margin-bottom: 1.5rem;
    color: var(--app-muted);
}

.not-found-search {
    width: 100%;
    margin-bottom: 1.25rem;
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    text-align: start;
}

.not-found-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.not-found-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    border-radius: var(--app-radius-pill);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    color: var(--app-ink);
    font-size: 0.9375rem;
}

.not-found-chip:hover {
    box-shadow: var(--app-shadow);
    color: var(--app-ink);
}

/* Listing page */

.listing-gallery {
    border-radius: var(--app-radius-lg);
    overflow: hidden;
    background: var(--app-surface);
}

.listing-gallery .carousel-item img {
    height: 480px;
    object-fit: contain;
}

.avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .listing-gallery .carousel-item img {
        height: 300px;
    }
}

.avatar-xl {
    width: 6rem;
    height: 6rem;
    font-size: 2.25rem;
}

.site-nav .nav-item {
    display: flex;
    align-items: center;
}

.site-nav .nav-link {
    white-space: nowrap;
}

.site-nav .icon {
    vertical-align: 0;
}

/* Presence: online or last seen */

.presence {
    color: var(--app-muted);
}

.presence.is-online {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--app-success);
}

.presence.is-online::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--app-success-dot);
}

/* Presence under the name in the conversation list. */
.chat-presence {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chat-presence.is-online {
    display: flex;
}

.list-group-item.active .presence {
    color: inherit;
    opacity: 0.85;
}

/* Bottom navigation on phones */

.bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--app-line);
    background: #fff;
}

.bottom-nav-item {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.25rem 0;
    color: var(--app-muted);
    font-size: 0.6875rem;
    line-height: 1.2;
    text-decoration: none;
}

.bottom-nav-item .icon {
    width: 1.5rem;
    height: 1.75rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--app-accent);
}

.bottom-nav-post-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 1.75rem;
    border-radius: var(--app-radius);
    background: var(--app-accent);
    color: #fff;
}

.bottom-nav-post-icon .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.bottom-nav-badge {
    position: absolute;
    top: -0.375rem;
    left: 0.875rem;
}

@media (max-width: 991.98px) {
    /* The content, the cookie notice and the push offer stay above the navigation. */
    body {
        padding-bottom: calc(3.75rem + env(safe-area-inset-bottom));
    }

    .cookie-banner,
    .push-offer {
        bottom: calc(3.75rem + env(safe-area-inset-bottom)) !important;
    }
}

/* "Post a listing" pinned above the bottom navigation on the "My listings" page. */
.my-post-bar {
    position: fixed;
    right: 0;
    bottom: calc(3.75rem + env(safe-area-inset-bottom));
    left: 0;
    z-index: 1020;
    padding: 0.75rem 1rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 35%);
}

@media (max-width: 575.98px) {
    body:has(.my-post-bar) {
        padding-bottom: calc(8rem + env(safe-area-inset-bottom));
    }
}

/* Empty screens */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1.5rem;
    border-radius: var(--app-radius-lg);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
    text-align: center;
}

.empty-state > * {
    max-width: 30rem;
}

/* Inside a list the list itself is the card. */
.list-group-item.empty-state {
    border-radius: 0;
    box-shadow: none;
}

.empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: var(--app-radius-lg);
    background: var(--bs-primary-bg-subtle);
    color: var(--app-accent);
}

.empty-state-icon .icon {
    width: 1.75rem;
    height: 1.75rem;
}

.empty-state-title {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.empty-state-text {
    margin-bottom: 1.25rem;
    color: var(--app-muted);
}

/* Toasts: messages after an action */

.toast-stack {
    position: fixed;
    top: 1rem;
    left: 50%;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(26rem, calc(100vw - 2rem));
    transform: translateX(-50%);
}

.app-toast {
    --bs-toast-border-radius: var(--app-radius);
    --bs-toast-border-color: var(--app-line);
    --bs-toast-max-width: 100%;
    width: 100%;
    border-left: 4px solid var(--app-accent);
    box-shadow: var(--app-shadow-lg);
    font-size: 0.9375rem;
}

.app-toast-success { border-left-color: var(--app-success-dot); }
.app-toast-danger { border-left-color: var(--bs-danger); }
.app-toast-warning { border-left-color: var(--bs-warning); }

/* Loading placeholders */

.skeleton {
    display: block;
    border-radius: var(--app-radius-sm);
    background: linear-gradient(90deg, var(--app-surface) 25%, var(--app-surface-hover) 37%, var(--app-surface) 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-line {
    height: 0.875rem;
}

@keyframes skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
    }
}

/* Seller rating and trust */

.rating-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
}

.rating-stars {
    position: relative;
    display: inline-block;
    font-size: 0.9375rem;
    line-height: 1;
    letter-spacing: 0.05em;
}

.rating-stars::before {
    content: "★★★★★";
    color: #dfe3ea;
}

.rating-stars::after {
    content: "★★★★★";
    position: absolute;
    top: 0;
    left: 0;
    width: var(--rating);
    overflow: hidden;
    color: var(--rating-color, #f5a524);
    white-space: nowrap;
}

/* Rating color from red (1) to green (5); every step readable on white. */
.rating-tone-1 { --rating-color: #c62828; }
.rating-tone-2 { --rating-color: #c43d12; }
.rating-tone-3 { --rating-color: #a15c00; }
.rating-tone-4 { --rating-color: #4a7c24; }
.rating-tone-5 { --rating-color: #2e7d32; }

.rating-value {
    color: var(--rating-color);
    font-weight: 700;
}

.review-stars {
    color: var(--rating-color);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.trust-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin: 0.375rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.trust-item.is-positive::before {
    content: "✓ ";
    color: var(--app-success);
    font-weight: 700;
}

/* My listings */

/* The seller's panel on the page of their own listing */

.owner-panel-title {
    font-weight: 700;
}

.owner-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.owner-stat {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--app-radius);
    background: var(--app-surface);
    color: var(--app-ink);
}

a.owner-stat:hover {
    background: var(--app-surface-hover);
    color: var(--app-ink);
}

.owner-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.owner-stat-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--app-muted);
    font-size: 0.75rem;
}

.owner-stat-label .icon {
    width: 0.875rem;
    height: 0.875rem;
}

.owner-panel-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    color: var(--app-muted);
    font-size: 0.875rem;
}

.my-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.my-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.875rem 1rem;
    border-radius: var(--app-radius);
    background: #fff;
    box-shadow: var(--app-shadow-sm);
}

.my-summary-value {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
}

.my-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.my-listing-photo {
    flex: none;
    width: 120px;
}

.my-listing-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--app-muted);
}

.my-listing-stats > span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

@media (max-width: 575.98px) {
    .my-listing-photo {
        width: 88px;
    }

    .my-summary-value {
        font-size: 1.125rem;
    }
}

/* Tabs that scroll sideways on phones: without a visible scrollbar. */
/* Listing wizard */

.wizard-progress .progress {
    height: 0.375rem;
    --bs-progress-bg: #fff;
    box-shadow: inset 0 0 0 1px var(--app-line);
    --bs-progress-bar-bg: var(--app-accent);
    --bs-progress-border-radius: var(--app-radius-pill);
}

.wizard-steps .nav-link.is-done {
    color: var(--app-success);
}

.photo-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--bs-primary-border-subtle);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.photo-dropzone:hover,
.photo-dropzone.is-over {
    border-color: var(--app-accent);
    background: var(--bs-primary-bg-subtle);
}

.photo-dropzone.is-busy {
    cursor: progress;
}

.photo-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #fff;
    color: var(--app-accent);
    box-shadow: var(--app-shadow-sm);
}

.photo-dropzone-icon .icon {
    width: 1.75rem;
    height: 1.75rem;
}

.photo-advice {
    color: #9a6700;
}

/* On phones listings are rows like on "My listings": photo on the left, details on the right. */
@media (max-width: 767.98px) {
    .listing-grid {
        --bs-gutter-y: 0.75rem;
    }

    .listing-grid .listing-card {
        display: grid;
        grid-template-columns: 7.5rem 1fr;
        grid-template-rows: auto auto 1fr;
        column-gap: 0.75rem;
        align-content: start;
        row-gap: 0.25rem;
        padding: 0.625rem;
    }

    .listing-grid .listing-card:hover {
        transform: none;
    }

    .listing-grid .listing-card > :not(.position-relative) {
        padding-inline: 0;
    }

    .listing-grid .listing-card > .position-relative {
        grid-row: 1 / span 3;
    }

    .listing-grid .listing-card-photo {
        border-radius: var(--app-radius);
    }

    .listing-grid .listing-card-price {
        margin-top: 0.125rem;
        font-size: 1.0625rem;
    }

    .listing-grid .listing-badge,
    .listing-grid .listing-card-photos {
        left: 0.3125rem;
        padding: 0.125rem 0.375rem;
        font-size: 0.6875rem;
    }

    /* The heart takes the top corner of the small photo: the mark goes to the bottom instead of the photo count. */
    .listing-grid .listing-badge {
        top: auto;
        bottom: 0.3125rem;
    }

    .listing-grid .listing-badge ~ .listing-card-photos {
        display: none;
    }

    .listing-grid .listing-card-photos {
        bottom: 0.3125rem;
    }

    .listing-grid .favorite-toggle {
        width: 1.875rem;
        height: 1.875rem;
        margin: 0.25rem !important;
    }

    .listing-grid .photo-placeholder-label {
        display: none !important;
    }
}
