/*
Theme Name: APAK Store v11
Description: Компактный современный магазин АПАК.РФ на базе Blocksy.
Author: APAK
Template: blocksy
Version: 11.0.0
Text Domain: apak-store-v11
*/

:root {
	--apak-green: #079a68;
	--apak-green-dark: #057a53;
	--apak-red: #ef3340;
	--apak-navy: #102a43;
	--apak-dark: #202625;
	--apak-text: #24323f;
	--apak-muted: #66737f;
	--apak-line: #dfe7e3;
	--apak-bg: #f5f8f7;
	--apak-soft: #eaf8f2;
	--apak-white: #fff;
	--apak-radius: 13px;
	--apak-shadow: 0 10px 28px rgba(16, 42, 67, .11);
}

body.apak-v11 {
	background: var(--apak-bg);
	color: var(--apak-text);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* Полностью убираем стандартные шапку и футер Blocksy. */
body.apak-v11 #header,
body.apak-v11 .ct-header,
body.apak-v11 #footer,
body.apak-v11 .ct-footer {
	display: none !important;
}

/* =========================
   Шапка
   ========================= */

.apak-site-header {
	position: relative;
	z-index: 9990;
	background: #fff;
	border-bottom: 1px solid var(--apak-line);
	box-shadow: 0 5px 22px rgba(16, 42, 67, .055);
	transition: box-shadow .22s ease;
}

.apak-site-header.is-stuck {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
}

body.admin-bar .apak-site-header.is-stuck {
	top: 32px;
}

.apak-header-spacer {
	height: 0;
	pointer-events: none;
}

.apak-site-header.is-compact {
	box-shadow: 0 8px 28px rgba(16, 42, 67, .14);
}

.apak-header-container {
	width: min(1240px, calc(100% - 40px));
	margin-inline: auto;
}

.apak-topbar {
	overflow: hidden;
	max-height: 42px;
	background: #1f2725;
	color: rgba(255,255,255,.92);
	font-size: 13px;
	transition: max-height .22s ease, opacity .18s ease;
}

.apak-site-header.is-compact .apak-topbar {
	max-height: 0;
	opacity: 0;
}

.apak-topbar__inner {
	min-height: 42px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.apak-topbar__group {
	display: flex;
	align-items: center;
	gap: 28px;
}

.apak-topbar__item,
.apak-topbar a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.apak-topbar a:hover { color: #fff; }

.apak-topbar svg {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	color: #38d59b;
}

.apak-header-main {
	display: grid;
	grid-template-columns: minmax(220px, 310px) minmax(280px, 1fr) auto;
	align-items: center;
	gap: 34px;
	min-height: 100px;
	transition: min-height .22s ease, gap .22s ease;
}

.apak-site-header.is-compact .apak-header-main {
	min-height: 68px;
	gap: 24px;
}

.apak-brand {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	color: var(--apak-navy);
	text-decoration: none;
}

.apak-wordmark {
	display: block;
	font-size: clamp(30px, 3vw, 42px);
	font-weight: 500;
	line-height: 1;
	letter-spacing: .12em;
	white-space: nowrap;
	transition: font-size .22s ease;
}

.apak-site-header.is-compact .apak-wordmark {
	font-size: 29px;
}

.apak-wordmark__red { color: var(--apak-red); }
.apak-wordmark__green { color: var(--apak-green); }
.apak-wordmark__dot { color: var(--apak-navy); }

.apak-brand__tagline {
	max-height: 28px;
	margin-top: 9px;
	overflow: hidden;
	color: var(--apak-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .025em;
	transition: max-height .2s ease, margin .2s ease, opacity .16s ease;
}

.apak-site-header.is-compact .apak-brand__tagline {
	max-height: 0;
	margin-top: 0;
	opacity: 0;
}

.apak-product-search {
	position: relative;
	display: flex;
	width: 100%;
	min-width: 0;
}

.apak-product-search input[type="search"] {
	width: 100%;
	height: 48px;
	padding: 0 54px 0 18px;
	border: 1px solid #cfdad5;
	border-radius: 14px;
	background: #fbfdfc;
	color: var(--apak-text);
	font-size: 14px;
	outline: none;
	transition: height .22s ease, border-color .2s ease, box-shadow .2s ease;
}

.apak-site-header.is-compact .apak-product-search input[type="search"] {
	height: 42px;
}

.apak-product-search input[type="search"]:focus {
	border-color: var(--apak-green);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(7,154,104,.11);
}

.apak-product-search button {
	position: absolute;
	top: 4px;
	right: 4px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 11px;
	background: var(--apak-green);
	color: #fff;
	cursor: pointer;
	transition: width .22s ease, height .22s ease;
}

.apak-site-header.is-compact .apak-product-search button {
	width: 34px;
	height: 34px;
}

.apak-product-search button:hover { background: var(--apak-green-dark); }
.apak-product-search svg { width: 19px; height: 19px; }

.apak-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.apak-header-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 46px;
	padding: 0 13px;
	border-radius: 12px;
	color: var(--apak-navy);
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
	transition: background .2s ease, color .2s ease;
}

.apak-header-action:hover {
	background: var(--apak-soft);
	color: var(--apak-green-dark);
}

.apak-header-action svg {
	width: 21px;
	height: 21px;
}

.apak-cart-count {
	position: absolute;
	top: 1px;
	left: 28px;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--apak-red);
	color: #fff;
	font-size: 9px;
	line-height: 1;
}

.apak-nav-wrap {
	overflow: hidden;
	max-height: 57px;
	border-top: 1px solid var(--apak-line);
	border-bottom: 3px solid var(--apak-green);
	background: #fff;
	transition: max-height .22s ease, opacity .18s ease;
}

.apak-site-header.is-compact .apak-nav-wrap {
	max-height: 0;
	opacity: 0;
	border-width: 0;
}

.apak-nav-inner {
	min-height: 54px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.apak-main-nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

.apak-main-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 15px;
	border-radius: 10px;
	color: var(--apak-navy);
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}

.apak-main-nav a:hover {
	background: var(--apak-soft);
	color: var(--apak-green-dark);
}

.apak-main-nav a.apak-catalog-link {
	background: var(--apak-green);
	color: #fff;
	padding-inline: 18px;
	box-shadow: 0 7px 18px rgba(7,154,104,.17);
}

.apak-main-nav a.apak-catalog-link:hover {
	background: var(--apak-green-dark);
	color: #fff;
}

.apak-nav-note {
	color: var(--apak-muted);
	font-size: 12px;
	white-space: nowrap;
}

.apak-menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--apak-line);
	border-radius: 12px;
	background: #fff;
	color: var(--apak-navy);
	cursor: pointer;
}

