/* ============================================================
   LA-5 — Оптимизированный CSS (ФИНАЛ)
   ============================================================ */

/* ------------------------------------------------------------
   1. ССЫЛКА-ТЕЛЕФОН В ШАПКЕ (T228)
   ------------------------------------------------------------ */
#rec1707601651 .t228__right_descr a {
    display: inline-block;
    text-decoration: none !important;
    border-bottom: 1px solid transparent !important;
    padding-bottom: 1px;
    transition: border-color 0.3s ease-in-out;
}
#rec1707601651 .t228__right_descr a:hover {
    border-bottom: 1px solid currentColor !important;
}

/* ------------------------------------------------------------
   2. УЗКАЯ КОЛОНКА (Tilda)
   ------------------------------------------------------------ */
@media screen and (min-width: 1200px) {
    #allrecords .t-width_8 { max-width: 75% !important; }
}

/* ------------------------------------------------------------
   3. КНОПКИ-ССЫЛКИ С ПОДЧЁРКИВАНИЕМ ПРИ HOVER
   ------------------------------------------------------------ */
#rec1707601651 .t-btnflex__text {
    border-bottom: 1px solid transparent !important;
    padding-bottom: 2px;
    transition: border-color 0.2s ease-in-out;
}
#rec1707601651 .t-btnflex:hover .t-btnflex__text {
    border-bottom: 1px solid currentColor !important;
}
#rec1707601651 .t-btnflex,
#rec1707601651 .t-btnflex__text {
    text-decoration: none !important;
}

/* ------------------------------------------------------------
   4. КАРТОЧКИ (T503) — отступы
   ------------------------------------------------------------ */
#allrecords .t503 .t-card__title,
#allrecords .t503 .t-card__descr {
    margin-top: 10px !important;
}

/* ------------------------------------------------------------
   5. КОРЗИНА (T706) — скрытие сумм
   ------------------------------------------------------------ */
#allrecords .t706__product-amount,
#allrecords .t706__cartwin-prodamount-wrap,
#allrecords .t706__cartwin-bottom,
#allrecords .t706__cartwin-totalamount-content {
    display: none;
}

/* ------------------------------------------------------------
   6. АНИМИРОВАННАЯ КНОПКА .btn-one
   ------------------------------------------------------------ */
.btn-one {
    position: relative;
    transition: opacity 0.3s ease;
}
.btn-one span {
    transition: color 0.3s ease;
}
.btn-one::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transform: scale(0.1, 1);
}
.btn-one:hover::before {
    opacity: 1;
    transform: scale(1, 1);
}
.btn-one::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}
.btn-one:hover::after {
    opacity: 0;
    transform: scale(0.1, 1);
}

/* ------------------------------------------------------------
   7. О БЛОКЕ (T799) — заголовок
   ------------------------------------------------------------ */
#rec1728906001 .t799__title {
    padding-bottom: 52px;
    margin-top: -15px;
}

/* ------------------------------------------------------------
   8. МАГАЗИН — пагинация
   ------------------------------------------------------------ */
#allrecords .t-store__pagination__item {
    color: #808080 !important;
}

/* ------------------------------------------------------------
   9. МИН-ШИРИНА FLEX-КНОПОК
   ------------------------------------------------------------ */
#allrecords .t-btn.t-btnflex {
    min-width: 272px !important;
    justify-content: center;
}

/* ------------------------------------------------------------
   10. УВАЖАЕМ REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   VB-X7K — Таблица доступных лотов
   ============================================================ */

#rec5880131601 { display: none !important; }

.vb-x7k, .vb-x7k * { box-sizing: border-box; }

.vb-x7k {
    --vb-x7k-bg: #ffffff;
    --vb-x7k-surface: #f6f8fb;
    --vb-x7k-border: rgba(0, 51, 102, 0.10);
    --vb-x7k-text: #1a2332;
    --vb-x7k-text-secondary: #6b7b8f;
    --vb-x7k-accent: #003366;
    --vb-x7k-accent-light: #3e5a82;
    --vb-x7k-repair: #2e7d32;
    --vb-x7k-shadow: 0 4px 24px rgba(0, 51, 102, 0.08);
    font-family: var(--t-text-font, 'Open Sans', sans-serif);
    background-color: var(--vb-x7k-bg);
    margin: 0;
    padding: 0;
}

