

/* ── универсальный ограничитель для .loadblock ───────────────── */
.loadblock{
    max-height:500px;          /* контент не вылезает выше 500 px */
    overflow-y:auto;           /* скроллим колесом/тачем */
    overflow-x:hidden;         /* горизонталь не нужна */

    /* прячем полосы прокрутки во всех браузерах */
    scrollbar-width:none;      /* Firefox */
    -ms-overflow-style:none;   /* IE 10+/Edge Legacy */
}
.loadblock::-webkit-scrollbar{ /* Chrome / Safari / Edge */
    display:none;
}

/* На мобильных убираем ограничение высоты и прокрутку */
@media (max-width: 768px) {
    .loadblock {
        max-height: none !important;     /* убираем ограничение высоты */
        overflow-y: visible !important;  /* убираем прокрутку */
        overflow-x: visible !important;
    }
}

#market_block_container { max-width: 500px; }

/* AI SP Popup Styles */
#ai_sp {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.ai-sp-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 80%;
    width: 600px;
    overflow: hidden;
    animation: ai-sp-fade-in 0.3s ease-out;
}

@keyframes ai-sp-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.ai-sp-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.ai-sp-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.ai-sp-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-sp-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-sp-content {
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.ai-sp-content h1, .ai-sp-content h2, .ai-sp-content h3 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.ai-sp-content h1:first-child,
.ai-sp-content h2:first-child,
.ai-sp-content h3:first-child {
    margin-top: 0;
}

.ai-sp-content ul {
    padding-left: 20px;
    margin: 15px 0;
}

.ai-sp-content li {
    margin: 8px 0;
}

.ai-sp-content strong {
    color: #667eea;
    font-weight: 600;
}

.ai-sp-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.ai-sp-content a:hover {
    border-bottom-color: #667eea;
}

.ai-sp-footer {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.ai-sp-footer .btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.ai-sp-footer .btn:hover {
    background: #5a6fd8;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-sp-popup {
        width: 95%;
        max-height: 90%;
    }
    
    .ai-sp-header {
        padding: 15px;
    }
    
    .ai-sp-header h3 {
        font-size: 1.3rem;
    }
    
    .ai-sp-content {
        padding: 20px;
        max-height: 300px;
    }
}


/***************************
 *  Promo-карточки 
 ***************************/
#promo_frame       { text-align: center; }
.promo_spo_frame   { background:#F1EDFF; padding:3px 5px; width:100px;
                     margin:5px; border-radius:4px; display:inline-block; }
.promo_spo_title   { height:65px; font-size:85%; overflow:hidden; margin-bottom:2px; }
.promo_spo_img     { background:#fff; }
.promo_spo_img img { max-width:100%; max-height:140px; }
.promo_spo_price   { background:#FFF8DD; padding:3px 2px; font-size:80%;
                     text-shadow:#fff 0 0 2px; }





/***************************
 *  Welcome-JTBD карточки (block_welcome_ai)
 ***************************/
.welcome-wide > #block_welcome_ai { padding-left: 5px; padding-right: 5px; }
 /* после — размещаем поверх всех колонок */
.welcome-wide{
    flex: 0 0 100% !important;   /* базис 100 %, не ужимается */
    max-width: 100% !important;  /* убираем прежний limit 380 px */
    margin-bottom: 25px;         /* «воздух» под welcome-блоком */
    padding-left: 5px;
    padding-right: 5px;
}

.welcome-wide .jtbd-row {
    justify-content: center;   /* карточки выравниваются по центру строки */
}

#block_welcome_ai .jtbd-row { display: flex; flex-wrap: wrap; margin: -7px; }
#block_welcome_ai .jtbd-card {
    flex: 1 1 calc(33.333% - 14px); max-width: 360px;
    margin: 7px; padding: 18px 15px;
    border: 1px solid #ddd; border-radius: 6px;
    background: #fff; color: #333; text-align: center; text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    font-size: 100%; line-height: 1.4; word-wrap: break-word;
    transition: all .15s ease-in-out;
}
#block_welcome_ai .jtbd-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
    transform: translateY(-2px);
}
@media (max-width: 991px) { #block_welcome_ai .jtbd-card { flex-basis: calc(50% - 14px); } }
@media (max-width: 600px) { #block_welcome_ai .jtbd-card { flex-basis: 100%; } }

/***************************
 *  «Новое в Сургуте» (bbs-grid)
 ***************************/

		/* --- стили объявлений bbs --- */
		.bbs-grid {
			display: flex; flex-wrap: wrap; justify-content: center;
			margin: -10px;
		}
		.bbs-card {
			flex: 1 1 260px;           /* адаптация 1-3 колонки */
			max-width: 320px;
			margin: 10px; padding: 18px 16px;
			border: 1px solid #e1e1e1; border-radius: 8px;
			background: #fff; color: #333; text-decoration: none;
			box-shadow: 0 2px 4px rgba(0,0,0,.05);
			transition: .15s ease-in-out;
		}
		.bbs-card:hover { box-shadow: 0 4px 10px rgba(0,0,0,.12); transform: translateY(-2px); }
		.bbs-card h4 { font-size: 110%; margin: 0 0 8px; line-height: 1.3; }
		.bbs-card p  { font-size: 100%; margin: 0 0 10px; line-height: 1.4; }
		.bbs-age     { font-size: 90%; color: #888; }
		.bbs-empty   { padding: 30px; text-align: center; color: #666; }

		@media (max-width: 600px) { 
			.bbs-card {
				max-width: 520px;
				margin: 10px; padding: 10px;
			}
		}

/***************************
 *  Блок «Справка / Помощь» (helper-list)
 ***************************/
#block_helper            { margin: 25px 0; }
.helper-list             { display: flex; flex-wrap: wrap; justify-content: center;
                           margin: -10px; padding: 0; list-style: none; }
.helper-item             { flex: 1 1 260px; max-width: 320px; margin: 5px;
                           background:#fff; border:1px solid #e1e1e1; border-radius:8px;
                           box-shadow:0 2px 4px rgba(0,0,0,.05); transition:.15s; }
.helper-item:hover       { box-shadow:0 4px 12px rgba(0,0,0,.12); transform:translateY(-2px); }
.helper-link             { display:block; padding:10px 12px; color:#337ab7; text-decoration:none; }
.helper-link strong      { font-size:100%; line-height:1.35; }
.helper-desc             { display:block; margin-top:4px; font-size:90%; color:#666; }
.helper-item .glyphicon  { float:right; font-size:120%; color:#999; }

		@media (max-width: 600px) { 
			.helper-item             { 
				flex: 1 1 320px; max-width: 550px; margin: 5px;
                          	
                           	}
		}

/* ╔═════════  ПРИСТРОЙ КАРТОЧКИ  ═════════╗ */

/* решётка */
.card-container{
    display:flex; flex-wrap:wrap; justify-content:center; gap:12px;
}

/* карточка: 48 + 130 + 32 = 210 + бордеры/тень ≈ 230 px */
.pristroi-card{
    width:160px; height:230px;
    display:flex; flex-direction:column;
    border:1px solid #e5e5e5; border-radius:6px;
    background:#fff; box-shadow:0 2px 4px rgba(0,0,0,.05);
    overflow:hidden; transition:.15s;
}
.pristroi-card:hover{
    transform:translateY(-2px); box-shadow:0 4px 10px rgba(0,0,0,.12);
}

/* ── 1. Заголовок (фикс 48 px) ───────────────────────────── */
.pristroi-title{
    flex:0 0 68px;                       /* не растёт, не сжимается */
    padding:6px 6px 4px;
    font-size:110%; line-height:1.25;
    overflow:hidden;                     /* прячем лишнее */
    display:-webkit-box; -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
}

/* ── 2. Картинка (фикс 130 px) ───────────────────────────── */
.pristroi-img{
    flex:0 0 130px;
    display:flex; align-items:center; justify-content:center;
    background:#fafafa; overflow:hidden;
}
.pristroi-img img{
    width:auto; height:auto;
    max-width:100%; max-height:100%;
    object-fit:contain; border:none;
}

/* ── 3. Цена (фикс 32 px, прижата к низу) ───────────────── */
.pristroi-price{
    flex:0 0 32px;                       /* забивает оставшиеся 32 px */
    display:flex; align-items:center; justify-content:center;
    font:700 14px/1.2 "Arial",sans-serif; color:#d9534f;
}
.pristroi-card.doubler .pristroi-price{ font-weight:900; }


/* ╚════════════════════════════════════════╝ */



