/* JayCraft «Фокус»: what theme.json cannot express. Colours, fonts and sizes come from theme.json presets. */

/* Keyboard focus is always visible (WCAG 2.1 AA). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--red);
	outline-offset: 2px;
}

/* Long machine names and Georgian words must wrap on phones instead of widening the page. */
:where(h1, h2, h3, h4) {
	overflow-wrap: break-word;
	hyphens: auto;
}

/* Georgian words are long and have no hyphenation: the main heading steps down on phones so a word fits on one line. */
:lang(ka) h1 {
	font-size: clamp(1.6rem, 6.4vw, var(--wp--preset--font-size--xx-large));
}

/* Outline button (for example "Compatible parts in the shop"): ink frame, filled on hover. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid currentColor;
	background-color: transparent;
	color: var(--wp--preset--color--ink);
}

@media (hover: hover) and (pointer: fine) {
	.wp-block-button.is-style-outline > .wp-block-button__link:hover {
		border-color: var(--wp--preset--color--ink);
		background-color: var(--wp--preset--color--ink);
		color: var(--wp--preset--color--white);
	}
}

.is-style-stage .wp-block-button.is-style-outline > .wp-block-button__link,
.jc-stage .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--paper);
}

/* Header: logo, menu, language switcher; on phones the menu folds into the Menu button. */
.jc-header-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
}

.jc-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
}

.jc-menu-list,
.jc-langs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.jc-menu-list {
	gap: 0.25rem 1.25rem;
}

.jc-menu-list a {
	display: inline-block;
	padding: 0.35rem 0;
	border-bottom: 2px solid transparent;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--small);
	font-stretch: 82%;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-transform: uppercase;
}

:lang(ka) .jc-menu-list a {
	font-family: var(--wp--preset--font-family--georgian);
	font-stretch: 75%;
	letter-spacing: 0.02em;
}

.jc-menu-list a[aria-current="page"] {
	border-bottom-color: var(--wp--preset--color--red);
}

@media (hover: hover) and (pointer: fine) {
	.jc-menu-list a:hover {
		border-bottom-color: var(--wp--preset--color--red);
	}
}

.jc-langs {
	gap: 0.25rem;
	padding-left: 1.25rem;
	border-left: 1px solid var(--wp--preset--color--stone);
}

.jc-langs a {
	display: inline-block;
	padding: 0.3rem 0.45rem;
	border-radius: var(--wp--custom--radius);
	color: var(--wp--preset--color--graphite);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.jc-langs a:hover {
		color: var(--wp--preset--color--red);
	}
}

