/* =====================================================================
   BRIGÁDELLÁTÓ – ARCULAT (2K)
   Enyhe lekerekítés: gombok, kártyák, címkék, szekciócímek.
   (A „Kategóriák böngészése” gomb szándékosan szögletes marad.)
   A ferde („csíkos”) formák a clip-path shape() függvénnyel kapnak
   lekerekített sarkot; ahol a böngésző ezt nem ismeri, marad az eredeti.
   ===================================================================== */

:root {
	--bl2k-r: 6px;      /* gombok, címkék, szekciócímek */
	--bl2k-r-lg: 10px;  /* kártyák, dobozok */
}

/* ---------- Gombok ---------- */
html body :is(
	.button,
	.btn,
	.wd-add-btn > a,
	.add_to_cart_button,
	.single_add_to_cart_button,
	.checkout-button,
	#place_order,
	.wc-forward,
	.blfs-btn,
	.bl-tanacs__gomb,
	.bl-tt-torol,
	.woocommerce-button,
	.woocommerce-Button,
	.wd-buy-now-btn,
	.elementor-button,
	.wd-load-more,
	.wc-block-components-button,
	input[type="submit"],
	button[type="submit"]
) {
	border-radius: var(--bl2k-r) !important;
}

/* A termékkártya „Opciók választása / Kosárba” gombja és a kívánságlista-gomb. */
html body .wd-product .wd-add-btn > a,
html body .wd-product .wd-wishlist-btn > a,
html body .wd-product .wd-compare-btn > a {
	border-radius: var(--bl2k-r) !important;
}

/* ---------- Kártyák ---------- */
html body .wd-product .product-wrapper,
html body .wd-product .wd-product-wrapper {
	border-radius: var(--bl2k-r-lg);
}
html body .bl-kat .wd-cat-inner,
html body .wd-cat .wd-cat-inner {
	border-radius: var(--bl2k-r-lg);
}

/* Készlet-sáv („RAKTÁRON” + csíkok) a termékkártyán. */
html body .product-element-bottom.product-information::before {
	border-radius: calc(var(--bl2k-r) - 2px);
}

/* Termékcímkék (Elfogyott, Akció, Új…) */
html body .product-labels .product-label,
html body .wd-product .onsale,
html body .wd-product .out-of-stock {
	border-radius: calc(var(--bl2k-r) - 2px) !important;
}

/* Lábléc címsorai (ferde sárga címke) */
html body .wd-footer .widget-title::before {
	border-radius: var(--bl2k-r);
}

