﻿:root {
    --color-bg: #ffffff;
    --color-surface: #faf9f5;
    --color-accent: #da7756;
    --color-accent-strong: #c95f3f;
    --color-accent-soft: #f3e3d8;
    --color-text: #1f1e1d;
    --color-muted: #6b6b6b;
    --color-border: #e5e1d8;
    --color-ink: #18202a;
    --shadow-soft: 0 12px 28px rgba(31, 30, 29, 0.08);
}

* {
    box-sizing: border-box;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    position: absolute;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 78px;
    padding: 12px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.96);
    position: sticky;
    top: 0;
    z-index: 1200;
    box-shadow: 0 1px 10px rgba(31, 30, 29, 0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.brand__mark {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    object-position: 50% 29%;
    border: 1px solid var(--color-border);
}

.brand__text {
    display: grid;
    gap: 1px;
}

.brand__name {
    color: var(--color-ink);
    font-size: 21px;
    font-weight: 750;
    line-height: 1;
}

.brand__name span {
    color: #ff5b11;
}

.brand__tagline,
.eyebrow {
    color: var(--color-muted);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.flash-messages {
    width: min(1180px, calc(100% - 36px));
    margin: 14px auto 0;
}

.flash-message {
    margin: 0 0 8px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    padding: 10px 14px;
}

.flash-message--error { border-color: #e4b8b1; color: #913c31; }
.flash-message--success { border-color: #b8d8c1; color: #27643b; }

.site-nav__link,
.btn-primary,
.btn-secondary,
.listing-card__cta,
.back-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav__link {
    border: 1px solid transparent;
    color: var(--color-muted);
    padding: 8px 12px;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.site-nav__link:hover {
    border-color: var(--color-border);
    background: var(--color-surface);
    color: var(--color-ink);
}

.site-nav__link--active,
.site-nav__link--active:hover {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
}

.notification-badge {
    min-width: 17px;
    height: 17px;
    position: absolute;
    top: -3px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #d94036;
    color: #fff;
    font-size: 9px;
    font-weight: 750;
    line-height: 1;
    padding: 0 3px;
}

.notification-badge[hidden] { display: none; }

.account-menu {
    position: relative;
    flex: 0 0 auto;
}

.account-menu__trigger {
    width: 42px;
    height: 42px;
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: #fff;
    color: var(--color-ink);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.account-menu__trigger:hover,
.account-menu__trigger[aria-expanded="true"] {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
}

.account-menu__trigger--active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
}

.account-menu__trigger--active:hover,
.account-menu__trigger--active[aria-expanded="true"] {
    background: var(--color-accent-strong);
    color: #fff;
}

.account-menu__trigger svg {
    width: 21px;
    height: 21px;
}

.account-menu__dropdown {
    width: 248px;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1300;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    padding: 6px;
}

.account-menu__dropdown[hidden] { display: none; }

.account-menu__identity {
    display: grid;
    gap: 2px;
    border-bottom: 1px solid var(--color-border);
    margin: 0 6px 5px;
    padding: 8px 4px 11px;
}

.account-menu__identity strong {
    overflow: hidden;
    color: var(--color-ink);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu__identity span {
    color: var(--color-muted);
    font-size: 12px;
}

.account-menu__item {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    padding: 9px 10px;
    text-align: left;
    text-decoration: none;
}

.account-menu__item:hover {
    background: var(--color-surface);
    color: var(--color-accent-strong);
}

.account-menu__logout { margin: 0; }

.account-menu__count {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f8e1df;
    color: #b83228;
    font-size: 11px;
    padding: 0 6px;
}

.account-menu__count[hidden] { display: none; }

.notification-list { display: grid; gap: 8px; }

.notification-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: var(--color-text);
    padding: 14px 16px;
    text-decoration: none;
}

.notification-item--unread { border-left: 4px solid var(--color-accent); background: #fff8f4; }
.notification-item time { flex: 0 0 auto; color: var(--color-muted); font-size: 13px; }

.btn-primary {
    border: 0;
    background: var(--color-accent);
    color: #fff;
    padding: 10px 18px;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--color-accent-strong);
}

.btn-secondary {
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
    padding: 9px 16px;
}

.catalog-head,
.catalog-layout,
.detail-page,
.site-footer {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.catalog-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 42px 0 24px;
}

.catalog-head h1,
.detail-header h1 {
    margin: 0;
    color: var(--color-ink);
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.04;
    letter-spacing: 0;
}

.catalog-head__lead {
    max-width: 650px;
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 18px;
}

.catalog-head__meta {
    min-width: 150px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}

.catalog-head__meta span {
    display: block;
    color: var(--color-accent);
    font-size: 34px;
    font-weight: 760;
    line-height: 1;
}

.catalog-head__meta small {
    color: var(--color-muted);
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    padding-bottom: 44px;
}

.filters-panel {
    align-self: start;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    padding: 16px;
    position: sticky;
    top: 98px;
}

.filters {
    display: grid;
    gap: 14px;
}

.filters label {
    display: grid;
    gap: 6px;
}

.filters span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 650;
}

.filters select,
.filters input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: var(--color-text);
    font: inherit;
    font-size: 14px;
    padding: 9px 11px;
}
.filters input::placeholder {
    color: #A9A39A;
    opacity: 1;
}

.filters input::-webkit-input-placeholder {
    color: #A9A39A;
}

.filters .filter-check { display: flex; align-items: center; gap: 8px; }
.filters .filter-check input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--color-accent); }
.filters .filter-check span { color: var(--color-text); font-weight: 550; }

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    align-content: start;
}