.jc-langs a[aria-current="true"] {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.jc-menu-button {
	display: none;
	align-items: center;
	gap: 0.6rem;
	padding: 0.5rem 0.8rem;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius);
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

.jc-menu-icon,
.jc-menu-icon::before,
.jc-menu-icon::after {
	display: block;
	width: 16px;
	height: 2px;
	background-color: currentColor;
}

.jc-menu-icon {
	position: relative;
}

.jc-menu-icon::before,
.jc-menu-icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.jc-menu-icon::before {
	top: -5px;
}

.jc-menu-icon::after {
	top: 5px;
}

@media (max-width: 781px) {
	.jc-has-js .jc-menu-button {
		display: inline-flex;
	}

	.jc-menu {
		flex-direction: column;
		align-items: flex-start;
		width: 100%;
	}

	.jc-has-js .jc-menu:not(.is-open) {
		display: none;
	}

	.jc-menu-list {
		flex-direction: column;
		align-items: flex-start;
	}

	.jc-langs {
		padding-left: 0;
		border-left: 0;
	}
}

.jc-logo {
	display: inline-block;
	line-height: 0;
}

.jc-logo img {
	display: block;
	width: 180px;
	height: auto;
}

/* Labels: narrow uppercase Tektur for menus, spec plates and eyebrow text. */
.jc-label,
.wp-block-navigation {
	font-stretch: 82%;
}

.jc-label {
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Georgian labels: Noto Sans Georgian at 75% width in Mtavruli capitals. */
:lang(ka) .jc-label,
:lang(ka) .wp-block-navigation {
	font-family: var(--wp--preset--font-family--georgian);
	font-stretch: 75%;
	letter-spacing: 0.02em;
}

/* Dark stage: only for machines and the footer. */
.jc-stage,
.is-style-stage {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.jc-stage :where(h1, h2, h3, h4, h5, h6, a:not(.wp-element-button)),
.is-style-stage :where(h1, h2, h3, h4, h5, h6, a:not(.wp-element-button)) {
	color: var(--wp--preset--color--paper);
}

@media (hover: hover) and (pointer: fine) {
	.jc-stage :where(a:not(.wp-element-button)):hover,
	.is-style-stage :where(a:not(.wp-element-button)):hover {
		color: var(--wp--preset--color--signal);
	}
}

.jc-stage .jc-label,
.is-style-stage .jc-label {
	color: var(--wp--preset--color--stone);
}

/* Focus frame: corner brackets (3 px, arm 26 px) around machine and part photos. */
.is-style-focus-frame {
	position: relative;
	padding: var(--wp--preset--spacing--30);
}

.is-style-focus-frame::after {
	--jc-arm: var(--wp--custom--frame--arm);
	--jc-width: var(--wp--custom--frame--width);
	--jc-color: currentColor;
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		linear-gradient(var(--jc-color), var(--jc-color)) top left / var(--jc-arm) var(--jc-width) no-repeat,
		linear-gradient(var(--jc-color), var(--jc-color)) top left / var(--jc-width) var(--jc-arm) no-repeat,
		linear-gradient(var(--jc-color), var(--jc-color)) top right / var(--jc-arm) var(--jc-width) no-repeat,
		linear-gradient(var(--jc-color), var(--jc-color)) top right / var(--jc-width) var(--jc-arm) no-repeat,
		linear-gradient(var(--jc-color), var(--jc-color)) bottom left / var(--jc-arm) var(--jc-width) no-repeat,
		linear-gradient(var(--jc-color), var(--jc-color)) bottom left / var(--jc-width) var(--jc-arm) no-repeat,
		linear-gradient(var(--jc-color), var(--jc-color)) bottom right / var(--jc-arm) var(--jc-width) no-repeat,
		linear-gradient(var(--jc-color), var(--jc-color)) bottom right / var(--jc-width) var(--jc-arm) no-repeat;
}

.is-style-focus-frame img {
	border-radius: 0;
}

/* Marker: the dot with three ticks instead of list bullets. */
.wp-block-list.is-style-marker {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-marker > li {
	position: relative;
	padding-left: 1.9em;
}

.wp-block-list.is-style-marker > li + li {
	margin-top: 0.5em;
}

.wp-block-list.is-style-marker > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.2em;
	height: 1.2em;
	background: url("../img/marker.svg") center / contain no-repeat;
}

/* Spec plate: characteristics in a 1 px frame split into cells, narrow label on top, larger value below. */
.jc-spec {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
	gap: 1px;
	margin: 0;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: var(--wp--custom--radius);
	background-color: currentColor;
	list-style: none;
}

.jc-spec > * {
	margin: 0;
	padding: 0.6rem 0.8rem;
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

.jc-stage .jc-spec > *,
.is-style-stage .jc-spec > * {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.jc-spec .jc-label {
	display: block;
	margin-bottom: 0.2rem;
}

.jc-spec strong {
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
}

.jc-spec dd {
	margin: 0;
}

/* Machine price, "from" label. */
.jc-machine-price {
	display: flex;
	align-items: baseline;
	gap: 0.6em;
}

.jc-machine-price strong {
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
}

/* Machine page, after the owner's reference machine shop: the catalogue menu on the left, the photos and the configurator
   side by side, tabs under the machine. Phones get one column. */
.jc-product-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
	align-items: start;
}

@media (min-width: 1080px) {
	.jc-product-layout {
		grid-template-columns: 16rem minmax(0, 1fr);
	}
}

.jc-product-main,
.jc-product-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
	align-items: start;
	min-width: 0;
}

/* Grid items may shrink below their content: otherwise the row of tabs widens the column past a phone screen. */
.jc-product-layout > *,
.jc-product-main > *,
.jc-product-top > * {
	min-width: 0;
}

@media (min-width: 782px) {
	.jc-product-top {
		grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 1fr);
	}
}

/* The grids space their parts themselves, so the flow layout margins are dropped inside them. */
.jc-product-layout > *,
.jc-product-main > *,
.jc-product-top > *,
.jc-product-panel > *,
.jc-media > * {
	margin-block: 0;
}

.jc-media {
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius);
}

.jc-product-panel {
	display: grid;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius);
}

@media (min-width: 782px) {
	.jc-product-panel {
		position: sticky;
		top: var(--wp--preset--spacing--40);
	}
}

.jc-product-note {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.jc-product-files .jc-files-list {
	margin: 0;
}

/* Breadcrumbs. */
.jc-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.jc-breadcrumbs li + li::before {
	content: "/";
	margin-right: 0.5rem;
	color: var(--wp--preset--color--stone);
}

.jc-breadcrumbs a {
	color: inherit;
}

@media (hover: hover) and (pointer: fine) {
	.jc-breadcrumbs a:hover {
		color: var(--wp--preset--color--red);
	}
}

/* Catalogue menu: machine types fold out to their machines. */
.jc-catalog-box {
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius);
}