.apak-menu-toggle svg { width: 23px; height: 23px; }

/* =========================
   Заголовок страницы
   ========================= */

body.apak-v11.woocommerce-shop .hero-section,
body.apak-v11.post-type-archive-product .hero-section,
body.apak-v11.tax-product_cat .hero-section,
body.apak-v11.tax-product_tag .hero-section {
	display: none !important;
}

body.apak-v11.woocommerce-shop .site-main,
body.apak-v11.post-type-archive-product .site-main,
body.apak-v11.tax-product_cat .site-main,
body.apak-v11.tax-product_tag .site-main {
	padding-top: 22px;
}

.apak-page-heading {
	margin: 0 0 18px;
	padding: 0 0 14px;
	border-bottom: 1px solid var(--apak-line);
}

.apak-page-heading .woocommerce-breadcrumb {
	margin: 0 0 7px;
	color: var(--apak-muted);
	font-size: 12px;
	line-height: 1.45;
}

.apak-page-heading .woocommerce-breadcrumb a {
	color: var(--apak-green-dark);
	text-decoration: none;
}

.apak-page-heading h1 {
	margin: 0;
	color: var(--apak-navy);
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 850;
	line-height: 1.12;
	letter-spacing: -.025em;
}

/* =========================
   Каталог и карточки
   ========================= */

body.apak-v11 .woocommerce-result-count {
	color: var(--apak-muted);
	font-size: 13px;
}

body.apak-v11 .woocommerce-ordering select {
	min-height: 42px;
	padding: 0 38px 0 14px;
	border: 1px solid var(--apak-line);
	border-radius: 10px;
	background-color: #fff;
	color: var(--apak-text);
	font-size: 13px;
	box-shadow: 0 3px 12px rgba(16,42,67,.035);
}

body.apak-v11 ul.products {
	display: grid;
	grid-template-columns: repeat(5, minmax(0,1fr));
	align-items: stretch;
	gap: 18px;
}

body.apak-v11 ul.products::before,
body.apak-v11 ul.products::after {
	display: none;
}

body.apak-v11 ul.products li.product {
	display: flex;
	flex-direction: column;
	float: none;
	width: auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 10px 10px 12px;
	overflow: hidden;
	border: 1px solid #dbe4df;
	border-radius: var(--apak-radius);
	background: #fff;
	box-shadow: 0 7px 20px rgba(16,42,67,.08);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.apak-v11 ul.products li.product:hover {
	transform: translateY(-3px);
	border-color: rgba(7,154,104,.42);
	box-shadow: 0 13px 30px rgba(16,42,67,.14);
}

body.apak-v11 ul.products li.product > a:first-child,
body.apak-v11 ul.products li.product figure,
body.apak-v11 ul.products li.product .ct-media-container,
body.apak-v11 ul.products li.product .ct-image-container {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 1px solid #edf1ef;
	border-radius: 10px;
	background: #fff;
}

body.apak-v11 ul.products li.product img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 1 / 1;
	object-fit: contain !important;
	object-position: center;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 0;
	background: #fff;
	transition: transform .25s ease;
}

