/* catalog/static/catalog/css/catalog.css */

/* ===== Категории ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.category-tab {
    padding: 6px 14px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #212529;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}
.category-tab:hover {
    border-color: #007bff;
    color: #007bff;
    text-decoration: none;
}
.category-tab.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* ===== Фильтры ===== */
.filter-form {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
}
.filter-group {
    margin-bottom: 12px;
}
.filter-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.filter-form hr {
    margin: 12px 0;
    border-top: 1px solid #eee;
}

/* ===== Сортировка ===== */
.sort-bar {
    display: flex;
    justify-content: flex-end;
}

/* ===== Карточка объявления ===== */
.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ad-card {
    position: relative;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.ad-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.ad-card__body {
    display: flex;
    gap: 16px;
    padding: 16px;
}

/* Изображение */
.ad-card__image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}
.ad-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ad-card__no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 40px;
}

/* Информация */
.ad-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.ad-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.ad-card__title {
    color: #212529;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    word-break: break-word;
}
.ad-card__title:hover {
    color: #007bff;
    text-decoration: none;
}
.ad-card__favorite {
    background: transparent;
    border: none;
    color: #adb5bd;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}
.ad-card__favorite:hover,
.ad-card__favorite.active {
    color: #dc3545;
}

/* Цена */
.ad-card__price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.ad-card__price {
    font-size: 22px;
    font-weight: 700;
    color: #28a745;
}
.ad-card__status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.ad-card__status.in-stock {
    background: #28a745;
    color: #fff;
}
.ad-card__status.on-order {
    background: #ffc107;
    color: #212529;
}

/* Характеристики */
.ad-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #495057;
}
.ad-card__spec i {
    color: #adb5bd;
    margin-right: 4px;
}

/* Подвал */
.ad-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    font-size: 13px;
    color: #6c757d;
}

/* ТОП-бейдж */
.ad-card__top-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Мобильная адаптивность */
@media (max-width: 768px) {
    .ad-card__body {
        flex-direction: column;
        padding: 12px;
    }
    .ad-card__image {
        width: 100%;
        height: 200px;
    }
    .ad-card__price {
        font-size: 18px;
    }
    .ad-card__specs {
        gap: 10px;
        font-size: 13px;
    }
}