/* Правки вёрстки сайта Пензы, 2026-11-10.
   Подключается в header.php после custom.css. */

/* Красное предупреждение «Цены действительны от 10 000 ₽»: строки не наезжают друг на друга */
.cart-table span[style*="line-height"], .ms-price-page span[style*="line-height"] { line-height: 1.35 !important; }

/* Оформление заказа: доставка считается менеджером, «0 ₽» не показываем */
#bx-soa-delivery .bx-soa-pp-price, #bx-soa-delivery .bx-soa-pp-delivery-cost { font-size: 0 !important; }
#bx-soa-delivery .bx-soa-pp-price::after { content: "стоимость рассчитает менеджер"; font-size: 13px; color: #777; }

/* Фильтр по размеру в разделах каталога */
.mc-size-filter { margin: 6px 0 18px; }
.mc-sf-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.mc-sf-label { font-weight: 600; font-size: 14px; margin-right: 4px; white-space: nowrap; }
.mc-sf-chip { padding: 5px 11px; border: 1px solid #ddd; border-radius: 999px; background: #fff; color: #222 !important; font-size: 14px; line-height: 1.3; text-decoration: none !important; white-space: nowrap; }
.mc-sf-chip:hover { border-color: #bf3d3d; color: #bf3d3d !important; }
.mc-sf-chip.active { background: #bf3d3d; border-color: #bf3d3d; color: #fff !important; }
.mc-sf-reset a { color: #bf3d3d; font-size: 14px; }
@media (max-width: 767px) {
	.mc-sf-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
}

/* Планшеты и небольшие ноутбуки: без горизонтальной прокрутки */
@media (min-width: 768px) {
	.container, footer .container, .catalog .container, .main .container, .main.full .container {
		width: auto !important; max-width: 1240px; margin-left: auto; margin-right: auto;
		padding-left: 16px; padding-right: 16px; box-sizing: border-box;
	}
}
@media (min-width: 768px) and (max-width: 1199px) {
	.header_top { display: flex !important; align-items: center; gap: 10px 18px; }
	.header_top::before, .header_top::after { display: none !important; }
	.header_top > * { float: none !important; margin-left: 0 !important; margin-right: 0 !important; }
	.header_top .logo { flex: 0 1 240px; min-width: 170px; }
	.header_top .logo img { max-width: 100%; height: auto; }
	.header_top .globe, .header_top .phone_us { width: auto !important; flex: 0 0 auto; }
	.header_top .header-right { margin-left: auto !important; width: auto !important; flex: 0 0 auto; }

	.cart-table-content table td.product_photo, .cart-table-content table th.photo-title { min-width: 64px !important; width: 64px !important; padding-left: 6px !important; }
	.cart-table-content table td.product_photo img { max-width: 56px; height: auto; }
	.cart-table-content table td.product_name { min-width: 160px !important; width: auto !important; }
	.cart-table-content table td.product_price { min-width: 150px !important; width: 150px !important; }
	.cart-table-content table td.product_quantity { min-width: 170px !important; width: 170px !important; }
	.cart-table-content table td.product_quantity .number-input input { width: 64px !important; }
	.cart-table-content table td.product_quantity .number-input b { display: none !important; }
	.cart-table-content table td.product_sum { min-width: 90px !important; width: 90px !important; }
	.cart-table-content table td.product_cart { min-width: 110px !important; width: 110px !important; }
	.cart-table-content table td.product_cart a.add-to-cart { width: auto !important; }
	.cart-table-content table td.product_cart svg { width: 100px; height: auto; }
}
@media (min-width: 768px) and (max-width: 900px) {
	.header_top .phone_us + .phone_us { display: none !important; }
	.header_top .logo { flex-basis: 200px; }
	.cart-table-content table td.product_name { min-width: 130px !important; }
	.cart-table-content table td.product_price { min-width: 132px !important; width: 132px !important; }
	.cart-table-content table td.product_quantity { min-width: 156px !important; width: 156px !important; }
	.cart-table-content table td.product_quantity .number-input input { width: 54px !important; }
	.cart-table-content table td.product_sum { min-width: 80px !important; width: 80px !important; }
	.cart-table-content table td.product_cart { min-width: 96px !important; width: 96px !important; padding-right: 4px !important; }
	.cart-table-content table td.product_cart svg { width: 88px; }
}

/* Телефоны: компактные строки каталога и меньше пустого места над товарами */
@media (max-width: 767px) {
	.cart-table-content table tr { padding: 14px 8px !important; align-items: center; }
	.cart-table-content table td.product_photo { flex: 0 0 64px; width: 64px !important; min-width: 0 !important; padding: 0 12px 0 0 !important; }
	.cart-table-content table td.product_photo img { width: 64px !important; height: 64px !important; object-fit: contain; }
	.cart-table-content table td.product_name { flex: 1 1 0; width: auto !important; min-width: 0; padding: 0 !important; }
	.cart-table-content table td.product_price, .cart-table-content table td.product_sum { padding: 10px 0 !important; }
	.cart-table.st_cart > span[style*="line-height"] p { margin: 0 0 2px !important; font-size: 13px; }
	.cart-table.st_cart > span[style*="line-height"] + br { display: none; }
	.cart-table .catalog-date-update { margin-bottom: 8px !important; font-size: 14px; }
	.cart-table-top { margin-top: 10px; }
	.small h1, .main h1 { margin-top: 10px !important; margin-bottom: 14px !important; font-size: 26px; line-height: 1.2; }
	/* Карточка товара: картинка меньше, цена и «В корзину» видны без прокрутки */
	.product-content .product-left img { max-height: 150px !important; height: auto !important; width: auto !important; max-width: 100%; margin: 0 auto; object-fit: contain; }
	.product-content .product-left .slick-slide, .product-content .product-left .slick-list, .product-content .product-left .slick-track { height: auto !important; }
	.product-content { padding-top: 10px !important; }
	/* Кнопка звонка LeadBack меньше и не закрывает текст */
	.lb-button__wrapper { transform: scale(.7); transform-origin: left bottom; left: 8px !important; bottom: 8px !important; }
}

/* Печать (2026-11-11): на листе только содержимое страницы, без чатов, кнопок и шапки.
   Прайс-лист: читаемый шрифт, шапка таблицы на каждом листе, строки не рвутся. */
@media print {
	@page { size: A4 portrait; margin: 12mm 10mm; }
	html, body { background: #fff !important; }
	body > *:not(.full) { display: none !important; }
	.full > .main-banner, .full > .form-bg, .full > footer, .breadcrumbs, .grecaptcha-badge { display: none !important; }
	#main_container { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }

	.ms-price-page .wrap { padding: 0 !important; }
	.ms-price-page .hero { box-shadow: none !important; background: none !important; border-radius: 0 !important; padding: 0 0 3mm !important; margin: 0 !important; }
	.ms-price-page h1 { font-size: 16pt !important; margin: 0 0 2mm !important; }
	.ms-price-page .hero p, .ms-price-page .hero span { font-size: 9pt !important; line-height: 1.3 !important; margin: 0 !important; }
	.ms-price-page .hero br { display: none; }
	.ms-price-page .mc-pl-meta { font-size: 10pt !important; margin: 0 0 3mm !important; }
	.ms-price-page details.section { box-shadow: none !important; border: none !important; border-radius: 0 !important; margin: 0 0 5mm !important; overflow: visible !important; }
	.ms-price-page summary { display: flex !important; background: none !important; color: #000 !important; padding: 1mm 0 !important; font-size: 12pt !important; border-bottom: 1.5pt solid #000; list-style: none; break-after: avoid; page-break-after: avoid; }
	.ms-price-page summary::-webkit-details-marker { display: none; }
	.ms-price-page summary b { background: none !important; color: #000 !important; padding: 0 !important; font-weight: 400 !important; font-size: 10pt !important; }
	.ms-price-page .table-wrap { overflow: visible !important; }
	.ms-price-page .price-table { width: 100% !important; }
	.ms-price-page .price-table thead { display: table-header-group; }
	.ms-price-page .price-table th { background: #e6e6e6 !important; color: #000 !important; font-size: 9pt !important; padding: 1.5mm 2mm !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.ms-price-page .price-table td { background: none !important; font-size: 10pt !important; padding: 1.2mm 2mm !important; border-bottom: 0.5pt solid #bbb !important; }
	.ms-price-page .price-table tr { break-inside: avoid; page-break-inside: avoid; }
	.ms-price-page .price-table td a { color: #000 !important; text-decoration: none !important; }
	.ms-price-page .price-table small { color: #555 !important; }
	.ms-price-page .price { color: #000 !important; }
	.ms-price-page .note { font-size: 8.5pt !important; }
}

/* 2026-11-11: в оформлении заказа не показываем служебные свойства товара («Кг в 1 п.м.», «Кратность») — они нужны только для пересчёта в шт и пог. м */
#bx-soa-basket .bx-soa-item-info-container, #bx-soa-order .bx-soa-item-info-container { display: none !important; }


/* Окно «Товар добавлен в корзину» (2026-11-11) */
.mc-atc{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(24,24,24,.55);opacity:0;transition:opacity .2s ease;box-sizing:border-box}
.mc-atc.is-open{opacity:1}
.mc-atc *{box-sizing:border-box}
.mc-atc__box{position:relative;width:100%;max-width:480px;background:#fff;border-radius:14px;box-shadow:0 24px 64px rgba(0,0,0,.22);padding:26px 26px 24px;color:#282828;font-family:inherit;transform:translateY(14px) scale(.98);transition:transform .22s ease}
.mc-atc.is-open .mc-atc__box{transform:none}
.mc-atc__x{position:absolute;top:12px;right:12px;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:transparent;color:#9a9a9a;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}
.mc-atc__x:hover{background:#f2f2f2;color:#282828}
.mc-atc__head{display:flex;align-items:center;gap:12px;margin:0 36px 18px 0}
.mc-atc__ok{flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:#e7f4eb;color:#2c9a57;display:flex;align-items:center;justify-content:center}
.mc-atc__title{font-size:20px;font-weight:700;line-height:1.25}
.mc-atc__item{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid #ececec;border-radius:10px;background:#fafafa}
.mc-atc__img{flex:0 0 60px;width:60px;height:60px;object-fit:cover;border-radius:6px;background:#fff}
.mc-atc__info{flex:1 1 auto;min-width:0}
.mc-atc__name{font-size:15px;font-weight:600;line-height:1.3}
.mc-atc__qty{margin-top:4px;font-size:13px;line-height:1.35;color:#6f6f6f}
.mc-atc__qty:empty{display:none}
.mc-atc__sum{flex:0 0 auto;font-size:17px;font-weight:700;white-space:nowrap}
.mc-atc__btns{display:flex;gap:10px;margin-top:20px}
.mc-atc__btns>*{flex:1 1 0;display:flex;align-items:center;justify-content:center;height:48px;margin:0;padding:0 14px;border-radius:8px;font-family:inherit;font-size:15px;font-weight:600;line-height:1;text-decoration:none!important;text-transform:none;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.mc-atc__cont{background:#fff;border:1.5px solid #d4d4d4;color:#282828}
.mc-atc__cont:hover{border-color:#282828}
.mc-atc__go{background:#BF3D3D;border:1.5px solid #BF3D3D;color:#fff!important}
.mc-atc__go:hover{background:#a53232;border-color:#a53232}
.mc-atc__btns>*:focus-visible,.mc-atc__x:focus-visible{outline:2px solid #BF3D3D;outline-offset:2px}
@media (max-width:600px){
  .mc-atc{align-items:flex-end;padding:0}
  .mc-atc__box{max-width:none;border-radius:16px 16px 0 0;padding:22px 16px 16px;padding-bottom:calc(16px + env(safe-area-inset-bottom));transform:translateY(100%)}
  .mc-atc__title{font-size:18px}
  .mc-atc__item{padding:10px 12px;gap:12px}
  .mc-atc__img{flex-basis:52px;width:52px;height:52px}
  .mc-atc__sum{font-size:16px}
  .mc-atc__btns{flex-direction:column-reverse;gap:8px;margin-top:16px}
  .mc-atc__btns>*{flex:0 0 auto;width:100%}
}
@media (prefers-reduced-motion:reduce){.mc-atc,.mc-atc__box{transition:none}}

/* Пока окно открыто, прячем плавающие кнопки звонка/чата */
body.mc-atc-open #lb_widget-root,body.mc-atc-open .b24-widget-button-wrapper,body.mc-atc-open .grecaptcha-badge{display:none!important}
