/* =============================================================
   MTSP — Catalog Product Page
   ============================================================= */

/* ---- Page spacing ----------------------------------------- */
body.single-catalog .content-area {
	margin-top: 24px !important;
}
body.tax-catalog_category .content-area {
	margin-top: 24px !important;
}

/* ---- Layout grid ------------------------------------------ */
/* Base: single product default — sidebar left 220px, main right 1fr */
.mtsp-catalog-wrap {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 2rem;
	align-items: start;
	padding: 1.5rem 0 3rem;
}
/* Grid children must not overflow */
.mtsp-catalog-sidebar,
.mtsp-catalog-main {
	min-width: 0;
	max-width: 100%;
}

/* Archive / category pages: main content first (wider), sidebar right */
body.tax-catalog_category .mtsp-catalog-wrap,
body.post-type-archive-catalog .mtsp-catalog-wrap {
	grid-template-columns: 220px 1fr !important;
}
/* ---- Breadcrumbs ------------------------------------------ */
.mtsp-breadcrumbs {
	font-size: 0.8rem;
	color: var(--global-palette6);
	margin-bottom: 1.25rem;
	line-height: 1.4;
}
.mtsp-breadcrumbs a {
	color: var(--global-palette5);
	text-decoration: none;
}
.mtsp-breadcrumbs a:hover {
	color: var(--global-palette1);
}
.mtsp-breadcrumbs .sep {
	margin: 0 0.35em;
}

/* ---- Product top: 2-col grid (gallery | info) ------------ */
.mtsp-product-top {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	margin-bottom: 28px;
	align-items: start;
	min-width: 0;
}
.mtsp-gallery-col {
	min-width: 0;
}
/* ---- Product info (right column) -------------------------- */
.mtsp-product-info {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.mtsp-catalog-main .entry-title {
	font-size: 1.4rem;
	margin: 0 0 10px;
	line-height: 1.3;
}

/* ---- Availability badge ----------------------------------- */
.mtsp-avail-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #e8f5e9;
	color: #2e7d32;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 14px;
	border-radius: 20px;
	margin-bottom: 10px;
	width: fit-content;
}
.mtsp-avail-badge::before {
	content: '';
	width: 7px;
	height: 7px;
	background: #43a047;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
}
.mtsp-avail-badge.out-of-stock {
	background: #fff3e0;
	color: #e65100;
}
.mtsp-avail-badge.out-of-stock::before {
	background: #ff6d00;
}

/* ---- Article code (in right column) ----------------------- */
.mtsp-product-info .mtsp-articul {
	font-size: 0.875rem;
	color: var(--global-palette5);
	margin: 0 0 10px;
}

/* ---- Short description ------------------------------------ */
.mtsp-short-desc {
	background: #eef2ff;
	border-left: 3px solid #1a3a6b;
	border-radius: 0 8px 8px 0;
	padding: 12px 16px;
	font-size: 13px;
	color: #444;
	line-height: 1.6;
	margin-bottom: 16px;
}
.mtsp-short-desc p {
	margin: 0;
}

/* ---- CTA block -------------------------------------------- */
.mtsp-cta-block {
	background: #fff;
	border: 1px solid #e0e8f5;
	border-radius: 12px;
	padding: 18px;
	margin-top: 16px;
}
.mtsp-cta-block .price-note {
	font-size: 12px;
	color: #888;
	margin: 0 0 12px;
}
.mtsp-btn-main {
	display: block;
	width: 100%;
	background: #e8500a;
	color: #fff;
	border: none;
	padding: 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	text-align: center;
	margin-bottom: 10px;
	text-decoration: none;
	box-sizing: border-box;
	transition: background 0.15s;
}
.mtsp-btn-main:hover {
	background: #c94008;
	color: #fff;
}
.mtsp-btn-secondary {
	display: block;
	width: 100%;
	background: #fff;
	color: #1a3a6b;
	border: 2px solid #1a3a6b;
	padding: 11px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	margin-bottom: 12px;
	box-sizing: border-box;
	transition: background 0.15s;
}
.mtsp-btn-secondary:hover {
	background: #eef2ff;
	color: #1a3a6b;
}
.mtsp-messenger-btns {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
}
.mtsp-btn-messenger {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: 1;
	padding: 11px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.2s;
	box-sizing: border-box;
}
.mtsp-btn-messenger:hover { opacity: 0.85; }
.mtsp-btn-viber {
	background: #7360f2;
	color: #fff;
}
.mtsp-btn-telegram {
	background: #29a8e9;
	color: #fff;
}
.mtsp-cta-meta {
	display: flex;
	gap: 12px;
}
.mtsp-cta-meta span {
	font-size: 11px;
	color: #888;
	flex: 1;
	line-height: 1.4;
}