.jc-catalog summary {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	list-style: none;
}

.jc-catalog summary::-webkit-details-marker {
	display: none;
}

.jc-catalog summary::after {
	content: "";
	flex: none;
	width: 0.45rem;
	height: 0.45rem;
	margin-left: auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-25%) rotate(45deg);
}

.jc-catalog details[open] > summary::after {
	transform: translateY(25%) rotate(-135deg);
}

.jc-catalog-title {
	padding: 0.8rem 1rem;
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.jc-catalog-list,
.jc-catalog-list ul,
.jc-catalog-extra {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jc-catalog-list > li + li,
.jc-catalog-extra {
	border-top: 1px solid var(--wp--preset--color--stone);
}

.jc-catalog-list > li > details > summary {
	padding: 0.75rem 1rem;
	font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
	.jc-catalog-list > li > details > summary:hover {
		color: var(--wp--preset--color--red);
	}
}

.jc-catalog-count {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

.jc-catalog-list ul {
	padding: 0 1rem 0.75rem;
}

.jc-catalog-list ul a {
	display: block;
	padding: 0.35rem 0 0.35rem 0.75rem;
	border-left: 2px solid var(--wp--preset--color--stone);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.jc-catalog-list ul a[aria-current] {
	border-left-color: var(--wp--preset--color--red);
	color: var(--wp--preset--color--red);
}

@media (hover: hover) and (pointer: fine) {
	.jc-catalog-list ul a:hover {
		border-left-color: var(--wp--preset--color--red);
		color: var(--wp--preset--color--red);
	}
}

.jc-catalog-list .jc-catalog-all a {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.jc-catalog-extra {
	padding: 0.5rem 1rem;
}

.jc-catalog-extra a {
	display: block;
	padding: 0.35rem 0;
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.jc-catalog-extra a:hover {
		color: var(--wp--preset--color--red);
	}
}

/* Photo thumbnails under the main photo. */
.jc-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: var(--wp--preset--spacing--30);
	padding: 0;
	list-style: none;
}

.jc-thumbs li {
	margin: 0;
}

.jc-thumbs a {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 4.5rem;
	height: 3.375rem;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--graphite);
	border-radius: var(--wp--custom--radius);
	color: var(--wp--preset--color--paper);
	text-decoration: none;
}

.jc-thumbs a[aria-current] {
	border-color: var(--wp--preset--color--signal);
}

@media (hover: hover) and (pointer: fine) {
	.jc-thumbs a:hover {
		border-color: var(--wp--preset--color--signal);
	}
}

.jc-thumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jc-thumbs-video {
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
}

.jc-thumbs-video::before {
	content: "▶";
	margin-right: 0.3em;
	color: var(--wp--preset--color--signal);
}

/* Configurator: the price and a list for each option group. */
.jc-configurator {
	display: grid;
	gap: 0.75rem;
}

.jc-configurator-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.6em;
	margin: 0;
}

.jc-configurator-price strong {
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.1;
}

.jc-configurator-field {
	display: grid;
	gap: 0.3rem;
	margin: 0;
}

.jc-configurator-field label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.jc-configurator-field select {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font: inherit;
}

@media (hover: hover) and (pointer: fine) {
	.jc-configurator-field select:hover {
		border-color: var(--wp--preset--color--ink);
	}
}

/* Tabs under the machine. Without JavaScript the buttons stay hidden and every tab shows with its heading. */
.jc-tab-list {
	display: none;
	overflow-x: auto;
	border-bottom: 1px solid var(--wp--preset--color--stone);
}

.jc-has-js .jc-tab-list {
	display: flex;
}

.jc-tab-list [role="tab"] {
	flex: none;
	margin-bottom: -1px;
	padding: 0.8rem 1.1rem;
	border: 1px solid transparent;
	border-bottom-color: var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius) var(--wp--custom--radius) 0 0;
	background: none;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--small);
	font-stretch: 82%;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
}

:lang(ka) .jc-tab-list [role="tab"] {
	font-family: var(--wp--preset--font-family--georgian);
	font-stretch: 75%;
	letter-spacing: 0.02em;
}

@media (hover: hover) and (pointer: fine) {
	.jc-tab-list [role="tab"]:hover {
		color: var(--wp--preset--color--ink);
	}
}