body.apak-v11 ul.products li.product:hover img {
	transform: scale(1.025);
}

body.apak-v11 ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	height: 55px;
	min-height: 55px;
	max-height: 55px;
	margin: 11px 2px 7px;
	overflow: hidden;
	color: var(--apak-navy);
	font-size: 13.5px;
	font-weight: 750;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

body.apak-v11 ul.products li.product .price {
	margin: auto 2px 10px;
	color: var(--apak-green-dark);
	font-size: 16px;
	font-weight: 850;
}

body.apak-v11 ul.products li.product .product-categories,
body.apak-v11 ul.products li.product .entry-meta,
body.apak-v11 ul.products li.product .ct-product-categories,
body.apak-v11 ul.products li.product [class*="category"] {
	display: none !important;
}

body.apak-v11 ul.products li.product .button,
body.apak-v11 ul.products li.product .added_to_cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 38px;
	margin-top: auto;
	padding: 8px 10px;
	border: 0;
	border-radius: 9px;
	background: var(--apak-green);
	color: #fff;
	font-size: 11.5px;
	font-weight: 850;
	text-decoration: none;
	box-shadow: 0 5px 13px rgba(7,154,104,.17);
}

body.apak-v11 ul.products li.product .button:hover,
body.apak-v11 ul.products li.product .added_to_cart:hover {
	background: var(--apak-green-dark);
}

body.apak-v11 .woocommerce-pagination ul.page-numbers {
	display: flex;
	gap: 8px;
	border: 0;
}

body.apak-v11 .woocommerce-pagination ul.page-numbers li {
	border: 0;
}

body.apak-v11 .woocommerce-pagination .page-numbers a,
body.apak-v11 .woocommerce-pagination .page-numbers span {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	border: 1px solid var(--apak-line);
	border-radius: 10px;
	background: #fff;
	color: var(--apak-navy);
	font-weight: 750;
}

body.apak-v11 .woocommerce-pagination .page-numbers .current {
	border-color: var(--apak-green);
	background: var(--apak-green);
	color: #fff;
}

/* =========================
   Карточка товара и формы
   ========================= */

body.apak-v11.single-product .product {
	padding: clamp(20px,3vw,38px);
	border: 1px solid var(--apak-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: var(--apak-shadow);
}

body.apak-v11.single-product div.product .product_title {
	color: var(--apak-navy);
	font-weight: 850;
}

body.apak-v11.single-product div.product p.price {
	color: var(--apak-green-dark);
	font-size: 27px;
	font-weight: 850;
}

body.apak-v11 .single_add_to_cart_button {
	min-height: 48px;
	border-radius: 12px !important;
	background: var(--apak-green) !important;
	font-weight: 850 !important;
}

body.apak-v11 input:not([type="checkbox"]):not([type="radio"]),
body.apak-v11 select,
body.apak-v11 textarea {
	border-color: var(--apak-line);
	border-radius: 11px;
	background: #fff;
}

/* =========================
   Футер
   ========================= */

.apak-footer {
	margin-top: 58px;
	background: #2f312f;
	color: #aeb9b5;
}

.apak-footer__main {
	display: grid;
	grid-template-columns: 1.35fr .8fr .8fr;
	gap: 70px;
	padding-top: 52px;
	padding-bottom: 48px;
}

.apak-footer__brand {
	display: inline-block;
	margin-bottom: 25px;
	font-size: 29px;
	font-weight: 500;
	letter-spacing: .1em;
	text-decoration: none;
}

.apak-footer__contact {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 22px;
}

.apak-footer__contact-icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 2px solid var(--apak-green);
	border-radius: 12px;
	color: var(--apak-green);
}

.apak-footer__contact-icon svg {
	width: 24px;
	height: 24px;
}

.apak-footer__contact small,
.apak-footer__address-label {
	display: block;
	margin-bottom: 3px;
	color: #9ba7a3;
	font-size: 12px;
}

.apak-footer__contact a {
	color: #b9c3c0;
	font-size: 21px;
	text-decoration: none;
}

.apak-footer__address {
	margin-top: 22px;
	font-size: 13px;
	line-height: 1.7;
}

