/* Listing Page Styles - Стили страницы листинга */

/* Breadcrumbs */
.breadcrumbs {
    background: white !important;
    border-bottom: 1px solid var(--border);
    padding: 20px 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumbs-content {
    max-width: 1400px !important;
    margin: 0 auto !important;
    width: 100% !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 5% !important;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumbs span {
    color: #999;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #667eea);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mobile-filter-toggle:hover {
    background: linear-gradient(135deg, #667eea, var(--primary));
}

.mobile-filter-toggle.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

/* Main Layout */
.main-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 30px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Advanced Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* Search Results */

.filter-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.filter-title button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-title button:hover {
    color: var(--primary-dark);
}

/* Price Range */
.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s;
}

.price-inputs input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Checkbox Groups */
.checkbox-group {
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    color: var(--text);
    transition: var(--transition);
}

.checkbox-label:hover {
    color: #28a745;
}

.checkbox-label i,
.checkbox-label .fa {
    color: #28a745;
}

.checkbox-label input {
    margin-right: 10px;
    accent-color: #28a745;
}

/* Search Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    font-size: 18px;
    color: var(--dark);
}

.results-count strong {
    color: var(--primary);
}

.sort-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-select {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    transition: var(--transition);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Villa Cards */
.villa-card-horizontal {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    transition: transform 0.3s;
}

.villa-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.villa-image {
    width: 378px !important;
    height: 245px !important;
    position: relative;
    overflow: hidden;
}

.villa-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.villa-image-link:hover {
    text-decoration: none;
}

.villa-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.villa-image-link:hover .villa-image img {
    transform: scale(1.05);
}

.villa-card-horizontal:hover .villa-image img {
    transform: scale(1.05);
}

.villa-content {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.villa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
    flex-wrap: wrap;
}

.villa-title {
    font-size: 22px;
    color: var(--dark);
    margin-bottom: 5px;
    font-weight: 600;
    word-wrap: break-word;
}

.villa-location {
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    flex-wrap: wrap;
}

.villa-price {
    text-align: right;
    flex-shrink: 0;
}

.price-amount {
    font-size: 28px;
    color: var(--primary);
    font-weight: 700;
}

.price-period {
    color: var(--gray);
    font-size: 14px;
}

.villa-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.feature {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #28a745;
    flex: 0 0 auto;
    min-width: 0;
}

.feature i,
.feature .fa {
    color: #28a745;
    flex-shrink: 0;
    font-size: 14px;
}

.feature span {
    white-space: nowrap;
}

.villa-description {
    color: var(--gray);
    margin-bottom: 20px;
    flex: 1;
    line-height: 1.6;
}

.villa-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.villa-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.villa-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.meta-text {
    font-size: 13px;
}

.meta-divider {
    color: #ccc;
}

.view-details {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.view-details:hover {
    background: var(--primary-dark);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .mobile-filter-toggle {
        display: flex;
    }

    .main-container {
        grid-template-columns: 1fr;
        padding: 20px 5%;
    }

    .filters-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 30px;
    }

    .villa-card-horizontal {
        flex-direction: column;
    }

    .villa-image {
        flex: 0 0 200px;
        width: 100%;
    }
    
    .villa-content {
        padding: 15px;
    }
    
    .villa-title {
        font-size: 18px;
    }
    
    .villa-features {
        gap: 10px;
    }
    
    .feature {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .quick-search {
        flex-direction: column;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .results-header > div {
        width: 100%;
    }

    .villa-header {
        flex-direction: column;
        gap: 10px;
    }

    .villa-price {
        text-align: left;
        width: 100%;
    }
    
    .villa-price .price-amount {
        font-size: 20px;
    }
    
    .villa-price .price-period {
        font-size: 12px;
    }

    .villa-title {
        font-size: 16px;
        word-wrap: break-word;
    }
    
    .villa-location {
        font-size: 12px;
        flex-wrap: wrap;
    }

    .villa-features {
        gap: 8px;
    }

    .feature {
        font-size: 12px;
    }
    .villa-description {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .villa-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .villa-meta {
        justify-content: center;
        font-size: 13px;
    }
    
    .meta-text {
        display: none;
    }
    
    .meta-divider {
        display: none;
    }
    
    .villa-meta span {
        font-size: 13px;
    }
    
    .view-details {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 14px;
        font-size: 14px;
    }
    
    .sort-options {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .sort-options > div {
        width: 100%;
    }
    
    .sort-options form,
    .sort-options a {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }

    /* Показываем кнопку фильтров только на мобильных */
    .filter-toggle {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .villa-image {
        flex: 0 0 180px;
    }
    
    .villa-content {
        padding: 12px;
    }
    
    .villa-title {
        font-size: 15px;
    }
    
    .villa-location {
        font-size: 11px;
    }
    
    .feature span {
        font-size: 11px;
    }
}