.jc-tab-list [role="tab"][aria-selected="true"] {
	border-color: var(--wp--preset--color--stone);
	border-top: 2px solid var(--wp--preset--color--red);
	border-bottom-color: var(--wp--preset--color--paper);
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

.jc-tab-panel {
	padding-top: var(--wp--preset--spacing--40);
}

.jc-tab-panel + .jc-tab-panel {
	margin-top: var(--wp--preset--spacing--50);
}

.jc-has-js .jc-tab-panel + .jc-tab-panel {
	margin-top: 0;
}

.jc-has-js .jc-tab-heading {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Dimensions and questions tabs. */
.jc-dimensions {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

.jc-drawing {
	margin: 0;
}

.jc-drawing img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius);
	background-color: var(--wp--preset--color--white);
}

.jc-faq-item {
	border-bottom: 1px solid var(--wp--preset--color--stone);
}

.jc-faq-item summary {
	position: relative;
	padding: 0.9rem 2rem 0.9rem 0;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.jc-faq-item summary::-webkit-details-marker {
	display: none;
}

.jc-faq-item summary::after {
	content: "+";
	position: absolute;
	top: 0.8rem;
	right: 0.25rem;
	color: var(--wp--preset--color--red);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1;
}

.jc-faq-item[open] summary::after {
	content: "−";
}

.jc-faq-answer {
	padding-bottom: 0.9rem;
}

.jc-faq-answer > :first-child {
	margin-top: 0;
}

/* Parts pages: the same layout as the machine page. Part photos sit on white, not on the dark stage. */
.jc-media-light {
	border: 1px solid var(--wp--preset--color--stone);
	background-color: var(--wp--preset--color--white);
}

.jc-card-sku {
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
}

/* Brand under the card title and in the buying panel: the same part from different brands differs only by this line. */
.jc-card-brand {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.jc-card-brand a {
	color: inherit;
}

.jc-shop-toolbar {
	gap: 0.75rem 1.5rem;
}

.jc-shop-toolbar > * {
	margin: 0;
}

.woocommerce .jc-shop-toolbar select {
	min-height: 2.5rem;
	padding: 0.35rem 0.75rem;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font: inherit;
}

/* WooCommerce puts a 2em gap under the gallery; inside the photo box the box padding is enough. */
.woocommerce .jc-media.jc-media-light div.images {
	margin-bottom: 0;
}

.jc-product-panel .wc-block-components-product-price,
.jc-product-panel .price {
	font-family: var(--wp--preset--font-family--tektur);
	font-weight: 600;
}

/* Product cards in the catalogue grid. */
.jc-product-main .wc-block-product {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--30);
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: var(--wp--custom--radius);
	background-color: var(--wp--preset--color--white);
}

/* WooCommerce tabs under the product, styled like the machine tabs. The doubled class outranks the rules of woocommerce.css
   (".woocommerce div.product .woocommerce-tabs ul.tabs li"). */
.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	border-bottom: 1px solid var(--wp--preset--color--stone);
	list-style: none;
}

.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs::before,
.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li::before,
.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li::after {
	display: none;
}

.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li {
	flex: none;
	margin: 0 0 -1px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius) var(--wp--custom--radius) 0 0;
	background: none;
}

.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.8rem 1.1rem;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--small);
	font-stretch: 82%;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-decoration: none;
	text-transform: uppercase;
}

:lang(ka) .woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li a {
	font-family: var(--wp--preset--font-family--georgian);
	font-stretch: 75%;
	letter-spacing: 0.02em;
}

.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li.active {
	border-color: var(--wp--preset--color--stone);
	border-top: 2px solid var(--wp--preset--color--red);
	border-bottom-color: var(--wp--preset--color--paper);
	background-color: var(--wp--preset--color--paper);
}

.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li.active a {
	color: var(--wp--preset--color--ink);
}

@media (hover: hover) and (pointer: fine) {
	.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs ul.tabs li a:hover {
		color: var(--wp--preset--color--ink);
	}
}

.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs .panel {
	margin: 0;
	padding-top: var(--wp--preset--spacing--40);
}

.woocommerce .jc-woo-tabs.jc-woo-tabs .woocommerce-tabs .panel > h2:first-child {
	display: none;
}

/* Machine gallery, video and downloads. */
.jc-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
	gap: 0.75rem;
	padding: 0;
	list-style: none;
}

.jc-gallery li {
	margin: 0;
}

.jc-gallery img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--wp--custom--radius);
}

.jc-video-frame {
	position: relative;
	aspect-ratio: 16 / 9;
}

.jc-video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: var(--wp--custom--radius);
}