/* ---- Tabs ------------------------------------------------- */
.mtsp-tabs {
	margin-top: 8px;
}
.mtsp-tabs-nav {
	display: flex;
	margin-bottom: 20px;
	gap: 4px;
	border-bottom: none;
}
.mtsp-tab {
	background: transparent;
	color: #333;
	border: 1px solid #dce6f5;
	border-bottom: none;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	-webkit-tap-highlight-color: transparent;
	outline: none !important;
	box-shadow: none !important;
}
.mtsp-tab:hover {
	background: #eef2ff;
	color: #1a3a6b;
}
.mtsp-tab.active {
	background: #1a3a6b;
	color: #fff !important;
	border-color: #1a3a6b;
}
.mtsp-tab:focus,
.mtsp-tab:focus-visible,
.mtsp-tab:active,
.mtsp-tabs-nav .mtsp-tab:focus,
.mtsp-tabs-nav .mtsp-tab:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
.mtsp-tab-content {
	display: none;
}
.mtsp-tab-content.active {
	display: block;
}
.mtsp-tab-empty {
	color: var(--global-palette5);
	font-size: 0.9rem;
	padding: 1rem 0;
}

/* ---- Delivery tab ----------------------------------------- */
.mtsp-delivery-info {
	padding: 4px 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.mtsp-delivery-info > div > p,
.mtsp-delivery-info > p {
	font-size: 13px;
	color: #555;
	line-height: 1.6;
	margin: 0 0 10px;
}
.mtsp-delivery-block-title {
	font-size: 14px;
	font-weight: 600;
	color: #1a3a6b;
	margin-bottom: 10px;
}
.mtsp-carriers-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.mtsp-carriers-list li {
	background: #eef2ff;
	color: #1a3a6b;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 16px;
	border-radius: 20px;
	border: 1px solid #c5d3f5;
}
.mtsp-delivery-payment {
	font-size: 13px;
	color: #555;
	line-height: 1.6;
	margin: 0;
	padding: 12px 14px;
	background: #f8faff;
	border-radius: 8px;
	border-left: 3px solid #1a3a6b;
}

/* ---- Gallery ---------------------------------------------- */
.mtsp-gallery {
	margin-bottom: 1.5rem;
}
.mtsp-gallery-main {
	position: relative;
	width: 100%;
	background: var(--global-palette7);
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
}
.mtsp-gallery-main img {
	max-width: 100%;
	max-height: 420px;
	width: auto;
	height: auto;
	object-fit: contain;
	cursor: zoom-in;
	display: block;
}
.mtsp-gallery-thumbs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.mtsp-gallery-thumb {
	width: 64px !important;
	height: 64px !important;
	min-width: 64px;
	border: 2px solid transparent;
	border-radius: 3px;
	overflow: hidden;
	cursor: pointer;
	background: var(--global-palette7);
	flex-shrink: 0;
	transition: border-color 0.15s;
}
.mtsp-gallery-thumb:hover {
	border-color: var(--global-palette5);
}
.mtsp-gallery-thumb.active {
	border-color: var(--global-palette1);
}
.mtsp-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---- Lightbox --------------------------------------------- */
.mtsp-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.88);
	z-index: 99999;
	align-items: center;
	justify-content: center;
}
.mtsp-lightbox.open {
	display: flex;
}
.mtsp-lightbox img {
	max-width: 92vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 3px;
}
.mtsp-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1.25rem;
	font-size: 2rem;
	color: #fff;
	cursor: pointer;
	line-height: 1;
	background: none;
	border: none;
	padding: 0;
}
.mtsp-lb-prev,
.mtsp-lb-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,.5);
	color: #fff;
	border: none;
	font-size: 32px;
	line-height: 1;
	padding: 12px 18px;
	cursor: pointer;
	border-radius: 4px;
	z-index: 10;
	transition: background .15s;
	user-select: none;
}
.mtsp-lb-prev { left: 16px; }
.mtsp-lb-next { right: 16px; }
.mtsp-lb-prev:hover,
.mtsp-lb-next:hover { background: rgba(0,0,0,.8); }
.mtsp-lb-counter {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,.7);
	font-size: 13px;
	background: rgba(0,0,0,.4);
	padding: 4px 12px;
	border-radius: 20px;
	pointer-events: none;
}