.apak-footer h3 {
	margin: 0 0 18px;
	color: #fff;
	font-size: 16px;
	font-weight: 750;
	text-transform: uppercase;
}

.apak-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.apak-footer li + li {
	margin-top: 14px;
}

.apak-footer li a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #9fa9a6;
	font-size: 13px;
	text-decoration: none;
}

.apak-footer li a::before {
	content: "›";
	color: #bfc7c4;
	font-size: 17px;
}

.apak-footer li a:hover {
	color: #fff;
}

.apak-footer__bottom {
	background: #292b29;
	border-top: 1px solid rgba(255,255,255,.035);
}

.apak-footer__bottom-inner {
	min-height: 70px;
	display: flex;
	align-items: center;
	color: #9ca7a3;
	font-size: 12px;
}

.apak-back-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: var(--apak-green);
	color: #fff;
	box-shadow: 0 9px 22px rgba(7,154,104,.28);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease;
}

.apak-back-top.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.apak-back-top svg {
	width: 17px;
	height: 17px;
}

/* =========================
   Мобильная нижняя панель
   ========================= */

.apak-mobile-dock {
	display: none;
}

@media (max-width: 1120px) {
	.apak-header-main {
		grid-template-columns: 260px minmax(250px, 1fr) auto;
		gap: 18px;
	}

	.apak-header-action span:not(.apak-cart-count) {
		display: none;
	}

	body.apak-v11 ul.products {
		grid-template-columns: repeat(4,minmax(0,1fr));
	}

	.apak-footer__main {
		gap: 35px;
	}
}

@media (max-width: 850px) {
	body.apak-v11 ul.products {
		grid-template-columns: repeat(3,minmax(0,1fr));
	}
}

@media (max-width: 782px) {
	body.admin-bar .apak-site-header {
		top: 46px;
	}

	body.apak-v11 {
		padding-bottom: 68px;
	}

	.apak-header-container {
		width: min(100% - 28px,1240px);
	}

	.apak-topbar__inner {
		min-height: 38px;
	}

	.apak-topbar__account,
	.apak-topbar__label {
		display: none;
	}

	.apak-topbar__group {
		width: 100%;
		justify-content: space-between;
		gap: 10px;
	}

	.apak-header-main {
		grid-template-columns: 1fr auto;
		gap: 12px;
		min-height: auto;
		padding: 14px 0;
	}

	.apak-site-header.is-compact .apak-header-main {
		min-height: 58px;
		padding: 8px 0;
	}

	.apak-brand__tagline {
		display: none;
	}

	.apak-wordmark {
		font-size: 29px;
	}

	.apak-site-header.is-compact .apak-wordmark {
		font-size: 25px;
	}

	.apak-menu-toggle {
		display: grid;
		place-items: center;
	}

	.apak-header-actions {
		display: none;
	}

	.apak-product-search {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.apak-site-header.is-compact .apak-product-search {
		display: none;
	}

	.apak-nav-inner {
		display: block;
		min-height: auto;
	}

	.apak-main-nav {
		display: none;
		flex-direction: column;
		align-items: stretch;
		padding: 10px 0 14px;
	}

	.apak-main-nav.is-open {
		display: flex;
	}

	.apak-main-nav a {
		justify-content: center;
	}

	.apak-nav-note {
		display: none;
	}

	.apak-page-heading {
		margin-bottom: 15px;
		padding-bottom: 12px;
	}

	body.apak-v11 ul.products {
		grid-template-columns: repeat(2,minmax(0,1fr));
		gap: 12px;
	}

	body.apak-v11 ul.products li.product {
		padding: 8px 8px 10px;
		border-radius: 11px;
	}

	body.apak-v11 ul.products li.product .woocommerce-loop-product__title {
		height: 51px;
		min-height: 51px;
		max-height: 51px;
		font-size: 12.5px;
	}

	body.apak-v11 ul.products li.product .price {
		font-size: 15px;
	}

	.apak-footer {
		margin-top: 36px;
	}

	.apak-footer__main {
		grid-template-columns: 1fr;
		gap: 32px;
		padding-top: 38px;
		padding-bottom: 36px;
	}

	.apak-footer__bottom-inner {
		min-height: 64px;
		padding-bottom: 10px;
	}

	.apak-back-top {
		bottom: 82px;
	}

	.apak-mobile-dock {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 10000;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		min-height: 62px;
		padding-bottom: env(safe-area-inset-bottom);
		border-top: 1px solid #dfe7e3;
		background: rgba(255,255,255,.97);
		box-shadow: 0 -8px 26px rgba(16,42,67,.13);
		backdrop-filter: blur(12px);
	}

	.apak-mobile-dock a {
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 4px;
		color: var(--apak-navy);
		font-size: 10px;
		font-weight: 750;
		text-decoration: none;
	}

	.apak-mobile-dock a:hover,
	.apak-mobile-dock a:focus {
		color: var(--apak-green-dark);
		background: var(--apak-soft);
	}

	.apak-mobile-dock svg {
		width: 21px;
		height: 21px;
	}

	.apak-mobile-dock .apak-mobile-count {
		position: absolute;
		top: 7px;
		left: calc(50% + 6px);
		display: grid;
		place-items: center;
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		border: 2px solid #fff;
		border-radius: 999px;
		background: var(--apak-red);
		color: #fff;
		font-size: 8px;
	}
}

@media (max-width: 390px) {
	body.apak-v11 ul.products {
		grid-template-columns: 1fr;
	}
}


/* =========================================================
   V5: упрощённая шапка, контакты в строке меню
   ========================================================= */
.apak-topbar { display: none !important; }

.apak-nav-contacts {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 22px;
	color: var(--apak-muted);
	font-size: 12px;
	white-space: nowrap;
}

.apak-nav-contact {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: inherit;
	text-decoration: none;
}

.apak-nav-contact:hover { color: var(--apak-green-dark); }
.apak-nav-contact svg {
	width: 15px;
	height: 15px;
	color: var(--apak-green);
	flex: 0 0 15px;
}

/* =========================================================
   Главная страница
   ========================================================= */
.apak-home {
	padding: 30px 0 64px;
}

.apak-home__container {
	width: min(1240px, calc(100% - 40px));
	margin-inline: auto;
}

.apak-home-banner {
	max-width: 1170px;
	margin: 0 auto 42px;
	overflow: hidden;
	border: 1px solid var(--apak-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: var(--apak-shadow);
}

.apak-home-banner img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1170 / 400;
	object-fit: contain;
}

.apak-home-section-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 22px;
}

