/* =========================================================================
   Orion Checkout – Shopify-style shop / category pages.
   Built on the Elementor Pro "Product Archive" template: body.oc-archive and
   .elementor-location-archive are in the selectors so these rules outrank the
   template's own per-element styles.
   ========================================================================= */

body.oc-archive {
	--oc-ink: #181C28;
	--oc-muted: #5E6575;
	--oc-line: #D3D6DC;
	--oc-line-soft: #E3E5E8;
	--oc-panel: #F4F5F2;
	--oc-tint: #F1F8EF;
	--oc-radius: 5px;
	--oc-head: "IBM Plex Sans", Heebo, sans-serif;
	--oc-body: Heebo, "IBM Plex Sans", sans-serif;
}

/* The header is 36% transparent (for the homepage hero); make it solid here */
body.oc-archive header.elementor > .e-con {
	background-color: #181C28 !important;
}

/* ---------- Collection header -------------------------------------------- */

body.oc-archive .oc-coll {
	margin: 8px 0 28px;
	font-family: var(--oc-body);
	color: var(--oc-ink);
}

body.oc-archive .oc-coll__crumbs {
	margin: 0 0 14px;
	font-size: 13px;
	color: var(--oc-muted);
}

body.oc-archive .oc-coll__crumbs a {
	color: var(--oc-muted);
	text-decoration: none;
}

body.oc-archive .oc-coll__crumbs a:hover {
	color: var(--oc-accent);
}

body.oc-archive .oc-coll__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 16px;
}

body.oc-archive .oc-coll__title {
	margin: 0;
	font-family: var(--oc-head);
	font-size: 36px;
	font-weight: 600;
	line-height: 1.15;
	text-transform: none;
	color: var(--oc-ink);
}

body.oc-archive .oc-coll__count {
	font-size: 14px;
	color: var(--oc-muted);
}

body.oc-archive .oc-coll__desc {
	max-width: 720px;
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 1.6;
	color: #3A4050;
}

body.oc-archive .oc-coll__desc p {
	margin: 0 0 8px;
}

/* Category chips – mobile/tablet only (desktop keeps the sidebar) */
body.oc-archive .oc-chips {
	display: none;
}

