/* =============================================
   Apartment Showcase Plugin — Frontend Styles v5
   ============================================= */

:root {
    --asp-accent:      #c8e63c;
    --asp-dark:        #111111;
    --asp-dark-2:      #1a1a1a;
    --asp-dark-3:      #2a2a2a;
    --asp-text:        #222222;
    --asp-text-light:  #777777;
    --asp-bg:          #f5f4f0;
    --asp-white:       #ffffff;
    --asp-border:      #e0e0e0;
    --asp-radius:      14px;
    --asp-radius-sm:   6px;
    --asp-shadow:      0 4px 24px rgba(0,0,0,0.09);
    --asp-shadow-lg:   0 12px 48px rgba(0,0,0,0.18);
    --asp-transition:  all 0.28s ease;
    --asp-tabs-h:      48px;
}

/* =============================
   СЕКЦІЯ
   ============================= */
.asp-section {
    background-color: var(--asp-bg);
    padding: 80px 0 60px;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.asp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================
   ЗАГОЛОВОК
   ============================= */
.asp-header { margin-bottom: 40px; }

.asp-header-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--asp-white);
    border: 1px solid var(--asp-border);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--asp-text);
    margin-bottom: 20px;
}

.asp-section-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--asp-dark);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.asp-section-subtitle {
    font-size: 17px;
    color: var(--asp-text-light);
    margin: 0;
}

/* =============================
   ФІЛЬТРИ
   ============================= */
.asp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px 22px;
    background: var(--asp-white);
    border-radius: var(--asp-radius);
    box-shadow: var(--asp-shadow);
}

.asp-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.asp-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--asp-dark);
    white-space: nowrap;
}

.asp-filter-buttons { display: flex; gap: 6px; flex-wrap: wrap; }

.asp-filter-btn {
    padding: 7px 16px;
    border: 1.5px solid var(--asp-border);
    background: transparent;
    border-radius: var(--asp-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--asp-text);
    cursor: pointer;
    transition: var(--asp-transition);
    white-space: nowrap;
    line-height: 1;
    font-family: inherit;
}

.asp-filter-btn:hover  { border-color: var(--asp-accent); background: var(--asp-accent); color: var(--asp-dark); }
.asp-filter-btn.active { background: var(--asp-accent); border-color: var(--asp-accent); color: var(--asp-dark); font-weight: 700; }

/* =============================
   ЛІЧИЛЬНИК ГЛЯДАЧІВ
   ============================= */
.asp-viewers-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--asp-white);
    border: 1px solid var(--asp-border);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--asp-text);
    margin-bottom: 28px;
    box-shadow: var(--asp-shadow);
}

.asp-viewers-dot {
    width: 8px; height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: asp-pulse-dot 1.8s ease-in-out infinite;
}

@keyframes asp-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.35); }
}

.asp-viewers-count { color: var(--asp-dark); font-weight: 800; font-size: 15px; }

/* =============================
   ГОЛОВНА КАРУСЕЛЬ
   ============================= */
.asp-main-carousel-wrap {
    position: relative;
    margin-bottom: 48px;
    user-select: none;
    padding: 0 36px;
}

.asp-main-carousel { overflow: hidden; border-radius: var(--asp-radius); }

.asp-main-carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* =============================
   КАРТКА
   ============================= */
