/* ============================================
   СТИЛИ ДЛЯ СТРАНИЦЫ КАТАЛОГА ТЕХНИКИ
   ============================================ */

/* Основные цвета */
:root {
    --primary-color: #0073aa;
    /* Основной синий */
    --primary-hover: #005a87;
    /* Темнее при наведении */
    --secondary-color: #4CAF50;
    /* Зеленый для акцентов */
    --light-bg: #f8f9fa;
    /* Светлый фон */
    --light-border: #e0e0e0;
    /* Светлая граница */
    --dark-text: #2c3e50;
    /* Темный текст */
    --medium-text: #666;
    /* Средний текст */
    --light-text: #999;
    /* Светлый текст */
    --white: #ffffff;
    /* Белый */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Тень */
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* Тень при наведении */
}

/* Общие стили для каталога */
.catalog-page {
    padding-top: 100px;
    background: var(--white);
}

/* Герой секция */
.catalog-hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4ff 100%);
    text-align: center;
    margin-bottom: 40px;
}

/* .catalog-title {
    font-size: 48px;
    color: var(--dark-text);
    margin-bottom: 15px;
    font-weight: 700;
} */

.catalog-subtitle {
    font-size: 18px;
    color: var(--medium-text);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.catalog-subtitle p {
    margin: 0 0 15px;
}

.catalog-subtitle p:last-child {
    margin-bottom: 0;
}

/* ============================================
   ЛЕВЫЙ САЙДБАР С ФИЛЬТРАМИ
   ============================================ */

.catalog-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

/* Сайдбар с фильтрами */
.catalog-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    align-self: flex-start;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    position: sticky;
    top: 120px;
}

/* Секции фильтров */
.filter-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-border);
}

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

.filter-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent, #7747D4);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent, #7747D4);
}

/* Общие стили для списков фильтров */
.filters-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Общие стили для элементов фильтров (типы и бренды) */
.filter-item,
.brand-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    background: var(--white);
    color: var(--medium-text);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    font-size: 14px;
    font-family: inherit;
}

