/*
 * Страница каталога — крошки, подразделы, сортировка, нижний текст раздела.
 * Значения сняты с боевого сайта (storefront/css/style.css и вычисленные стили).
 */

/* ---------- Отступы страницы ----------
 * У GeneratePress три слоя отступов (site-content 20, site-main 20, inside-article 40).
 * На боевом между меню и крошками только их собственные 50px, а контент — во всю
 * ширину контейнера 1400, ровно под шапкой.
 */
.tax-product_cat .site-content,
.tax-product_tag .site-content,
.post-type-archive-product .site-content { padding-top: 0; }

.tax-product_cat .site-main,
.tax-product_tag .site-main,
.post-type-archive-product .site-main { margin-top: 0; }

/* боковые отступы нужны только там, где контейнер уже экрана */
.tax-product_cat .inside-article,
.tax-product_tag .inside-article,
.post-type-archive-product .inside-article { padding: 0 15px 30px; }

@media (min-width: 1300px) {
	.tax-product_cat .inside-article,
	.tax-product_tag .inside-article,
	.post-type-archive-product .inside-article { padding: 0 0 40px; }
}

/* ---------- Хлебные крошки ---------- */

.woocommerce .woocommerce-breadcrumb.pos-breadcrumb,
.woocommerce-page .woocommerce-breadcrumb.pos-breadcrumb {
	margin: 50px 0 40px;
	padding-left: 5px;
	color: #2f2620;
	font-family: "PT Sans", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: 0;
	text-transform: uppercase;
}

.woocommerce .woocommerce-breadcrumb.pos-breadcrumb a {
	color: #2f2620;
	text-decoration: none;
	border: 0;
}

.woocommerce .woocommerce-breadcrumb.pos-breadcrumb .pos-crumb:last-of-type { font-weight: 700; }
/* на боевом от конца слова до следующего ровно 25px, «/» посередине */
.woocommerce .woocommerce-breadcrumb.pos-breadcrumb .pos-crumb-sep {
	display: inline-block;
	width: 25px;
	margin: 0;
	color: #2f2620;
	text-align: center;
	white-space: pre;
	word-spacing: -4px;
}

/* ---------- Подразделы «пилюлями» ---------- */

@media (min-width: 768px) {
	.pos-subcats {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 15px 30px;
		margin: 0 0 15px;
	}

	.pos-subcat {
		display: flex;
		align-items: center;
		gap: 0;
		min-height: 70px;
		max-height: 70px;
		padding: 0 10px;
		background: #fff;
		border: 1px solid #e6e6e6;
		border-radius: 80px;
		box-shadow: 3px 3px 5px 0 rgba(145, 145, 145, 0.4);
		color: #2f2620;
		text-decoration: none;
		transition: none;
	}

	.pos-subcat:hover {
		background: #f5f5f5;
		box-shadow: 3px 3px 5px 0 rgba(145, 145, 145, 0.86);
		color: #2f2620;
	}

	.pos-subcat img {
		flex: 0 0 50px;
		width: 50px;
		height: 50px;
		margin: 0;
		border-radius: 100%;
		object-fit: cover;
	}

	.pos-subcat span {
		padding-left: 10px;
		color: #2f2620;
		font-family: "Roboto", sans-serif;
		font-weight: 400;
		font-size: 17px;
		line-height: 1;
		text-align: left;
	}
}

@media (min-width: 768px) and (max-width: 991px) {
	.pos-subcats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
}

/* ---------- Сортировка ---------- */

.woocommerce .sorting-for {
	display: flex;
	justify-content: flex-end;
	margin: 40px 0 25px;
}

.sorting-for .dropdown { position: relative; }