.asp-apartment-card {
    flex: 0 0 calc(33.333% - 16px);
    min-width: calc(33.333% - 16px);
    margin-right: 24px;
    background: var(--asp-white);
    border-radius: var(--asp-radius);
    overflow: hidden;
    box-shadow: var(--asp-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.asp-apartment-card:hover { transform: translateY(-4px); box-shadow: var(--asp-shadow-lg); }
.asp-apartment-card.asp-hidden { display: none; }

.asp-card-image {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 1px solid var(--asp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.asp-card-image img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    display: block;
}

.asp-apartment-card:hover .asp-card-image img { transform: scale(1.03); }

.asp-card-status {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.06em;
    z-index: 2;
}

.asp-status--available { background: var(--asp-accent); color: var(--asp-dark); }
.asp-status--reserved  { background: #f0a500; color: #fff; }
.asp-status--sold      { background: #e53935; color: #fff; }

.asp-card-number {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px; font-weight: 700;
    z-index: 2;
}

/* Бейдж знижки на картці */
.asp-card-discount-badge {
    position: absolute;
    bottom: 10px; left: 10px;
    background: #e53935;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.04em;
    z-index: 2;
    animation: asp-badge-pulse 2s ease-in-out infinite;
}

@keyframes asp-badge-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.asp-card-body {
    padding: 16px 18px 20px;
    display: flex; flex-direction: column; flex: 1;
}

.asp-card-title { font-size: 14px; font-weight: 800; color: var(--asp-dark); margin: 0 0 10px; line-height: 1.35; }

.asp-card-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.asp-spec {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px;
    background: var(--asp-bg);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--asp-text);
    border: 1px solid var(--asp-border);
}

.asp-spec-icon  { font-size: 12px; }
.asp-spec-value { font-weight: 600; }

/* Блок ціни з перекресленою оригінальною */
.asp-card-price-block {
    margin-bottom: 12px;
}

.asp-card-price-original {
    display: block;
    font-size: 13px;
    color: var(--asp-text-light);
    text-decoration: line-through;
    margin-bottom: 2px;
}

.asp-card-price {
    font-size: 22px; font-weight: 900;
    color: var(--asp-dark);
    letter-spacing: -0.01em;
}

.asp-card-price--discounted { color: #e53935; }

.asp-btn-details {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    background: var(--asp-dark); color: var(--asp-white);
    border: 2px solid var(--asp-dark);
    border-radius: var(--asp-radius-sm);
    font-size: 13px; font-weight: 700;
    cursor: pointer; transition: var(--asp-transition);
    align-self: flex-start; margin-top: auto;
    font-family: inherit;
}

.asp-btn-details:hover { background: var(--asp-accent); border-color: var(--asp-accent); color: var(--asp-dark); }
.asp-btn-details:hover .asp-btn-icon { transform: rotate(45deg); }
.asp-btn-icon { font-size: 14px; display: inline-block; transition: transform 0.2s; }

/* =============================
   КНОПКИ ГОЛОВНОЇ КАРУСЕЛІ
   ============================= */
.asp-main-carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: var(--asp-white); color: var(--asp-dark);
    border: 1.5px solid var(--asp-border);
    border-radius: var(--asp-radius-sm);
    width: 44px; height: 44px; font-size: 18px;
    cursor: pointer; z-index: 10; transition: var(--asp-transition);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--asp-shadow);
}

.asp-main-carousel-btn:hover    { background: var(--asp-accent); border-color: var(--asp-accent); color: var(--asp-dark); }
.asp-main-carousel-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.asp-main-carousel-btn--prev    { left: 0; }
.asp-main-carousel-btn--next    { right: 0; }

.asp-main-carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }

.asp-main-dot {
    width: 8px; height: 8px;
    border-radius: 2px;
    background: var(--asp-border);
    border: none; cursor: pointer; padding: 0;
    transition: var(--asp-transition);
}

.asp-main-dot.active { background: var(--asp-accent); width: 28px; }

/* =============================
   CTA БАНЕР
   ============================= */
.asp-cta-banner {
    background: var(--asp-dark);
    border-radius: var(--asp-radius);
    padding: 40px 48px;
    margin-top: 16px;
}

.asp-cta-banner-content {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 32px; flex-wrap: wrap;
}

.asp-cta-banner-text h3 { font-size: 26px; font-weight: 900; color: var(--asp-white); margin: 0 0 8px; letter-spacing: -0.02em; }
.asp-cta-banner-text p  { font-size: 15px; color: rgba(255,255,255,0.6); margin: 0; max-width: 480px; }

.asp-cta-banner-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 16px 32px;
    background: var(--asp-accent); color: var(--asp-dark);
    border: none; border-radius: var(--asp-radius-sm);
    font-size: 15px; font-weight: 800;
    cursor: pointer; transition: var(--asp-transition);
    white-space: nowrap; flex-shrink: 0;
    font-family: inherit;
}

.asp-cta-banner-btn:hover { background: #d4f040; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,230,60,0.35); }

.asp-no-results {
    text-align: center; padding: 60px 20px;
    color: var(--asp-text-light); font-size: 16px;
    background: var(--asp-white); border-radius: var(--asp-radius);
}

/* ============================================
   МОДАЛЬНЕ ВІКНО
   ============================================ */
.asp-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.78);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 12px;
    animation: asp-fade-in 0.22s ease;
}