/* ---- Product info strip ----------------------------------- */
.mtsp-product-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: center;
	margin-bottom: 1.25rem;
	padding: 0.75rem 1rem;
	background: var(--global-palette7);
	border-radius: 4px;
	border-left: 3px solid var(--global-palette1);
}
.mtsp-articul {
	font-size: 0.875rem;
	color: var(--global-palette5);
}
.mtsp-articul strong {
	color: var(--global-palette4);
}
.mtsp-stock {
	font-size: 0.875rem;
	font-weight: 600;
}
.mtsp-stock.in-stock {
	color: #28a745;
}
.mtsp-stock.out-of-stock {
	color: var(--global-palette13);
}

/* ---- Little about (short intro) --------------------------- */
.mtsp-little-about {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--global-palette4);
	margin-bottom: 1.25rem;
}

/* ---- Notice ----------------------------------------------- */
.mtsp-notice {
	background: #fff8e1;
	border-left: 3px solid var(--global-palette14);
	padding: 0.75rem 1rem;
	border-radius: 0 4px 4px 0;
	font-size: 0.9rem;
	margin-bottom: 1.25rem;
	color: var(--global-palette4);
}

/* ---- Description (post_content) --------------------------- */
.mtsp-description {
	border-top: 1px solid var(--global-palette8);
	padding-top: 1.25rem;
	margin-top: 0.5rem;
	overflow-x: auto;
	max-width: 100%;
}
.mtsp-description h2,
.mtsp-description h3 {
	font-size: 1.15rem;
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}
.mtsp-description table {
	width: 100%;
	min-width: 320px;
	border-collapse: collapse;
	font-size: 0.9rem;
	margin: 1rem 0;
}
.mtsp-description table td,
.mtsp-description table th {
	border: 1px solid #ccc;
	padding: 0.4rem 0.6rem;
	vertical-align: top;
}
.mtsp-description table tr:nth-child(even) td {
	background: var(--global-palette7);
}

/* ── SIDEBAR SHELL ── */
.mtsp-catalog-sidebar {
	position: sticky;
	top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ── CATALOG SECTION ── */
.mtsp-sidebar-section {
	background: #fff;
	border: 1px solid #e0e8f5;
	border-radius: 10px;
	overflow: hidden;
}

.mtsp-sidebar-title {
	background: #1a3a6b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 10px 14px;
	margin: 0;
}

/* Root categories */
.mtsp-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mtsp-cat-root {
	border-bottom: 1px solid #f0f4ff;
}
.mtsp-cat-root:last-child {
	border-bottom: none;
}

.mtsp-cat-root > a,
.mtsp-cat-root > span {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 500;
	color: #333;
	text-decoration: none;
	transition: background .15s;
}
.mtsp-cat-root > a:hover {
	background: #f5f8ff;
	color: #1a3a6b;
}
.mtsp-cat-root.active > a,
.mtsp-cat-root.active > span {
	color: #1a3a6b;
	font-weight: 600;
	background: #eef2ff;
}

/* Category icons */
.mtsp-cat-icon {
	width: 28px;
	height: 28px;
	object-fit: cover;
	flex-shrink: 0;
	opacity: 0.85;
	border-radius: 50%;
	border: 1.5px solid #dce6f5;
	background: #f0f4ff;
}
.mtsp-cat-root.active .mtsp-cat-icon {
	opacity: 1;
	border-color: #1a3a6b;
}

/* Subcategories */
.mtsp-cat-children {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #f8faff;
	border-top: 1px solid #e8f0fe;
}
.mtsp-cat-children li {
	border-bottom: 1px solid #eef2ff;
}
.mtsp-cat-children li:last-child {
	border-bottom: none;
}
.mtsp-cat-children li a {
	display: block;
	padding: 7px 14px 7px 36px;
	font-size: 12px;
	font-weight: 400;
	color: #555;
	text-decoration: none;
	position: relative;
	transition: color .15s;
}
.mtsp-cat-children li a::before {
	content: '';
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #aab4c8;
}
.mtsp-cat-children li a:hover {
	color: #1a3a6b;
}
.mtsp-cat-children li a:hover::before {
	background: #1a3a6b;
}
.mtsp-cat-children li.current a {
	color: #1a3a6b;
	font-weight: 600;
}
.mtsp-cat-children li.current a::before {
	background: #e8500a;
}

/* ── FORM SECTION ── */
.mtsp-sidebar-form {
	background: #1a3a6b;
	border-radius: 10px;
	overflow: hidden;
}
.mtsp-sidebar-form .mtsp-sidebar-title {
	background: rgba(0,0,0,.2);
	font-size: 11px;
	letter-spacing: 1px;
}
.mtsp-sidebar-form-body {
	padding: 14px;
}
.mtsp-sidebar-form-tagline {
	font-size: 12px;
	color: rgba(255,255,255,.8);
	line-height: 1.5;
	margin: 0 0 12px;
}
/* Hide CF7 explanatory text and response output */
.mtsp-sidebar-form .wpcf7 .feedback-titles,
.mtsp-sidebar-form .wpcf7 form > div:nth-of-type(-n+2),
.mtsp-sidebar-form .wpcf7 br {
	display: none !important;
}
/* Form labels */
.mtsp-sidebar-form .wpcf7 label {
	display: block;
	font-size: 11px;
	color: rgba(255,255,255,.7);
	margin-bottom: 4px;
}
/* Form inputs */
.mtsp-sidebar-form .wpcf7 input[type="text"],
.mtsp-sidebar-form .wpcf7 input[type="tel"] {
	width: 100%;
	background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.2);
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 12px;
	color: #fff !important;
	margin-bottom: 10px;
	outline: none;
	box-sizing: border-box;
	transition: border .15s;
}
.mtsp-sidebar-form .wpcf7 input[type="text"]::placeholder,
.mtsp-sidebar-form .wpcf7 input[type="tel"]::placeholder {
	color: rgba(255,255,255,.4);
}
.mtsp-sidebar-form .wpcf7 input:focus {
	border-color: rgba(255,255,255,.5);
	background: rgba(255,255,255,.18);
}
/* Submit button */
.mtsp-sidebar-form .wpcf7 input[type="submit"] {
	width: 100%;
	background: #e8500a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s;
}
.mtsp-sidebar-form .wpcf7 input[type="submit"]:hover {
	background: #c94208;
}

