/* ==========================================================================
   La Espalda — Mobile & Responsive (полная переработка юзабилити)
   Брейкпоинты: 1024 / 768 / 560 / 380
   ========================================================================== */

/* ---------- Базовая защита от переполнения ---------- */
html, body { overflow-x: hidden; max-width: 100%; }
img, table, iframe { max-width: 100%; }
.la-container { width: 100%; }

/* Тач-таргеты: минимум 44px (WCAG) */
@media (max-width: 768px) {
	.la-btn { padding: 14px 24px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
	.la-nav-list a { min-height: 48px; display: flex; align-items: center; }
	.la-header-icon { width: 46px; height: 46px; }
	.la-faq-item summary { min-height: 52px; display: flex; align-items: center; }
}

/* ---------- Планшет (≤1024) ---------- */
@media (max-width: 1024px) {
	.la-container { padding: 0 18px; }
	.la-section { padding: 44px 0; }
	.la-hero { padding: 48px 0 36px; }
}

/* ---------- Мобильный крупный (≤768) ---------- */
@media (max-width: 768px) {
	body { font-size: 16px; }
	h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
	h2 { font-size: clamp(1.3rem, 5vw, 1.6rem); }

	.la-section { padding: 36px 0; }
	.la-section-title { margin-bottom: 20px; }

	/* Hero */
	.la-hero { padding: 32px 0 28px; }
	.la-hero-inner { grid-template-columns: 1fr !important; gap: 28px; }
	.la-hero-media { order: -1; max-width: 320px; margin: 0 auto; }
	.la-hero h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
	.la-hero-sub { font-size: 1.02rem; }
	.la-hero-actions { flex-direction: column; }
	.la-hero-actions .la-btn { width: 100%; }
	.la-hero-trust { gap: 8px 18px; font-size: .85rem; }

	/* Мерная лента тоньше */
	.la-tape { height: 10px; margin: 20px 0; }
	.la-tape-full { height: 10px; }

	/* Сетки в одну колонку */
	.la-cats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.la-benefits-grid,
	.la-reviews-grid,
	.la-instr-grid,
	.la-posts-grid,
	.la-situations-grid,
	.la-wtb-channels { grid-template-columns: 1fr; gap: 14px; }

	/* Баннеры размер/документы — вертикально */
	.la-size-banner,
	.la-docs-banner { grid-template-columns: 1fr !important; display: flex !important; flex-direction: column; gap: 18px; align-items: flex-start; }
	.la-size-banner .la-btn,
	.la-docs-banner .la-btn { width: 100%; text-align: center; }

	/* Каталог */
	.la-catalog-layout { grid-template-columns: 1fr; gap: 20px; }
	.la-catalog-filters { position: static; }
	ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	ul.products li.product { padding: 10px; }
	.la-loop-title { font-size: .92rem; }
	.la-loop-price { font-size: 1rem; }

	/* Карточка товара */
	.la-single-product div.product { grid-template-columns: 1fr; gap: 24px; }
	.la-wtb-buttons { flex-direction: column; }
	.la-wtb-buttons .la-btn { width: 100%; text-align: center; }

	/* Формы / B2B / контакты */
	.la-b2b-grid,
	.la-contacts-grid { grid-template-columns: 1fr; gap: 24px; }
	.la-form { padding: 18px; }

	/* Мастер размера */
	.la-wizard { padding: 18px; }
	.la-wizard-options { grid-template-columns: 1fr; }
	.la-wizard-nav { flex-direction: column; }
	.la-wizard-nav .la-btn { width: 100%; }
	.la-wizard-field input { width: 100%; max-width: 200px; }
	.la-wizard-steps li { font-size: .78rem; }

	/* Подвал */
	.la-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

	/* Бот: на всю ширину снизу */
	.la-chat {
		right: 0; left: 0; bottom: 0;
		width: 100%; height: 80vh; max-height: 80vh;
		border-radius: var(--la-radius) var(--la-radius) 0 0;
	}
	.la-chat-toggle { right: 16px; bottom: 16px; }

	/* Cookie-баннер */
	.la-cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
	.la-cookie-actions { flex-direction: column; }
	.la-cookie-actions .la-btn { width: 100%; }

	/* Таблицы — горизонтальный скролл */
	.la-content table,
	.la-size-table { display: block; overflow-x: auto; white-space: nowrap; }

	/* Промо размера */
	.la-size-promo { flex-direction: row; padding: 14px 16px; }
}

/* ---------- Мобильный средний (≤560) ---------- */
@media (max-width: 560px) {
	.la-footer-grid { grid-template-columns: 1fr; gap: 20px; }
	.la-cats-grid { grid-template-columns: 1fr 1fr; }
	.la-logo-text { font-size: 1.1rem; }
	.la-header-inner { gap: 10px; min-height: 60px; }
	.la-header { position: sticky; }
	.la-nav { inset: 60px 0 auto 0; }
	.la-breadcrumbs { font-size: .82rem; }
	.la-page-lead { font-size: 1.02rem; }
}

/* ---------- Мобильный малый (≤380) ---------- */
@media (max-width: 380px) {
	.la-container { padding: 0 14px; }
	ul.products { grid-template-columns: 1fr; }
	.la-cats-grid { grid-template-columns: 1fr; }
	.la-hero h1 { font-size: 1.7rem; }
	.la-cart-count { top: 0; right: -2px; }
}

/* ---------- Ландшафт телефона: бот не на всю высоту ---------- */
@media (max-width: 768px) and (orientation: landscape) {
	.la-chat { height: 90vh; }
}