.apak-home-section-head h2 {
	margin: 0;
	color: var(--apak-navy);
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 850;
	letter-spacing: -.025em;
}

.apak-home-section-head p {
	max-width: 580px;
	margin: 8px 0 0;
	color: var(--apak-muted);
	font-size: 14px;
	line-height: 1.55;
}

.apak-all-catalog {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 16px;
	border: 1px solid var(--apak-green);
	border-radius: 11px;
	color: var(--apak-green-dark);
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

.apak-all-catalog:hover {
	background: var(--apak-green);
	color: #fff;
}

.apak-category-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 18px;
}

.apak-category-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid #dce5e1;
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 7px 20px rgba(16,42,67,.07);
	color: var(--apak-navy);
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.apak-category-card:hover {
	transform: translateY(-4px);
	border-color: rgba(7,154,104,.42);
	box-shadow: 0 14px 32px rgba(16,42,67,.13);
}

.apak-category-card__media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-bottom: 1px solid var(--apak-line);
	background: #fff;
}

.apak-category-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	padding: 8px;
}

.apak-category-card__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 68px;
	padding: 13px 14px;
}

.apak-category-card__title {
	font-size: 14px;
	font-weight: 800;
	line-height: 1.3;
}

.apak-category-card__count {
	display: grid;
	place-items: center;
	min-width: 30px;
	height: 30px;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--apak-soft);
	color: var(--apak-green-dark);
	font-size: 11px;
	font-weight: 800;
}

.apak-home-empty {
	padding: 28px;
	border: 1px dashed #cfdad5;
	border-radius: 14px;
	background: #fff;
	color: var(--apak-muted);
	text-align: center;
}

@media (max-width: 1120px) {
	.apak-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.apak-nav-contacts { gap: 12px; font-size: 11px; }
}

@media (max-width: 900px) {
	.apak-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.apak-nav-contacts { display: none; }
}

@media (max-width: 782px) {
	body.admin-bar .apak-site-header.is-stuck { top: 46px; }
	.apak-home { padding-top: 18px; }
	.apak-home__container { width: min(100% - 28px, 1240px); }
	.apak-home-banner { margin-bottom: 28px; border-radius: 12px; }
	.apak-home-section-head { align-items: flex-start; }
	.apak-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.apak-category-card__body { min-height: 62px; padding: 11px; }
	.apak-category-card__title { font-size: 13px; }
}

@media (max-width: 470px) {
	.apak-home-section-head { display: block; }
	.apak-all-catalog { margin-top: 15px; }
}


/* =========================================================
   V6: упрощённый заголовок Главной и Telegram в футере
   ========================================================= */
.apak-home-section-head--single {
	align-items: center;
}