/* Force show all form elements — override any cf7sg popup hiding */
.mtsp-sidebar-form .wpcf7 label,
.mtsp-sidebar-form .wpcf7 input[type="text"],
.mtsp-sidebar-form .wpcf7 input[type="tel"],
.mtsp-sidebar-form .wpcf7 input[type="submit"] {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: static !important;
	clip: auto !important;
	overflow: visible !important;
	width: 100% !important;
}
.mtsp-sidebar-form .wpcf7 input[type="submit"] {
	width: 100% !important;
}

/* Kill feedback-titles ghost text from cf7sg wrapper */
.mtsp-sidebar-form .cf7sg-container .feedback-titles,
.mtsp-sidebar-form [class*="feedback"] {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* Prevent any text bleeding from cf7sg wrappers */
.mtsp-sidebar-form .cf7sg-container,
.mtsp-sidebar-form .cf7-smart-grid {
	overflow: hidden;
}

/* ---- Video tab -------------------------------------------- */
.mtsp-video-wrap {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 10px;
	margin-bottom: 16px;
	background: #000;
}
.mtsp-video-wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}
.mtsp-video-thumb {
	position: relative;
	cursor: pointer;
}
.mtsp-video-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.mtsp-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0,0,0,.7);
	color: #fff;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	pointer-events: none;
}