.vb-x7k .t-container, .vb-x7k .t-col, .vb-x7k .t-col_12 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* -------- Обёртка таблицы -------- */
.vb-x7k__table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--vb-x7k-border);
    background: var(--vb-x7k-bg);
    box-shadow: var(--vb-x7k-shadow);
    margin-top: 20px;
}

.vb-x7k__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

/* -------- Шапка -------- */
.vb-x7k__table thead {
    background: linear-gradient(135deg, var(--vb-x7k-accent) 0%, var(--vb-x7k-accent-light) 100%);
}

.vb-x7k__table th {
    font-family: var(--t-headline-font, Gotham, sans-serif);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    padding: 18px 24px;
    text-align: left;
    white-space: nowrap;
    border-bottom: none;
    user-select: none;
}
.vb-x7k__table th:first-child { border-radius: 16px 0 0 0; }
.vb-x7k__table th:last-child  { border-radius: 0 16px 0 0; }

.vb-x7k__table th.sortable { cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.vb-x7k__table th.sortable:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
.vb-x7k__table th .arrow {
    display: inline-block; font-size: 10px; margin-left: 6px;
    transition: transform 0.2s; opacity: 0.3; vertical-align: middle;
}
.vb-x7k__table th.active .arrow      { opacity: 1; }
.vb-x7k__table th.active.desc .arrow { transform: rotate(180deg); }

/* -------- Тело таблицы -------- */
.vb-x7k__table tbody tr {
    transition: background-color 0.25s;
    animation: vb-x7k-fade-in 0.4s ease both;
}
.vb-x7k__table tbody tr:hover { background-color: var(--vb-x7k-surface); }

.vb-x7k__table td {
    font-size: 16px; color: var(--vb-x7k-text);
    padding: 18px 24px; border-bottom: 1px solid var(--vb-x7k-border);
    background: transparent; vertical-align: middle;
}
.vb-x7k__table tbody tr:last-child td { border-bottom: none; }
.vb-x7k__table tbody tr:last-child td:first-child { border-radius: 0 0 0 16px; }
.vb-x7k__table tbody tr:last-child td:last-child  { border-radius: 0 0 16px 0; }

/* -------- Миниатюры -------- */
.vb-x7k__thumb-wrapper { position: relative; display: inline-block; }
.vb-x7k__thumb {
    width: 64px; height: 48px; object-fit: cover; border-radius: 8px;
    cursor: pointer; display: block; transition: transform 0.2s, box-shadow 0.2s;
    background: var(--vb-x7k-surface);
}
.vb-x7k__thumb:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(0, 51, 102, 0.18); }
.vb-x7k__thumb-badge {
    position: absolute; bottom: 4px; right: 4px;
    background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 10px;
    padding: 2px 6px; border-radius: 10px; pointer-events: none; backdrop-filter: blur(2px);
}

/* -------- Бейджи -------- */
.vb-x7k__badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 100px; font-size: 12px;
    font-weight: 600; text-transform: uppercase; white-space: nowrap;
}
.vb-x7k__badge--rent {
    background: rgba(62, 90, 130, 0.10); color: var(--vb-x7k-accent-light);
    border: 1px solid rgba(62, 90, 130, 0.20);
}
.vb-x7k__badge--sale {
    background: rgba(0, 51, 102, 0.08); color: var(--vb-x7k-accent);
    border: 1px solid rgba(0, 51, 102, 0.18);
}

