/**
 * Shop and product-category archive styles.
 * Loaded only on WooCommerce product archive pages.
 */

.cft-shop-page {
	width: min(100% - 32px, 1240px);
	margin-inline: auto;
	padding-block: 0 clamp(48px, 6vw, 80px);
}

.cft-shop-page__header {
	margin-bottom: 20px;
	border-bottom: 1px solid #d8d8d8;
	text-align: center;
}

.cft-shop-page__title {
	display: inline-block;
	position: relative;
	margin: 0;
	padding: 18px 0 13px;
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 700;
	line-height: 1.2;
}

.cft-shop-page__title::after {
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	height: 1px;
	background: var(--cft-color-black);
	content: "";
}

.cft-shop-page .woocommerce-products-header__title {
	display: none;
}

.cft-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 50px;
	margin-bottom: 20px;
	border-bottom: 1px solid #e3e3e3;
}

.cft-shop-toolbar__controls,
.cft-shop-toolbar__sorting,
.cft-shop-per-page,
.cft-shop-page .woocommerce-ordering {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cft-shop-toolbar button {
	display: inline-grid;
	width: 28px;
	height: 30px;
	place-items: center;
	padding: 0;
	color: #222;
	background: transparent;
	border: 1px solid transparent;
	font-size: 18px;
	line-height: 1;
}

.cft-shop-toolbar button:hover,
.cft-shop-toolbar button:focus-visible,
.cft-shop-toolbar button.is-active {
	color: #111;
	border-color: #111;
}

.cft-shop-toolbar__icon {
	display: inline-grid;
	place-items: center;
}

.cft-shop-toolbar button svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.6;
}

.cft-shop-per-page label {
	color: #555;
	font-size: 13px;
}

.cft-shop-per-page select,
.cft-shop-page .woocommerce-ordering select {
	min-height: 38px;
	padding: 0 30px 0 12px;
	color: #222;
	background-color: #fff;
	border: 1px solid #d4d4d4;
	border-radius: 5px;
	font-size: 13px;
}

.cft-shop-page .woocommerce-ordering {
	float: none;
	margin: 0;
}

.cft-shop-page .woocommerce-ordering select {
	min-width: 128px;
}

.cft-shop-filter-panel {
	position: relative;
	margin-bottom: 20px;
	background: #f7f7f7;
	border: 1px solid #ddd;
}

.cft-shop-filter-panel[hidden] {
	display: none;
}

.cft-shop-filter-panel__inner {
	position: relative;
	padding: 24px;
}

.cft-shop-filter-panel__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px !important;
	height: 32px !important;
	border-color: #ccc !important;
	font-size: 22px !important;
}

.cft-shop-filter-widget__title {
	margin: 0 0 14px;
	font-size: 17px;
}

.cft-shop-filter-panel .cft-category-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.cft-shop-filter-panel .cft-category-links a {
	color: #222;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cft-shop-page .woocommerce-pagination {
	padding-top: 28px;
	text-align: center;
}

@media (max-width: 640px) {
	.cft-shop-page {
		width: min(100% - 24px, 1240px);
	}

	.cft-shop-toolbar {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
		padding-block: 10px;
	}

	.cft-shop-toolbar__sorting {
		width: 100%;
		justify-content: space-between;
	}

}

.tax-product_cat .cft-shop-page__header {
	margin-bottom: 0;
}

.tax-product_cat .cft-shop-toolbar {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	padding-block: 8px;
}

.cft-shop-toolbar__total {
	min-width: 0;
	color: #645b50;
	font-size: 0.875rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.tax-product_cat .cft-shop-toolbar .woocommerce-breadcrumb {
	flex: 1 1 14rem;
	min-width: 0;
	margin: 0;
	color: #26211c;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.tax-product_cat .cft-shop-toolbar__sorting {
	flex-wrap: wrap;
	justify-content: flex-end;
	width: auto;
	max-width: 100%;
	margin-inline-start: auto;
}

.tax-product_cat .cft-shop-toolbar__sorting .woocommerce-ordering,
.tax-product_cat .cft-shop-toolbar__sorting .woocommerce-ordering select {
	max-width: 100%;
}

.tax-product_cat .woocommerce-breadcrumb a {
	color: #645b50;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 0.2em;
}

.tax-product_cat .woocommerce-breadcrumb a:hover,
.tax-product_cat .woocommerce-breadcrumb a:focus-visible {
	color: #392b1b;
	text-decoration-color: currentColor;
}

.cft-category-breadcrumb__separator {
	display: inline-block;
	width: 0.4em;
	height: 0.4em;
	margin-inline: 0.65em;
	border-block-start: 1px solid #82725e;
	border-inline-end: 1px solid #82725e;
	transform: rotate(45deg);
	vertical-align: 0.15em;
}

.cft-category-breadcrumb__separator:dir(rtl) {
	transform: rotate(-45deg);
}

.cft-category-scroll-active .woocommerce-pagination {
	display: none;
}

.cft-category-description {
	width: 100%;
	margin-block-start: clamp(28px, 5vw, 56px);
	padding-block-start: clamp(16px, 3vw, 28px);
	border-block-start: 1px solid #e5e1da;
	color: #39332d;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.cft-category-description .term-description > :first-child {
	margin-block-start: 0;
}

.cft-category-description .term-description > :last-child {
	margin-block-end: 0;
}

.cft-category-description :is(ul, ol) {
	padding-inline-start: 1.5em;
}

.cft-category-description a {
	color: #574027;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cft-category-scroll {
	min-height: 1px;
	color: #62594e;
	font-size: 0.875rem;
	text-align: center;
}

.cft-category-scroll[data-state]:not([data-state=""]) {
	padding-block: 24px 8px;
}

.cft-category-scroll__status {
	display: inline;
	margin: 0;
}

.cft-category-scroll__spinner {
	display: none;
	width: 1em;
	height: 1em;
	margin-inline-end: 0.4em;
	border: 2px solid #ded7ce;
	border-block-start-color: #62594e;
	border-radius: 50%;
	vertical-align: -0.15em;
}

.cft-category-scroll[data-state="loading"] .cft-category-scroll__spinner {
	display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
	.cft-category-scroll[data-state="loading"] .cft-category-scroll__spinner {
		animation: cft-category-spin 0.8s linear infinite;
	}

}

@keyframes cft-category-spin {
	to {
		transform: rotate(1turn);
	}
}