.listing-card {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 2px 12px rgba(31, 30, 29, 0.04);
}

.listing-card:hover {
    box-shadow: var(--shadow-soft);
}

.listing-card__image-link {
    display: block;
    height: 188px;
    background: var(--color-accent-soft);
}

.listing-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-card__empty-image,
.detail-gallery__empty {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--color-accent-strong);
    font-weight: 700;
    text-align: center;
    padding: 20px;
}

.listing-card__body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.listing-card__topline,
.listing-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 8px;
    background: var(--color-accent-soft);
    color: var(--color-accent-strong);
    font-size: 12px;
    font-weight: 760;
    padding: 4px 9px;
}

.listing-card__area,
.listing-card__district {
    color: var(--color-muted);
    font-size: 14px;
}

.listing-card__title {
    color: var(--color-ink);
    font-size: 18px;
    font-weight: 760;
    line-height: 1.25;
    text-decoration: none;
}

.listing-card__district {
    margin: 0;
}

.listing-card__address {
    min-height: 36px;
    margin: 0;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.35;
}

.listing-card__availability {
    margin: 0;
    color: #27643b;
    font-size: 12px;
    font-weight: 700;
}

.listing-card__features { min-height: 26px; display: flex; flex-wrap: wrap; gap: 5px; }
.listing-card__features span { border: 1px solid var(--color-border); border-radius: 6px; background: #fff; color: var(--color-muted); font-size: 11px; padding: 3px 6px; }

.detail-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 26px; }
.detail-feature { min-height: 76px; display: grid; align-content: center; gap: 7px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; padding: 11px 12px; }
.detail-feature small { color: var(--color-muted); font-size: 12px; }
.detail-feature__value { min-width: 0; display: flex; align-items: center; gap: 8px; }
.detail-feature__value strong { overflow-wrap: anywhere; color: var(--color-ink); line-height: 1.25; }
.detail-feature__status { width: 22px; height: 22px; flex: 0 0 22px; display: inline-grid; place-items: center; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface); color: var(--color-muted); font-size: 14px; font-weight: 800; line-height: 1; }
.detail-feature--yes { border-color: #c9dfcf; background: #fbfefc; }
.detail-feature--yes .detail-feature__status { border-color: #b8d8c1; background: #e8f3eb; color: #27643b; }
.detail-feature--no { border-color: #e7cfcb; background: #fffdfc; }
.detail-feature--no .detail-feature__status { border-color: #dfbbb5; background: #f7e8e6; color: #a2473d; }
.detail-feature--neutral .detail-feature__status { border-color: #ddd5c8; background: #f4f1eb; color: #766a59; }
.detail-gallery figure { margin: 0; }
.detail-gallery figcaption { color: var(--color-muted); font-size: 11px; padding: 6px 2px 2px; }
.detail-gallery figcaption a { color: var(--color-muted); }

.listing-card__footer strong {
    color: var(--color-accent);
    font-size: 18px;
}

.listing-card__cta {
    min-height: 34px;
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 7px 10px;
    color: var(--color-text);
}

.empty-state {
    grid-column: 1 / -1;
    min-height: 280px;
    display: grid;
    justify-items: start;
    align-content: center;
    gap: 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    padding: 28px;
}

.empty-state h2,
.request-panel h2,
.detail-description h2 {
    margin: 0;
    color: var(--color-ink);
    font-size: 22px;
    letter-spacing: 0;
}

.empty-state p,
.request-panel p,
.detail-description p {
    margin: 0;
    color: var(--color-muted);
}

.detail-page {
    padding: 28px 0 48px;
}

.back-link {
    width: max-content;
    color: var(--color-muted);
    margin-bottom: 22px;
}

.detail-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--color-border);
}

.detail-header h1 {
    font-size: clamp(32px, 4vw, 48px);
}

.detail-header__meta {
    margin: 12px 0 0;
    color: var(--color-muted);
}

.detail-price {
    min-width: 180px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 16px;
}

.detail-price strong {
    display: block;
    color: var(--color-accent);
    font-size: 28px;
    line-height: 1;
}

.detail-price span {
    color: var(--color-muted);
    font-size: 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin-top: 24px;
}

.detail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.detail-gallery img,
.detail-gallery__empty {
    width: 100%;
    min-height: 220px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-accent-soft);
    object-fit: cover;
}

.request-panel {
    align-self: start;
    display: grid;
    gap: 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    padding: 20px;
    position: sticky;
    top: 98px;
}

.request-panel__submitted {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #b8d8c1;
    border-radius: 8px;
    background: #f2f8f3;
    padding: 11px 12px;
}

.request-panel__submitted-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #2f7a46;
    color: #fff;
    font-weight: 750;
}

.request-panel__submitted div {
    display: grid;
    gap: 1px;
}

.request-panel__submitted strong {
    color: #225c35;
}

.request-panel__submitted span:last-child {
    color: var(--color-muted);
    font-size: 13px;
}

.detail-description {
    max-width: 760px;
    display: grid;
    gap: 10px;
    margin-top: 30px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 14px;
}

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

@media (max-width: 820px) {
    .catalog-head,
    .detail-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        flex-wrap: nowrap;
    }

    .catalog-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .filters-panel,
    .request-panel {
        position: static;
    }

    .catalog-head__meta,
    .detail-price {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .site-header {
        min-height: 62px;
        gap: 8px;
        padding: 6px 10px;
    }

    .brand {
        width: 50px;
        flex: 0 0 50px;
        flex-direction: column;
        gap: 2px;
    }

    .brand__mark {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    .brand__text {
        display: block;
        line-height: 1;
    }

    .brand__name {
        display: block;
        font-size: 11px;
        line-height: 1;
    }

    .catalog-head,
    .catalog-layout,
    .detail-page,
    .site-footer {
        width: min(100% - 24px, 1180px);
    }

    .brand__tagline {
        display: none;
    }

    .site-nav {
        width: auto;
        min-width: 0;
        margin-left: auto;
        display: grid;
        grid-template-columns: minmax(0, auto) minmax(0, auto) 36px;
        gap: 5px;
    }

    .site-nav__link {
        width: 100%;
        min-height: 34px;
        padding: 5px 7px;
        font-size: 11px;
    }

    .account-menu__trigger {
        width: 36px;
        height: 36px;
    }

    .account-menu__trigger svg {
        width: 18px;
        height: 18px;
    }

    .account-menu { justify-self: end; }
    .account-menu__dropdown { width: min(248px, calc(100vw - 24px)); }

    .listing-grid {
        grid-template-columns: 1fr;
    }

    .notification-item { flex-direction: column; gap: 6px; }
}