@keyframes asp-fade-in { from { opacity: 0; } to { opacity: 1; } }

.asp-modal {
    background: var(--asp-white);
    border-radius: 16px;
    width: 100%;
    max-width: 1020px;
    max-height: calc(100vh - 24px);
    height: calc(100vh - 24px);
    overflow: hidden;
    position: relative;
    animation: asp-slide-up 0.28s ease;
    box-shadow: 0 32px 100px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

@keyframes asp-slide-up {
    from { transform: translateY(28px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.asp-modal-inner {
    display: flex; flex-direction: column;
    height: 100%; overflow: hidden;
}

/* ---- Двоколонний layout ---- */
.asp-modal-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    height: 100%;
    overflow: hidden;
}

/* ---- ЛІВА КОЛОНКА ---- */
.asp-modal-left {
    display: flex; flex-direction: column;
    background: var(--asp-dark-2);
    overflow: hidden;
    border-radius: 16px 0 0 16px;
    min-height: 0;
}

/*
 * Рядок табів — flex-контейнер.
 * Таби зліва (flex:1, overflow-x:auto).
 * Кнопка закриття справа — flex-shrink:0, вписана в рядок.
 * Кнопка НІКОЛИ не перекриває таби і не виїжджає за межі.
 */
.asp-modal-tabs-row {
    display: flex;
    align-items: stretch;
    background: var(--asp-dark-3);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    height: var(--asp-tabs-h);
    /* padding-right НЕ потрібен — кнопка займає своє місце в flex */
}

.asp-modal-tabs {
    display: flex;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0; /* важливо для flex overflow */
}

.asp-modal-tabs::-webkit-scrollbar { display: none; }

/*
 * Таб — SVG іконка + підпис.
 * SVG успадковує колір через currentColor.
 * Неактивний — приглушений білий, активний — акцентний зелений.
 */
.asp-modal-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 0 14px;
    height: var(--asp-tabs-h);
    background: transparent;
    color: rgba(255,255,255,0.35);
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
}

.asp-modal-tab:hover  { color: rgba(255,255,255,0.75); }
.asp-modal-tab.active { color: var(--asp-accent); border-bottom-color: var(--asp-accent); }

.asp-modal-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.asp-modal-tab-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.asp-modal-tab-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1;
}

/*
 * Кнопка закриття — ОСТАННЯ в flex-рядку табів.
 * flex-shrink:0 — не стискається.
 * Фіксована ширина 48px.
 * border-radius тільки правий верхній кут (16px = радіус модалки).
 */
.asp-modal-tabs-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: var(--asp-tabs-h);
    background: transparent;
    color: rgba(255,255,255,0.4);
    border: none;
    border-left: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    border-radius: 0 16px 0 0;
}

.asp-modal-tabs-close:hover {
    background: rgba(255,255,255,0.1);
    color: var(--asp-white);
}

.asp-modal-tabs-close svg {
    width: 14px;
    height: 14px;
    display: block;
}

/*
 * .asp-modal-close залишаємо ТІЛЬКИ для форми контактів.
 * В основній модалі квартири він більше не використовується.
 */
.asp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(17,17,17,0.08);
    color: var(--asp-dark);
    border: 1.5px solid var(--asp-border);
    border-radius: var(--asp-radius-sm);
    font-size: 14px;
    cursor: pointer;
    z-index: 30;
    transition: var(--asp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.asp-modal-close:hover {
    background: var(--asp-dark);
    color: var(--asp-white);
    border-color: var(--asp-dark);
}

/* Область зображення */
.asp-modal-carousel {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--asp-dark-2);
    min-height: 0;
}