.jc-files-list {
	padding: 0;
	list-style: none;
}

.jc-files-list li {
	margin: 0;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--wp--preset--color--stone);
}

.jc-file-meta {
	margin-left: 0.5em;
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--small);
}

/* Placeholder photos (machines and products without a photo yet). The placeholder draws its own corners, so the focus frame is not doubled. */
.is-style-focus-frame.jc-placeholder {
	padding: 0;
}

.is-style-focus-frame.jc-placeholder::after {
	display: none;
}

.jc-placeholder img,
img.jc-placeholder {
	display: block;
	width: 100%;
	height: auto;
}

/* Home: machine type grid, cards and hero drawing. */
.jc-type-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
	gap: 1px;
	margin: var(--wp--preset--spacing--40) 0 0;
	padding: 0;
	border: 1px solid var(--wp--preset--color--stone);
	background-color: var(--wp--preset--color--stone);
	list-style: none;
}

.jc-type-grid li {
	margin: 0;
	background-color: var(--wp--preset--color--paper);
}

.jc-type-grid a {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	height: 100%;
	box-sizing: border-box;
	padding: 1.5rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.jc-type-grid a:hover {
		background-color: var(--wp--preset--color--ink);
		color: var(--wp--preset--color--paper);
	}
}

.jc-type-grid strong {
	font-family: var(--wp--preset--font-family--tektur);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.15;
}

.jc-type-grid .jc-type-text {
	color: var(--wp--preset--color--muted);
}

@media (hover: hover) and (pointer: fine) {
	.jc-type-grid a:hover .jc-type-text {
		color: var(--wp--preset--color--stone);
	}
}

.jc-card {
	padding: var(--wp--preset--spacing--50);
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius);
}

.jc-home-art {
	margin: 0;
	color: var(--wp--preset--color--stone);
}

.jc-home-art img {
	display: block;
	width: 100%;
	height: auto;
}

/* Machine type filter above the catalogue grid. */
.jc-machine-types {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	list-style: none;
}

.jc-machine-types a {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius);
	text-decoration: none;
}

/* Article numbers and serials. */
.jc-sku {
	font-family: var(--wp--preset--font-family--mono);
	font-weight: 500;
}

/* Product catalogue cards: button always at the bottom regardless of name/brand length. */
.wc-block-product-template .product {
	display: flex;
	flex-direction: column;
}

.wc-block-product-template .product .wc-block-components-product-button {
	margin-top: auto;
}

/* Product grid column count by viewport.
   WC renders class "columns-3" on the <ul>; we override grid-template-columns at each breakpoint.
   Laptop (600–1439px): WC's own columns-3 rule is used unchanged — 3 cards.
   Phone (≤599px): 1 card fills the screen.
   Large desktop (≥1600px): 4 cards make use of the wider viewport. */
@media (max-width: 599px) {
	.wc-block-product-template__responsive.columns-3 {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 1440px) {
	.wc-block-product-template__responsive.columns-3 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1080px) {
.jc-product-main {
grid-column: 2;
}
}

/* ---------- Store notice ("the site is running in test mode") ----------
   WooCommerce's store notice (Customizer → WooCommerce → Store notice) in the brand colours instead of WC purple.
   WC prints it first in <body> (wp_body_open) and pins it to the bottom of the screen, where it covers content;
   here it stays in the flow above the header and sticks to the top while scrolling, below the WP admin bar if any. */
p.demo_store,
.woocommerce-store-notice {
	position: sticky !important;
	top: var(--wp-admin--admin-bar--height, 0px) !important;
	bottom: auto !important;
	left: auto;
	right: auto;
	z-index: 100;
	width: 100%;
	margin: 0;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
	border-bottom: 3px solid var(--wp--preset--color--red);
	box-shadow: none;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	line-height: 1.4;
	text-align: center;
	padding: 0.6em 1rem;
	box-sizing: border-box;
	overflow-wrap: anywhere;
}

/* The sticky product panel must not slide under the notice (about one line high from 782px up). */
@media (min-width: 782px) {
	.woocommerce-demo-store .jc-product-panel {
		top: calc(var(--wp--preset--spacing--40) + 3rem);
	}
}

p.demo_store a,
.woocommerce-store-notice a {
	color: var(--wp--preset--color--signal);
	text-decoration: underline;
}

@media (hover: hover) and (pointer: fine) {
	p.demo_store a:hover,
	.woocommerce-store-notice a:hover {
		color: var(--wp--preset--color--white);
	}
}

/* «Фокус» (Д-001): header actions — sign in / account and the cart with a counter. */
.jc-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.jc-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	min-height: 44px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	text-decoration: none;
}