.sorting-for .dropdown-toggle {
	position: relative;
	min-width: 200px;
	margin: 0;
	padding: 5px 0 0;
	background: none;
	border: 0;
	box-shadow: none;
	border-radius: 0;
	color: #2f2620;
	font-family: "Roboto", sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 22px;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.sorting-for .dropdown-toggle:hover,
.sorting-for .dropdown-toggle:focus { background: none; color: #2f2620; }
.sorting-for .dropdown-toggle:focus-visible { outline: 2px solid #4fad10; outline-offset: 4px; }

.sorting-for .dropdown-toggle .sorting-current {
	margin-left: 10px;
	padding: 5px 33px 5px 9px;
	border: 1px solid #dfdfdf;
	border-radius: 30px;
}

.sorting-for .dropdown-toggle::before {
	content: "";
	position: absolute;
	top: 11px;
	right: 12px;
	width: 16px;
	height: 11px;
	background: url("../icons/row-down.png") center / contain no-repeat;
	transition: transform .2s cubic-bezier(.5, 0, 0, 1.25);
}

.sorting-for .dropdown.open .dropdown-toggle::before { transform: rotate(180deg); }

.sorting-for .visable-mobile { display: none; }

.sorting-for .dropdown-menu {
	position: absolute;
	top: 36px;
	right: 0;
	left: auto;
	z-index: 20;
	width: 100%;
	min-width: 200px;
	margin: 0;
	padding: 20px 0 15px;
	list-style: none;
	background: #fff;
	border: 2px solid #f5f3f3;
	border-radius: 5px 5px 5px 20px;
	box-shadow: 0 0 5px -2px rgba(120, 119, 120, 0.3);
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: all .3s ease-in-out;
}

.sorting-for .dropdown.open .dropdown-menu {
	max-height: 300px;
	opacity: 1;
	visibility: visible;
}

.sorting-for .dropdown-menu li { margin: 0; }

.sorting-for .dropdown-menu > li > a {
	display: block;
	padding: 3px 10px 3px 28px;
	color: #9a988c;
	font-family: "Roboto", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 1.1;
	white-space: nowrap;
	text-decoration: none;
}

.sorting-for .dropdown-menu > li > a:hover,
.sorting-for .dropdown-menu > li > a:focus { color: #9a988c; background: #f5f5f5; }
.sorting-for .dropdown-menu > li > a.active { color: #4eab10; }

@media (max-width: 991px) {
	.sorting-for .dropdown-toggle {
		min-width: 200px;
		height: 40px;
		padding: 0 10px 0 0;
		border: 1px solid #e7e7e7;
		color: #2f2620;
		font-family: "Roboto", sans-serif;
		font-weight: 500;
		font-size: 12px;
		line-height: 39px;
		text-align: center;
		text-transform: uppercase;
	}
	.sorting-for .dropdown-toggle::before { top: 15px; }
	.sorting-for .hidden-mobile { display: none; }
	.sorting-for .visable-mobile { display: inline; }
}

@media (max-width: 767px) {
	.woocommerce .woocommerce-breadcrumb.pos-breadcrumb { margin: 25px 0 25px; }
	.woocommerce .sorting-for { margin: 0 0 15px; }
	.sorting-for .dropdown { width: 100%; }
	.sorting-for .dropdown-toggle { width: 100%; }
}

/* ---------- Заголовок и текст раздела внизу ---------- */

.footer-category-desc {
	clear: both;
	margin: 0 0 30px;
	color: #2f2620;
	font-family: "PT Sans", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
}

.footer-category-desc .category-h1 {
	margin: 20px 0 10px;
	color: #2f2620;
	font-family: "PT Sans", sans-serif;
	font-weight: 700;
	font-size: 20px;
	line-height: 22px;
	text-transform: uppercase;
}

.footer-category-desc p { margin: 0 0 10px; }

.footer-category-desc h2 {
	margin: 20px 0 10px;
	color: #2f2620;
	font-family: "PT Sans", sans-serif;
	font-weight: 400;
	font-size: 30px;
	line-height: 33px;
	text-transform: none;
}

.footer-category-desc h3 {
	margin: 20px 0 10px;
	font-family: "PT Sans", sans-serif;
	font-weight: 400;
	font-size: 24px;
	line-height: 1.1;
}

.footer-category-desc ul,
.footer-category-desc ol { margin: 0 0 10px; padding-left: 40px; }
.footer-category-desc li { margin: 0; }

@media (max-width: 767px) {
	.footer-category-desc h2 { font-size: 22px; line-height: 26px; }
}

.pos-search-title { margin: 0 0 25px; color: #2f2620; font-family: var(--pos-font-head); font-weight: 700; font-size: 20px; line-height: 1.2; text-transform: uppercase; }
