:root {
    --bg-color: #0B0E14;
    --card-bg: #151921;
    --bg-dark: #141414;
    --border-color: #262626;
    --accent-purple: #703BF7;
    --accent-light: #946cf9;
    --text-gray: #999999;
    --white: #ffffff;
    --danger: #ff453a;
}

body {
    background-color: var(--bg-color);
    color: var(--white);
    margin: 0;
    font-family: 'Urbanist', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

a { text-decoration: none; }

/* --- ПОИСК --- */
.search-section {
    padding: 14px 0 40px;
}

.search-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

.search-section .search-main {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    background: #1a1f29;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px 4px 4px 12px;
    gap: 8px;
}

.icon-search {
    font-size: 14px;
    opacity: .6;
    line-height: 1;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--white);
    padding: 10px 0;
    outline: none;
    font-size: 15px;
    font-family: inherit;
}

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

.btn-search {
    flex-shrink: 0;
    background: var(--accent-purple);
    color: var(--white);
    border: none;
    padding: 9px 18px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: 0.2s;
}

.btn-search:hover { background: var(--accent-light); }

/* --- СЕТКА КАРТОЧЕК --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (min-width: 1100px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

.property-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, border-color .15s ease;
}

.property-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-purple);
}

/* --- СЛАЙДЕР --- */
.property-image-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0d1017;
    overflow: hidden;
}

.slider-wrapper { width: 100%; height: 100%; }

.slide {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide.active { display: block; }

.no-photo {
    display: none;
    align-items: center;
    justify-content: center;
    background: #12161e;
    color: var(--text-gray);
    font-size: 12px;
}

.no-photo.active { display: flex; }

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(11, 14, 20, .55);
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s ease, background .15s ease;
    z-index: 2;
}

.property-image-slider:hover .slider-prev,
.property-image-slider:hover .slider-next { opacity: 1; }

.slider-prev:hover, .slider-next:hover { background: var(--accent-purple); }

.slider-prev { left: 6px; }
.slider-next { right: 6px; }

.photo-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(11, 14, 20, .6);
    color: var(--white);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    z-index: 2;
}

/* --- ИНФО --- */
.property-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.property-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: var(--white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-price {
    font-size: 17px;
    font-weight: 800;
    color: var(--accent-purple);
    margin: 0;
    line-height: 1.1;
}

.property-price span {
    font-size: 11px;
    font-weight: 600;
    opacity: .8;
}

.property-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: auto;
    padding-top: 4px;
}

.property-meta p {
    font-size: 11px;
    color: var(--text-gray);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-meta a { color: var(--text-gray); }
.property-meta i { color: var(--accent-purple); opacity: .8; margin-right: 4px; }

/* --- КНОПКИ РЕДАКТИРОВАНИЯ --- */
.property-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.property-actions .btn-edit,
.property-actions .btn-del {
    flex: 1;
    text-align: center;
    font-size: 11px;
    padding: 6px 4px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: 0.2s;
}

.btn-edit { background: var(--accent-purple); color: var(--white); }
.btn-edit:hover { background: var(--accent-light); }

.form-del { flex: 1; display: flex; }
.btn-del {
    width: 100%;
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.btn-del:hover { background: var(--danger); color: var(--white); }

/* --- ПАГИНАЦИЯ --- */
.pagination {
    margin: 20px 0 40px;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: var(--bg-dark);
    color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--border-color);
    border-color: var(--accent-purple);
}

.page-link.active {
    background: var(--accent-purple);
    border-color: var(--accent-light);
    cursor: default;
}

/* --- ПУСТОЕ СОСТОЯНИЕ --- */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px dashed var(--border-color);
    margin: 20px 0;
    text-align: center;
}

.empty-text {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 20px;
}

.main-btn2 {
    display: inline-block;
    background-color: var(--accent-purple);
    padding: 12px 24px;
    border-radius: 10px;
    color: var(--white);
    font-weight: 600;
    transition: all 0.2s ease;
}

.main-btn2:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
}

/* ==== Заблюренные карточки для гостей ==== */

.blurred-card {
    pointer-events: none;       /* нельзя кликнуть */
    user-select: none;          /* нельзя выделить */
    position: relative;
    overflow: hidden;
}

.blurred-image {
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a2e 100%);
    height: 200px;              /* подгони под свою высоту картинок */
    filter: blur(8px);
    opacity: 0.6;
}

.blurred-info {
    filter: blur(6px);
    opacity: 0.5;
    padding: 12px;
}

.blurred-line {
    height: 12px;
    background: #3a3a4e;
    border-radius: 6px;
    margin-bottom: 8px;
}

.blurred-line-title { width: 70%; }
.blurred-line-price { width: 40%; }
.blurred-line-address { width: 55%; }

/* Плашка "зарегистрируйтесь" */
.register-cta {
    text-align: center;
    margin: 40px auto 20px;
    padding: 30px 20px;
    max-width: 600px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2a1f5c 0%, #1a1533 100%);
    border: 1px solid #4b3b8f;
}

.register-cta p {
    color: #e0d8ff;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.register-cta-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #7c5cff;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    margin-right: 12px;
}

.register-cta-btn:hover {
    background: #6b4ce6;
    transform: translateY(-2px);
}

.register-cta-login {
    color: #a99cff;
    text-decoration: none;
    font-size: 15px;
}

.register-cta-login:hover {
    text-decoration: underline;
}