.asp-modal-carousel-track {
    display: flex;
    height: 100%; width: 100%;
    transition: transform 0.38s ease;
}

.asp-modal-slide {
    min-width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    padding: 16px; box-sizing: border-box;
}

.asp-modal-slide img {
    max-width: 100%; max-height: 100%;
    object-fit: contain; display: block;
    cursor: zoom-in; transition: transform 0.3s ease;
}

.asp-modal-slide img.zoomed { transform: scale(2); cursor: zoom-out; }

.asp-modal-slide-video {
    min-width: 100%; height: 100%;
    background: var(--asp-dark); padding: 0;
}

.asp-modal-slide-video iframe,
.asp-modal-slide-video video {
    width: 100%; height: 100%;
    display: block; border: none;
}

/* Кнопки каруселі в модалі */
.asp-modal-carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
    color: #fff; border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--asp-radius-sm);
    width: 40px; height: 40px; font-size: 16px;
    cursor: pointer; z-index: 5; transition: var(--asp-transition);
    display: flex; align-items: center; justify-content: center;
}

.asp-modal-carousel-btn:hover  { background: var(--asp-accent); border-color: var(--asp-accent); color: var(--asp-dark); }
.asp-modal-carousel-btn--prev  { left: 10px; }
.asp-modal-carousel-btn--next  { right: 10px; }

/* Dots каруселі в модалі */
.asp-modal-carousel-dots {
    display: flex; justify-content: center; gap: 5px;
    padding: 10px; flex-shrink: 0;
    background: var(--asp-dark-2);
}

.asp-modal-dot {
    width: 6px; height: 6px; border-radius: 2px;
    background: rgba(255,255,255,0.22);
    border: none; cursor: pointer; padding: 0;
    transition: var(--asp-transition);
}

.asp-modal-dot.active { background: var(--asp-accent); width: 20px; }

/* ---- ПРАВА КОЛОНКА ---- */
.asp-modal-right {
    display: flex;
    flex-direction: column;
    /* Відступ зверху невеликий — кнопка закриття в табах, не тут */
    padding: 16px 20px 0 20px;
    border-left: 1px solid var(--asp-border);
    border-radius: 0 16px 16px 0;
    background: var(--asp-white);
    /* Критично: обмежуємо висоту щоб flex-дочірні елементи не вилазили */
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

/*
 * Скрол-область всередині правої колонки.
 * Весь контент (заголовок, ціна, характеристики, опис, умови) — тут.
 * CTA кнопка — ПОЗА цим блоком, прилипає знизу.
 */
.asp-modal-right-scroll {
    flex: 1 1 0;
    min-height: 0;        /* критично для flex + overflow */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--asp-border) transparent;
    padding-right: 4px;
    padding-bottom: 8px;
}
.asp-modal-right-scroll::-webkit-scrollbar       { width: 4px; }
.asp-modal-right-scroll::-webkit-scrollbar-track { background: transparent; }
.asp-modal-right-scroll::-webkit-scrollbar-thumb { background: var(--asp-border); border-radius: 2px; }

.asp-modal-apt-title {
    font-size: 18px; font-weight: 900; color: var(--asp-dark);
    margin: 0 0 4px; line-height: 1.3; letter-spacing: -0.01em;
}

.asp-modal-apt-num { font-size: 12px; color: var(--asp-text-light); margin-bottom: 14px; }

.asp-modal-price-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; padding: 12px 14px;
    background: var(--asp-bg); border-radius: var(--asp-radius-sm);
    border: 1px solid var(--asp-border);
}

/* Перекреслена оригінальна ціна в модалі */
.asp-modal-price-original {
    font-size: 12px;
    color: var(--asp-text-light);
    text-decoration: line-through;
    display: block;
    margin-bottom: 2px;
}