/* ---------- Ferde (paralelogramma) formák lekerekítése ---------- */
@supports (clip-path: shape(from 0 0, line to 1px 1px)) {

	/*
	   Jobbra dőlő sáv, bal oldala egyenes:
	   polygon(0 0, 100% 0, calc(100% - S) 100%, 0 100%)
	   --bl2k-s: a dőlés (S), --bl2k-k: a sarok-ív vízszintes eltolása a ferde élen.
	*/
	html body .bl-szekciocim .woodmart-title-container::before,
	html body .bl-szekciocim .elementor-heading-title::before,
	html body .bl-kat .cat-design-default .wd-entities-title,
	html body .bl-neon-cim .woodmart-title-container,
	html body .bl-neon-cim .elementor-heading-title,
	body.single-product .product.instock .summary-inner > .price::before,
	body.single-product .product.outofstock .summary-inner > .price::before,
	body.single-product .product.onbackorder .summary-inner > .price::before,
	body.single-product form.cart .woocommerce-variation-availability .stock,
	body.single-product .wd-nav-tabs > li > a.wd-nav-link,
	body.single-product .product-tabs-wrapper .wd-accordion-title.wd-active .wd-accordion-title-text,
	body.single-product .related-and-upsells .wd-el-title::before,
	body.single-product .related-and-upsells .slider-title::before {
		--bl2k-k: calc(var(--bl2k-r) * .35);
		clip-path: shape(
			from 0 var(--bl2k-r),
			curve to var(--bl2k-r) 0 with 0 0,
			hline to calc(100% - var(--bl2k-r)),
			curve to calc(100% - var(--bl2k-k)) var(--bl2k-r) with 100% 0,
			line to calc(100% - var(--bl2k-s) + var(--bl2k-k)) calc(100% - var(--bl2k-r)),
			curve to calc(100% - var(--bl2k-s) - var(--bl2k-r)) 100% with calc(100% - var(--bl2k-s)) 100%,
			hline to var(--bl2k-r),
			curve to 0 calc(100% - var(--bl2k-r)) with 0 100%,
			close
		);
	}

	html body .bl-szekciocim .woodmart-title-container::before,
	html body .bl-szekciocim .elementor-heading-title::before { --bl2k-s: 22px; }
	html body .bl-kat .cat-design-default .wd-entities-title { --bl2k-s: 18px; }
	html body .bl-neon-cim .woodmart-title-container,
	html body .bl-neon-cim .elementor-heading-title { --bl2k-s: .5em; --bl2k-r: 5px; }
	body.single-product .product.instock .summary-inner > .price::before,
	body.single-product .product.outofstock .summary-inner > .price::before,
	body.single-product .product.onbackorder .summary-inner > .price::before,
	body.single-product form.cart .woocommerce-variation-availability .stock { --bl2k-s: 8px; --bl2k-r: 4px; }
	body.single-product .wd-nav-tabs > li > a.wd-nav-link { --bl2k-s: 16px; }
	body.single-product .product-tabs-wrapper .wd-accordion-title.wd-active .wd-accordion-title-text { --bl2k-s: 12px; --bl2k-r: 4px; }
	body.single-product .related-and-upsells .wd-el-title::before,
	body.single-product .related-and-upsells .slider-title::before { --bl2k-s: 20px; }

	/*
	   Mindkét oldalán ferde paralelogramma:
	   polygon(S 0, 100% 0, calc(100% - S) 100%, 0 100%)
	*/
	html body .bl-szekciocim .woodmart-title-container::after,
	html body .bl-szekciocim .elementor-heading-title::after,
	html body:is(.woocommerce-cart, .woocommerce-checkout) .wd-checkout-steps li > :is(a, span)::before,
	html body.woocommerce-checkout .woocommerce-form-coupon-toggle > div::before {
		--bl2k-k: calc(var(--bl2k-r) * .35);
		clip-path: shape(
			from calc(var(--bl2k-s) - var(--bl2k-k)) var(--bl2k-r),
			curve to calc(var(--bl2k-s) + var(--bl2k-r)) 0 with var(--bl2k-s) 0,
			hline to calc(100% - var(--bl2k-r)),
			curve to calc(100% - var(--bl2k-k)) var(--bl2k-r) with 100% 0,
			line to calc(100% - var(--bl2k-s) + var(--bl2k-k)) calc(100% - var(--bl2k-r)),
			curve to calc(100% - var(--bl2k-s) - var(--bl2k-r)) 100% with calc(100% - var(--bl2k-s)) 100%,
			hline to var(--bl2k-r),
			curve to var(--bl2k-k) calc(100% - var(--bl2k-r)) with 0 100%,
			close
		);
	}
	html body .bl-szekciocim .woodmart-title-container::after,
	html body .bl-szekciocim .elementor-heading-title::after { --bl2k-s: 22px; }
	html body:is(.woocommerce-cart, .woocommerce-checkout) .wd-checkout-steps li > :is(a, span)::before,
	html body.woocommerce-checkout .woocommerce-form-coupon-toggle > div::before { --bl2k-s: 22%; --bl2k-r: 4px; }

	/*
	   Balra dőlő, jobb oldalán egyenes (kategóriakártya nyíl-doboza):
	   polygon(S 0, 100% 0, 100% 100%, 0 100%)
	*/
	html body .bl-kat .wd-cat .wd-cat-inner::after {
		--bl2k-s: 18px;
		--bl2k-k: calc(var(--bl2k-r) * .3);
		clip-path: shape(
			from calc(var(--bl2k-s) - var(--bl2k-k)) var(--bl2k-r),
			curve to calc(var(--bl2k-s) + var(--bl2k-r)) 0 with var(--bl2k-s) 0,
			hline to 100%,
			vline to 100%,
			hline to var(--bl2k-r),
			curve to var(--bl2k-k) calc(100% - var(--bl2k-r)) with 0 100%,
			close
		);
	}

	/* Mobilon kisebb a dőlés (a téma szerint is). */
	@media (max-width: 768.98px) {
		html body .bl-szekciocim .woodmart-title-container::before,
		html body .bl-szekciocim .elementor-heading-title::before,
		html body .bl-szekciocim .woodmart-title-container::after,
		html body .bl-szekciocim .elementor-heading-title::after { --bl2k-s: 14px; --bl2k-r: 5px; }
		html body .bl-kat .cat-design-default .wd-entities-title { --bl2k-s: 12px; --bl2k-r: 5px; }
	}
}