/* ---- Related products slider ------------------------------ */
.mtsp-related-products {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 2px solid #e8eef5;
}
.mtsp-related-title {
	font-size: 20px;
	font-weight: 700;
	color: #1a3a6b;
	margin-bottom: 20px;
}
.mtsp-related-slider-wrap {
	display: flex;
	align-items: stretch;
	gap: 8px;
	position: relative;
}
.mtsp-related-track-outer {
	overflow: hidden;
	flex: 1;
	min-width: 0;
}
.mtsp-related-track {
	display: flex;
	gap: 16px;
	transition: transform 0.3s ease;
	will-change: transform;
}
.mtsp-related-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e0e8f5;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	transition: box-shadow .15s, transform .15s;
	flex: 0 0 calc(25% - 12px);
	width: calc(25% - 12px);
	max-width: calc(25% - 12px);
	min-width: 0;
	box-sizing: border-box;
}
.mtsp-related-card:hover {
	box-shadow: 0 4px 16px rgba(26,58,107,.12);
	transform: translateY(-2px);
}
.mtsp-related-img {
	height: 140px;
	background: #f4f7fc;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.mtsp-related-img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
}
.mtsp-related-no-img {
	font-size: 32px;
	opacity: .3;
}
.mtsp-related-body {
	padding: 12px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 4px;
}
.mtsp-related-code {
	font-size: 11px;
	color: #aaa;
}
.mtsp-related-name {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a2e;
	line-height: 1.4;
	flex: 1;
}
.mtsp-related-stock {
	font-size: 11px;
	color: #2e7d32;
	font-weight: 500;
}
.mtsp-related-btn {
	margin-top: 8px;
	background: #1a3a6b;
	color: #fff;
	text-align: center;
	padding: 7px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
}
.mtsp-related-card:hover .mtsp-related-btn {
	background: #e8500a;
}
/* Slider arrows */
.mtsp-related-prev,
.mtsp-related-next {
	background: #1a3a6b;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
	align-self: center;
}
.mtsp-related-prev:hover,
.mtsp-related-next:hover {
	background: #e8500a;
}
.mtsp-related-prev:disabled,
.mtsp-related-next:disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}
@media (max-width: 767px) {
	.mtsp-related-card {
		flex: 0 0 100%;
		width: 100%;
		max-width: 100%;
	}
}

.mtsp-no-desc {
	color: #555;
	font-size: 15px;
	padding: 8px 0;
}

/* ---- Popup modal ------------------------------------------ */
.mtsp-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.55);
	z-index: 9999;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.mtsp-popup-overlay.active { display: flex; }
.mtsp-popup-box {
	background: #fff;
	border-radius: 12px;
	padding: 32px 28px 24px;
	max-width: 460px;
	width: 100%;
	position: relative;
	box-shadow: 0 8px 40px rgba(0,0,0,0.18);
	max-height: 90vh;
	overflow-y: auto;
}
.mtsp-popup-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #666;
	padding: 4px;
	line-height: 1;
	-webkit-tap-highlight-color: transparent;
	outline: none !important;
	box-shadow: none !important;
}
.mtsp-popup-close:hover { color: #1a3a6b; }
.mtsp-popup-heading {
	font-size: 20px;
	font-weight: 700;
	color: #1a3a6b;
	margin: 0 0 6px;
}
.mtsp-popup-product {
	font-size: 13px;
	color: #666;
	margin: 0 0 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid #eee;
}
.mtsp-popup-comment {
	width: 100%;
	border: 1px solid #dce6f5;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 14px;
	resize: vertical;
	margin-bottom: 12px;
	font-family: inherit;
	box-sizing: border-box;
}
.mtsp-popup-comment:focus {
	outline: none;
	border-color: #1a3a6b;
}
.mtsp-popup-box .wpcf7 input[type="text"],
.mtsp-popup-box .wpcf7 input[type="tel"] {
	width: 100%;
	border: 1px solid #dce6f5;
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 10px;
	font-size: 14px;
	box-sizing: border-box;
}
.mtsp-popup-box .wpcf7 input[type="submit"] {
	background: #e8500a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px 24px;
	width: 100%;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.mtsp-popup-box .wpcf7 input[type="submit"]:hover { background: #c94008; }
/* Flex ordering: textarea after inputs, before submit */
.mtsp-popup-box .wpcf7-form {
	display: flex;
	flex-direction: column;
}
.mtsp-popup-comment-wrap {
	order: 3;
}
.mtsp-popup-box .wpcf7-form p:last-child {
	order: 4;
}

/* =============================================================
   MTSP — Category archive: product card grid
   ============================================================= */

/* Product grid — 3 columns */
.mtsp-product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 24px;
	align-items: stretch;
}
/* Product card */
.mtsp-product-card {
	background: #fff;
	border: 1px solid #e0e8f5;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: box-shadow 0.15s, transform 0.15s;
}
.mtsp-product-card:hover {
	box-shadow: 0 4px 20px rgba(26,58,107,0.1);
	transform: translateY(-2px);
}

/* Card image */
.mtsp-card-img-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 170px;
	background: #f4f7fc;
	border-bottom: 1px solid #e8eef5;
	overflow: hidden;
}
.mtsp-card-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 12px;
	box-sizing: border-box;
	transition: transform 0.3s ease;
}
.mtsp-product-card:hover .mtsp-card-img-wrap img {
	transform: scale(1.05);
}
.mtsp-card-no-img {
	display: block;
	width: 100%;
	height: 100%;
	background: #f0f4fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23c0cce0' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center/48px no-repeat;
}