:lang(ka) .jc-action {
	font-family: var(--wp--preset--font-family--georgian);
}

@media (hover: hover) and (pointer: fine) {
	.jc-action:hover {
		border-color: var(--wp--preset--color--ink);
	}
}

.jc-action:focus-visible {
	outline: 2px solid var(--wp--preset--color--red);
	outline-offset: 2px;
}

.jc-action img {
	display: block;
	width: 24px;
	height: 24px;
}

/* Not red: the cart icon already has its red dot. */
.jc-badge {
	position: absolute;
	top: 3px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	font: 500 11px/18px var(--wp--preset--font-family--mono);
	text-align: center;
	box-sizing: border-box;
}

.jc-badge[hidden] {
	display: none;
}

/* Desktop: logo · menu · actions. Phones: logo · actions · Menu button, the menu unfolds below. */
@media (max-width: 781px) {
	.jc-header-bar {
		gap: 0.75rem;
	}

	.jc-logo {
		order: 1;
		margin-right: auto;
	}

	.jc-actions {
		order: 2;
	}

	.jc-menu-button {
		order: 3;
	}

	.jc-menu {
		order: 4;
	}

	.jc-action-label {
		display: none;
	}

	.jc-logo img {
		width: 140px;
	}
}

/* Section icons in the catalogue menu (decorative, 24 px). */
.jc-catalog-icon {
	flex: none;
	width: 24px;
	height: 24px;
}

/* Section tiles on the shop page: 4 per row on computers, 2 on phones. */
.jc-tiles {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: var(--wp--preset--spacing--50);
}

.jc-tile {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius);
	background-color: var(--wp--preset--color--stone);
	color: var(--wp--preset--color--graphite);
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.jc-tile:hover {
		border-color: var(--wp--preset--color--ink);
	}
}

.jc-tile:focus-visible {
	outline: 2px solid var(--wp--preset--color--red);
	outline-offset: 2px;
}

.jc-tile img {
	width: 48px;
	height: 48px;
}