.apak-home-section-head--single h1 {
	max-width: 850px;
	margin: 0;
	color: var(--apak-navy);
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 850;
	line-height: 1.15;
	letter-spacing: -.025em;
}

.apak-category-card__body {
	justify-content: flex-start;
}

.apak-category-card__count {
	display: none !important;
}

.apak-footer .apak-wordmark__dot {
	color: #fff;
}

.apak-footer__telegram {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
	color: #b9c3c0;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.apak-footer__telegram:hover {
	color: #fff;
}

.apak-footer__telegram-icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #229ed9;
	color: #fff;
	box-shadow: 0 7px 18px rgba(34, 158, 217, .2);
}

.apak-footer__telegram-icon svg {
	width: 20px;
	height: 20px;
}

.apak-main-nav > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.apak-main-nav > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 15px;
	border-radius: 10px;
	color: var(--apak-navy);
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}

.apak-main-nav > li > a:hover,
.apak-main-nav > li.current-menu-item > a {
	background: var(--apak-soft);
	color: var(--apak-green-dark);
}

@media (max-width: 782px) {
	.apak-home-section-head--single {
		display: block;
	}

	.apak-home-section-head--single .apak-all-catalog {
		margin-top: 16px;
	}

	.apak-main-nav > li > a {
		justify-content: center;
		width: 100%;
	}
}


/* =========================================================
   V7: ссылки кабинета в футере
   ========================================================= */
.apak-footer__account-links li a {
	align-items: center;
}

.apak-footer__account-links li a::before {
	width: 16px;
	color: var(--apak-green);
	font-weight: 900;
	text-align: center;
}

.apak-home-banner > a {
	display: block;
}


/* =========================================================
   V8: подкатегории, плоский каталог, цены и пагинация
   ========================================================= */

/* Ярлыки прямых подкатегорий под H1. */
.apak-subcategory-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 17px;
}

