/* Стили для страницы каталога недвижимости */

/* Переменные для основных цветов */
:root {
    --primary-color: #dd2a1b;
    --text-color: #111111;
    --bg-color: #f0f3fa;
    --card-bg: #ffffff;
    --border-radius: 10px;
}

/* Стили для основного контейнера */
.catalog-container {
    background-color: var(--bg-color);
    padding: 30px 0;
}

/* Стили для карточки объекта */
.property-card {
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border: none !important;
    overflow: hidden;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15) !important;
}

.property-card .card-img-top {
    transition: transform 0.3s ease-in-out;
}

.property-card:hover .card-img-top {
    transform: scale(1.05);
}

.property-card .card-body {
    padding: 1.25rem;
}

.property-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.property-card .card-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Цена объекта */
.property-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
    margin-top: 0.5rem;
}

.price-per-meter {
    color: #666;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.25rem;
}

/* Свойства объекта (метраж, комнаты и т.д.) */
.property-features {
    display: flex;
    gap: 15px;
    margin: 0.75rem 0;
}

.property-feature {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
}

.property-feature i {
    margin-right: 5px;
    color: #999;
}

/* Категории недвижимости */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.category-tab {
    padding: 10px 20px;
    background-color: var(--card-bg);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.category-tab:hover {
    background-color: #f8f8f8;
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
}

/* Фильтры */
.catalog-filters {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-heading {
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Стиль для ползунка цены */
.form-range::-webkit-slider-thumb {
    background-color: var(--primary-color);
}

.form-range::-moz-range-thumb {
    background-color: var(--primary-color);
}

.form-range::-ms-thumb {
    background-color: var(--primary-color);
}

/* Активный пункт в списке типов недвижимости */
.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Стили для чекбоксов */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Стили для форм фильтрации */
input.form-control-sm {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Ничего не найдено */
.no-results {
    text-align: center;
    padding: 40px 0;
    color: #888;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 1199.98px) {
    .property-card .card-img-top {
        height: 180px;
    }
}

@media (max-width: 991.98px) {
    .filters-section {
        margin-bottom: 2rem;
    }
    
    .category-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-tab {
        white-space: nowrap;
    }
}

@media (max-width: 767.98px) {
    .property-card {
        margin-bottom: 1rem;
    }
    
    .property-card .card-img-top {
        height: 160px;
    }
}

@media (max-width: 575.98px) {
    .category-tab {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/* Фильтры */
.filter-panel {
    position: sticky;
    top: 20px;
    z-index: 100;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border: none;
}

.form-select:focus,
.form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Детальная страница объекта */
.price-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    position: relative;
    overflow: hidden;
}

.price-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc3545, #fd7e14, #ffc107);
}

/* Характеристики */
.characteristics .d-flex {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.characteristics .d-flex:hover {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding-left: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.characteristics .d-flex:last-child {
    border-bottom: none;
}

/* Дополнительные характеристики */
.feature-item {
    transition: all 0.2s ease-in-out;
    border: 1px solid #e9ecef !important;
    background: #fff;
}

.feature-item:hover {
    background-color: #f8f9fa !important;
    border-color: #dc3545 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Карусель изображений */
.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid #fff;
}

.carousel-indicators button.active {
    background-color: #dc3545;
    border-color: #dc3545;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev {
    left: 15px;
}

.carousel-control-next {
    right: 15px;
}

/* Хлебные крошки */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-weight: bold;
}

.breadcrumb-item a {
    color: #dc3545;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #c82333;
    text-decoration: underline;
}

/* Кнопки */
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    transition: all 0.2s ease;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    transform: translateY(-1px);
}

/* Sticky элементы */
.sticky-top {
    z-index: 10;
}

/* Анимации загрузки */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card {
    animation: fadeInUp 0.6s ease-out;
}

.property-card:nth-child(2) {
    animation-delay: 0.1s;
}

.property-card:nth-child(3) {
    animation-delay: 0.2s;
}

.property-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filter-panel {
        position: static;
        margin-bottom: 2rem;
    }
    
    .property-card:hover {
        transform: none;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .characteristics .d-flex:hover {
        background-color: transparent;
        padding-left: 0;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Улучшения для доступности */
@media (prefers-reduced-motion: reduce) {
    .property-card,
    .feature-item,
    .btn-danger,
    .btn-outline-danger {
        transition: none;
    }
    
    .property-card:hover {
        transform: none;
    }
    
    .feature-item:hover {
        transform: none;
    }
}

/* Темная тема (если потребуется) */
@media (prefers-color-scheme: dark) {
    .feature-item {
        background: #2d3748;
        border-color: #4a5568 !important;
        color: #e2e8f0;
    }
    
    .feature-item:hover {
        background-color: #4a5568 !important;
    }
    
    .price-section {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
} 