.jc-tile b {
	color: var(--wp--preset--color--ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

/* On stone cards small text is graphite, not muted (contrast). */
.jc-tile code {
	color: var(--wp--preset--color--graphite);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	font-weight: 500;
	background: none;
	padding: 0;
}

@media (max-width: 781px) {
	.jc-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jc-tile {
		padding: 16px;
	}
}

@media (min-width: 782px) {
	/* Menu sits next to the header actions on the right. */
	.jc-menu {
		margin-left: auto;
	}
}

@media (min-width: 782px) and (max-width: 1079px) {
	/* The catalogue column leaves room for 2 tiles per row on tablets and small laptops. */
	.jc-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	/* Phones: logo, sign in, cart and the Menu button on one line (390 px). */
	.jc-header-bar {
		flex-wrap: wrap;
		column-gap: 8px;
	}

	.jc-logo img {
		width: 128px;
	}

	.jc-actions {
		gap: 0;
	}

	.jc-action {
		padding: 0;
	}

	.jc-menu-button {
		padding: 0.5rem 0.6rem;
	}
}

/* Product cards on the same grid as the section tiles above them: 4 columns on computers, 2 on tablets,
   12 px gaps (Д-001 follow-up, owner 11.10.2026). Phones keep one card per row — name, price and button need the width. */
.jc-product-main .wc-block-product-template.wc-block-product-template {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
}

.jc-product-main .wc-block-product-template.wc-block-product-template.wc-block-product-template > li.wc-block-product {
	width: auto;
	max-width: none;
	margin: 0;
}

@media (max-width: 1079px) {
	.jc-product-main .wc-block-product-template.wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.jc-product-main .wc-block-product-template.wc-block-product-template {
		grid-template-columns: 1fr;
	}
}

/* Home since 13.10.2026: machine and parts tiles under small linked titles, then the newest parts. */
.jc-tiles-title {
	margin: 0 0 12px;
	font-size: 18px;
	line-height: 1.3;
}

.jc-tiles-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.jc-tiles-title a::after {
	content: " →";
	color: var(--wp--preset--color--red);
}

.jc-tile-num {
	color: var(--wp--preset--color--red);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 22px;
	font-weight: 600;
	line-height: 48px;
}

.jc-home .jc-product-main > .jc-tiles-title {
	margin-block-start: 0;
}

/* The main column is a flex column with a 40 px gap: tiles need no own bottom margin here, a title sits close to its grid. */
.jc-home .jc-tiles {
	margin-bottom: 0;
}

.jc-home .jc-product-main > .jc-new-arrivals {
	margin-block-start: -28px;
}

.jc-home .jc-tiles-title + .jc-tiles {
	margin-top: -28px;
}

/* ---------- Quality checklist (Л-010), small things, 13.10.2026 ----------
   Numbers in prices and article numbers keep one width; headings break evenly; buttons give a short press response;
   on touch screens links and buttons get a 44 px tap area. Hover effects are for mouse only (see the @media blocks above). */
.wc-block-components-product-price,
.wc-block-formatted-money-amount,
.woocommerce-Price-amount,
.jc-card-sku,
.wc-block-components-product-sku,
.jc-tile code {
	font-variant-numeric: tabular-nums;
}

h1,
h2,
h3,
.wp-block-heading,
.wp-block-post-title {
	text-wrap: balance;
}

p,
li {
	text-wrap: pretty;
}

/* Product descriptions: about 65 characters a line. */
.woocommerce-Tabs-panel > p,
.woocommerce-Tabs-panel > ul,
.woocommerce-Tabs-panel > ol,
.woocommerce-Tabs-panel > h2,
.woocommerce-Tabs-panel > h3,
.woocommerce-product-details__short-description,
.wp-block-post-excerpt__excerpt {
	max-width: 65ch;
}

.wp-element-button,
.wp-block-button__link,
.jc-tile,
.jc-action,
.jc-menu-button,
.jc-banners__arrow {
	transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out;
}

.wp-element-button:active,
.wp-block-button__link:active,
.jc-tile:active,
.jc-action:active,
.jc-menu-button:active,
.jc-banners__arrow:active {
	transform: scale(0.97);
}

/* Touch screens only: a 44 px tap area for buttons (on a computer the buttons keep their designed size). */
@media (pointer: coarse) {
	.jc-menu-button,
	.wp-element-button,
	.wp-block-button__link {
		min-height: 44px;
	}

	.wp-block-buttons .wp-block-button__link {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
}

@media (pointer: coarse) {
	.jc-menu-list a,
	.jc-langs a,
	.jc-catalog-list a,
	.jc-logo {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
	}

	/* Links inside text: a taller tap area without moving the text lines. */
	.woocommerce-breadcrumb a,
	.jc-breadcrumbs a,
	footer a,
	.wp-block-post-title a,
	.wp-block-post-terms a,
	.jc-card-brand a,
	.jc-tiles-title a,
	main p a:not(.wp-element-button),
	.wp-block-query-pagination a,
	.woocommerce-store-notice__dismiss-link {
		padding-block: 14px;
	}

	select,
	.woocommerce-ordering select.orderby {
		min-height: 44px;
	}

	.woocommerce-product-gallery__trigger {
		width: 44px !important;
		height: 44px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-element-button,
	.wp-block-button__link,
	.jc-tile,
	.jc-action,
	.jc-menu-button,
	.jc-banners__arrow {
		transition: none;
	}

	.wp-element-button:active,
	.wp-block-button__link:active,
	.jc-tile:active,
	.jc-action:active,
	.jc-menu-button:active,
	.jc-banners__arrow:active {
		transform: none;
	}
}

/* ---------- Phones (checklist section 10, 13.10.2026) ---------- */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
}

/* With viewport-fit=cover a turned iPhone puts the page under the notch: keep the content beside it. */
body {
	padding-left: env(safe-area-inset-left, 0px);
	padding-right: env(safe-area-inset-right, 0px);
}

a,
button,
summary,
label,
input,
select,
textarea,
[role="button"],
[role="tab"] {
	touch-action: manipulation;
}

/* Long press must not select the label of a control; text people may copy (address, phone, article) stays selectable. */
.wp-element-button,
.wp-block-button__link,
button,
summary,
[role="tab"],
.jc-menu-button,
.jc-action,
.jc-langs a,
.jc-tile {
	-webkit-user-select: none;
	user-select: none;
}

/* Link and button hover colours of the theme (moved from theme.json, which applies them on touch screens too). */
@media (hover: hover) and (pointer: fine) {
	:root :where(a:where(:not(.wp-element-button)):hover) {
		color: var(--wp--preset--color--red);
	}

	:root :where(.wp-element-button:hover, .wp-block-button__link:hover) {
		background-color: var(--wp--preset--color--ink);
		color: var(--wp--preset--color--white);
	}
}

@media (pointer: coarse) {
	/* 16 px fields: iPhone does not zoom the page in when a field is tapped. */
	input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
	select,
	textarea {
		font-size: max(16px, 1em);
	}
}

/* Without the grey tap flash links need their own press response; buttons have theirs above. */
@media (hover: none) {
	a:not(.wp-element-button):not(.wp-block-button__link):not(.jc-tile):active {
		opacity: 0.7;
	}
}

/* ---------- Header search (14.10.2026) ----------
   From 1200 px the field stands in the header between the menu and the icons; narrower, the magnifier opens it as a
   full-width row under the header bar. Without JavaScript the row is simply always shown. */
.jc-search {
	display: flex;
	align-items: center;
	order: 5;
	flex: 1 1 100%;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--white);
}

.jc-has-js .jc-search:not(.is-open) {
	display: none;
}

.jc-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 42px;
	padding: 0 12px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: max(16px, 1em);
}

.jc-search input[type="search"]:focus {
	outline: none;
}

.jc-search:focus-within {
	outline: 2px solid var(--wp--preset--color--red);
	outline-offset: 2px;
}

.jc-search button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-height: 42px;
	border: 0;
	background: transparent;
	cursor: pointer;
}

