/* Breadcrumbs */
.breadcrumbs {
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumbs::-webkit-scrollbar {
    display: none;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 8px;
}

/* Ad Details */
.ad-details {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.ad-gallery {
    flex: 1;
    min-width: 0;
    background-color: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.main-image {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
}

.main-image img {
    max-height: 500px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.image-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.nav-btn:hover {
    background: white;
    transform: scale(1.05);
}

.image-counter {
    text-align: center;
    padding: 10px;
    color: #666;
    font-size: 14px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.thumbnails {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    overflow-x: auto;
}

.thumbnails::-webkit-scrollbar {
    height: 4px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.thumbnail {
    flex-shrink: 0;
}

.thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumbnail img.active,
.thumbnail img:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.ad-info-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.ad-info-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 20px;
    position: sticky;
    top: 20px;
}

.ad-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.ad-title {
    height: 60px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.4;
    color: #333;
}

.ad-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

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

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

.meta-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-value {
    font-weight: 500;
    color: #333;
    text-align: right;
}

.contact-section {
    margin-bottom: 20px;
    border-top: 2px solid #f0f0f0;
    padding-top: 20px;
}

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

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.contact-item:hover {
    background-color: var(--bg-hover);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-text {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.secondary-btn {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.ad-description {
    background-color: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-top: 20px;
}

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

.description-text {
    line-height: 1.6;
    color: #555;
}

.description-text p {
    margin-bottom: 0;
    white-space: pre-line;
}

/* Кнопка полноэкранного режима */
.fullscreen-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    border-radius: 6px;
    padding: 8px;
    backdrop-filter: blur(5px);
}

.fullscreen-btn:hover {
    background: white !important;
}

/* Мобильная адаптация */
@media (max-width: 991px) {
    .ad-details {
        flex-direction: column;
        gap: 20px;
    }
    
    .ad-info-sidebar {
        width: 100%;
        flex: none;
    }
    
    .ad-info-card {
        position: static;
    }
    
    .main-image {
        padding: 15px;
    }
    
    .main-image img {
        max-height: 400px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
    }
    
    .thumbnail img {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 767px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .breadcrumbs {
        font-size: 13px;
        padding: 10px 0;
    }
    
    .main-image {
        padding: 10px;
    }
    
    .main-image img {
        max-height: 350px;
    }
    
    .ad-info-card {
        padding: 20px;
    }
    
    .ad-description {
        padding: 20px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .thumbnail img {
        width: 60px;
        height: 60px;
    }
    
    .image-nav {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 12px;
    }
    
    .main-image img {
        max-height: 300px;
    }
    
    .ad-info-card {
        padding: 15px;
    }
    
    .ad-description {
        padding: 15px;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .thumbnail img {
        width: 50px;
        height: 50px;
    }
    
    .image-nav {
        padding: 0 10px;
    }
    
    .ad-price {
        font-size: 24px;
    }
    
    .ad-title {
        font-size: 18px;
    }
}