/* -------- Ремонт -------- */
.vb-x7k__repair { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.vb-x7k__repair-dot {
    width: 8px; height: 8px; border-radius: 50%; background-color: var(--vb-x7k-repair);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* -------- Legacy -------- */
.vb-x7k__rates { display: none !important; }
.vb-x7k__cards { display: none; }

/* -------- Лайтбокс (Десктоп) -------- */
.vb-x7k__lightbox {
    position: fixed; inset: 0; z-index: 99999;
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.vb-x7k__lightbox--open { display: flex; }

.vb-x7k__lightbox-overlay {
    position: absolute; inset: 0; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(4px);
}
.vb-x7k__lightbox-content {
    position: relative; display: flex; flex-direction: column; align-items: center;
    justify-content: center; width: 100%; height: 100%; pointer-events: none;
}
.vb-x7k__lightbox-img-wrap {
    position: relative; max-width: 92vw; max-height: 85vh; pointer-events: auto;
}
.vb-x7k__lightbox-img {
    display: block; max-width: 100%; max-height: 85vh; width: auto; height: auto;
    object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); background: #111;
}
.vb-x7k__lightbox-caption {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    padding: 10px 20px; background: rgba(0, 0, 0, 0.6); color: #fff;
    font-size: 15px; border-radius: 100px; white-space: nowrap;
}

.vb-x7k__lightbox-close, .vb-x7k__lightbox-nav {
    background: rgba(255, 255, 255, 0.1); border: none; border-radius: 50%;
    color: #fff; cursor: pointer; pointer-events: auto; transition: background 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.vb-x7k__lightbox-close:hover, .vb-x7k__lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }

.vb-x7k__lightbox-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; font-size: 24px; }
.vb-x7k__lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 24px; }
.vb-x7k__lightbox-nav--prev { left: 20px; }
.vb-x7k__lightbox-nav--next { right: 20px; }
.vb-x7k__lightbox-nav[disabled] { opacity: 0; pointer-events: none; }

@keyframes vb-x7k-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ (включает НОВЫЙ дизайн карточек)
   ============================================================ */
@media (max-width: 639px) {
    .vb-x7k__table-wrap { display: none; }
    .vb-x7k__cards      { display: block; }

    /* Карточка теперь без внутреннего padding */
    .vb-x7k__card {
        background: var(--vb-x7k-bg); border: 1px solid var(--vb-x7k-border);
        border-radius: 16px; margin-bottom: 20px; box-shadow: 0 4px 16px rgba(0, 51, 102, 0.06);
        overflow: hidden; display: flex; flex-direction: column; padding: 0;
        animation: vb-x7k-fade-in 0.4s ease both;
    }
    .vb-x7k__card:last-child { margin-bottom: 0; }

    /* Фото прижато к краям */
    .vb-x7k__card-media {
        margin: 0; width: 100%; aspect-ratio: 4 / 3;
        background: var(--vb-x7k-surface); position: relative; overflow: hidden;
    }
    .vb-x7k__card-media .vb-x7k__thumb {
        width: 100%; height: 100%; border-radius: 0; object-fit: cover;
    }
    .vb-x7k__card-media .vb-x7k__thumb-wrapper { display: block; width: 100%; height: 100%; }

    /* Бейдж (Продажа/Аренда) накладывается на фото */
    .vb-x7k__card-media .vb-x7k__badge {
        position: absolute; top: 12px; left: 12px; z-index: 2;
        background: rgba(0, 51, 102, 0.85); color: #fff;
        backdrop-filter: blur(4px); border: none; font-size: 11px; padding: 5px 12px;
    }

    /* Бейдж количества фото */
    .vb-x7k__card-media .vb-x7k__thumb-badge { bottom: 12px; right: 12px; font-size: 12px; padding: 4px 8px; }

    /* Контентная часть (заголовок и текст) */
    .vb-x7k__card-content { padding: 20px; display: flex; flex-direction: column; }
    
    .vb-x7k__card-title {
        font-family: var(--t-headline-font, Gotham, sans-serif);
        font-size: 18px; font-weight: 600; color: var(--vb-x7k-text); margin: 0 0 6px; line-height: 1.3;
    }
    
    .vb-x7k__card-price {
        font-family: var(--t-headline-font, Gotham, sans-serif);
        font-size: 20px; font-weight: 700; color: var(--vb-x7k-accent); margin: 0 0 16px; line-height: 1;
    }

    .vb-x7k__card-divider { height: 1px; background: var(--vb-x7k-border); margin: 0 0 12px; }

    /* Строки таблицы внутри карточки */
    .vb-x7k__card-row {
        display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; gap: 12px;
    }
    .vb-x7k__card-row:last-of-type { padding-bottom: 0; }
    .vb-x7k__card-label { color: var(--vb-x7k-text-secondary); font-size: 14px; flex-shrink: 0; }
    .vb-x7k__card-value {
        text-align: right; font-weight: 500; font-size: 15px; color: var(--vb-x7k-text);
        max-width: 65%; word-wrap: break-word;
    }

    /* --- Лайтбокс (Мобильный) --- */
    .vb-x7k__lightbox { padding: 10px; }
    .vb-x7k__lightbox-img { max-height: 75vh; }
    .vb-x7k__lightbox-caption { bottom: 10px; font-size: 13px; padding: 8px 16px; }
    .vb-x7k__lightbox-nav { width: 36px; height: 36px; font-size: 18px; }
    .vb-x7k__lightbox-nav--prev { left: 8px; }
    .vb-x7k__lightbox-nav--next { right: 8px; }
    .vb-x7k__lightbox-close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 20px; }
}