/* ============================================================
   Мобільна версія promshyna.com.ua — 12.08.2026
   ------------------------------------------------------------
   Файл підключається ПІСЛЯ style.css і містить лише правила
   всередині @media, тому десктоп лишається байт-у-байт таким,
   як був. Правити мобільну верстку — тут.

   Точки зламу:
     768px — телефони й вузькі планшети (основна робота)
     480px — вузькі телефони (одна колонка скрізь)
     360px — найвужчі (компактні відступи)
   ============================================================ */

/* ---------- елементи, яких на десктопі не існує ---------- */
.pv-mob-bar,
.pv-mob-search,
.pv-mob-drawer,
.pv-mob-overlay,
.pv-toast,
.pv-buybar { display: none; }

@media (max-width: 768px) {

/* ============ 1. Базове полотно ============================
   Було: .main { width: 80% } на тлі фонової картинки — сайт
   стояв вузькою смугою посеред екрана, з боків сірий фон. */
html, body { max-width: 100%; overflow-x: hidden; }
body {
	background: #fff !important;
	font-size: 16px;
	line-height: 1.5;
}
.main,
.main.container {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}
.content {
	padding: 0 16px 24px;
	box-sizing: border-box;
	overflow: visible;
}
img { max-width: 100%; height: auto; }
* { -webkit-tap-highlight-color: rgba(255,152,60,.25); }

/* ============ 2. Стара шапка й вертикальна панель соцмереж = */
.header > .logo,
.header > .right-block,
.header .menu,
.menu,
ul.social-icons { display: none !important; }

/* ============ 3. Мобільна шапка ============================ */
.pv-mob-bar {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 58px;
	padding: 0 12px;
	background: #fff;
	border-bottom: 1px solid #e3e3e3;
	position: sticky;
	top: 0;
	z-index: 900;
}
.pv-mob-logo { flex: 1 1 auto; min-width: 0; line-height: 0; }
.pv-mob-logo img { max-width: 170px; width: 100%; height: auto; }
.pv-mob-btn {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 0;
	color: #414040;
	position: relative;
	cursor: pointer;
}
.pv-mob-btn svg { width: 24px; height: 24px; fill: currentColor; }
.pv-cart-badge {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	box-sizing: border-box;
	background: #c0392b;
	color: #fff;
	border-radius: 9px;
	font-size: 11px;
	line-height: 17px;
	text-align: center;
	font-weight: bold;
}
.pv-cart-badge[hidden] { display: none; }

/* пошук — розкривається під шапкою на всю ширину */
.pv-mob-search {
	display: none;
	padding: 10px 12px;
	background: #f7f7f7;
	border-bottom: 1px solid #e3e3e3;
}
.pv-mob-search.pv-open { display: block; }
.pv-mob-search input[type="search"] {
	width: 100%;
	height: 46px;
	padding: 0 12px;
	font-size: 16px;
	border: 1px solid #c9c9c9;
	border-radius: 3px;
	box-sizing: border-box;
}
.pv-mob-search button {
	width: 100%;
	height: 46px;
	margin-top: 8px;
	background: #FF983C;
	color: #fff;
	border: 0;
	border-radius: 3px;
	font-size: 16px;
}
.pv-mob-search a {
	display: inline-block;
	margin-top: 10px;
	color: #c26a1b;
	font-size: 14px;
	text-decoration: none;
}

/* ============ 4. Висувне меню ============================== */
.pv-mob-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	z-index: 950;
}
.pv-mob-overlay.pv-open { display: block; }
.pv-mob-drawer {
	display: block;
	position: fixed;
	top: 0;
	right: 0;
	width: 82%;
	max-width: 320px;
	height: 100%;
	background: #fff;
	z-index: 960;
	transform: translateX(100%);
	transition: transform .22s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.pv-mob-drawer.pv-open { transform: translateX(0); }
.pv-mob-drawer .pv-drawer-close {
	width: 100%;
	height: 52px;
	text-align: right;
	padding: 0 16px;
	background: none;
	border: 0;
	border-bottom: 1px solid #eee;
	font-size: 26px;
	line-height: 1;
	color: #777;
}
.pv-mob-drawer a {
	display: block;
	padding: 14px 18px;
	border-bottom: 1px solid #f0f0f0;
	color: #333;
	text-decoration: none;
	font-size: 16px;
}
.pv-mob-drawer .pv-drawer-foot {
	padding: 16px 18px;
	font-size: 15px;
	color: #555;
}
.pv-mob-drawer .pv-drawer-foot a {
	display: inline;
	padding: 0 4px;
	border: 0;
}

/* ============ 5. Типографіка ============================== */
h1 { font-size: 26px; line-height: 1.2; margin: 10px 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 22px; line-height: 1.25; }
h3 { font-size: 19px; line-height: 1.3; }
.font-size-12px, .font-size-13px { font-size: 15px !important; }

/* ============ 6. Головна ================================== */
/* картки категорій: були на всю ширину з великою порожнечею */
.content > .item-block-wrapper,
.content > .item-block-wrapper > .item-block {
	width: 100% !important;
	height: auto !important;
	float: none !important;
	display: block !important;
	margin: 0 0 10px !important;
}
.content > .item-block-wrapper > .item-block > a {
	display: flex !important;
	align-items: center;
	gap: 14px;
	padding: 10px 12px;
	border: 1px solid #e6e6e6;
	border-radius: 4px;
	text-decoration: none;
}
.content > .item-block-wrapper > .item-block img {
	width: 96px;
	height: auto;
	flex: 0 0 96px;
}
.content > .item-block-wrapper .item-block-title {
	text-align: left !important;
	font-size: 16px;
	line-height: 1.3;
	color: #333;
	width: auto !important;
	height: auto !important;
	/* без цього flex-елемент не звужується вужче за найдовше слово
	   («сільськогосподарської» — 215px) і вилазить за екран */
	min-width: 0;
	overflow-wrap: anywhere;
	hyphens: auto;
}
/* слайдер на весь екран */
#featured, .orbit-wrapper, .orbit { width: 100% !important; height: auto !important; }
#featured img { width: 100%; height: auto; }

/* блоки, які ми додали раніше (перший екран, довіра, консультація) */
.pv-hero a, .pv-cta a { display: block; width: 100%; box-sizing: border-box;
	text-align: center; min-height: 48px; line-height: 30px; margin: 0 0 10px !important; }

/* ============ 7. Каталог і списки товарів ================= */
/* службові обгортки каталогу мають десктопні бічні поля (30–95px) —
   через них картка займала менше ніж 80% ширини екрана */
.product-content,
.content-results,
.category-goods-grid,
.goods-grid,
.products-list,
.category-content,
.brand-content {
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	float: none !important;
}
.item-block-wrapper { width: 100% !important; height: auto !important; }
.item-block {
	width: 100% !important;
	height: auto !important;
	float: none !important;
	display: block !important;
	margin: 0 0 14px !important;
	padding: 12px !important;
	border: 1px solid #e6e6e6;
	border-radius: 4px;
	box-sizing: border-box;
}
.item-block img { display: block; margin: 0 auto 10px; max-width: 100%; height: auto; }
.item-block-title { font-size: 16px !important; line-height: 1.3; text-align: left !important; }
/* назва товару червоним читалася як помилка — лишаємо акцент лише на розмірі */
.item-block-title span[style*="color:red"],
.item-block-title span[style*="color: red"] { color: #333 !important; font-weight: bold; }
.item-block .price { font-size: 18px !important; font-weight: bold; margin-top: 6px; }
.item-block .desctiption-products-11 { font-size: 14px; line-height: 1.45; color: #555; }
.item-block .cart-button { display: block !important; position: static !important;
	margin-top: 10px; opacity: 1 !important; }
.cart-button img { width: 28px; height: auto; }

/* фільтри в категорії */
.filter, .filter-block, .sortview-nav, .sort-view { width: 100% !important; float: none !important; }
select, input[type="text"], input[type="search"], input[type="tel"], input[type="email"], textarea {
	max-width: 100%;
	box-sizing: border-box;
	font-size: 16px;   /* менше — iOS робить zoom при фокусі */
}

/* ============ 8. Картка товару ============================ */
/* десктопні поля (margin: 0 75px і padding: 0 70px) на вузькому екрані
   виштовхували вміст за межі viewport */
.product-card,
.product-card-body,
.product-card-description,
.similar-products,
.similar-products-list,
.price-cart-wrapper {
	width: auto !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	float: none !important;
}
/* крихти накладалися на заголовок: у десктопній верстці в них
   фіксована висота, менша за фактичний текст */
.product-card .breadcrumbs {
	position: static !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 0 12px !important;
	padding: 0 !important;
	font-size: 14px;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: normal;
}
.product-card-title, .product-card-title h1 { width: auto !important; height: auto !important; }
.product-card-body { width: 100% !important; float: none !important; }
.product-card-body #product-photo,
.product-card-body #product-photo img {
	display: block;
	width: 100% !important;
	max-width: 420px;
	height: auto !important;
	margin: 0 auto;
	float: none !important;
}
table.product-options { width: 100% !important; margin-top: 14px; }
table.product-options td { padding: 7px 6px; font-size: 15px; }
table.product-options tr { border-bottom: 1px solid #f0f0f0; }
.product-card-description { width: 100% !important; float: none !important;
	font-size: 16px; line-height: 1.55; }
.price-cart-wrapper, .price-block-wrapper { width: 100% !important; float: none !important;
	text-align: left !important; }
.price-cart-wrapper .price { font-size: 22px !important; }
#addToCart {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100% !important;
	min-height: 52px;
	margin: 12px 0 0 !important;
	font-size: 17px;
	box-sizing: border-box;
}
/* схожі товари — горизонтальна стрічка замість каруселі */
.similar-products, .similar-products-list { width: 100% !important; height: auto !important; }
.similar-products .item-block-wrapper {
	display: flex !important;
	overflow-x: auto !important;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	gap: 10px;
	padding-bottom: 6px;
	width: 100% !important;
	height: auto !important;
}
.similar-products .item-block { flex: 0 0 62%; }


/* карусель схожих товарів на телефоні не запускається (див.
   product-page.js), тому лишки її розмітки прибираємо на всяк випадок */
.slidesjs-container,
.slidesjs-control,
.slidesjs-control > div {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	position: static !important;
	overflow: visible !important;
}

/* нижня панель купівлі */
.pv-buybar {
	display: none;
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 880;
	background: #fff;
	border-top: 1px solid #ddd;
	padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
	align-items: center;
	gap: 12px;
	box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}
.pv-buybar.pv-show { display: flex; }
.pv-buybar .pv-buybar-price { font-size: 18px; font-weight: bold; white-space: nowrap; }
.pv-buybar button {
	flex: 1 1 auto;
	min-height: 46px;
	background: #FF983C;
	color: #fff;
	border: 0;
	border-radius: 3px;
	font-size: 16px;
}

/* ============ 9. Кошик =================================== */
.cart-content {
	width: auto !important;
	margin-left: 0 !important;   /* десктопні 0 35px зсували кошик управо */
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	float: none !important;
}
.cart-item-block-header { display: none !important; }
.cart-item-block {
	display: grid !important;
	grid-template-columns: 84px 1fr;
	/* без цього клітинки розтягуються на всю висоту рядка сітки
	   й товар займає 600+px */
	grid-auto-rows: min-content;
	align-content: start;
	align-items: start;
	grid-gap: 4px 12px;
	width: 100% !important;
	height: auto !important;
	padding: 12px 0 !important;
	border-bottom: 1px solid #eee;
}
.cart-item-block > div { min-height: 0 !important; }
.cart-item-image { grid-row: span 4; width: 84px !important; height: auto !important; }
.cart-item-image img { width: 100%; height: auto; }
.cart-item-title, .cart-item-price, .cart-item-amount, .cart-item-summ, .cart-item-remove {
	width: auto !important;
	height: auto !important;
	/* десктопні padding: 50px 0 роздували рядок товару до 600+px */
	padding: 2px 0 !important;
	line-height: 1.4 !important;
	float: none !important;
	text-align: left !important;
	font-size: 15px;
}
.cart-item-image { grid-row: 1 / -1 !important; }
.cart-item-price::before { content: attr(data-label); }
.cart-item-amount select { width: 84px; height: 44px; }
.cart-item-remove { grid-column: 2; }
.cart-order-wrapper { width: 100% !important; padding: 16px 0 !important; text-align: left !important; }
.cart-order-wrapper .total-summ { font-size: 18px !important; margin-bottom: 12px; }
.cart-order-wrapper input[type="button"],
#submit { width: 100% !important; min-height: 52px; font-size: 17px; }

/* ============ 10. Оформлення замовлення ================== */
/* Було: таблиця label|input із жорсткими width:220px і 300px в
   inline-стилях — поля йшли за межі екрана. Розкладаємо в колонку. */
.order-form-wrapper {
	width: auto !important;
	margin: 0 !important;      /* десктопні 0 95px зсували форму за екран */
	padding: 0 !important;
	float: none !important;
}
.order-form-wrapper table,
.order-form-wrapper tbody,
.order-form-wrapper tr,
.order-form-wrapper td { display: block !important; width: 100% !important; }
.order-form-wrapper td { padding: 0 !important; }
.order-form-wrapper tr { margin-bottom: 14px; }
.order-form-wrapper td:first-child {
	font-size: 15px;
	color: #444;
	margin-bottom: 5px;
	width: 100% !important;
}
.order-form-wrapper input[type="text"],
.order-form-wrapper input[type="tel"],
.order-form-wrapper input[type="email"],
.order-form-wrapper textarea {
	width: 100% !important;
	min-height: 48px;
	padding: 8px 10px;
	font-size: 16px;
	box-sizing: border-box;
	border: 1px solid #c9c9c9;
	border-radius: 3px;
}
.order-form-wrapper textarea { min-height: 130px !important; height: auto !important; }
.order-form-wrapper input[type="button"] {
	width: 100% !important;
	min-height: 52px;
	white-space: normal;
	font-size: 17px;
}
.order-form-wrapper input[type="radio"] { width: 20px; height: 20px; vertical-align: middle; }
.order-form-wrapper label, .order-form-wrapper .order-type { font-size: 16px; }

/* ============ 11. Контакти, відгуки, статті =============== */
.contacts-info table, .contacts-info tbody, .contacts-info tr, .contacts-info td {
	display: block !important; width: 100% !important; }
.contacts-info td { padding: 2px 0 !important; }
.contacts-info tr { margin-bottom: 14px; }
.contacts-info td:first-child { font-weight: bold; color: #444; }
.contacts-form, .review-form { width: 100% !important; float: none !important; }
.contacts-form input, .contacts-form textarea,
.review-form input, .review-form textarea {
	width: 100% !important; min-height: 48px; font-size: 16px;
	box-sizing: border-box; padding: 8px 10px;
	border: 1px solid #c9c9c9; border-radius: 3px;
}
.contacts-form textarea, .review-form textarea { min-height: 130px; }
.contacts-form input[type="submit"], .review-form input[type="submit"] {
	background: #FF983C; color: #fff; border: 0; font-size: 17px; min-height: 52px; }
.reviews > div { width: auto !important; }
.articles-block, .article-block { width: 100% !important; }
.article-text img, .articles-block img { max-width: 100%; height: auto; }

/* довільний html зі старих сторінок */
.content table { max-width: 100%; }
.content table:not(.product-options) { display: block; overflow-x: auto; }

/* ============ 12. Підвал ================================= */
.footer-promshyna, .footer-phone, .footer-copyright {
	position: static !important; float: none !important;
	width: 100% !important; text-align: left !important;
	padding: 0 16px; box-sizing: border-box; }
.footer-copyright { padding-top: 10px; color: #777; }

} /* /max-width: 768px */

/* ---------------- 480px і вужче ---------------- */
@media (max-width: 480px) {
	h1 { font-size: 24px; }
	.content { padding: 0 12px 20px; }
	/* характеристики товару: підпис зверху, значення знизу */
	table.product-options,
	table.product-options tbody,
	table.product-options tr,
	table.product-options td { display: block !important; width: 100% !important; }
	table.product-options tr { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
	table.product-options td:first-child { color: #777; font-size: 14px; padding: 0 0 2px; }
	table.product-options td:last-child { font-size: 16px; padding: 0; }
	.similar-products .item-block { flex: 0 0 78%; }
	.cart-item-block { grid-template-columns: 68px 1fr; }
	.cart-item-image { width: 68px !important; }
}

/* ---------------- 360px і вужче ---------------- */
@media (max-width: 360px) {
	.content { padding: 0 10px 18px; }
	.pv-mob-logo img { max-width: 140px; }
	.pv-mob-btn { width: 40px; }
	h1 { font-size: 22px; }
	.content > .item-block-wrapper > .item-block img { width: 76px; flex-basis: 76px; }
}

/* ---------------- сповіщення «товар додано» ---------------- */
.pv-toast {
	position: fixed;
	left: 12px; right: 12px; bottom: 12px;
	z-index: 1000;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-left: 4px solid #FF983C;
	border-radius: 4px;
	box-shadow: 0 4px 18px rgba(0,0,0,.18);
	padding: 14px 16px;
	font-size: 15px;
}
.pv-toast.pv-show { display: block; }
.pv-toast-title { font-weight: bold; margin-bottom: 4px; }
.pv-toast-name { color: #555; font-size: 14px; margin-bottom: 12px; }
.pv-toast-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-toast-actions a, .pv-toast-actions button {
	flex: 1 1 46%;
	min-height: 44px;
	border-radius: 3px;
	font-size: 15px;
	text-align: center;
	line-height: 44px;
	text-decoration: none;
	cursor: pointer;
	padding: 0 10px;
	box-sizing: border-box;
}
.pv-toast-actions button { background: #fff; border: 1px solid #c9c9c9; color: #444; }
.pv-toast-actions a { background: #FF983C; border: 1px solid #FF983C; color: #fff; }
@media (min-width: 769px) {
	.pv-toast { left: auto; right: 24px; bottom: 24px; width: 340px; }
}

/* ---- інлайнові десктопні ширини в старій розмітці ---- */
@media (max-width: 768px) {
	.categories-list > div[style],
	.content > div[style*="width:"],
	.content > div[style*="width: "] {
		width: auto !important;
		max-width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		box-sizing: border-box;
	}
}

/* ---- таблиця гарантійних строків: у блоки ---- */
@media (max-width: 640px) {
	table.pv-terms,
	table.pv-terms tbody,
	table.pv-terms tr,
	table.pv-terms td { display: block !important; width: 100% !important; }
	table.pv-terms tr { padding: 10px 0; border-bottom: 1px solid #eee; }
	table.pv-terms tr:first-child { display: none !important; }  /* шапка таблиці */
	table.pv-terms td { padding: 2px 0 !important; }
	table.pv-terms td:first-child { font-weight: bold; }
	table.pv-terms td:last-child { color: #777; font-size: 14px; }
}

/* ---- підказки валідації у формі замовлення ---- */
.pv-field-error {
	display: block;
	margin: 4px 0 0;
	color: #c0392b;
	font-size: 13px;
}
input.invalid-element,
textarea.invalid-element {
	border: 1px solid #c0392b !important;
	background: #fff8f7;
}
