/** 
 * @file: product_card.css
 * @description: Стили для карточки продукта (детальная страница лота)
 * @created: 2025-11-24
 */

/* Переменные: см. design-tokens.css */

/* Исправление позиционирования результатов глобального поиска */
.catalog-header-new {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

.search-bar-section {
    position: relative !important;
    overflow: visible !important;
}

.search-bar-wrapper[data-global-search] {
    position: relative !important;
    overflow: visible !important;
}

.search-input-wrapper-main {
    position: relative !important;
    overflow: visible !important;
    z-index: 1001 !important;
}

.global-search-results {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    z-index: 10000 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    margin-top: 0 !important;
}

/* Убираем overflow, который может обрезать результаты поиска */
body.front-landing,
body.front-landing main,
.min-h-screen {
    overflow-x: hidden;
    overflow-y: visible;
}

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-white {
    background-color: #ffffff;
}

.border-b {
    border-bottom-width: 1px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.z-40 {
    z-index: 40;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Flexbox */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 2rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Grid System */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

/* Typography */
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #111827;
}

.font-bold {
    font-weight: 700;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-blue-600 {
    --tw-gradient-from: #2563eb;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(37, 99, 235, 0));
}

.to-purple-600 {
    --tw-gradient-to: #9333ea;
}

.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.text-transparent {
    color: transparent;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.hidden {
    display: none;
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    /* Полная ширина сетки после удаления правого сайдбара на странице лота */
    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }
    
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    
    .lg\:gap-8 {
        gap: 2rem;
    }
    
    .lg\:space-y-8 > * + * {
        margin-top: 2rem;
    }
    
    .lg\:px-0 {
        padding-left: 0;
        padding-right: 0;
    }
    
    .lg\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .lg\:py-8 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .lg\:block {
        display: block;
    }
    
    .lg\:hidden {
        display: none;
    }
    
    .lg\:mb-6 {
        margin-bottom: 1.5rem;
    }
}

/* Breadcrumbs */
.breadcrumb {
    margin-top: 20px;
    margin-bottom: 1rem;
}

/* Страница лота: без двойных отступов (раньше дублировались с mb-4 / lg:mb-6) */
/*
 * Типографика: класс .breadcrumb совпадает с Bootstrap — у nav задаётся font-size из BS.
 * Раньше у .breadcrumb-page был отдельно 0.8125rem → на мобиле крошки выглядели «другим» шрифтом
 * относительно ссылок и остальной страницы (Inter 16px). Всё выравниваем через inherit.
 */
.breadcrumb--lot-detail.breadcrumb {
    margin-top: 0.75rem;
    margin-bottom: 0.625rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-family: inherit;
    /* Десктоп: как body; на ≤1023px уменьшается в блоке «Мобильная карточка лота» */
    font-size: max(16px, 1rem);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

@media (min-width: 1024px) {
    .breadcrumb--lot-detail.breadcrumb {
        margin-top: 1rem;
        margin-bottom: 0.75rem;
    }
}

/* Хлебные крошки: длинное название лота переносится без огромной «лесенки» */
.breadcrumb--lot-detail .breadcrumb-list {
    row-gap: 0.25rem;
}

.breadcrumb--lot-detail .breadcrumb-link,
.breadcrumb--lot-detail .breadcrumb-separator,
.breadcrumb--lot-detail .breadcrumb-page {
    font-family: inherit;
    font-size: inherit;
}

.breadcrumb--lot-detail .breadcrumb-page {
    word-break: break-word;
    overflow-wrap: anywhere;
    font-weight: 500;
}

.breadcrumb--lot-detail .breadcrumb-link {
    font-weight: 500;
}

/* Мобильная / планшетная карточка лота: меньше кегль — больше контента на экране (единый Inter) */
@media (max-width: 1023px) {
    .breadcrumb--lot-detail.breadcrumb {
        font-size: max(13px, 0.8125rem);
        line-height: 1.4;
    }

    .lot-detail-top-meta .main-info-title {
        font-size: 1.125rem;
        line-height: 1.28;
    }

    .lot-detail-top-meta .main-info-subtitle {
        font-size: 0.8125rem;
        line-height: 1.35;
    }

    .lot-detail-top-meta .main-info-stats {
        font-size: 0.75rem;
        gap: 0.35rem 0.65rem;
    }

    .lot-hero-aside .price-main {
        font-size: 1.5rem;
    }

    .lot-hero-aside .price-average,
    .lot-hero-aside .price-badge {
        font-size: 0.75rem;
    }

    .lot-hero-aside .price-action-btn {
        font-size: 0.6875rem;
        padding: 0.4rem 0.45rem;
    }

    .quick-specs {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .quick-spec-label {
        font-size: 0.6875rem;
    }

    .quick-spec-value {
        font-size: 0.8125rem;
    }

    .content-section {
        margin-bottom: 1.5rem;
    }

    .content-section-title {
        font-size: 1.0625rem;
        margin-bottom: 0.65rem;
    }

    .description-content {
        font-size: 0.875rem;
        line-height: 1.55;
    }

    .description-toggle {
        font-size: 0.8125rem;
    }

    .spec-label,
    .spec-value {
        font-size: 0.8125rem;
    }

    .similar-cars-section h2 {
        font-size: 1.125rem;
    }

    .similar-car-details h3 {
        font-size: 0.8125rem;
    }

    .similar-car-details p {
        font-size: 0.75rem;
    }

    .similar-car-price-main {
        font-size: 1rem;
    }
}

/* Вертикальные интервалы блоков страницы лота (вместо space-y-4 + lg:space-y-8 = до 32px) */
.lot-detail-body-stack > * + * {
    margin-top: 1rem;
}

@media (min-width: 1024px) {
    .lot-detail-body-stack > * + * {
        margin-top: 1.25rem;
    }

    /* Плотнее между заголовком/просмотрами и галереей */
    .lot-detail-body-stack > .lot-detail-top-meta + .lot-hero-row {
        margin-top: 0.75rem;
    }
}

/* Верх страницы лота: основное фото + цена в строке 1; превью — строка 2 только под фото */
.lot-hero-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.lot-hero-main,
.lot-hero-thumbs,
.lot-hero-aside {
    min-width: 0;
    align-self: start;
}

/* Оболочка основного фото (раньше верх .product-gallery целиком) */
.lot-hero-main {
    background: #f3f4f6;
    border-radius: 1rem;
    overflow: hidden;
    animation: fade-in 0.4s;
    width: 100%;
}

.lot-hero-row--with-thumbs .lot-hero-main {
    border-radius: 1rem 1rem 0 0;
}

.lot-hero-thumbs {
    overflow: hidden;
}

.lot-hero-row--with-thumbs .lot-hero-thumbs {
    border-radius: 0 0 1rem 1rem;
}

.lot-hero-aside {
    margin: 0;
    padding: 0;
}

@media (min-width: 1024px) {
    .lot-hero-row {
        grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 1.25rem;
        /* Без зазора между основным фото и полосой превью — единый визуальный блок */
        row-gap: 0;
        /* start: высота ряда = контент, карточка цены не растягивается на всю ячейку (без «дыры» между ценой и кнопками) */
        align-items: start;
    }

    .lot-hero-main {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }

    .lot-hero-thumbs {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
    }

    .lot-hero-aside {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        position: sticky;
        /* Выравниваем блок по верхнему уровню с галереей */
        top: 0;
    }
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-separator {
    color: #6b7280;
    margin: 0 0.25rem;
}

.breadcrumb-link {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--nfs-blue);
}

.breadcrumb-page {
    color: #111827;
    font-weight: 500;
}

/* Gallery */
.product-gallery {
    background: #f3f4f6;
    border-radius: 1rem;
    overflow: hidden;
    animation: fade-in 0.4s;
}

.gallery-main {
    position: relative;
    aspect-ratio: 1;
}

@media (min-width: 1024px) {
    .gallery-main {
        aspect-ratio: 16/9;
    }
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    cursor: pointer;
}

.gallery-img.active {
    display: block;
}

/*
 * Превью в ряду «галерея + цена»: явная высота и 100% ширины.
 * Сочетание aspect-ratio + max-height давало сужение блока по ширине и серую полосу справа
 * (см. MDN: контейнер с фиксированными размерами + object-fit: cover).
 */
.lot-hero-main .gallery-main {
    width: 100%;
    height: 300px;
    max-height: none;
    aspect-ratio: auto;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .lot-hero-main .gallery-main {
        height: 420px;
    }
}

.lot-hero-main .gallery-img.active {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    z-index: 10;
}

.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.badge-verified {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.badge-hot {
    background: rgba(249, 115, 22, 0.9);
    color: white;
}

.gallery-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.gallery-action-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #111827;
}

.gallery-action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.gallery-action-btn.active {
    background: #ef4444;
    color: white;
}

.gallery-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    color: #111827;
}

.gallery-main:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-prev {
    left: 1rem;
}

.gallery-nav-next {
    right: 1rem;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #1f2937;
    overflow-x: auto;
    scrollbar-width: none;
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    width: 4rem;
    height: 4rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    background: none;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.active {
    border-color: var(--nfs-blue);
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail:not(.active) {
    opacity: 0.6;
}

.thumbnail:hover:not(.active) {
    opacity: 1;
    transform: scale(1.05);
}

/* Gallery Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
}
.gallery-lightbox.gallery-lightbox-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.gallery-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}
.gallery-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.gallery-lightbox-prev { left: 1rem; }
.gallery-lightbox-next { right: 1rem; }
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}
.gallery-lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

/* Main Info */
.main-info {
    animation: fade-in-up 0.6s;
}

/* Заголовок и метаданные над галереей: компактные отступы, статистика слева группой */
.lot-detail-top-meta .main-info-header {
    margin-bottom: 0.5rem;
}

.lot-detail-top-meta .main-info-stats {
    margin-bottom: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    width: fit-content;
    max-width: 100%;
}

/* Сброс глобальных правил front.css для .stat-item (flex:1, min-width, padding) */
.lot-detail-top-meta .main-info-stats .stat-item {
    flex: 0 0 auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    gap: 0.375rem;
    background: none;
    border-radius: 0;
    backdrop-filter: none;
    text-align: left;
}

.lot-detail-top-meta .main-info-stats .stat-item i {
    flex-shrink: 0;
}

.lot-detail-top-meta .main-info-title {
    margin-bottom: 0.375rem;
    line-height: 1.2;
}

.main-info-header {
    margin-bottom: 1.5rem;
}

.main-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

@media (min-width: 1024px) {
    .main-info-title {
        font-size: 2.25rem;
    }
}

.main-info-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

@media (min-width: 1024px) {
    .main-info-subtitle {
        font-size: 1.125rem;
    }
}

.main-info-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    width: 1rem;
    height: 1rem;
}

/* Price Block */
.price-block {
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #eff6ff, #f3e8ff, #fce7f3);
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

/* Блок цены справа от галереи: компактная высота по контенту, верх вровень с фото */
.price-block--hero-aside {
    margin-bottom: 0;
    margin-top: 0;
}

@media (min-width: 1024px) {
    .price-block--hero-aside {
        /* Верх совпадает с верхом серой галереи (без лишнего «сдвига» вниз) */
        padding: 0.75rem 1rem 1rem;
    }

    .lot-hero-aside .price-main {
        font-size: 1.65rem;
    }

    .lot-hero-aside .price-average {
        font-size: 0.8125rem;
    }

    .lot-hero-aside .price-action-btn {
        font-size: 0.6875rem;
        padding: 0.45rem 0.5rem;
    }

    .lot-hero-aside .price-action-btn span {
        line-height: 1.2;
    }
}

.price-block-content {
    margin-bottom: 1rem;
}

.price-main {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

@media (min-width: 1024px) {
    .price-main {
        font-size: 2.5rem;
    }
}

.price-average {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.price-badge-fair {
    background: #dcfce7;
    color: #15803d;
}

.price-badge-good {
    background: #dbeafe;
    color: #1e40af;
}

.price-badge-high {
    background: #fee2e2;
    color: #991b1b;
}

.price-savings {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #bfdbfe;
    font-size: 0.875rem;
    color: #374151;
}

.price-savings i {
    color: var(--nfs-green);
}

.price-range {
    margin-top: 1rem;
}

.price-range-bar {
    position: relative;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.price-range-fair {
    position: absolute;
    left: 30%;
    width: 40%;
    height: 100%;
    background: #dcfce7;
}

.price-range-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0.75rem;
    height: 0.75rem;
    background: var(--nfs-blue);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.price-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #bfdbfe;
}

.price-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    color: var(--nfs-blue);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.price-action-btn:hover {
    background: #eff6ff;
}

/* «Позвонить» в сетке быстрых действий (как CTA на мобиле) */
.price-action-btn--call {
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    color: #fff;
    border-color: transparent;
}

.price-action-btn--call:hover {
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    color: #fff;
    filter: brightness(1.05);
    opacity: 0.98;
}

/* Quick Specs */
.quick-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .quick-specs {
        grid-template-columns: repeat(4, 1fr);
    }
}

.quick-spec-item {
    display: flex;
    flex-direction: column;
}

.quick-spec-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.quick-spec-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
}

/* Кнопки CTA (запасной стиль; основные действия — в .price-actions) */
.cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cta-btn-primary {
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-btn-primary:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

.cta-btn-secondary {
    border: 2px solid var(--nfs-blue);
    color: var(--nfs-blue);
    background: white;
}

.cta-btn-secondary:hover {
    background: #eff6ff;
}

.cta-btn-outline {
    border: 1px solid #d1d5db;
    color: #374151;
    background: white;
}

.cta-btn-outline:hover {
    background: #f9fafb;
}

/* Content Area */
.content-area {
    animation: fade-in-up 0.6s;
    animation-delay: 0.1s;
    animation-fill-mode: both;
}

.content-section {
    margin-bottom: 2rem;
}

.content-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .content-section-title {
        font-size: 1.5rem;
    }
}

.description-content {
    color: #374151;
    line-height: 1.75;
    max-height: 6rem;
    overflow: hidden;
    transition: max-height 0.3s;
}

.description-content.expanded {
    max-height: none;
}

.description-toggle {
    margin-top: 0.5rem;
    color: var(--nfs-blue);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
}

.description-toggle:hover {
    color: var(--nfs-purple);
}

/* ИИ-анализ на странице лота */
.ai-analysis-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
}
.ai-block-title {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.75rem;
}
.ai-block-text {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}
.ai-condition-grid, .ai-risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem 1.5rem;
}
.ai-condition-item, .ai-risk-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.ai-condition-label, .ai-risk-label {
    font-size: 0.8125rem;
    color: #64748b;
}
.ai-condition-value, .ai-risk-value {
    font-weight: 600;
    color: #1e293b;
}
.ai-overall .fa-star { margin-right: 0.125rem; }
.ai-summary { color: #475569; font-size: 0.9375rem; }
.ai-risk-checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.ai-check { display: inline-flex; align-items: center; gap: 0.25rem; }
.ai-notes { font-size: 0.875rem; }

/* Specs Table */
.specs-table {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
}

.specs-group {
    border-bottom: 1px solid #e5e7eb;
}

.specs-group:last-child {
    border-bottom: none;
}

.specs-group-header {
    padding: 0.75rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #111827;
}

.specs-group-content {
    display: flex;
    flex-direction: column;
}

.spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-row:hover {
    background: #f9fafb;
}

.spec-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.spec-value {
    font-size: 0.875rem;
    color: #111827;
    font-weight: 500;
}

/* AI Analysis */
.ai-tabs {
    margin-top: 1rem;
}

.ai-tabs-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ai-tab {
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

@media (min-width: 1024px) {
    .ai-tab {
        font-size: 0.875rem;
    }
}

.ai-tab.active {
    background: var(--nfs-blue);
    color: white;
}

.ai-tab-content {
    display: none;
}

.ai-tab-content.active {
    display: block;
}

.ai-analysis-card {
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #eff6ff, #f3e8ff);
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ai-analysis-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom right, var(--nfs-blue), var(--nfs-purple));
    border-radius: 0.75rem;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ai-analysis-icon i {
    font-size: 1.5rem;
}

.ai-analysis-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.ai-analysis-header p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.ai-analysis-gauge {
    position: relative;
    width: 100%;
    max-width: 20rem;
    aspect-ratio: 1;
    margin: 0 auto 1.5rem;
}

.ai-gauge-circle {
    position: relative;
    width: 100%;
    height: 100%;
}

.ai-gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ai-gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.ai-gauge-score {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
}

.ai-gauge-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.ai-analysis-verdict {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    text-align: center;
}

.ai-verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.ai-verdict-badge.badge-good {
    background: #dcfce7;
    color: #15803d;
}

.ai-verdict-badge.badge-fair {
    background: #e5e7eb;
    color: #374151;
}

.ai-verdict-badge.badge-high {
    background: #fee2e2;
    color: #991b1b;
}

.ai-insights {
    margin-top: 0.75rem;
}

.ai-insights p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0;
}

/* Condition Card */
.ai-condition-card {
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #eff6ff, #f3e8ff);
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
}

.ai-condition-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.condition-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.condition-item {
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
}

.condition-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.condition-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.condition-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.condition-bar-fill {
    height: 100%;
    background: var(--nfs-green);
    border-radius: 9999px;
    transition: width 0.5s;
}

.condition-summary {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    font-size: 0.875rem;
}

.condition-summary > div:first-child {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.condition-summary > div:last-child {
    color: #6b7280;
}

/* Risks Card */
.ai-risks-card {
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #eff6ff, #f3e8ff);
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
}

.ai-risks-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.risks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.risk-item {
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
}

.risk-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.risk-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.risk-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.risk-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s;
}

.risk-bar-fill.risk-low {
    background: var(--nfs-green);
}

.risk-bar-fill.risk-medium {
    background: #fbbf24;
}

.risk-bar-fill.risk-high {
    background: #ef4444;
}

.risks-checks {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
}

.risk-check {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.risk-check:last-child {
    margin-bottom: 0;
}

.risk-check i {
    color: var(--nfs-green);
    margin-top: 0.125rem;
}

/* Timeline */
.timeline {
    position: relative;
}

.timeline-event {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.timeline-event:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: -1.5rem;
    width: 2px;
    background: linear-gradient(to bottom, var(--nfs-blue), var(--nfs-purple));
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-dot-manufacture {
    background: var(--nfs-purple);
}

.timeline-dot-registration {
    background: var(--nfs-blue);
}

.timeline-dot-service {
    background: var(--nfs-green);
}

.timeline-dot-sale {
    background: var(--nfs-orange);
}

.timeline-content {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.timeline-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
    color: white;
}

.timeline-icon-manufacture {
    background: var(--nfs-purple);
}

.timeline-icon-registration {
    background: var(--nfs-blue);
}

.timeline-icon-service {
    background: var(--nfs-green);
}

.timeline-icon-sale {
    background: var(--nfs-orange);
}

.timeline-text {
    flex: 1;
}

.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.timeline-description {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Equipment */
.equipment-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .equipment-tabs {
        grid-template-columns: repeat(4, 1fr);
    }
}

.equipment-tab {
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

@media (min-width: 1024px) {
    .equipment-tab {
        font-size: 0.875rem;
    }
}

.equipment-tab.active {
    background: var(--nfs-blue);
    color: white;
}

.equipment-content {
    margin-top: 1rem;
}

.equipment-panel {
    display: none;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .equipment-panel {
        grid-template-columns: repeat(2, 1fr);
    }
}

.equipment-panel.active {
    display: grid;
}

.equipment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.equipment-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.equipment-icon-yes {
    background: #dcfce7;
    color: var(--nfs-green);
}

.equipment-icon-no {
    background: #e5e7eb;
    color: #9ca3af;
}

.equipment-item span {
    font-size: 0.875rem;
    color: #111827;
}

.equipment-item:has(.equipment-icon-no) span {
    color: #9ca3af;
}

/* Sidebar */
.product-sidebar {
    position: relative;
}

@media (min-width: 1024px) {
    .product-sidebar {
        position: sticky;
        top: 5rem;
        align-self: start;
    }
}
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .product-sidebar {
        position: sticky;
        top: 5rem;
    }
}

/* Seller Card */
.seller-card {
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seller-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.seller-avatar-wrapper {
    position: relative;
    width: 4rem;
    height: 4rem;
    flex-shrink: 0;
}

.seller-avatar-img,
.seller-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.seller-avatar-placeholder {
    background: linear-gradient(to bottom right, var(--nfs-blue), var(--nfs-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.seller-online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 1rem;
    height: 1rem;
    background: var(--nfs-green);
    border: 2px solid white;
    border-radius: 50%;
}

.seller-info {
    flex: 1;
    min-width: 0;
}

.seller-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.seller-stars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.seller-stars i {
    font-size: 1rem;
    width: 1rem;
    height: 1rem;
}

.seller-stars i.filled {
    color: var(--nfs-orange);
    fill: var(--nfs-orange);
}

.seller-stars i.empty {
    color: #e5e7eb;
    fill: #e5e7eb;
}

.seller-rating-text {
    font-size: 0.875rem;
    color: #6b7280;
}

.seller-online-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--nfs-green);
}

.online-dot-pulse {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--nfs-green);
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.seller-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.seller-stat-item {
    text-align: left;
}

.seller-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.seller-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.seller-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.seller-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
}

.seller-btn-primary {
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.seller-btn-primary:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

.seller-btn-secondary {
    border: 1px solid #d1d5db;
    color: #374151;
    background: white;
}

.seller-btn-secondary:hover {
    background: #f9fafb;
}

.seller-btn-video {
    border: 1px solid var(--nfs-purple);
    color: var(--nfs-purple);
    background: white;
    position: relative;
}

.seller-btn-video:hover {
    background: #f3e8ff;
}

.video-dot-pulse {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--nfs-green);
    border-radius: 50%;
    margin-left: auto;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.seller-all-listings {
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--nfs-blue);
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    text-align: center;
}

.seller-all-listings:hover {
    color: var(--nfs-purple);
}

/* Location Card */
.location-card {
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.location-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.location-map,
.location-map-container {
    aspect-ratio: 16/9;
    min-height: 200px;
    background: #e5e7eb;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #9ca3af;
    font-size: 3rem;
}

.location-map-container {
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 300px;
    min-height: 300px;
}

.location-map-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--nfs-blue);
    text-decoration: none;
    transition: opacity 0.2s;
}

.location-map-fallback:hover {
    opacity: 0.8;
}

.location-map-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.location-map-link .location-map-container {
    cursor: pointer;
    flex-direction: column;
    gap: 0.5rem;
    transition: background 0.2s;
}

.location-map-link:hover .location-map-container {
    background: #d1d5db;
}

.location-map-link .location-map-container i {
    font-size: 2.5rem;
    color: var(--nfs-blue);
}

.location-map-link .location-map-container span {
    font-size: 0.9rem;
    color: #374151;
}

.location-address {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 1rem;
}

.location-address i {
    color: #6b7280;
    margin-top: 0.125rem;
}

.location-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--nfs-blue);
    border-radius: 0.75rem;
    color: var(--nfs-blue);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.location-btn:hover {
    background: #eff6ff;
}

/* Loan Calculator */
.loan-calculator {
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #eff6ff, #f3e8ff);
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
}

.loan-calculator h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.loan-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.loan-price {
    font-size: 0.875rem;
    color: #374151;
}

.loan-down-payment label,
.loan-term label {
    display: block;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.loan-down-payment input[type="range"] {
    width: 100%;
    margin-bottom: 0.5rem;
}

.loan-down-payment-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
}

.loan-term-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.loan-term-btn {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.loan-term-btn.active {
    background: var(--nfs-blue);
    color: white;
    border-color: var(--nfs-blue);
}

.loan-rate {
    font-size: 0.875rem;
    color: #6b7280;
}

.loan-result {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
}

.loan-result-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.loan-result-row:last-child {
    margin-bottom: 0;
}

.loan-result-total {
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.loan-result-total strong {
    font-size: 0.875rem;
}

.loan-apply-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loan-apply-btn:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* Similar Cars */
.similar-cars {
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.similar-cars h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.similar-cars-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.similar-car-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
}

.similar-car-item:hover {
    background: #f3f4f6;
}

.similar-car-item img {
    width: 5rem;
    height: 5rem;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.similar-car-info {
    flex: 1;
    min-width: 0;
}

.similar-car-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.similar-car-info p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0;
}

.similar-car-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-top: 0.5rem;
}

.similar-cars-more {
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--nfs-blue);
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    text-align: center;
}

.similar-cars-more:hover {
    color: var(--nfs-purple);
}

/* Similar Cars Section */
.similar-cars-section {
    margin-top: 2rem;
    animation: fade-in-up 0.6s;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.similar-cars-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .similar-cars-section h2 {
        font-size: 1.5rem;
    }
}

.similar-cars-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .similar-cars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .similar-cars-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.similar-car-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.similar-car-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.similar-car-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.similar-car-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.similar-car-card:hover .similar-car-image img {
    transform: scale(1.05);
}

.similar-car-details {
    padding: 1rem;
}

.similar-car-details h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.similar-car-details p {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.25rem 0;
}

.similar-car-price-main {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-top: 0.5rem;
}

/* Нижняя панель цены: мобилка и ПК; плавность через класс --visible */
.sticky-bar-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    /* Горизонтальные отступы — у .container внутри .sticky-bar-content */
    padding: 0.75rem 0;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1023px) {
    .sticky-bar-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transform: translateY(110%);
        pointer-events: none;
        transition:
            opacity 0.35s ease,
            transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: opacity, transform;
    }

    .sticky-bar-mobile.sticky-bar-mobile--visible {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

@media (min-width: 1024px) {
    .sticky-bar-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transform: translateY(110%);
        pointer-events: none;
        transition:
            opacity 0.35s ease,
            transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0.65rem 0;
        padding-bottom: max(0.65rem, env(safe-area-inset-bottom, 0px));
    }

    .sticky-bar-mobile.sticky-bar-mobile--visible {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* Запас снизу: больше, только когда нижняя панель цены реально показана */
@media (max-width: 1023px) {
    body.lot-detail-page main .min-h-screen {
        padding-bottom: max(2rem, calc(1rem + env(safe-area-inset-bottom, 0px)));
    }

    body.lot-detail-page.lot-detail-sticky-bar-visible main .min-h-screen {
        padding-bottom: max(5.5rem, calc(4.5rem + env(safe-area-inset-bottom, 0px)));
    }

    /*
     * «Наверх»: пока панель цены скрыта — внизу экрана (на месте зоны панели).
     * Когда панель видна (скролл вверх) — body.lot-detail-sticky-bar-visible, кнопка поднимается выше панели.
     */
    body.lot-detail-page .back-to-top {
        bottom: max(1rem, env(safe-area-inset-bottom, 0px));
        right: max(1rem, env(safe-area-inset-right, 0px));
        z-index: 45;
        width: 2.75rem;
        height: 2.75rem;
        transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.lot-detail-page.lot-detail-sticky-bar-visible .back-to-top {
        bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    }
}

/* ПК: отступ контента и «наверх» относительно нижней панели */
@media (min-width: 1024px) {
    body.lot-detail-page main .min-h-screen {
        padding-bottom: max(2rem, 1.5rem);
    }

    body.lot-detail-page.lot-detail-sticky-bar-visible main .min-h-screen {
        padding-bottom: 6rem;
    }

    body.lot-detail-page .back-to-top {
        bottom: 1.25rem;
        right: 1.5rem;
        z-index: 45;
        width: 2.75rem;
        height: 2.75rem;
        transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.lot-detail-page.lot-detail-sticky-bar-visible .back-to-top {
        bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Ширина как у каталога: в шаблоне class="sticky-bar-content container" */
.sticky-bar-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.sticky-bar-price {
    flex: 1 1 140px;
    min-width: 0;
}

.sticky-bar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    justify-content: flex-end;
    flex: 1 1 200px;
}

.sticky-bar-btn-text {
    white-space: nowrap;
}

.sticky-bar-price-main {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sticky-bar-price-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.sticky-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    background: linear-gradient(to right, var(--nfs-blue), var(--nfs-purple));
    border: none;
    border-radius: 0.65rem;
    color: white;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

.sticky-bar-btn:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

.sticky-bar-btn--outline {
    background: #fff;
    border: 1.5px solid #bfdbfe;
    color: var(--nfs-blue);
    box-shadow: none;
}

.sticky-bar-btn--outline:hover {
    background: #eff6ff;
    border-color: var(--nfs-blue);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

@media (min-width: 1024px) {
    .sticky-bar-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fade-in 0.4s;
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s;
}

.animate-stagger-1 {
    animation-delay: 0.1s;
}

.animate-stagger-2 {
    animation-delay: 0.2s;
}

.animate-stagger-3 {
    animation-delay: 0.3s;
}

.animate-stagger-4 {
    animation-delay: 0.4s;
}

