/* ad-single.css */
.ad-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    background: #ffffff;
    line-height: 1.5;
}

/* Хлебные крошки */
.ad-single-breadcrumbs {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.ad-single-breadcrumbs a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ad-single-breadcrumbs a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.ad-breadcrumb-separator {
    margin: 0 8px;
    color: #9ca3af;
}

/* Основной контент */
.ad-single-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 992px) {
    .ad-single-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Левая колонка */
.ad-single-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Галерея */
.ad-single-gallery {
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
}

.ad-gallery-main {
    height: 400px;
    overflow: hidden;
}

.ad-gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.ad-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.ad-no-image-placeholder {
    text-align: center;
    color: #9ca3af;
    font-size: 16px;
}

.ad-gallery-thumbs {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.ad-gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ad-gallery-thumb:hover,
.ad-gallery-thumb.active {
    border-color: #3b82f6;
}

/* Заголовок и цена */
.ad-single-header {
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.ad-single-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ad-single-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    line-height: 1.3;
}

.ad-single-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ad-badge-featured {
    background-color: #fef3c7;
    color: #92400e;
}

.ad-badge-urgent {
    background-color: #fee2e2;
    color: #991b1b;
}

.ad-single-price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.ad-single-price {
    font-size: 32px;
    font-weight: 700;
    color: #059669;
}

.ad-single-meta {
    display: flex;
    gap: 20px;
    color: #6b7280;
    font-size: 14px;
}

/* Секции */
.ad-single-section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #111827;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.ad-single-description-content {
    font-size: 16px;
    color: #374151;
    line-height: 1.7;
}

.ad-single-description-content p {
    margin: 0 0 15px 0;
}

.ad-single-description-content p:last-child {
    margin-bottom: 0;
}

/* Характеристики */
.ad-single-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.ad-single-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ad-single-spec-label {
    color: #6b7280;
    font-weight: 500;
}

.ad-single-spec-value {
    color: #111827;
    font-weight: 500;
}

/* Местоположение */
.ad-single-location-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-single-location-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #374151;
}

.ad-location-icon {
    font-size: 20px;
}

.ad-single-map {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.ad-map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

/* Правая колонка */
.ad-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ad-single-sidebar-card {
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: white;
}

/* Контакты */
.ad-single-contact-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #111827;
}

.ad-single-phone,
.ad-single-email {
    margin-bottom: 15px;
}

.ad-phone-number {
    display: block;
    padding: 15px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #0369a1;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ad-phone-number:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.ad-email-link {
    display: block;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #374151;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ad-email-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Действия */
.ad-single-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.ad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.ad-btn-primary {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.ad-btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.ad-btn-outline {
    background-color: transparent;
    color: #374151;
    border-color: #d1d5db;
}

.ad-btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.ad-btn-block {
    width: 100%;
}

/* Автор */
.ad-single-author-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.ad-single-author-avatar {
    flex-shrink: 0;
}

.ad-single-author-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.ad-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50%;
}

.ad-single-author-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.ad-single-author-name a {
    color: #111827;
    text-decoration: none;
}

.ad-single-author-name a:hover {
    color: #3b82f6;
}

.ad-single-author-meta {
    font-size: 13px;
    color: #6b7280;
}

.ad-single-author-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.ad-author-stat {
    text-align: center;
}

.ad-author-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.ad-author-stat-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Статистика */
.ad-single-stats-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #111827;
}

.ad-single-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ad-single-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ad-single-stat:last-child {
    border-bottom: none;
}

.ad-single-stat-label {
    color: #6b7280;
    font-size: 14px;
}

.ad-single-stat-value {
    color: #111827;
    font-weight: 500;
}

/* Похожие объявления */
.ad-single-similar {
    margin-top: 40px;
}

.ad-similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Модальные окна */
.ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.ad-modal.active {
    display: flex;
    animation: ad-modal-fade-in 0.3s ease;
}

@keyframes ad-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ad-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: ad-modal-slide-up 0.3s ease;
}

@keyframes ad-modal-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ad-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    z-index: 1;
}

.ad-modal-close:hover {
    color: #111827;
}

.ad-modal-body {
    padding: 30px;
}

/* Сообщения об ошибках */
.ad-single-error {
    padding: 40px;
    text-align: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
}

/* Адаптивность */
@media (max-width: 768px) {
    .ad-single-container {
        padding: 15px;
    }
    
    .ad-single-title {
        font-size: 24px;
    }
    
    .ad-single-price {
        font-size: 28px;
    }
    
    .ad-single-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .ad-single-specs-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .ad-single-title {
        font-size: 20px;
    }
    
    .ad-single-price {
        font-size: 24px;
    }
    
    .ad-similar-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-modal-content {
        margin: 0;
        border-radius: 12px 12px 0 0;
        max-height: 80vh;
    }
}