.asp-modal-price-val {
    font-size: 22px; font-weight: 900; color: var(--asp-dark);
    letter-spacing: -0.02em;
}

.asp-modal-price-val--discounted { color: #e53935; }

.asp-modal-status-badge {
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.07em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 4px;
}

/* Специфікації */
.asp-modal-specs {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-bottom: 14px;
}

.asp-modal-spec {
    background: var(--asp-bg);
    border-radius: var(--asp-radius-sm);
    padding: 11px 12px;
    border: 1px solid var(--asp-border);
}

.asp-modal-spec-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--asp-text-light); margin-bottom: 3px; display: block;
}

.asp-modal-spec-value { font-size: 16px; font-weight: 800; color: var(--asp-dark); display: block; }

.asp-modal-spec--accent { background: var(--asp-accent); border-color: var(--asp-accent); }
.asp-modal-spec--accent .asp-modal-spec-label,
.asp-modal-spec--accent .asp-modal-spec-value { color: var(--asp-dark); }

/* Опис */
.asp-modal-desc {
    font-size: 13px; line-height: 1.7; color: var(--asp-text-light);
    background: var(--asp-bg); border-radius: var(--asp-radius-sm);
    padding: 12px; margin-bottom: 14px;
    border: 1px solid var(--asp-border);
}

/* ---- УМОВИ ПРИДБАННЯ В МОДАЛІ ---- */
.asp-modal-purchase { margin-bottom: 14px; }

.asp-modal-purchase-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--asp-text-light);
    margin-bottom: 8px; display: block;
}

.asp-modal-purchase-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.asp-modal-purchase-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px;
    background: var(--asp-dark);
    color: var(--asp-white);
    border-radius: 4px;
    font-size: 12px; font-weight: 700;
}

.asp-modal-purchase-tag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.asp-modal-purchase-tag-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.asp-modal-purchase-tag[title] { cursor: help; }

/* ============================================
   БЛОК ЗНИЖКИ / ТАЙМЕР В МОДАЛІ
   ============================================ */
.asp-modal-discount-block {
    margin-bottom: 14px;
    border-radius: var(--asp-radius-sm);
    overflow: hidden;
    border: 1.5px solid #e53935;
}

.asp-modal-discount-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #e53935;
    color: #fff;
}

.asp-modal-discount-badge {
    font-size: 13px; font-weight: 800;
    letter-spacing: 0.04em;
    display: flex; align-items: center; gap: 6px;
}

.asp-modal-discount-amount {
    font-size: 16px; font-weight: 900;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 4px;
}

.asp-modal-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fff5f5;
    border-top: 1px solid rgba(229,57,53,0.2);
    flex-wrap: wrap;
}

.asp-modal-timer-label {
    font-size: 11px; font-weight: 700;
    color: #e53935;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.asp-modal-timer-units {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.asp-timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--asp-dark);
    color: var(--asp-white);
    border-radius: 4px;
    padding: 5px 8px;
    min-width: 42px;
}

