/* ==========================================================================
   ИСТОРИЯ ПРОДАЖ: ФИНАЛЬНАЯ ВЕРСИЯ (БЕЗ ВИЗУАЛЬНОГО ШУМА)
   ========================================================================== */

.history-page {
    padding: 40px 0 80px;
    background-color: #f9f9f9;
    min-height: 100vh;
}

.history-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.case-card {
    display: flex;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 24px;
    overflow: hidden;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.case-card:hover {
    border-color: #3E89C2;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

/* ФОТО И БЕЙДЖИ (Доказательство реальности кейса) */
.case-img-side {
    position: relative;
    width: 380px;
    min-width: 380px;
    aspect-ratio: 4/3;
    background-color: #F1F5F9;
}

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

.case-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.badge-status {
    background: #0F172A;
    color: #fff;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 900;
    border-radius: 6px 6px 0 0;
    letter-spacing: 0.05em;
}

.badge-type {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: #0F172A;
    padding: 3px 12px;
    font-size: 9px;
    font-weight: 700;
    border-radius: 0 0 6px 6px;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

/* КОНТЕНТНАЯ ЧАСТЬ */
.case-info-side {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.case-title {
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 6px 0;
}

.case-specs-text {
    font-size: 14px;
    color: #64748B;
}

.case-date-group {
    text-align: right;
    min-width: 120px;
}

.date-label {
    font-size: 11px;
    color: #94A3B8;
    display: block;
}

.date-value {
    font-size: 13px;
    color: #1E293B;
    font-weight: 700;
}

/* ФИНАНСОВЫЙ БЛОК И CTA */
.case-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
}

.case-finance-group {
    display: flex;
    flex-direction: column;
}

/* Главная цена (Доминанта) */
.price-main {
    display: flex;
    flex-direction: column;
}

.price-amount {
    font-size: 32px;
    font-weight: 950;
    color: #0F172A;
    line-height: 1;
    letter-spacing: -0.03em;
}

.price-location {
    font-size: 11px;
    color: #16A34A;
    font-weight: 800;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Экономия (Спокойная строка без плашки) */
.price-saving-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px dashed #E2E8F0;
}

.saving-text {
    font-size: 12px;
    color: #94A3B8;
}

.saving-value {
    font-size: 14px;
    font-weight: 800;
    color: #16A34A;
}

/* Кнопка действия */
.btn-case {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3E89C2;
    color: #fff;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(62, 137, 194, 0.2);
}

.btn-case:hover {
    background: #0F172A;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

/* ==========================================================================
   АДАПТИВНОСТЬ (Компактный мобильный вид)
   ========================================================================== */

@media (max-width: 1024px) {
    .case-img-side {
        width: 320px;
        min-width: 320px;
    }
    .price-amount {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .case-card {
        flex-direction: column;
        border-radius: 16px;
    }

    .case-img-side {
        width: 100%;
        min-width: auto;
        aspect-ratio: 16/10;
    }

    .case-info-side {
        padding: 20px;
    }

    .case-header {
        flex-direction: column;
        gap: 12px;
    }

    .case-date-group {
        text-align: left;
    }

    .case-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-top: 20px;
    }

    .price-amount {
        font-size: 26px;
    }

    .price-saving-row {
        border-top: none;
        padding-top: 0;
        margin-top: 8px;
    }

    .case-cta {
        width: 100%;
    }

    .btn-case {
        width: 100%;
    }
}