.filter-item:hover,
.brand-item:hover {
    border-color: var(--accent, #7747D4);
    color: var(--accent, #7747D4);
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(119, 71, 212, 0.2);
}

.filter-item.active,
.brand-item.active {
    background: var(--accent, #7747D4);
    border-color: var(--accent, #7747D4);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(119, 71, 212, 0.3);
}

/* Фильтр НДС: чекбоксы */
.filter-vat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.filter-vat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--medium-text, #333);
    user-select: none;
}
.filter-vat-item:hover {
    color: var(--accent, #7747D4);
}
.filter-vat-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent, #7747D4);
    cursor: pointer;
}

/* Фильтр цены: поле от → ползунок → поле до → ползунок → Применить */
.filter-price {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.filter-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-price-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent, #7747D4);
    min-width: 24px;
}
.filter-price-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--light-border, #ddd);
    border-radius: 8px;
    font-size: 14px;
    min-width: 0;
}
.filter-price-input:focus {
    outline: none;
    border-color: var(--accent, #7747D4);
    box-shadow: 0 0 0 2px rgba(119, 71, 212, 0.15);
}
.filter-price-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-price-slider-wrap .filter-price-slider {
    flex: 1;
    min-width: 0;
}
.filter-price-slider-value {
    font-size: 13px;
    color: var(--accent, #7747D4);
    font-weight: 600;
    min-width: 4em;
    text-align: right;
}
.filter-price-slider {
    height: 8px;
    border-radius: 4px;
    accent-color: var(--accent, #7747D4);
    cursor: pointer;
}
.filter-price-apply {
    width: 100%;
    margin-top: 6px;
}
.btn--accent,
.filter-price-apply {
    background: var(--accent, #7747D4);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}
.btn--accent:hover,
.filter-price-apply:hover {
    background: var(--accent-gradient, linear-gradient(90deg, #1F1A1C 0%, #7747D4 100%));
    color: #fff;
    transform: translateY(-1px);
}

/* Счетчики в фильтрах */
.filter-count,
.brand-count {
    font-size: 12px;
    opacity: 0.7;
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.filter-item.active .filter-count,
.brand-item.active .brand-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Сортировка */
.sorting-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--light-border);
    border-radius: 8px;
    background: var(--white);
    color: var(--dark-text);
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.sorting-select:focus {
    outline: none;
    border-color: var(--accent, #7747D4);
    box-shadow: 0 0 0 2px rgba(119, 71, 212, 0.15);
}

/* Кнопка сброса фильтров */
#reset-filters {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid var(--light-border);
    background: var(--white);
    color: var(--medium-text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
}

#reset-filters:hover {
    border-color: var(--accent, #7747D4);
    color: var(--accent, #7747D4);
    transform: translateY(-1px);
}

/* Сообщение "нет брендов" */
.no-brands {
    text-align: center;
    padding: 20px;
    color: var(--light-text);
    font-size: 14px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px dashed var(--light-border);
}

/* ============================================
   ОСНОВНОЕ СОДЕРЖИМОЕ КАТАЛОГА
   ============================================ */

.catalog-content {
    flex: 1;
}

/* Заголовок с результатами */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-border);
}

.catalog-results-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-text);
    margin: 0;
}

.results-count {
    font-size: 14px;
    color: var(--medium-text);
    background: var(--light-bg);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Сетка техники */
.technique-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Карточка техники */
.technique-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.technique-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.technique-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: var(--light-bg);
}

.technique-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.technique-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent, #7747D4);
    margin: 8px 0;
    line-height: 1.4;
}

.technique-vat {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin-left: 4px;
    display: inline-block;
}

/* Для мобильных устройств можно сделать адаптацию */
@media (max-width: 768px) {
    .technique-price {
        font-size: 16px;
    }

    .technique-vat {
        font-size: 12px;
    }
}

/* Бейдж состояния */
.condition-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--white);
    z-index: 1;
}

.condition-badge.new {
    background: #1F1A1C;
}

.condition-badge.used {
    background: #7747D4;
}

/* Иконка типа техники */
.type-icon-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 2px solid var(--accent, #7747D4);
    box-shadow: 0 2px 8px rgba(119, 71, 212, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    z-index: 1;
}

.type-icon-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Контент карточки */
.technique-content {
    padding: 20px;
    position: relative;
}

.technique-info-column .technique-title {
    font-size: 40px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.technique-title {
    font-size: 18px;
    color: var(--dark-text);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.technique-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.technique-title a:hover {
    color: var(--primary-color);
}

.vat-info {
    font-size: 14px;
    color: #666;
    margin-left: 5px;
    font-weight: normal;
}

.card-vat {
    font-size: 12px;
    color: #888;
    margin-left: 5px;
    font-weight: normal;
}

/* Бренд техники */
.technique-brand {
    font-size: 14px;
    color: var(--medium-text);
    margin-bottom: 10px;
    font-weight: 500;
}

/* Цена */
.technique-price {
    font-size: 22px;
    color: var(--accent, #7747D4);
    font-weight: 700;
    margin-bottom: 15px;
}

/* Мета-информация */
.technique-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--medium-text);
}

.meta-item svg {
    color: var(--accent, #7747D4);
    width: 14px;
    height: 14px;
}

/* Бейдж лизинга */
.leasing-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    right: 15px;
}

.leasing-badge svg {
    width: 14px;
    height: 14px;
}

/* Кнопка "Подробнее" */
.technique-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent, #7747D4);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.3s ease, color 0.3s ease;
}

.technique-more:hover {
    gap: 12px;
    color: var(--accent, #7747D4);
    filter: brightness(0.85);
}

.technique-more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    color: inherit;
}

.technique-more:hover svg {
    transform: translateX(3px);
}

/* Пагинация */
.catalog-pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: var(--light-bg);
    border-radius: 6px;
    text-decoration: none;
    color: var(--medium-text);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: var(--accent, #7747D4);
    color: var(--white);
}

/* Индикатор загрузки */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-bg);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.small .spinner {
    width: 30px;
    height: 30px;
    border-width: 2px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Сообщение "нет результатов" */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
}

.no-results__icon {
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    color: var(--dark-text);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--medium-text);
    margin-bottom: 20px;
}

.no-results .btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.no-results .btn:hover {
    background: var(--primary-hover);
}

/* CTA секция */
.catalog-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    padding: 80px 0;
    color: var(--white);
    text-align: center;
    margin-top: 60px;
}

.cta-title {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
}

.cta-text {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-content .btn {
    background: var(--white);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-content .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    gap: 15px;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1200px) {
    .catalog-layout {
        gap: 30px;
    }

    .catalog-sidebar {
        width: 280px;
    }
}

@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

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

    .filters-list {
        max-height: 300px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    .catalog-page {
        padding-top: 80px;
    }

    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .catalog-results-title {
        font-size: 20px;
    }

    .technique-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .filter-item,
    .brand-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    .sorting-select {
        padding: 8px 12px;
        font-size: 13px;
    }

    .catalog-cta {
        padding: 60px 0;
    }

    .cta-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
	.technique-info-column .technique-title {
		font-size:24px
	}
    .catalog-sidebar {
        padding: 20px;
    }

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

    .catalog-hero {
        padding: 40px 0;
    }

    /* .catalog-title {
        font-size: 28px;
    } */
	
	.description-content {
		padding:20px;
	}

    .catalog-subtitle {
        font-size: 16px;
    }

    .condition-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .type-icon-badge {
        width: 35px;
        height: 35px;
        padding: 6px;
    }
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ
   ============================================ */

/* Плавная анимация при фильтрации */
.technique-grid {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Кастомный скроллбар для списка брендов */
.brands-list::-webkit-scrollbar {
    width: 6px;
}

.brands-list::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 3px;
}

.brands-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Подсказки при наведении на элементы */
.filter-item,
.brand-item,
.technique-card {
    cursor: pointer;
}

/* Состояние disabled для кнопок */
.filter-item:disabled,
.brand-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.filter-item:disabled:hover,
.brand-item:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--light-border);
    color: var(--medium-text);
}