.asp-timer-val {
    font-size: 18px; font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.asp-timer-lbl {
    font-size: 9px; font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 2px;
}

.asp-timer-sep {
    font-size: 18px; font-weight: 900;
    color: var(--asp-dark);
    margin: 0 1px;
    align-self: center;
    padding-bottom: 12px;
}

.asp-timer-expired {
    font-size: 12px; font-weight: 700;
    color: var(--asp-text-light);
    padding: 8px 14px;
    background: #fff5f5;
}

/* ---- CTA в модалі ---- */
.asp-modal-cta {
    flex-shrink: 0;
    padding: 12px 0 16px;
    border-top: 1px solid var(--asp-border);
    background: var(--asp-white);
    /* margin-top: auto не потрібен — flex-колонка сама розставляє */
}

.asp-modal-cta-title { font-size: 13px; font-weight: 700; color: var(--asp-dark); margin-bottom: 10px; }

.asp-modal-cta-btn {
    width: 100%; padding: 13px 18px;
    background: var(--asp-dark); color: var(--asp-white);
    border: none; border-radius: var(--asp-radius-sm);
    font-size: 13px; font-weight: 700;
    cursor: pointer; transition: var(--asp-transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit;
}

.asp-modal-cta-btn:hover { background: var(--asp-accent); color: var(--asp-dark); }

.asp-modal-cta-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.asp-modal-cta-btn-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* =============================
   ФОРМА ЗВ'ЯЗКУ
   ============================= */
.asp-contact-overlay { z-index: 100000; }

.asp-contact-modal {
    max-width: 860px;
    height: auto !important;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    border-radius: 16px;
}

.asp-contact-modal .asp-modal-close {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    top: 12px; right: 12px;
    width: 36px; height: 36px;
}

.asp-contact-modal .asp-modal-close:hover {
    background: var(--asp-accent);
    color: var(--asp-dark);
    border-color: var(--asp-accent);
}

.asp-contact-modal-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
}

.asp-contact-modal-left {
    background: var(--asp-dark);
    border-radius: 16px 0 0 16px;
    padding: 40px 36px;
    display: flex; flex-direction: column; gap: 20px;
}

.asp-contact-badge {
    display: inline-block;
    background: var(--asp-accent); color: var(--asp-dark);
    font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 5px 12px;
    border-radius: 4px; align-self: flex-start;
}

.asp-contact-modal-left h3 {
    font-size: 22px; font-weight: 900; color: var(--asp-white);
    margin: 0; line-height: 1.35; letter-spacing: -0.02em;
}

.asp-contact-benefits {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}

.asp-contact-benefits li { font-size: 13px; color: rgba(255,255,255,0.72); }

.asp-contact-apt-info {
    background: rgba(200,230,60,0.12);
    border: 1px solid rgba(200,230,60,0.3);
    border-radius: var(--asp-radius-sm);
    padding: 12px 14px;
    margin-top: auto;
}

.asp-contact-apt-info-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.07em;
    text-transform: uppercase; color: var(--asp-accent);
    margin-bottom: 4px; display: block;
}

.asp-contact-apt-info-title { font-size: 13px; font-weight: 700; color: var(--asp-white); }

.asp-contact-modal-right {
    padding: 36px 30px;
    border-radius: 0 16px 16px 0;
    background: var(--asp-white);
}

.asp-contact-modal-right h4 { font-size: 20px; font-weight: 800; color: var(--asp-dark); margin: 0 0 22px; }

.asp-contact-form { display: flex; flex-direction: column; gap: 14px; }

.asp-form-group { display: flex; flex-direction: column; gap: 5px; }

.asp-form-group label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--asp-text-light);
}

.asp-form-group input,
.asp-form-group select,
.asp-form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--asp-border);
    border-radius: var(--asp-radius-sm);
    font-size: 14px; font-family: inherit;
    color: var(--asp-dark); background: var(--asp-white);
    transition: border-color 0.2s; outline: none;
    width: 100%; box-sizing: border-box;
}

.asp-form-group input:focus,
.asp-form-group select:focus,
.asp-form-group textarea:focus { border-color: var(--asp-accent); }

.asp-form-group textarea { resize: vertical; }

.asp-form-msg {
    padding: 11px 14px; border-radius: var(--asp-radius-sm);
    font-size: 13px; font-weight: 600;
}

.asp-form-msg--success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.asp-form-msg--error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.asp-form-submit {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 24px;
    background: var(--asp-dark); color: var(--asp-white);
    border: none; border-radius: var(--asp-radius-sm);
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: var(--asp-transition); font-family: inherit;
}

.asp-form-submit:hover    { background: var(--asp-accent); color: var(--asp-dark); }
.asp-form-submit:disabled { opacity: 0.55; cursor: default; }

.asp-form-privacy {
    font-size: 11px; color: var(--asp-text-light);
    margin: 0; text-align: center; line-height: 1.5;
}

/* =============================
   ЗАВАНТАЖЕННЯ
   ============================= */
