/* style.css — минимализм, Avito-стиль, синие акценты */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== ШАПКА ===== */
.header {
    background-color: white;
    border-bottom: 1px solid #eaeaea;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-zontik {
    color: #00aaff;  /* синий Avito */
}

.logo-vito {
    color: #333;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.btn-primary {
    background-color: #00aaff;
    color: white;
}

.btn-primary:hover {
    background-color: #0099e6;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #eaeaea;
}

.btn-text {
    background: none;
    color: #00aaff;
    padding: 8px 12px;
}

.btn-text:hover {
    background-color: #e6f4ff;
}

.btn-warning {
    background-color: #ff4d4d;
    color: white;
}

.btn-warning:hover {
    background-color: #e60000;
}

.btn-disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.btn-large {
    width: 100%;
    padding: 14px;
    font-size: 18px;
}

/* ===== СЕТКА ГЛАВНОЙ ===== */
.main-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* Фильтры (боковая панель) */
.filters {
    background-color: #fafafa;
    padding: 24px 20px;
    border-radius: 16px;
    border: 1px solid #eee;
}

.filters h3 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #222;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #555;
}

.filter-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.2s;
}

.filter-input:focus {
    border-color: #00aaff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,170,255,0.1);
}

.price-range {
    display: flex;
    gap: 10px;
}

.admin-section {
    margin-top: 30px;
}

.admin-note {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Категории (иконки) */
.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.category-card {
    background-color: #f5f5f5;
    padding: 18px 8px;
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    color: #222;
    transition: 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.category-card:hover {
    background-color: #e6f4ff;
    border-color: #00aaff;
    color: #00aaff;
}

/* Сетка объявлений */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Карточка товара */
.ad-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 16px;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    border-color: #ddd;
    transform: translateY(-2px);
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 500;
}

.ad-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.ad-price {
    font-weight: 700;
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.ad-details {
    display: flex;
    justify-content: space-between;
    color: #767676;
    font-size: 14px;
    margin-top: 10px;
}

.ad-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ad-status {
    background-color: #f5f5f5;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    color: #555;
}

.no-ads {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 24px;
    color: #777;
}

/* ===== СТРАНИЦА ДОБАВЛЕНИЯ ===== */
.add-form {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid #eee;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
}

.form-input:focus {
    border-color: #00aaff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,170,255,0.05);
}

.photo-placeholder {
    background-color: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #888;
}

.photo-stub {
    display: block;
    margin-bottom: 12px;
}

/* ===== ДЕТАЛЬНАЯ СТРАНИЦА ===== */
.item-detail {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 28px;
    border: 1px solid #f0f0f0;
}

.item-detail h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.item-price {
    font-size: 36px;
    font-weight: 700;
    color: #00aaff;
}

.item-category, .item-seller, .item-location {
    background: #f5f5f5;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 15px;
}

.item-description {
    font-size: 18px;
    line-height: 1.6;
    color: #2c2c2c;
    margin-top: 20px;
}

.not-found {
    text-align: center;
    padding: 80px 20px;
}

/* ===== ФУТЕР ===== */
.footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #eaeaea;
    color: #888;
    text-align: center;
}

/* ===== АДАПТАЦИЯ (МОБИЛЬНЫЕ) ===== */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        order: 2;
    }
    
    .categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        font-size: 26px;
    }
    
    .ads-grid {
        grid-template-columns: 1fr;
    }
    
    .item-detail {
        padding: 24px;
    }
    
    .item-detail h1 {
        font-size: 26px;
    }
}