@media (max-width: 1024px) {
	body.oc-archive .oc-chips {
		display: flex;
		gap: 8px;
		margin: 18px -16px 0;
		padding: 0 16px 4px;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	body.oc-archive .oc-chips::-webkit-scrollbar {
		display: none;
	}

	body.oc-archive .oc-chip {
		flex-shrink: 0;
		display: inline-flex;
		align-items: center;
		min-height: 40px;
		padding: 0 16px;
		border: 1px solid var(--oc-line);
		border-radius: 999px;
		background: #fff;
		color: var(--oc-ink);
		font-size: 14px;
		font-weight: 500;
		white-space: nowrap;
		text-decoration: none;
	}

	body.oc-archive .oc-chip.is-active {
		border-color: var(--oc-ink);
		background: var(--oc-ink);
		color: #fff;
	}

	/* The chips replace the template's collapsed "Продуктови категории" box */
	body.oc-archive .elementor-location-archive .e-con:has(.elementor-widget-n-accordion):not(:has(.elementor-widget-woocommerce-products)) {
		display: none;
	}
}

/* ---------- Desktop sidebar (Elementor icon boxes) ------------------------ */

body.oc-archive .elementor-location-archive .e-con.e-con:has(> .elementor-widget-icon-box) {
	border-color: var(--oc-line-soft);
	border-radius: 12px;
}

body.oc-archive .elementor-location-archive .elementor-widget-icon-box.elementor-widget-icon-box {
	border-bottom-color: var(--oc-line-soft);
}

body.oc-archive .elementor-location-archive .elementor-widget-icon-box .elementor-icon-box-title a {
	color: #3A4050;
	transition: color 0.15s ease;
}

body.oc-archive .elementor-location-archive .elementor-widget-icon-box:hover .elementor-icon-box-title a,
body.oc-archive .elementor-location-archive .elementor-widget-icon-box.oc-is-active .elementor-icon-box-title a {
	color: var(--oc-accent);
}

body.oc-archive .elementor-location-archive .elementor-widget-icon-box.oc-is-active .elementor-icon-box-title a {
	font-weight: 600;
}

/* ---------- Product grid ---------------------------------------------------
   The archive template styles its cards with !important and very specific
   per-element selectors, so the card rules below use !important too. */

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 32px 24px;
	margin: 0;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products::before,
body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products::after {
	display: none;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product {
	display: flex !important;
	flex-direction: column !important;
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-family: var(--oc-body) !important;
	text-align: left !important;
}

/* The grey square is painted behind the image (a square SVG at the top of the
   link), so photos with a white background blend into it via multiply. */
body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product a.woocommerce-loop-product__link {
	display: flex !important;
	flex-direction: column !important;
	flex-grow: 1 !important;
	text-decoration: none !important;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' rx='5' fill='%23F4F5F2'/%3E%3C/svg%3E") top center / 100% auto no-repeat !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product a img {
	width: 100% !important;
	aspect-ratio: 1 !important;
	height: auto !important;
	margin: 0 0 14px !important;
	padding: 24px !important;
	box-sizing: border-box !important;
	object-fit: contain !important;
	border: 0 !important;
	border-radius: 12px !important;
	background: transparent !important;
	mix-blend-mode: multiply !important;
	transition: transform 0.2s ease !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product:hover a img {
	transform: scale(1.02) !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .woocommerce-loop-product__title {
	margin: 0 !important;
	padding: 0 !important;
	font-family: var(--oc-body) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	color: var(--oc-ink) !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .price {
	margin: 6px 0 14px !important;
	font-family: var(--oc-head) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: var(--oc-ink) !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .price del {
	margin-right: 6px !important;
	font-weight: 400 !important;
	color: var(--oc-muted) !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .price ins {
	text-decoration: none !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 44px !important;
	margin: auto 0 0 !important;
	padding: 10px 16px !important;
	box-sizing: border-box !important;
	border: 1px solid var(--oc-line) !important;
	border-radius: var(--oc-radius) !important;
	background: #fff !important;
	color: var(--oc-ink) !important;
	box-shadow: none !important;
	font-family: var(--oc-body) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	text-align: center !important;
	text-transform: none !important;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .button:hover,
body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .button:focus-visible {
	border-color: var(--oc-accent) !important;
	background: var(--oc-accent) !important;
	color: #fff !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .button.added {
	border-color: var(--oc-accent) !important;
	background: var(--oc-tint) !important;
	color: var(--oc-accent-dark) !important;
}

body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .added_to_cart {
	margin-top: 8px !important;
	font-size: 13px !important;
	text-align: center !important;
	color: var(--oc-accent) !important;
}

/* ---------- Mobile: two cards per row -------------------------------------- */

@media (max-width: 767px) {
	body.oc-archive .oc-coll__title {
		font-size: 28px;
	}

	body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 24px 12px;
	}

	body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product a img {
		padding: 14px !important;
		border-radius: 10px !important;
	}

	body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .woocommerce-loop-product__title {
		font-size: 14px !important;
	}

	body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .button {
		min-height: 40px !important;
		padding: 8px 10px !important;
		font-size: 13px !important;
	}
}

/* "Цена по запитване" for quote-only products */
body.oc-archive .elementor-location-archive .elementor-widget-woocommerce-products ul.products li.product .price .oc-price-quote {
	font-family: var(--oc-body) !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: var(--oc-muted) !important;
}

/* ---------- Filters ------------------------------------------------------- */

body.oc-archive .oc-filters {
	position: relative;
	margin: 22px 0 0;
	font-family: var(--oc-body);
	color: var(--oc-ink);
}

body.oc-archive .oc-filters.is-loading .oc-filters__groups,
body.oc-archive .oc-filters.is-loading .oc-filters__active {
	opacity: 0.55;
	pointer-events: none;
}

body.oc-archive .oc-filters__open,
body.oc-archive .oc-filters__head,
body.oc-archive .oc-filters__foot,
body.oc-archive .oc-filters__backdrop {
	display: none;
}

body.oc-archive .oc-filters__groups {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body.oc-archive .oc-filter {
	position: relative;
}

body.oc-archive .oc-filter > summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px 0 16px;
	border: 1px solid var(--oc-line);
	border-radius: 999px;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	color: var(--oc-ink);
	list-style: none;
	cursor: pointer;
	user-select: none;
	transition: border-color 0.15s;
}

body.oc-archive .oc-filter > summary::-webkit-details-marker {
	display: none;
}

body.oc-archive .oc-filter > summary::after {
	content: "";
	width: 7px;
	height: 7px;
	margin: -3px 0 0 2px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.15s;
}

body.oc-archive .oc-filter[open] > summary::after {
	margin-top: 3px;
	transform: rotate(-135deg);
}

body.oc-archive .oc-filter > summary:hover,
body.oc-archive .oc-filter[open] > summary {
	border-color: var(--oc-ink);
}

body.oc-archive .oc-filter__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--oc-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}

body.oc-archive .oc-filter__body {
	position: absolute;
	z-index: 30;
	top: calc(100% + 8px);
	left: 0;
	min-width: 240px;
	max-height: 360px;
	padding: 8px;
	overflow-y: auto;
	border: 1px solid var(--oc-line-soft);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(24, 28, 40, 0.12);
}

body.oc-archive .oc-filter__opt {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 9px 10px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--oc-ink);
	cursor: pointer;
}

body.oc-archive .oc-filter__opt:hover {
	background: var(--oc-panel);
}

body.oc-archive .oc-filter__opt input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

body.oc-archive .oc-filter__box {
	flex-shrink: 0;
	position: relative;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--oc-line);
	border-radius: 4px;
	background: #fff;
}

body.oc-archive .oc-filter__opt input:checked + .oc-filter__box {
	border-color: var(--oc-accent);
	background: var(--oc-accent);
}

body.oc-archive .oc-filter__opt input:checked + .oc-filter__box::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
}

body.oc-archive .oc-filter__opt input:focus-visible + .oc-filter__box {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--oc-accent);
}

body.oc-archive .oc-filter__name {
	flex: 1;
	white-space: nowrap;
}

body.oc-archive .oc-filter__count {
	font-size: 12px;
	color: var(--oc-muted);
}

body.oc-archive .oc-filter__range {
	display: flex;
	gap: 8px;
	padding: 8px 6px;
}

body.oc-archive .oc-filter__range label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	position: relative;
	margin: 0;
	font-size: 12px;
	color: var(--oc-muted);
}

body.oc-archive .oc-filter__range input {
	width: 120px;
	height: 42px;
	padding: 0 28px 0 12px;
	border: 1px solid var(--oc-line);
	border-radius: var(--oc-radius);
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	color: var(--oc-ink);
	-moz-appearance: textfield;
}

body.oc-archive .oc-filter__range input::-webkit-outer-spin-button,
body.oc-archive .oc-filter__range input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

body.oc-archive .oc-filter__range input:focus {
	outline: none;
	border-color: var(--oc-accent);
	box-shadow: 0 0 0 1px var(--oc-accent);
}

body.oc-archive .oc-filter__range em {
	position: absolute;
	right: 10px;
	bottom: 12px;
	font-style: normal;
	font-size: 14px;
	color: var(--oc-muted);
}

body.oc-archive .oc-filters button.oc-filter__apply,
body.oc-archive .oc-filters button.oc-filters__submit {
	width: 100%;
	min-height: 44px;
	margin: 4px 0 0;
	padding: 0 16px;
	border: 0;
	border-radius: var(--oc-radius);
	background: var(--oc-accent);
	box-shadow: none;
	color: #fff;
	font-family: var(--oc-head);
	font-size: 15px;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
}

body.oc-archive .oc-filters button.oc-filter__apply:hover,
body.oc-archive .oc-filters button.oc-filters__submit:hover {
	background: var(--oc-accent-dark);
}

/* Active filters */
body.oc-archive .oc-filters__active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0;
}