.asp-loading {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; width: 100%;
    padding: 40px; color: var(--asp-text-light);
    font-size: 14px; gap: 14px;
}

.asp-spinner {
    width: 34px; height: 34px;
    border: 3px solid var(--asp-border);
    border-top-color: var(--asp-accent);
    border-radius: 50%;
    animation: asp-spin 0.75s linear infinite;
}

@keyframes asp-spin { to { transform: rotate(360deg); } }

/* =============================
   АДАПТИВНІСТЬ
   ============================= */
@media (max-width: 1100px) {
    .asp-main-carousel-wrap { padding: 0 28px; }
    .asp-modal-layout { grid-template-columns: 1fr 300px; }
}

@media (max-width: 900px) {
    .asp-apartment-card {
        flex: 0 0 calc(50% - 12px);
        min-width: calc(50% - 12px);
    }

    .asp-modal {
        max-width: 600px;
        height: calc(100vh - 24px);
    }

    .asp-modal-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 1fr;
        overflow-y: auto;
    }

    .asp-modal-left { border-radius: 16px 16px 0 0; }

    /*
     * На мобільному таби займають повну ширину.
     * Кнопка закриття — крайній правий flex-елемент,
     * border-radius 0 бо кут модалки зверху-зліва тепер у лівої колонки.
     */
    .asp-modal-tabs-close {
        border-radius: 0 16px 0 0;
    }

    /* На мобільному таби — тільки іконки, підпис прихований */
    .asp-modal-tab-label { display: none; }

    .asp-modal-tab {
        min-width: 44px;
        padding: 0 10px;
    }

    .asp-modal-tab-icon svg {
        width: 22px;
        height: 22px;
    }

   
    .asp-modal-right {
        border-radius: 0 0 16px 16px;
        border-left: none;
        border-top: 1px solid var(--asp-border);
        padding-top: 16px;
        /* На мобільному висота визначається grid-template-rows */
        max-height: none;
        overflow: hidden;
    }

    /* CTA прилипає до низу на мобільному */
    .asp-modal-cta {
        position: sticky;
        bottom: 0;
        background: var(--asp-white);
        padding: 10px 0 0;
        z-index: 5;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    }

    .asp-modal-right-scroll {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .asp-contact-modal-inner { grid-template-columns: 1fr; }
    .asp-contact-modal-left  { border-radius: 16px 16px 0 0; }
    .asp-contact-modal-right { border-radius: 0 0 16px 16px; }
}

@media (max-width: 640px) {
    .asp-section { padding: 40px 0; }

    .asp-apartment-card { flex: 0 0 100%; min-width: 100%; margin-right: 0; }

    .asp-main-carousel-wrap { padding: 0 20px; }
    .asp-filters             { flex-direction: column; gap: 12px; padding: 14px 16px; }
    .asp-cta-banner          { padding: 24px 20px; }
    .asp-cta-banner-content  { flex-direction: column; gap: 18px; }
    .asp-cta-banner-btn      { width: 100%; justify-content: center; }
    .asp-main-carousel-btn   { display: none; }

    .asp-modal {
        max-width: 100%;
        height: calc(100vh - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 12px;
    }

    .asp-modal-layout { grid-template-rows: 45vh 1fr; overflow-y: auto; }

    .asp-modal-tab         { padding: 0 8px; min-width: 40px; }
    .asp-modal-tabs-close  { width: 40px; }

    .asp-modal-tab-icon svg { width: 20px; height: 20px; }

    .asp-modal-specs { grid-template-columns: 1fr 1fr; }
        .asp-modal-right {
        padding-top: 12px;
    }

    /* Таймер компактніший */
    .asp-timer-val  { font-size: 15px; }
    .asp-timer-unit { min-width: 34px; padding: 4px 6px; }
    .asp-timer-sep  { font-size: 15px; }
    .asp-timer-lbl  { font-size: 8px; }
}

@media (max-width: 400px) {
    .asp-modal-specs  { grid-template-columns: 1fr; }
    .asp-modal-layout { grid-template-rows: 40vh 1fr; }
}