/* Card body */
.mtsp-card-body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 4px;
}
.mtsp-card-code {
	font-size: 11px;
	color: #999;
	font-weight: 400;
	margin: 0;
}
.mtsp-card-title {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
	color: #1a1a2e;
	line-height: 1.4;
	margin: 2px 0;
	min-height: 3em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mtsp-card-title a {
	color: inherit;
	text-decoration: none;
}
.mtsp-card-title a:hover { color: #e8500a; }

/* Stock badge */
.mtsp-card-stock {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #e8f5e9;
	color: #2e7d32;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 20px;
	width: fit-content;
	margin: 2px 0;
}
.mtsp-card-stock::before {
	content: '';
	width: 6px;
	height: 6px;
	background: #43a047;
	border-radius: 50%;
	display: inline-block;
	flex-shrink: 0;
}

/* Description */
.mtsp-card-about {
	font-size: 12px;
	color: #666;
	line-height: 1.5;
	flex: 1;
	min-height: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

/* Card CTA button */
.mtsp-card-btn {
	display: block;
	background: #1a3a6b;
	color: #fff !important;
	text-align: center;
	padding: 10px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.15s;
	margin-top: auto !important;
	flex-shrink: 0;
}
.mtsp-card-btn:hover { background: #122c55; color: #fff !important; }

/* Category description */
.mtsp-category-desc,
.mtsp-tax-description {
	margin-bottom: 20px;
	font-size: 15px;
	line-height: 1.7;
	color: #333;
}
.mtsp-category-desc ul,
.mtsp-tax-description ul {
	list-style: none;
	padding: 0;
	margin: 12px 0;
}
.mtsp-category-desc ul li,
.mtsp-tax-description ul li {
	padding: 4px 0 4px 20px;
	position: relative;
	color: #555;
}
.mtsp-category-desc ul li::before,
.mtsp-tax-description ul li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: #e8500a;
	font-weight: 700;
}


/* === C2.6 (2026-04-25): Subcategory cards — light blue gradient === */
.mtsp-subcats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
	margin: 1.5rem 0 2rem;
}
.mtsp-subcat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 18px 14px;
	background: linear-gradient(135deg, #e3edf7 0%, #c7d8eb 100%);
	border: 1px solid #b0c5dc;
	border-radius: 10px;
	text-decoration: none;
	color: #1a2a44;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.mtsp-subcat-card:hover {
	box-shadow: 0 4px 14px rgba(20, 30, 60, 0.12);
	transform: translateY(-2px);
	border-color: #8fadc9;
}
.mtsp-subcat-icon {
	width: 96px;
	height: 96px;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.mtsp-subcat-icon img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.mtsp-subcat-icon--empty {
	background: rgba(255, 255, 255, 0.5);
	border-radius: 50%;
}
.mtsp-subcat-name {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 6px;
	color: #1a2a44;
}
.mtsp-subcat-count {
	font-size: 0.85rem;
	color: #4a6082;
	margin-top: auto;
}

@media (max-width: 600px) {
	.mtsp-subcats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 8px;
	}
	.mtsp-subcat-icon {
		width: 72px;
		height: 72px;
	}
}

/* ---- SEO read-more (pure CSS + hidden attribute) ---------- */
.mtsp-seo-block {
	margin-top: 20px;
	border: 1px solid #e0e8f5;
	border-radius: 8px;
	padding: 14px;
	background: #f8faff;
	font-size: 13px;
	color: #555;
	line-height: 1.7;
}
.mtsp-seo-preview {
	overflow: hidden; /* clearfix for floated images */
}
.mtsp-seo-preview img,
.mtsp-seo-rest img {
	max-width: 40%;
	height: auto;
}
.mtsp-seo-preview img.alignright,
.mtsp-seo-rest img.alignright {
	float: right;
	margin: 0 0 10px 14px;
}
.mtsp-seo-preview img.alignleft,
.mtsp-seo-rest img.alignleft {
	float: left;
	margin: 0 14px 10px 0;
}
.mtsp-seo-preview p,
.mtsp-seo-rest p {
	margin-bottom: 10px;
}
.mtsp-seo-preview p:last-child {
	margin-bottom: 0;
}
.mtsp-seo-toggle {
	display: inline-block;
	margin-top: 10px;
	background: none;
	border: none;
	color: #1a3a6b;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---- Products section header ----------------------------- */
.mtsp-products-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
	margin-bottom: 16px;
}
.mtsp-products-title {
	font-size: 16px;
	font-weight: 600;
	color: #1a3a6b;
	white-space: nowrap;
	margin: 0;
}
.mtsp-products-header::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e0e8f5;
}

/* =============================================================
   MTSP — Responsive breakpoints
   ============================================================= */

/* === TABLET 900px === */
@media (max-width: 900px) {

  /* Category + product page: sidebar stacks on mobile */
  body.tax-catalog_category .mtsp-catalog-wrap,
  body.single-catalog .content-container .mtsp-catalog-wrap {
    grid-template-columns: 1fr !important;
  }

  /* Sidebar goes to bottom on mobile — hide heavy catalog tree, keep form */
  .mtsp-catalog-sidebar {
    order: 2;
  }
  .mtsp-sidebar-section:first-child {
    display: none; /* hide category tree on mobile — it's in breadcrumbs */
  }
  .mtsp-sidebar-form {
    display: block;
  }

  /* Product grid: 2 columns */
  .mtsp-product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Subcategory cards: 2 columns */
  .mtsp-subcats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  /* Related products: 2 columns */
  .mtsp-related-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Single product top: stack */
  .mtsp-product-top {
    grid-template-columns: 1fr !important;
    gap: 16px;
    width: 100%;
  }

  /* Gallery on mobile */
  .mtsp-gallery-main {
    width: 100%;
    height: 260px;
  }
  .mtsp-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Prevent horizontal overflow from catalog wrap */
  .mtsp-catalog-wrap {
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }
  .mtsp-catalog-main {
    overflow-x: hidden;
    width: 100%;
  }

  /* Tabs: scrollable so they don't blow the page width */
  .mtsp-tabs {
    overflow: hidden;
  }
  .mtsp-tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .mtsp-tabs-nav::-webkit-scrollbar { display: none; }
  .mtsp-tab { white-space: nowrap; flex-shrink: 0; }

  /* Product cards: ensure button stays visible */
  .mtsp-product-card {
    min-height: 320px;
  }
  .mtsp-card-img-wrap {
    height: 150px;
    min-height: 150px;
  }
}

/* === MOBILE 768px — single product page fixes === */
@media (max-width: 768px) {
  body.single-catalog .content-container .mtsp-catalog-wrap {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  body.single-catalog .mtsp-catalog-sidebar {
    display: none !important;
  }
  /* product-top is display:grid — use grid-template-columns, not flex-direction */
  .mtsp-product-top {
    grid-template-columns: 1fr !important;
  }
  .mtsp-gallery-col,
  .mtsp-product-info {
    width: 100%;
    max-width: 100%;
  }
  .mtsp-gallery-main img {
    max-width: 100%;
    height: auto;
  }
  .mtsp-messenger-btns {
    gap: 8px;
  }
  .mtsp-btn-messenger {
    font-size: 13px;
    padding: 10px 8px;
  }
}

/* === MOBILE 560px === */
@media (max-width: 560px) {

  /* Product grid: 1 column */
  .mtsp-product-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Subcategory cards: still 2 columns (compact) */
  .mtsp-subcats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  /* Related products: 1 column */
  .mtsp-related-grid {
    grid-template-columns: 1fr !important;
  }

  /* CTA block spacing */
  .mtsp-cta-block {
    padding: 14px;
  }

  /* Tabs: scrollable on mobile */
  .mtsp-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Delivery carriers: wrap */
  .mtsp-carriers-list {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Video wrap: full height */
  .mtsp-video-wrap {
    padding-bottom: 56.25%;
  }

  /* Gallery thumbs: smaller */
  .mtsp-gallery-thumb {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
  }

  /* Gallery main: shorter on small phones */
  .mtsp-gallery-main {
    height: 220px;
  }

  /* Product cards: tighter on small screens */
  .mtsp-product-card {
    min-height: 280px;
  }
  .mtsp-card-img-wrap {
    height: 140px;
    min-height: 140px;
  }

  /* Lightbox arrows */
  .mtsp-lb-prev { left: 8px; padding: 8px 12px; font-size: 24px; }
  .mtsp-lb-next { right: 8px; padding: 8px 12px; font-size: 24px; }

  /* Breadcrumbs: wrap */
  .mtsp-breadcrumbs {
    flex-wrap: wrap;
    font-size: 11px;
  }
}

/* === EXTRA SMALL 380px === */
@media (max-width: 380px) {
  .mtsp-product-grid {
    grid-template-columns: 1fr !important;
  }
  .mtsp-subcats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- Search results empty state --------------------------- */
.mtsp-search-empty {
	padding: 40px 0;
	text-align: center;
}
.mtsp-search-empty p {
	font-size: 15px;
	color: #666;
	margin-bottom: 20px;
}

/* ---- Pagination (search + category pages) ----------------- */
.mtsp-pagination {
	margin-top: 32px !important;
	display: flex !important;
	justify-content: center !important;
	gap: 6px !important;
	flex-wrap: wrap !important;
}
.mtsp-pagination .page-numbers {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 36px !important;
	height: 36px !important;
	padding: 0 10px !important;
	border-radius: 6px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	text-decoration: none !important;
	border: 1px solid #e0e8f5 !important;
	color: #1a3a6b !important;
	background: #fff !important;
	transition: all .15s !important;
}
.mtsp-pagination .page-numbers:hover {
	background: #eef2ff !important;
	border-color: #1a3a6b !important;
}
.mtsp-pagination .page-numbers.current {
	background: #1a3a6b !important;
	color: #fff !important;
	border-color: #1a3a6b !important;
}
.mtsp-pagination .page-numbers.dots {
	border: none !important;
	background: none !important;
	color: #999 !important;
}

/* Visually hidden — accessible to screen readers and search engines */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* === C5 (2026-04-25): Bi-directional blog↔catalog blocks === */

/* Grid for "Релевантні товари" on single.php (cards inherit C4.1 .mtsp-fp-featured-section overrides). */
/* C5-fix4 (2026-04-25): block now lives in .entry-related-inner-content.alignwide (~1054px) — 4 cols readable. */
.mtsp-c5-rel-products .mtsp-c5-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-top: 1.5rem;
}
@media (max-width: 900px) {
	.mtsp-c5-rel-products .mtsp-c5-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 540px) {
	.mtsp-c5-rel-products .mtsp-c5-grid {
		grid-template-columns: 1fr;
	}
}

/* "Корисні матеріали" article cards on single-catalog.php */
.mtsp-c5-articles-section {
	margin: 2.5rem 0 2rem;
}
/* C5-fix8 (2026-04-25): align with .mtsp-related-title (Схожі товари) — h3 20px #1a3a6b. */
.mtsp-c5-articles-title {
	font-size: 20px;
	font-weight: 700;
	color: #1a3a6b;
	margin-bottom: 20px;
}
/* C5-fix3 (2026-04-25): auto-fill (not auto-fit) so single card doesn't span 1242px container; cap card width too. */
.mtsp-c5-articles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
	max-width: 880px;
}
.mtsp-c5-articles-grid .teaser {
	max-width: 360px; /* grid-scoped констрейнт c5 — ретаргечено на canon .teaser (трек E Гр.2, 2026-07-15). Card-блок .mtsp-c5-* нижче — мертвий, чистка Фаза 3. */
}
/* Картки «Корисні матеріали» → canon .teaser (assets/css/article-cards.css).
   Легасі-блок .mtsp-c5-article-* (хардкод-hex, radius 12) видалено 2026-07-15
   (трек E Гр.2). Лишаються: .mtsp-c5-articles-title (section-title, вище) +
   .mtsp-c5-articles-grid + ретаргет .mtsp-c5-articles-grid .teaser (вище). */

/* === C5-fix (2026-04-25): override slider flex-basis when card sits inside CSS grid === */
.mtsp-c5-rel-products .mtsp-c5-grid .mtsp-related-card {
	flex: 1 1 auto;
	max-width: none;
	min-width: 0;
	width: 100%;
}

/* F-PRICES (2026-04-27) — price block on product main view */
.mtsp-product-price {
	margin: 1rem 0 1.25rem;
	font-size: 1.75rem;
	font-weight: 700;
	color: #1565c0;
	line-height: 1;
}
.mtsp-product-price-value {
	white-space: nowrap;
}

/* F-PRICES (2026-04-27) — listing card price (search.php loads only single-catalog.css) */
.mtsp-card-price {
	font-size: 1.1rem;
	font-weight: 600;
	color: #1565c0;
	margin: 0.5rem 0;
}
.mtsp-card-price--ask {
	font-weight: 500;
	font-style: italic;
	color: #6c757d;
}
