/* Базовые стили */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    font-size: 22px;
    color: #333;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
    text-decoration: none;
}

.btn:hover {
    background-color: #004499;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #0066cc;
    color: #0066cc;
}

.btn-outline:hover {
    background-color: #0066cc;
    color: white;
}

.page.active {
    display: block;
}

.main-content {
    padding: 30px 0;
    min-height: 70vh;
}

/* Стили для шапки */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
    cursor: pointer;
}

.logo span {
    color: #ff9900;
}

.search-bar {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 9px 15px;
    cursor: pointer;
}

.user-actions a {
    margin-left: 15px;
    color: #0066cc;
    text-decoration: none;
}

/* Навигация */
nav {
    background-color: #0066cc;
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.desktop-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-nav li {
    margin-right: 20px;
}

.desktop-nav a {
    color: white;
    text-decoration: none;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s;
}

.desktop-nav a:hover {
    color: #ff9900;
}

.desktop-nav a.active {
    color: #ff9900;
}

.desktop-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff9900;
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #0066cc;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #0066cc;
    color: white;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #f5f5f5;
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.mobile-nav-menu a:hover {
    background: #f0f7ff;
    color: #0066cc;
}

.mobile-nav-menu i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.mobile-user-actions {
    padding: 20px;
    border-top: 1px solid #eee;
}

.mobile-search {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Стили для каруселей */
.categories-carousel, .premium-carousel {
    position: relative;
    margin-bottom: 40px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.categories-track, .premium-track {
    display: flex;
    transition: transform 0.3s ease;
    padding: 10px 5px;
}

.categories-track {
    gap: 25px;
}

.premium-track {
    gap: 20px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: white;
    color: #333;
    border-color: #ddd;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: #0066cc;
}

/* Категории */
.category-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
    cursor: pointer;
    flex-shrink: 0;
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-icon:hover {
    transform: scale(1.1);
}

.category-icon i {
    font-size: 32px;
    color: #0066cc;
}

.category-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Премиум объявления */
.premium-slide {
    min-width: 300px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    flex-shrink: 0;
}

.premium-image {
    height: 200px;
    background: linear-gradient(45deg, #ff9900, #ffcc00);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.premium-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff9900;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.premium-price {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 18px;
}

.favorite-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.favorite-icon:hover {
    background: #ff4757;
    color: white;
}

.favorite-icon.active {
    background: #ff4757;
    color: white;
}

.premium-content {
    padding: 15px;
}

.premium-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.premium-location, .premium-date {
    color: #666;
    font-size: 14px;
}

/* Последние объявления */
.latest-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
}

.ad-card:hover {
    transform: translateY(-5px);
}

.ad-image {
    height: 180px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    position: relative;
}

.ad-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.ad-favorite:hover {
    background: #ff4757;
    color: white;
}

.ad-favorite.active {
    background: #ff4757;
    color: white;
}

.ad-content {
    padding: 15px;
}

.ad-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
}

.ad-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

.ad-location, .ad-date {
    color: #666;
    font-size: 14px;
}

/* Описание сайта */
.about-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.about-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.about-text {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    max-width: 800px;
    margin: 0 auto 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Новости */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.news-image {
    height: 160px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.news-content {
    padding: 20px;
}

.news-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
}

.news-date {
    color: #666;
    font-size: 14px;
}

/* Подвал */
footer {
    background: #333;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-logo span {
    color: #ff9900;
}

.footer-about {
    margin-bottom: 15px;
}

.footer-menu h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-menu ul {
    list-style: none;
}

.footer-menu ul li {
    margin-bottom: 8px;
}

.footer-menu ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-menu ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
	
	.categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ad-detail-content {
        grid-template-columns: 1fr;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .contacts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        max-width: 100%;
        margin: 15px 0 0;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .latest-ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .premium-slide {
        min-width: 280px;
    }
    
    .about-section {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .category-icon {
        width: 70px;
        height: 70px;
    }
    
    .category-icon i {
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .user-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .user-actions a {
        margin-left: 0;
        font-size: 14px;
    }
    
    .mobile-nav {
        width: 100%;
        right: -100%;
    }
}

/* Стили для нового футера */
.footer-apps {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.app-store-btn {
    display: flex;
    align-items: center;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #555;
}

.app-store-btn:hover {
    background: #444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.app-store-btn i {
    font-size: 24px;
    margin-right: 12px;
}

.app-store-btn .btn-text {
    display: flex;
    flex-direction: column;
}

.app-store-btn .small-text {
    font-size: 10px;
    opacity: 0.8;
}

.app-store-btn .store-name {
    font-size: 16px;
    font-weight: 600;
}

.google-play {
    background: linear-gradient(135deg, #4285f4, #34a853);
    border-color: #4285f4;
}

.rustore {
    background: linear-gradient(135deg, #ff3c00, #ff6a00);
    border-color: #ff3c00;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-about {
    display: flex;
    flex-direction: column;
}

.footer-description {
    margin-bottom: 20px;
    color: #ccc;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    background: #0066cc;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #555, transparent);
    margin: 30px 0;
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-apps {
        justify-content: center;
    }
    
    .app-store-btn {
        flex: 1;
        min-width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .app-store-btn {
        min-width: 100%;
    }
    
    .social-links {
        justify-content: center;
    }
}
/* Стили для страницы категорий */
.category-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.category-title {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.category-description {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.category-filters {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    min-width: 150px;
}

/* Плитка премиум объявлений */
.premium-tile {
    margin-bottom: 40px;
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.premium-tile-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s;
}

.premium-tile-card:hover {
    transform: translateY(-5px);
}

.premium-tile-image {
    height: 200px;
    background: linear-gradient(45deg, #ff9900, #ffcc00);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.premium-tile-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff9900;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.premium-tile-price {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 18px;
}

.premium-tile-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.premium-tile-favorite:hover {
    background: #ff4757;
    color: white;
}

.premium-tile-favorite.active {
    background: #ff4757;
    color: white;
}

.premium-tile-content {
    padding: 20px;
}

.premium-tile-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
}

.premium-tile-location, .premium-tile-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

/* Список обычных объявлений */
.ads-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.list-ads-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-ads-count {
    color: #666;
    font-size: 14px;
}

.sort-options {
    display: flex;
    gap: 15px;
}

.sort-option {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 0;
    font-size: 14px;
    position: relative;
}

.sort-option.active {
    color: #0066cc;
    font-weight: 500;
}

.sort-option.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0066cc;
}

.ads-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-ad-item {
    display: flex;
    padding: 20px 25px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.3s;
    cursor: pointer;
}

.list-ad-item:hover {
    background: #f8f9fa;
}

.list-ad-item:last-child {
    border-bottom: none;
}

.list-ad-image {
    width: 120px;
    height: 90px;
    background: #eee;
    border-radius: 8px;
    margin-right: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.list-ad-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.list-ad-info {
    flex: 1;
}

.list-ad-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
}

.list-ad-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
}

.list-ad-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-ad-meta {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 13px;
}

.list-ad-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.list-ad-favorite {
    background: none;
    border: none;
    color: #ddd;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

.list-ad-favorite:hover {
    color: #ff4757;
}

.list-ad-favorite.active {
    color: #ff4757;
}

.list-ad-date {
    color: #888;
    font-size: 13px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: #f0f7ff;
    border-color: #0066cc;
}

.pagination-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.pagination-dots {
    color: #666;
    padding: 0 5px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .premium-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .premium-grid {
        grid-template-columns: 1fr;
    }
    
    .list-ad-item {
        flex-direction: column;
    }
    
    .list-ad-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .list-ad-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .list-ad-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .category-filters {
        flex-direction: column;
    }
    
    .filter-select {
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .list-ads-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .premium-tile-image {
        height: 160px;
    }
}
/* Стили для страницы условий использования */
.terms-container {
    max-width: 900px;
    margin: 0 auto;
}

.terms-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.terms-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.terms-subtitle {
    color: #666;
    font-size: 18px;
    margin-bottom: 20px;
}

.last-updated {
    color: #888;
    font-size: 14px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

.terms-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.terms-section {
    margin-bottom: 35px;
}

.terms-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 22px;
    color: #0066cc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.terms-text {
    line-height: 1.7;
    color: #444;
    margin-bottom: 15px;
}

.terms-list {
    margin: 15px 0;
    padding-left: 25px;
}

.terms-list li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #444;
}

.highlight-box {
    background: #f0f7ff;
    border-left: 4px solid #0066cc;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.warning-box {
    background: #fff3f3;
    border-left: 4px solid #e74c3c;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.contact-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.contact-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
}

.back-to-home:hover {
    color: #004499;
}

@media (max-width: 768px) {
    .terms-content {
        padding: 25px 20px;
    }
    
    .terms-header {
        padding: 20px 15px;
    }
    
    .terms-title {
        font-size: 26px;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 15px;
    }
}
/* Стили для страниц авторизации */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 28px;
    font-weight: bold;
    color: #0066cc;
    margin-bottom: 10px;
}

.auth-logo span {
    color: #ff9900;
}

.auth-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #666;
    margin-bottom: 20px;
}

.social-auth {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.social-btn:hover {
    background: #f9f9f9;
}

.social-btn.google {
    color: #db4437;
}

.social-btn.facebook {
    color: #4267B2;
}

.divider {
    text-align: center;
    position: relative;
    margin: 25px 0;
    color: #777;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: #666;
}

.auth-footer a {
    color: #0066cc;
    font-weight: 500;
}

.password-toggle {
    position: relative;
}

.password-toggle input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check input {
    margin-right: 10px;
}

.form-check label {
    font-size: 14px;
    color: #555;
}

.forgot-password {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-password a {
    font-size: 14px;
    color: #0066cc;
}

.terms-text {
    font-size: 14px;
    color: #666;
    margin-top: 20px;
    text-align: center;
}

.terms-text a {
    color: #0066cc;
}

.benefits-list {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
}

.benefits-list h3 {
    margin-bottom: 15px;
    color: #0066cc;
}

.benefits-list ul {
    list-style: none;
}

.benefits-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.benefits-list i {
    color: #28a745;
    margin-right: 10px;
    margin-top: 3px;
}
/* Формы */
.form-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

/* Карточка объявления */
.ad-detail {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.ad-detail-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.ad-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px;
}

.ad-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ad-main-image {
    grid-column: 1 / -1;
    height: 300px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.ad-thumb {
    height: 100px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
}

.ad-info h3 {
    margin-bottom: 15px;
}

.ad-info-item {
    margin-bottom: 10px;
    display: flex;
}

.ad-info-label {
    font-weight: bold;
    width: 150px;
}

.ad-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.ad-description {
    margin-top: 20px;
    line-height: 1.6;
}

.ad-seller {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.seller-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.seller-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #999;
}

/* Стили для системы комментариев */
.comments-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.comments-title {
    font-size: 22px;
    color: #333;
}

.comments-count {
    color: #777;
    font-size: 16px;
}

.comment-form {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.comment-form-title {
    margin-bottom: 15px;
    font-size: 18px;
}

.comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.comments-list {
    margin-bottom: 30px;
}

.comment {
    display: flex;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

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

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    color: #777;
    font-size: 14px;
}

.comment-text {
    line-height: 1.6;
    margin-bottom: 10px;
    color: #444;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-action {
    background: none;
    border: none;
    color: #777;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.comment-action:hover {
    color: #0066cc;
}

.comment-reply {
    margin-left: 65px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f5f5f5;
}

.reply-form {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.reply-form textarea {
    min-height: 80px;
    resize: vertical;
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.no-comments {
    text-align: center;
    padding: 40px 0;
    color: #777;
}

.no-comments i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.rating-stars {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star.active {
    color: #ffc107;
}

.comment-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rating-value {
    font-weight: 600;
    color: #333;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: #0066cc;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.sort-comments {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.sort-option {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

.sort-option.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

@media (max-width: 768px) {
    .comment {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .comment-reply {
        margin-left: 0;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-date {
        margin-top: 5px;
    }
}

/* Обновленные стили для кнопок и заголовка */
.seller-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-call {
    background: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    width: 100%;
}

.btn-call:hover {
    background: #c0392b;
}

.action-icons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    transition: all 0.3s;
    cursor: pointer;
}

.icon-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.icon-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Обновленный заголовок с иконкой избранного */
.ad-header-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.ad-title-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
}

.favorite-star {
    color: #ddd;
    font-size: 24px;
    margin-top: 5px;
    cursor: pointer;
    transition: color 0.3s;
}

.favorite-star:hover {
    color: #ffc107;
}

.favorite-star.active {
    color: #ffc107;
}

.ad-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
    flex: 1;
}

.ad-price {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    margin-left: 20px;
}
/* Стили для страницы объявления */
.ad-page-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.ad-main-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.ad-sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: fit-content;
}

.content-block {
    padding: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.content-block:last-child {
    border-bottom: none;
}

.block-title {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

/* Заголовок и цена */
.ad-header-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ad-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
    flex: 1;
}

.ad-price {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    margin-left: 20px;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.meta-item i {
    margin-right: 8px;
    color: #0066cc;
}

/* Галерея */
.gallery-block {
    padding: 0;
}

.ad-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ad-main-image {
    grid-column: 1 / -1;
    height: 400px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 0;
}

.ad-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 25px 25px;
}

.ad-thumb {
    height: 80px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #999;
    cursor: pointer;
}

/* Описание */
.description-text {
    line-height: 1.6;
    color: #444;
}

/* Характеристики */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.spec-label {
    color: #666;
}

.spec-value {
    font-weight: 500;
    color: #333;
}

/* Сайдбар */
.seller-block {
    text-align: center;
}

.seller-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.seller-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.seller-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    color: #ffc107;
}

.seller-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.seller-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-call {
    background: #28a745;
    color: white;
}

.btn-call:hover {
    background: #218838;
}

.btn-message {
    background: #0066cc;
    color: white;
}

.btn-message:hover {
    background: #004499;
}

.btn-favorite {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-favorite:hover {
    background: #e9ecef;
}

.sidebar-specs {
    margin-top: 20px;
}

.sidebar-specs .spec-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 0;
}

/* Комментарии */
.comments-section {
    margin-top: 0;
}

@media (max-width: 992px) {
    .ad-page-container {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .ad-header-block {
        flex-direction: column;
    }
    
    .ad-price {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .ad-meta {
        gap: 10px;
    }
    
    .ad-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
}
yle>
<style>
/* Обновленные стили для кнопок и заголовка */
.seller-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-call {
    background: #e74c3c;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    width: 100%;
}

.btn-call:hover {
    background: #c0392b;
}

.action-icons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    transition: all 0.3s;
    cursor: pointer;
}

.icon-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.icon-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Обновленный заголовок с иконкой избранного */
.ad-header-block {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.ad-title-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex: 1;
}

.favorite-star {
    color: #ddd;
    font-size: 24px;
    margin-top: 5px;
    cursor: pointer;
    transition: color 0.3s;
}

.favorite-star:hover {
    color: #ffc107;
}

.favorite-star.active {
    color: #ffc107;
}

.ad-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
    flex: 1;
}

.ad-price {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    margin-left: 20px;
}

/* Стили для карусели похожих объявлений */
.similar-ads-section {
    margin: 30px 0;
}

.similar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.similar-title {
    font-size: 20px;
    color: #333;
}

.similar-carousel {
    position: relative;
    overflow: hidden;
}

.similar-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
}

.similar-slide {
    min-width: 280px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.similar-slide:hover {
    transform: translateY(-5px);
}

.similar-image {
    height: 160px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.similar-content {
    padding: 15px;
}

.similar-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
}

.similar-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.similar-location, .similar-date {
    color: #777;
    font-size: 14px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: #0066cc;
}

@media (max-width: 768px) {
    .similar-slide {
        min-width: 250px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
    }
}
/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ПОЛЬЗОВАТЕЛЯ ===== */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    background: none;
    border: none;
    color: #0066cc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-dropdown-btn:hover {
    background-color: #f0f7ff;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 230px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 5px;
    overflow: hidden;
}

.user-dropdown-content.active {
    display: block;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.user-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.user-email {
    color: #666;
    font-size: 14px;
}

.user-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-dropdown-menu li {
    border-bottom: 1px solid #f5f5f5;
}

.user-dropdown-menu li:last-child {
    border-bottom: none;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.user-dropdown-menu a:hover {
    background-color: #f0f7ff;
    color: #0066cc;
}

.user-dropdown-menu i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.user-dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.logout-btn {
    color: #e74c3c !important;
}

.logout-btn:hover {
    background-color: #fdf2f2 !important;
}

/* Оверлей для закрытия меню */
.dropdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999;
}

/* Обновленные стили для user-actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions .btn-outline {
    margin-left: 0;
}

/* Состояние авторизованного пользователя */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .user-dropdown-content {
        right: -50px;
        min-width: 180px;
    }
}

/* Стили для выпадающего меню категорий */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 800px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    padding: 25px;
    display: none;
    z-index: 1000;
    margin-top: 10px;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.dropdown-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.dropdown-column h3 {
    font-size: 16px;
    color: #0066cc;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.dropdown-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-column li {
    margin-bottom: 8px;
}

.dropdown-column a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: all 0.3s;
    font-size: 14px;
}

.dropdown-column a:hover {
    color: #0066cc;
    padding-left: 5px;
}

.dropdown-column a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #666;
}

.dropdown-column a:hover i {
    color: #0066cc;
}

.subcategory-list {
    margin-left: 20px;
    margin-top: 5px;
}

.subcategory-list li {
    margin-bottom: 5px;
}

.subcategory-list a {
    font-size: 13px;
    color: #666;
}

.subcategory-list a:hover {
    color: #ff9900;
}

.dropdown-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.dropdown-header h2 {
    color: #333;
    font-size: 18px;
    margin-bottom: 5px;
}

.dropdown-header p {
    color: #666;
    font-size: 14px;
}

.view-all {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.view-all a {
    color: #0066cc;
    font-weight: 500;
}

.view-all a:hover {
    color: #004499;
}

/* Адаптивность для выпадающего меню */
@media (max-width: 992px) {
    .dropdown-menu {
        width: 600px;
    }
    
    .dropdown-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dropdown-menu {
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        overflow-y: auto;
        margin-top: 0;
        border-radius: 0;
        animation: slideIn 0.3s ease;
    }
    
    @keyframes slideIn {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }
    
    .dropdown-columns {
        grid-template-columns: 1fr;
    }
    
    .dropdown-header {
        text-align: left;
    }
}

/* Стили для страницы настроек */
.settings-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.settings-sidebar {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: fit-content;
}

.settings-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user_menu {
    list-style: none;
}

.user_menu li {
    margin-bottom: 5px;
}

.user_menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    color: #333;
    transition: all 0.3s;
}

.user_menu a:hover, .user_menu a.active {
    background: #f0f7ff;
    color: #0066cc;
}

.user_menu i {
    width: 20px;
    margin-right: 10px;
    font-size: 16px;
}

.settings-section {
    margin-bottom: 40px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.setting-hint {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0066cc;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-item, .checkbox-item {
    display: flex;
    align-items: center;
}

.radio-item input, .checkbox-item input {
    margin-right: 10px;
}

.select-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 16px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f0f7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0066cc;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e0e0e0;
}

.avatar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.danger-zone {
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 25px;
    background: #fdf2f2;
}

.danger-title {
    color: #e74c3c;
    margin-bottom: 15px;
    font-size: 18px;
}

.danger-text {
    color: #666;
    margin-bottom: 20px;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.security-item:last-child {
    border-bottom: none;
}

.security-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.security-info p {
    color: #666;
    font-size: 14px;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.session-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.session-info p {
    color: #666;
    font-size: 14px;
}

.session-current {
    background: #f0f7ff;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 12px;
    color: #0066cc;
    font-weight: 500;
}

.notifications-category {
    margin-bottom: 25px;
}

.notifications-category h4 {
    margin-bottom: 15px;
    color: #333;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-info h5 {
    margin-bottom: 5px;
    color: #333;
}

.notification-info p {
    color: #666;
    font-size: 14px;
}

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

@media (max-width: 576px) {
    .security-item, .session-item, .notification-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .avatar-upload {
        flex-direction: column;
        text-align: center;
    }
}

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

.seller-info2 {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.seller-avatar2 {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #999;
}
.my-ads-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
}

.ads-sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: fit-content;
}

.ads-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Компактная таблица */
.ads-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ads-table th {
    background: #f9f9f9;
    padding: 12px 8px;
    text-align: left;
    font-weight: 500;
    color: #333;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.ads-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Компактная информация об объявлении */
.ad-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ad-thumb {
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
    font-size: 12px;
}

.ad-details {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ad-details h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #666;
    font-size: 12px;
}

.ad-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 14px;
}

/* Компактный статус */
.ad-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-hidden {
    background: #e2e3e5;
    color: #383d41;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* Компактные счетчики */
.ad-stats {
    font-size: 12px;
    color: #666;
}

.ad-views, .ad-replies {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

/* Колонка действий */
.ad-actions-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 90px;
}

.action-btn {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    width: 100%;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-edit {
    color: #0066cc;
    border-color: #0066cc;
}

.btn-edit:hover {
    background: #0066cc;
    color: white;
}

.btn-delete {
    color: #e74c3c;
    border-color: #e74c3c;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

.btn-hide {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-hide:hover {
    background: #6c757d;
    color: white;
}

/* Компактные элементы управления */
.ads-actions {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ads-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 13px;
    min-width: 120px;
}

/* Компактная боковая панель */
.ads-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ads-nav li {
    margin-bottom: 2px;
}

.ads-nav a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    color: #333;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 13px;
}

.ads-nav a:hover, .ads-nav a.active {
    background: #f0f7ff;
    color: #0066cc;
}

.ads-nav i {
    width: 16px;
    margin-right: 8px;
    font-size: 14px;
}

.ads-stats {
    background: #f0f7ff;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    font-size: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d6e4ff;
}

.stat-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Компактная пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 13px;
}

.page-btn {
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-width: 32px;
    text-align: center;
}

.page-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Мобильная адаптация */
@media (max-width: 992px) {
    .my-ads-container {
        grid-template-columns: 1fr;
    }
    
    .ads-table {
        display: block;
        overflow-x: auto;
    }
    
    .ads-table th, .ads-table td {
        padding: 8px 6px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .ads-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ads-filters {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-select {
        flex: 1;
        min-width: 0;
    }
    
    .ad-info {
        gap: 8px;
    }
    
    .ad-thumb {
        width: 50px;
        height: 50px;
    }
    
    .ad-details h4 {
        font-size: 13px;
    }
    
    .action-btn {
        padding: 4px 6px;
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .ads-table {
        font-size: 12px;
    }
    
    .ad-actions-column {
        min-width: 80px;
    }
    
    .action-btn {
        padding: 3px 5px;
        font-size: 10px;
    }
    
    .action-btn i {
        font-size: 10px;
    }
}

.wrapper-flash {font-weight: bold;}
.flashmessage {font-size: 16px;padding: 18px 50px 18px 10px;width: 100%;top:0px;z-index: 8;text-align: center;color: #ffffff;position: relative;}
.flashmessage + .flashmessage, .flashmessage + #flash_js + .flashmessage {margin-top:10px;}
.flashmessage-warning,.help-box {background-color: #d0a52a;border: solid 1px #93741e;}
.flashmessage-error {background-color: #c44e20;border: solid 1px #873616;}
.flashmessage-ok {background-color: #839b44;border: solid 1px #4f5e29;}
.flashmessage-info {background-color: #30a0ef;border: solid 1px #2477b2;}
.flashmessage a {color:#000;}
.help-box {padding: 5px 10px;display: inline-block;color: #fff;font-size: 14px;margin: 10px 0;}
.flashmessage .ico-close {transition:0.1s;position: absolute; top: 50%; right: 5px; float: right; font-size: 18px; color: white; text-shadow: none; text-decoration: none; font-weight: bold; cursor: pointer; padding: 0; line-height: 40px; border: none; width: 40px; height: 40px; margin-top: -20px; background: rgba(0,0,0,0.2); }
.flashmessage .ico-close:hover {background:rgba(0,0,0,0.3);}
.flashmessage-error .close {color: #B94A48;}
.flashmessage-warning .close {color: #C09853;}
.flashmessage-success .close,.flashmessage-information .close {color: #3A87AD;}
#error_list,.error_list, #comment_error_list {text-align:left;background-color: #F2DEDE;border: solid 2px #EED3D7;color: #B94A48;padding: 10px;list-style: none;display: none;margin: 15px 0;;}
#error_list li,.error_list li, #comment_error_list li {list-style: none;padding:0;}
#error_list li label,.error_list li label, #comment_error_list li label {margin-top: 0;float: none;width: auto;font-weight:normal;margin:2px 0;padding:0;text-align:left;}
#comment_error_list {margin-top:0;}
.item-photos .main-photo {width: 550px;float: left;}
.item-photos .thumbs {float: right;width: 150px;}
.item-photos .thumbs img {margin-bottom: 10px;border: solid 2px rgba(0,0,0,0.1);transition:0.2s;width: 100%;}
.item-photos .thumbs img:hover {border-color:#0d9ecc;}
.item-photos { margin: 0 0 25px 0; display: block; float: left; width: 100%; }
.item-header {margin:0 0 15px 0;padding:12px 5px;border-top:1px solid rgba(0,0,0,0.1);border-bottom:1px solid rgba(0,0,0,0.1);}
.esimage {
	weight: 100%;
}

.smallimg {
	max-width: 60px;
}