body.oc-archive .oc-filters__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 32px;
	padding: 0 10px 0 12px;
	border-radius: 999px;
	background: var(--oc-tint);
	color: var(--oc-ink);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}

body.oc-archive .oc-filters__chip span {
	font-size: 16px;
	line-height: 1;
	color: var(--oc-muted);
}

body.oc-archive .oc-filters__chip:hover span {
	color: var(--oc-ink);
}

body.oc-archive .oc-filters__clear {
	margin-left: 4px;
	font-size: 13px;
	color: var(--oc-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Filters: phone drawer ---------------------------------------- */

@media (max-width: 767px) {
	body.oc-archive .oc-filters {
		margin-top: 14px;
	}

	body.oc-archive .oc-filters button.oc-filters__open {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		min-height: 44px;
		padding: 0 16px;
		border: 1px solid var(--oc-line);
		border-radius: var(--oc-radius);
		background: #fff;
		box-shadow: none;
		color: var(--oc-ink);
		font-family: var(--oc-head);
		font-size: 15px;
		font-weight: 600;
		text-transform: none;
	}

	body.oc-archive .oc-filters__badge:empty {
		display: none;
	}

	body.oc-archive .oc-filters__badge {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		border-radius: 999px;
		background: var(--oc-accent);
		color: #fff;
		font-size: 12px;
	}

	body.oc-archive .oc-filters__panel {
		position: fixed;
		z-index: 100000;
		left: 0;
		right: 0;
		bottom: 0;
		display: flex;
		flex-direction: column;
		max-height: 85vh;
		max-height: 85dvh;
		border-radius: 16px 16px 0 0;
		background: #fff;
		box-shadow: 0 -12px 40px rgba(24, 28, 40, 0.18);
		transform: translateY(105%);
		visibility: hidden;
		transition: transform 0.25s ease, visibility 0s 0.25s;
	}

	body.oc-archive .oc-filters.is-open .oc-filters__panel {
		transform: none;
		visibility: visible;
		transition: transform 0.25s ease;
	}

	body.oc-archive .oc-filters__backdrop {
		position: fixed;
		z-index: 99999;
		inset: 0;
		background: rgba(24, 28, 40, 0.45);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.25s;
	}

	body.oc-archive .oc-filters.is-open .oc-filters__backdrop {
		display: block;
		opacity: 1;
		pointer-events: auto;
	}

	body.oc-archive .oc-filters__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px 16px 12px;
		border-bottom: 1px solid var(--oc-line-soft);
		font-family: var(--oc-head);
		font-size: 18px;
	}

	body.oc-archive .oc-filters button.oc-filters__close {
		width: 36px;
		height: 36px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: var(--oc-panel);
		box-shadow: none;
		color: var(--oc-ink);
		font-size: 22px;
		line-height: 1;
	}

	body.oc-archive .oc-filters__groups {
		flex: 1;
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 0;
		padding: 0 16px;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	body.oc-archive .oc-filter {
		border-bottom: 1px solid var(--oc-line-soft);
	}

	body.oc-archive .oc-filter > summary {
		display: flex;
		justify-content: space-between;
		width: 100%;
		min-height: 54px;
		padding: 0 4px 0 0;
		border: 0;
		border-radius: 0;
		font-size: 16px;
		font-weight: 600;
	}

	body.oc-archive .oc-filter > summary .oc-filter__n {
		margin-left: auto;
	}

	body.oc-archive .oc-filter__body {
		position: static;
		min-width: 0;
		max-height: none;
		padding: 0 0 12px;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	body.oc-archive .oc-filter__opt {
		padding: 10px 2px;
		font-size: 15px;
	}

	body.oc-archive .oc-filter__range {
		padding: 0;
	}

	body.oc-archive .oc-filter__range label {
		flex: 1;
	}

	body.oc-archive .oc-filter__range input {
		width: 100%;
	}

	body.oc-archive .oc-filters button.oc-filter__apply {
		display: none;
	}

	body.oc-archive .oc-filters__foot {
		display: flex;
		align-items: center;
		gap: 16px;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--oc-line-soft);
	}

	body.oc-archive .oc-filters__reset {
		flex-shrink: 0;
		font-size: 15px;
		color: var(--oc-ink);
		text-decoration: underline;
		text-underline-offset: 3px;
	}

	body.oc-archive .oc-filters button.oc-filters__submit {
		margin: 0;
		min-height: 48px;
	}

	html.oc-filters-lock,
	html.oc-filters-lock body {
		overflow: hidden;
	}

	body.oc-archive .oc-filters__active {
		flex-wrap: nowrap;
		margin: 12px -16px 0;
		padding: 0 16px 2px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	body.oc-archive .oc-filters__chip,
	body.oc-archive .oc-filters__clear {
		flex-shrink: 0;
		white-space: nowrap;
	}
}