.apak-subcategory-chip {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 8px 14px;
	border: 1px solid rgba(7, 154, 104, .28);
	border-radius: 999px;
	background: #f0faf6;
	color: var(--apak-green-dark);
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.apak-subcategory-chip:hover,
.apak-subcategory-chip:focus-visible {
	border-color: var(--apak-green);
	background: var(--apak-green);
	color: #fff;
	transform: translateY(-1px);
}

/* Каталог выглядит как единый белый лист, без отдельных рамок карточек. */
body.apak-v11.woocommerce-shop .site-main,
body.apak-v11.post-type-archive-product .site-main,
body.apak-v11.tax-product_cat .site-main,
body.apak-v11.tax-product_tag .site-main {
	background: #fff;
}

body.apak-v11 ul.products li.product,
body.apak-v11 ul.products li.product:hover {
	padding: 8px 8px 14px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body.apak-v11 ul.products li.product:hover {
	transform: none;
}

body.apak-v11 ul.products li.product > a:first-child,
body.apak-v11 ul.products li.product figure,
body.apak-v11 ul.products li.product .ct-media-container,
body.apak-v11 ul.products li.product .ct-image-container {
	border: 0;
	border-radius: 0;
	background: #fff;
}

body.apak-v11 ul.products li.product img {
	border-radius: 0;
}

/* Все товарные CTA отображаются прописными буквами. */
body.apak-v11 ul.products li.product .button,
body.apak-v11 ul.products li.product .added_to_cart,
body.apak-v11 .single_add_to_cart_button {
	text-transform: uppercase;
	letter-spacing: .025em;
}

/* Фирменная зелёная пагинация. */
body.apak-v11 .woocommerce-pagination .page-numbers a,
body.apak-v11 .woocommerce-pagination .page-numbers span {
	border-color: rgba(7, 154, 104, .45);
	color: var(--apak-green-dark);
}

body.apak-v11 .woocommerce-pagination .page-numbers a:hover,
body.apak-v11 .woocommerce-pagination .page-numbers a:focus-visible,
body.apak-v11 .woocommerce-pagination .page-numbers .current {
	border-color: var(--apak-green);
	background: var(--apak-green);
	color: #fff;
}

@media (max-width: 782px) {
	.apak-subcategory-chips {
		gap: 7px;
		margin-top: 14px;
	}

	.apak-subcategory-chip {
		min-height: 35px;
		padding: 7px 11px;
		font-size: 11.5px;
	}
}


/* =========================================================
   V9: Главная, карточка товара и связанные товары
   ========================================================= */

/* Главная: белый фон и плоские карточки категорий. */
body.apak-v11.home,
body.apak-v11.home .site-main,
body.apak-v11 .apak-home {
	background: #fff;
}

.apak-home-section-head--single {
	display: block;
	width: 100%;
}

.apak-home-section-head--single h1 {
	width: 100%;
	max-width: none;
}

.apak-category-card,
.apak-category-card:hover {
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	transform: none;
}

.apak-category-card__media {
	border: 0;
	background: #fff;
}

.apak-category-card__media img {
	padding: 0;
	background: #fff;
}

.apak-category-card__body {
	padding-inline: 4px;
	background: #fff;
}

.apak-home-catalog-cta {
	display: flex;
	justify-content: center;
	margin-top: 34px;
}

.apak-home-catalog-cta .apak-all-catalog {
	min-width: 170px;
}

/* Карточка товара: компактная фотография слева, информация справа. */
@media (min-width: 901px) {
	body.apak-v11.single-product div.product {
		display: grid !important;
		grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
		align-items: start;
		gap: clamp(34px, 5vw, 72px);
	}

	body.apak-v11.single-product div.product > .woocommerce-product-gallery {
		grid-column: 1;
		width: 100% !important;
		max-width: 360px;
		float: none !important;
		margin: 0 !important;
	}

	body.apak-v11.single-product div.product > .summary,
	body.apak-v11.single-product div.product > .entry-summary {
		grid-column: 2;
		width: 100% !important;
		float: none !important;
		margin: 0 !important;
	}

	body.apak-v11.single-product div.product > .woocommerce-tabs,
	body.apak-v11.single-product div.product > .related,
	body.apak-v11.single-product div.product > .upsells {
		grid-column: 1 / -1;
		width: 100%;
	}
}

body.apak-v11.single-product .woocommerce-product-gallery__image,
body.apak-v11.single-product .woocommerce-product-gallery__image a {
	display: block;
	width: 100%;
	cursor: zoom-in;
}

body.apak-v11.single-product .woocommerce-product-gallery__image img {
	display: block;
	width: 100% !important;
	height: auto !important;
	max-height: 390px;
	margin: 0 auto;
	object-fit: contain;
	object-position: center;
}

body.apak-v11.single-product .flex-control-thumbs {
	margin-top: 12px;
}

.apak-product-description-top {
	margin: 20px 0 24px;
	color: var(--apak-text);
	font-size: 14px;
	line-height: 1.65;
}

.apak-product-description-top > :first-child {
	margin-top: 0;
}

.apak-product-description-top > :last-child {
	margin-bottom: 0;
}

.apak-product-meta {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--apak-line);
}

.apak-product-meta > span {
	display: block;
	margin-top: 8px;
	color: var(--apak-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .035em;
}

.apak-product-meta__label {
	color: var(--apak-navy);
	font-weight: 850;
}

.apak-product-meta a {
	color: var(--apak-muted);
	text-decoration: none;
}

.apak-product-meta a:hover {
	color: var(--apak-green-dark);
}

/* Пять похожих товаров в строке. */
body.apak-v11.single-product .related.products ul.products,
body.apak-v11.single-product .upsells.products ul.products {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1120px) {
	body.apak-v11.single-product .related.products ul.products,
	body.apak-v11.single-product .upsells.products ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 850px) {
	body.apak-v11.single-product .related.products ul.products,
	body.apak-v11.single-product .upsells.products ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.apak-home-catalog-cta {
		margin-top: 24px;
	}

	body.apak-v11.single-product .woocommerce-product-gallery__image img {
		max-height: 430px;
	}

	body.apak-v11.single-product .related.products ul.products,
	body.apak-v11.single-product .upsells.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 390px) {
	body.apak-v11.single-product .related.products ul.products,
	body.apak-v11.single-product .upsells.products ul.products {
		grid-template-columns: 1fr;
	}
}


/* =========================================================
   V10: исправление структуры карточки товара Blocksy
   ========================================================= */

/*
 * Blocksy размещает галерею и summary внутри .product-entry-wrapper.
 * Поэтому сетку задаём именно этому контейнеру, а не внешнему div.product.
 */
@media (min-width: 901px) {
	body.apak-v11.single-product div.product {
		display: block !important;
	}

	body.apak-v11.single-product .product-entry-wrapper {
		display: grid !important;
		grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
		align-items: start !important;
		gap: clamp(38px, 5vw, 72px) !important;
		width: 100% !important;
		max-width: 1240px !important;
		margin-inline: auto !important;
	}

	body.apak-v11.single-product .product-entry-wrapper > .woocommerce-product-gallery {
		grid-column: 1 !important;
		width: 100% !important;
		max-width: 360px !important;
		float: none !important;
		margin: 0 !important;
	}

	body.apak-v11.single-product .product-entry-wrapper > .summary,
	body.apak-v11.single-product .product-entry-wrapper > .entry-summary {
		grid-column: 2 !important;
		width: 100% !important;
		max-width: none !important;
		min-width: 0 !important;
		float: none !important;
		margin: 0 !important;
	}
}

/* Реальная галерея Blocksy использует .ct-media-container. */
body.apak-v11.single-product .woocommerce-product-gallery .ct-product-gallery-container,
body.apak-v11.single-product .woocommerce-product-gallery .ct-media-container {
	width: 100% !important;
	max-width: 360px !important;
	margin-inline: auto !important;
	cursor: zoom-in;
}

body.apak-v11.single-product .woocommerce-product-gallery .ct-media-container img.wp-post-image {
	display: block;
	width: 100% !important;
	height: auto !important;
	max-height: 360px !important;
	margin-inline: auto !important;
	object-fit: contain !important;
	object-position: center !important;
	aspect-ratio: auto !important;
}

/*
 * Blocksy добавляет собственный мета-блок после нашего.
 * Скрываем только его: наш .apak-product-meta остаётся.
 */
body.apak-v11.single-product .entry-summary > .product_meta:not(.apak-product-meta),
body.apak-v11.single-product .entry-summary-items > .product_meta:not(.apak-product-meta),
body.apak-v11.single-product .entry-summary > .ct-product-divider[data-id="divider_2"],
body.apak-v11.single-product .entry-summary-items > .ct-product-divider[data-id="divider_2"] {
	display: none !important;
}

/* Наш артикул не показывается, пока поле пустое. */
body.apak-v11.single-product .apak-product-meta:empty {
	display: none !important;
}

@media (max-width: 900px) {
	body.apak-v11.single-product .product-entry-wrapper {
		display: block !important;
	}

	body.apak-v11.single-product .product-entry-wrapper > .woocommerce-product-gallery {
		width: 100% !important;
		max-width: 430px !important;
		margin: 0 auto 28px !important;
	}

	body.apak-v11.single-product .product-entry-wrapper > .summary,
	body.apak-v11.single-product .product-entry-wrapper > .entry-summary {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
	}
}


/* =========================================================
   V11: без увеличения фото и без краткого описания
   ========================================================= */

/* Blocksy выводит краткое описание своим конструктором — скрываем его полностью. */
body.apak-v11.single-product .woocommerce-product-details__short-description,
body.apak-v11.single-product .entry-summary-items > .woocommerce-product-details__short-description,
body.apak-v11.single-product .entry-summary > .woocommerce-product-details__short-description {
	display: none !important;
}

/* Убираем иконку увеличения и любое кликабельное поведение галереи. */
body.apak-v11.single-product .woocommerce-product-gallery__trigger,
body.apak-v11.single-product .ct-product-gallery-container .woocommerce-product-gallery__trigger {
	display: none !important;
}

body.apak-v11.single-product .woocommerce-product-gallery a,
body.apak-v11.single-product .woocommerce-product-gallery__image a,
body.apak-v11.single-product .ct-product-gallery-container a,
body.apak-v11.single-product .ct-media-container {
	cursor: default !important;
}

body.apak-v11.single-product .woocommerce-product-gallery__image a,
body.apak-v11.single-product .ct-product-gallery-container a {
	pointer-events: none !important;
}

/* Изображение остаётся обычным аккуратным элементом без zoom-эффекта. */
body.apak-v11.single-product .woocommerce-product-gallery img,
body.apak-v11.single-product .ct-product-gallery-container img {
	transform: none !important;
	cursor: default !important;
}

/* APAK: каталог в заголовке левой панели, домен в шапке. */
body.apak-v11 .apak-site-header .apak-brand{margin-left:0!important;}
body.apak-v11 .apak-site-header .apak-wordmark{font-size:34px!important;letter-spacing:-1px;color:#102a43;}
body.apak-v11 .apak-site-header #menu-item-1853{display:none!important;}
@media(min-width:1000px){body.apak-v11 .apak-site-header .apak-header-main{grid-template-columns:230px minmax(200px,1fr) auto!important;}}
body.woocommerce.archive #sidebar .ct-sidebar{position:relative;padding-top:12px;}
body.woocommerce.archive #sidebar .ct-sidebar::before{content:"☰  Каталог"!important;display:flex!important;align-items:center;box-sizing:border-box;width:122px;height:48px;margin:0 0 15px!important;padding:10px 12px!important;border-radius:8px!important;background:#009b69!important;color:#fff!important;font-size:15px!important;line-height:22px;}
body.woocommerce.archive #sidebar .ct-sidebar::after{content:"АПАК";position:absolute;top:4px;left:145px;color:#e50026;font:800 28px/40px Inter,Arial,sans-serif;letter-spacing:-1px;pointer-events:none;}