@media (min-width: 1200px) {
	.jc-search,
	.jc-has-js .jc-search:not(.is-open) {
		display: flex;
		order: 0;
		flex: 0 1 240px;
	}

	.jc-search-toggle {
		display: none !important;
	}

	.jc-header-bar > .jc-menu {
		margin-left: auto;
	}
}

/* Phones: logo, search, sign in, cart and the menu button in one row — the menu button shows only its icon
   (its label stays for screen readers). */
@media (max-width: 781px) {
	.jc-header-bar {
		column-gap: 8px;
	}

	.jc-menu-button {
		justify-content: center;
		min-width: 44px;
		padding: 0 10px;
	}

	.jc-menu-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.jc-actions {
		gap: 0;
	}
}

/* The narrowest phones (320 px): a smaller logo keeps the header in one row. */
@media (max-width: 359px) {
	.jc-logo img {
		width: 86px;
		height: auto;
	}
}

/* ---------- Stress test fixes (checklist section 8, 14.10.2026) ---------- */

/* 4. Product photos of any shape are shown whole in the cards (a long rail or a tall part is not cut to a grey patch). */
.wc-block-components-product-image img,
.wc-block-grid__product-image img,
.wc-block-cart-item__image img {
	object-fit: contain !important;
	background-color: var(--wp--preset--color--white);
}

/* 5. Out-of-stock note in a product card (jaycraft-shop adds it above the button). */
.jc-card-stock {
	margin: 0 0 8px;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 781px) {
	/* 1. A long section or product name must not fill the phone screen. */
	main h1,
	main .wp-block-query-title {
		font-size: clamp(24px, 7vw, 28px) !important;
		line-height: 1.15;
	}

	/* 2. The last breadcrumb repeats the heading right below it — on phones it is left out. */
	.woocommerce-breadcrumb .jc-crumb:last-child,
	.woocommerce-breadcrumb .jc-crumb-sep:nth-last-child(2),
	.jc-breadcrumbs li:last-child {
		display: none;
	}

	/* 7. The test-mode notice scrolls away with the page on phones instead of keeping 100 px of the screen. */
	p.demo_store,
	.woocommerce-store-notice {
		position: static !important;
	}

	/* 9. Machine page tabs wrap to a second row instead of running off the screen. */
	.jc-has-js .jc-tab-list {
		flex-wrap: wrap;
		overflow-x: visible;
	}

	.jc-tab-list [role="tab"] {
		padding: 0.7rem 0.8rem;
	}
}

/* 3. Cart on the narrowest phones: smaller photo column, so the line total stays on the screen. */
@media (max-width: 400px) {
	.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: 56px minmax(0, 1fr) auto !important;
	}

	.wc-block-cart .wc-block-cart-item__image img {
		width: 56px;
	}
}

/* Cut to length (Р-83, 19.10.2026): piece length above the quantity and the button, total and note under them. */
.jc-cut {
	display: grid;
	gap: 6px;
	margin-bottom: 4px;
}
.jc-cut__label {
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}
.jc-cut select {
	width: 100%;
	min-height: 46px;
	padding: 8px 12px;
	border: 1px solid var(--wp--preset--color--stone);
	border-radius: 0;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
	font: inherit;
}
.jc-cut select:focus-visible {
	outline: 2px solid var(--wp--preset--color--red);
	outline-offset: 1px;
}
.jc-cut__pieces {
	margin-top: 10px;
}
form.cart > .jc-cut__total {
	margin: 12px 0 0;
	font-weight: 600;
	font-size: 1.125rem;
}
form.cart > .jc-cut__total:empty {
	display: none;
}
form.cart > .jc-cut__note {
	margin: 4px 0 0;
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}
