/*
Theme Name: krscds-shop
Theme URI: https://kriscod.es
Author: kriscod.es
Author URI: https://kriscod.es
Description: A premium WooCommerce block theme built on Full Site Editing. Bold e-commerce aesthetic with dense product layouts, high performance, and zero dependency on page builders.
Version: 0.5.0
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: krscds-shop
Tags: full-site-editing, block-styles, wide-blocks, woocommerce, e-commerce, block-patterns
*/

/*
 * Only rules that theme.json cannot express.
 * Target: < 50 rules.
 * All values use design tokens from theme.json — no hardcoded colors or sizes.
 */

/* --- Prevent horizontal overflow from alignfull math edge cases --- */
html,
body {
	overflow-x: clip;
	max-width: 100%;
}

/* Constrain .wp-site-blocks so nothing escapes viewport */
.wp-site-blocks {
	overflow-x: clip;
}

/* Mobile: tighter root padding, prevent any right gap */
@media (max-width: 576px) {
	body {
		--wp--style--root--padding-right: 0.75rem;
		--wp--style--root--padding-left: 0.75rem;
	}
}

/* --- Focus visibility for accessibility --- */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* --- Smooth scroll for anchor links (respect reduced motion) --- */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* --- Screen reader text (required by theme review) --- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--background);
	clip: auto !important;
	clip-path: none;
	color: var(--wp--preset--color--foreground);
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* --- Form inputs: transition + focus ring (supplements theme.json elements.input) --- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
	transition: border-color var(--wp--custom--transition--fast, 150ms ease),
		box-shadow var(--wp--custom--transition--fast, 150ms ease);
}

input:focus,
textarea:focus,
select:focus {
	box-shadow: 0 0 0 1px var(--wp--preset--color--primary);
	outline: none;
}

/* --- WooCommerce block checkout/cart form overrides --- */
/* WC blocks use hardcoded CSS and do NOT inherit from theme.json elements.input.
   Scoped !important overrides are required (standard WC theming practice). */

.wc-block-components-text-input input,
.wc-block-components-text-input textarea {
	border: 1px solid var(--wp--preset--color--border) !important;
	border-radius: var(--wp--custom--border-radius--md) !important;
	font-family: var(--wp--preset--font-family--inter) !important;
	font-size: var(--wp--preset--font-size--md) !important;
}

.wc-block-components-text-input input:focus,
.wc-block-components-text-input textarea:focus {
	border-color: var(--wp--preset--color--primary) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--primary) !important;
}

.wc-blocks-components-select .wc-blocks-components-select__container {
	border: 1px solid var(--wp--preset--color--border) !important;
	border-radius: var(--wp--custom--border-radius--md) !important;
}

.wc-blocks-components-select .wc-blocks-components-select__container:focus-within {
	border-color: var(--wp--preset--color--primary) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--primary) !important;
}

.wc-block-components-button:not(.is-link) {
	border-radius: var(--wp--custom--border-radius--md) !important;
	font-weight: 600 !important;
}

.wc-block-components-checkout-step__heading {
	font-family: var(--wp--preset--font-family--inter);
}

.wc-block-components-text-input.has-error input {
	border-color: var(--wp--preset--color--error) !important;
}

/* --- Shop sidebar: mobile offcanvas --- */
/* Toggle button is hidden on desktop, visible on mobile */
.krscds-sidebar-toggle,
.krscds-sidebar-close {
	display: none;
}

.krscds-sidebar-toggle {
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--border-radius--md);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	cursor: pointer;
	margin-bottom: var(--wp--preset--spacing--40);
}

@media (max-width: 768px) {
	.krscds-sidebar-toggle {
		display: inline-flex;
	}

	.krscds-shop-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 300px;
		height: 100vh;
		background: var(--wp--preset--color--background);
		z-index: 9999;
		overflow-y: auto;
		padding: var(--wp--preset--spacing--50);
		transform: translateX(-100%);
		transition: transform var(--wp--custom--transition--normal, 250ms ease);
		box-shadow: var(--wp--custom--shadow--xl);
	}

	.krscds-shop-sidebar.is-open {
		transform: translateX(0);
	}

	/* Overlay behind sidebar */
	.krscds-sidebar-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 9998;
	}

	.krscds-sidebar-overlay.is-open {
		display: block;
	}

	/* Close button inside sidebar */
	.krscds-sidebar-close {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: var(--wp--preset--spacing--40);
		padding-bottom: var(--wp--preset--spacing|30);
		border-bottom: 1px solid var(--wp--preset--color--border);
	}

	.krscds-sidebar-close button {
		background: none;
		border: none;
		font-size: 24px;
		cursor: pointer;
		padding: 4px;
		line-height: 1;
		color: var(--wp--preset--color--foreground);
	}
}

/* ==========================================================================
   HEADER — 3-layer dark luxury header
   ========================================================================== */

/* --- Header: wrapper --- */
/* Sticky must be on the template-part wrapper, not the inner <header>,
   because WP wraps template parts in <header class="wp-block-template-part">
   which fits tightly around its content — no room for inner sticky. */
.wp-block-template-part:has(.krscds-header) {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--wp--preset--color--header-dark, #0D0D0D);
}

/* Admin bar offset — desktop: admin bar is fixed, header sticks below it */
.admin-bar .wp-block-template-part:has(.krscds-header) {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* Admin bar offset — mobile: admin bar is position:absolute (scrolls away),
   so sticky header should stick to top:0 after the bar scrolls out of view. */
@media (max-width: 782px) {
	.admin-bar .wp-block-template-part:has(.krscds-header) {
		top: 0;
	}
}

.krscds-header {
	--krscds-gold: var(--wp--preset--color--gold, #D4A847);
	--krscds-rose-gold: var(--wp--preset--color--rose-gold, #B76E79);
	--krscds-header-text: rgba(255, 255, 255, 0.75);
	box-shadow: var(--wp--custom--shadow--lg, 0 10px 15px rgba(0, 0, 0, 0.1));
}

/* Reset WP group padding/margin that FSE injects from root styles.
   blockGap:0 is set in header.html; CSS is a safety net. */
.krscds-header,
.krscds-header > .wp-block-group {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* --- TOP BAR --- */
.krscds-header__top {
	background: var(--wp--preset--color--header-dark, #0D0D0D);
	padding-top: 0;
	padding-bottom: 0;
}

.krscds-header__top > .wp-block-group {
	min-height: var(--wp--custom--header--top-height, 40px);
	align-items: center;
}

/* Top bar layout (wp:html blocks don't get flex from FSE) */
.krscds-header__top-left,
.krscds-header__top-right {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--40, 1rem);
}

.krscds-header__top-item,
.krscds-header__top-item.has-xs-font-size {
	color: var(--krscds-header-text);
	margin: 0;
	line-height: 1;
	white-space: nowrap;
	font-size: var(--wp--preset--font-size--xs, 0.75rem);
	font-family: var(--wp--preset--font-family--inter);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

a.krscds-header__top-item {
	color: var(--krscds-header-text);
	text-decoration: none;
	transition: color var(--wp--custom--transition--fast, 150ms ease);
}

a.krscds-header__top-item:hover {
	color: var(--krscds-gold);
	text-decoration: none;
}

/* SVG icons in top bar */
.krscds-header__icon {
	flex-shrink: 0;
	opacity: 0.6;
}

/* --- MAIN BAR --- */
.krscds-header__main {
	background: var(--wp--preset--color--header-main, #111111);
	border-bottom: 2px solid var(--krscds-gold);
	padding-top: 0;
	padding-bottom: 0;
}

.krscds-header__main > .wp-block-group {
	min-height: var(--wp--custom--header--main-height, 80px);
	align-items: center;
}

/* Site logo image */
.krscds-header__logo .wp-block-site-logo {
	flex-shrink: 0;
	line-height: 0;
}

.krscds-header__logo .wp-block-site-logo img {
	height: auto;
	max-height: 50px;
	width: auto;
}

/* Logo: gradient text (fallback when no logo image) */
.krscds-header__logo .wp-block-site-title,
.krscds-header__logo .wp-block-site-title a {
	background: linear-gradient(135deg, var(--krscds-rose-gold), var(--krscds-gold));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 800;
	letter-spacing: -0.02em;
	text-decoration: none;
	white-space: nowrap;
}

/* Search: flex-grow in main bar */
.krscds-header__search {
	flex: 1;
	max-width: 700px;
	margin: 0 var(--wp--preset--spacing--50, 1.5rem);
}

/* Cart wrapper */
.krscds-header__cart {
	flex-shrink: 0;
}

/* --- BOTTOM NAV --- */
.krscds-header__bottom {
	background: var(--wp--preset--color--header-dark, #0D0D0D);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	padding-top: 0;
	padding-bottom: 0;
}

.krscds-header__bottom > .wp-block-group,
.krscds-header__bottom .wp-block-navigation {
	min-height: var(--wp--custom--header--bottom-height, 50px);
	align-items: center;
}

/* Nav links: uppercase, light text, gold hover */
.krscds-header__nav-list {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 30px;
	list-style: none;
	padding: 0;
	margin: 0;
	min-height: var(--wp--custom--header--bottom-height, 50px);
}

.krscds-header__nav-list a {
	color: var(--krscds-header-text) !important;
	text-transform: uppercase;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.5px;
	text-decoration: none !important;
	transition: color var(--wp--custom--transition--fast, 150ms ease);
}

.krscds-header__nav-list a:hover,
.krscds-header__nav-list a:focus {
	color: var(--krscds-gold) !important;
	text-decoration: none !important;
}

/* "More" dropdown nav item */
.krscds-header__nav-more {
	position: relative;
}

.krscds-header__nav-more > button {
	background: none;
	border: none;
	color: var(--krscds-header-text);
	text-transform: uppercase;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.5px;
	cursor: pointer;
	padding: 0;
	transition: color var(--wp--custom--transition--fast, 150ms ease);
}

.krscds-header__nav-more > button:hover,
.krscds-header__nav-more > button:focus {
	color: var(--krscds-gold);
}

.krscds-header__nav-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 200px;
	background: var(--wp--preset--color--header-dark, #0D0D0D);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--wp--custom--border-radius--sm, 8px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	padding: 8px 0;
	margin-top: 8px;
	z-index: 1000;
	list-style: none;
}

.krscds-header__nav-more.is-open .krscds-header__nav-dropdown {
	display: block;
}

.krscds-header__nav-dropdown li {
	margin: 0;
}

.krscds-header__nav-dropdown a {
	display: block;
	padding: 10px 20px;
	font-size: 12px !important;
	white-space: nowrap;
}

.krscds-header__nav-dropdown a:hover {
	background: rgba(255, 255, 255, 0.05);
}

.krscds-header__nav-dropdown a:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	outline: 2px solid var(--wp--preset--color--gold, #D4A847);
	outline-offset: -2px;
}

/* Legacy fallback for wp:navigation block */
.krscds-header__bottom .wp-block-navigation a {
	color: var(--krscds-header-text) !important;
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-decoration: none !important;
	transition: color var(--wp--custom--transition--fast, 150ms ease);
}

.krscds-header__bottom .wp-block-navigation a:hover,
.krscds-header__bottom .wp-block-navigation a:focus {
	color: var(--krscds-gold) !important;
	text-decoration: none !important;
}

/* --- HEADER RESPONSIVE --- */

/* Tablet: narrower search */
@media (min-width: 769px) and (max-width: 992px) {
	.krscds-header__search {
		max-width: 400px;
	}
}

/* --- Hamburger button: hidden on desktop, visible on mobile --- */
.krscds-header__hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	flex-shrink: 0;
	order: 4;
}

.krscds-header__hamburger-line {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--krscds-header-text, rgba(255, 255, 255, 0.75));
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hamburger to X animation when active */
.krscds-header__hamburger.is-active .krscds-header__hamburger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.krscds-header__hamburger.is-active .krscds-header__hamburger-line:nth-child(2) {
	opacity: 0;
}

.krscds-header__hamburger.is-active .krscds-header__hamburger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.krscds-header__hamburger:focus-visible {
	outline: 2px solid var(--wp--preset--color--gold, #D4A847);
	outline-offset: 2px;
}

/* Mobile: hide top bar, show hamburger, bottom nav becomes slide-down drawer */
@media (max-width: 768px) {
	.krscds-header__top {
		display: none;
	}

	/* Bottom nav: hidden by default, shown when toggled */
	.krscds-header__bottom {
		display: none;
		background: var(--wp--preset--color--header-dark, #0D0D0D);
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}

	.krscds-header__bottom.is-mobile-open {
		display: block;
	}

	/* Nav list: vertical on mobile */
	.krscds-header__bottom .krscds-header__nav-list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: var(--wp--preset--spacing--30, 0.75rem) 0;
	}

	.krscds-header__bottom .krscds-header__nav-list li {
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	}

	.krscds-header__bottom .krscds-header__nav-list li:last-child {
		border-bottom: none;
	}

	.krscds-header__bottom .krscds-header__nav-list a {
		display: block;
		padding: 12px var(--wp--preset--spacing--50, 1.5rem);
		font-size: 14px;
	}

	/* "More" dropdown: inline in mobile (no absolute positioning) */
	.krscds-header__bottom .krscds-header__nav-more > button {
		display: block;
		width: 100%;
		text-align: left;
		padding: 12px var(--wp--preset--spacing--50, 1.5rem);
		font-size: 14px;
	}

	.krscds-header__bottom .krscds-header__nav-dropdown {
		position: static;
		min-width: auto;
		box-shadow: none;
		border: none;
		border-radius: 0;
		margin-top: 0;
		padding: 0;
		background: rgba(255, 255, 255, 0.03);
	}

	.krscds-header__bottom .krscds-header__nav-dropdown a {
		padding: 10px var(--wp--preset--spacing--50, 1.5rem) 10px calc(var(--wp--preset--spacing--50, 1.5rem) + 16px);
		font-size: 13px !important;
	}

	/* Show hamburger button */
	.krscds-header__hamburger {
		display: flex;
	}

	.krscds-header__main > .wp-block-group {
		flex-wrap: wrap;
		gap: var(--wp--preset--spacing--20, 0.5rem);
		padding-top: var(--wp--preset--spacing--30, 0.75rem);
		padding-bottom: var(--wp--preset--spacing--30, 0.75rem);
	}

	.krscds-header__search {
		order: 3;
		flex-basis: 100%;
		max-width: 100%;
		margin: 0;
	}

	.krscds-header__logo {
		flex: 1;
		min-width: 0;
	}

	/* Prevent cart badge from pushing layout wider than screen */
	.krscds-header__cart {
		flex-shrink: 1;
		min-width: 0;
		overflow: hidden;
	}

	/* Prevent any header child from causing horizontal overflow */
	.krscds-header__main > .wp-block-group > * {
		min-width: 0;
	}
}

/* Remove gap between header and content (FSE block gap) */
.wp-site-blocks > .wp-block-template-part:has(.krscds-header) + * {
	margin-top: 0 !important;
}

/* Remove white gaps between full-width homepage sections.
   WordPress adds default margin-top to sibling blocks.
   Full-width sections (USP, newsletter, footer) should be seamless. */
.wp-site-blocks > .alignfull,
.wp-site-blocks > main + .alignfull,
.wp-site-blocks > .alignfull + .alignfull,
.wp-site-blocks > .alignfull + .wp-block-template-part {
	margin-top: 0 !important;
}

/* Space between main content and USP trust-badges section */
.wp-site-blocks > main + .krscds-usp {
	margin-top: 20px !important;
}

/* --- Header: hide WooCommerce auto-injected blocks --- */
/* WC uses Block Hooks to inject customer-account and mini-cart into
   core/navigation. We have our own krscds/ajax-search and krscds/mini-cart
   so the WC duplicates must be hidden. The PHP hooked_block_types filter
   is the primary prevention; this CSS is a visual safety net. */
header .wp-block-woocommerce-customer-account,
header .wp-block-woocommerce-mini-cart {
	display: none !important;
}

/* --- Single product: quality class badges --- */
/* Color-code quality classes A (green), B (warning), C (muted) */
.krscds-quality-badge a,
.krscds-type-badge a {
	display: inline-block;
	padding: 2px 10px;
	border-radius: var(--wp--custom--border-radius--sm, 4px);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	line-height: 1.6;
}

/* Default: green for Klasa A */
.krscds-quality-badge a {
	background: var(--wp--preset--color--success);
	color: var(--wp--preset--color--background);
}

/* Klasa B: warning orange */
.krscds-quality-badge a[data-class="b"] {
	background: var(--wp--preset--color--warning);
}

/* Klasa C: muted/grey */
.krscds-quality-badge a[data-class="c"] {
	background: var(--wp--preset--color--muted);
}

.krscds-type-badge a {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--background);
}

/* --- Single product: trust info section --- */
.krscds-product-trust .wp-block-group {
	gap: var(--wp--preset--spacing--20, 0.5rem);
}

/* --- Single product: WooCommerce product details tabs --- */
/* Align tab styling with theme design tokens */
.wc-block-components-tab-panel__tab-list {
	border-bottom: 2px solid var(--wp--preset--color--border);
	gap: 0;
}

.wc-block-components-tab-panel__tab {
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	font-weight: 600;
	color: var(--wp--preset--color--muted);
	transition: color var(--wp--custom--transition--fast, 150ms ease),
		border-color var(--wp--custom--transition--fast, 150ms ease);
}

.wc-block-components-tab-panel__tab:hover {
	color: var(--wp--preset--color--foreground);
}

.wc-block-components-tab-panel__tab[aria-selected="true"] {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--primary);
}

/* ==========================================================================
   SINGLE PRODUCT PAGE — prototype-matching overrides (krscds-sp-*)
   ========================================================================== */

/* Hide default WC price block on single product (price is in the bar above) */
.single-product .wp-block-woocommerce-product-price {
	display: none;
}

/* Hide WC default stock text on single product (we inject our own styled version) */
.single-product .wp-block-woocommerce-add-to-cart-form .stock {
	display: none !important;
}

/* --- REF badge (dark pill, monospace, gold text) --- */
.krscds-sp-ref-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--wp--preset--color--header-dark, #0D0D0D);
	color: var(--wp--preset--color--gold, #D4A847);
	padding: 6px 16px;
	border-radius: 4px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 15px;
	letter-spacing: 1px;
}

.krscds-sp-ref-badge svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
}

/* --- Price bar: premium gold style matching ATC button --- */
.krscds-sp-price-bar {
	display: flex;
	gap: 24px;
	align-items: baseline;
	margin-bottom: 20px;
	padding: 18px 24px;
	background: linear-gradient(135deg, #B76E79, #D4A847);
	border-radius: var(--wp--custom--border-radius--sm, 8px);
	border: none;
	box-shadow: 0 4px 15px rgba(183, 110, 121, 0.25);
}

.krscds-sp-price-bar__label {
	font-size: 10px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 1);
	font-weight: 700;
	letter-spacing: 0.5px;
	display: block;
	margin-bottom: 3px;
}

.krscds-sp-price-bar__ours .krscds-sp-price-bar__value,
.krscds-sp-price-bar__ours .krscds-sp-price-bar__value .woocommerce-Price-amount {
	font-size: 32px;
	font-weight: 900;
	color: #fff;
	line-height: 1;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.krscds-sp-price-bar__retail .krscds-sp-price-bar__value,
.krscds-sp-price-bar__retail .krscds-sp-price-bar__value .woocommerce-Price-amount {
	font-size: 20px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1;
}

.krscds-sp-price-bar__retail del {
	text-decoration: line-through;
	opacity: 0.85;
}

.krscds-sp-price-bar__netto {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.75);
	margin-top: 2px;
	letter-spacing: 0.3px;
}

.krscds-sp-price-bar__retail .krscds-sp-price-bar__netto {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
}

.krscds-sp-price-bar__retail .krscds-sp-price-bar__netto del {
	opacity: 0.7;
}

/* --- Section labels (STAN PRODUKTU, WYMIARY PRODUKTU) --- */
.krscds-sp-section-label {
	font-size: 12px !important;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted, #666) !important;
	margin-top: 25px !important;
	margin-bottom: 12px !important;
	letter-spacing: 1px;
	font-weight: 600 !important;
}

/* --- Condition pills (5 pills, active highlighted) --- */
.krscds-sp-condition {
	margin-bottom: 5px;
}

.krscds-sp-condition__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.krscds-sp-condition__pill {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 20px;
	border: 1px solid var(--wp--preset--color--border, #E1E8ED);
	font-size: 12px;
	font-weight: 600;
	cursor: default;
	background: var(--wp--preset--color--background, #fff);
	color: var(--wp--preset--color--foreground, #111);
}

.krscds-sp-condition__pill svg {
	flex-shrink: 0;
}

.krscds-sp-condition__pill--active {
	border-color: #C0392B;
	background: #FFF0F3;
	color: #C0392B;
}

/* --- Dimensions table (4 columns) --- */
.krscds-sp-dimensions {
	margin-bottom: 25px;
}

.krscds-sp-dimensions__table {
	width: 100%;
	border-collapse: collapse;
}

.krscds-sp-dimensions__table th {
	background: var(--wp--preset--color--surface, #F7F9FB);
	padding: 10px 15px;
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--wp--preset--color--muted, #666);
	text-align: center;
	border: 1px solid var(--wp--preset--color--border, #E1E8ED);
}

.krscds-sp-dimensions__table td {
	padding: 12px 15px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	border: 1px solid var(--wp--preset--color--border, #E1E8ED);
	background: var(--wp--preset--color--background, #fff);
}

/* --- Stock display (green/red dot + label) --- */
.krscds-sp-stock {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 25px;
	font-size: 14px;
	font-weight: 600;
}

.krscds-sp-stock__dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.krscds-sp-stock--in {
	color: var(--wp--preset--color--success, #2E7D32);
}

.krscds-sp-stock--in .krscds-sp-stock__dot {
	background: var(--wp--preset--color--success, #2E7D32);
}

.krscds-sp-stock--out {
	color: #E63946;
}

.krscds-sp-stock--out .krscds-sp-stock__dot {
	background: #E63946;
}

/* --- Quantity selector ± (JS-enhanced wrapper) --- */
.krscds-sp-qty {
	display: flex;
	align-items: center;
	border: 1px solid var(--wp--preset--color--border, #E1E8ED);
	border-radius: 30px;
	height: 54px;
	padding: 0 20px;
	background: var(--wp--preset--color--background, #fff);
}

.krscds-sp-qty .qty {
	border: none !important;
	width: 40px !important;
	min-width: 40px !important;
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	padding: 0 !important;
	margin: 0 10px;
	-moz-appearance: textfield;
	background: transparent !important;
	box-shadow: none !important;
}

.krscds-sp-qty .qty::-webkit-outer-spin-button,
.krscds-sp-qty .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.krscds-sp-qty__btn {
	border: none;
	background: none;
	cursor: pointer;
	font-size: 20px;
	font-weight: 700;
	padding: 0;
	line-height: 1;
	color: var(--wp--preset--color--foreground, #111);
}

.krscds-sp-qty__btn:hover {
	color: #C0392B;
}

/* Make WC add-to-cart form a flex row */
.single-product .wp-block-woocommerce-add-to-cart-form form.cart {
	display: flex;
	gap: 15px;
	align-items: center;
}

/* Hide WC default quantity wrapper margin */
.single-product .wp-block-woocommerce-add-to-cart-form .quantity {
	margin: 0;
}

/* --- Add to cart button (gradient rose-gold → gold) --- */
.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button {
	background: linear-gradient(135deg, #B76E79, #D4A847) !important;
	color: #fff !important;
	border-radius: 25px !important;
	height: 54px;
	padding: 0 40px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	flex: 1;
	border: none !important;
	cursor: pointer;
	transition: box-shadow 0.3s, transform 0.3s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button:hover {
	box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4);
	transform: translateY(-1px);
}

/* Cart icon before button text */
.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 10px;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}

/* --- Custom tabs (Opis / Specyfikacja / Dane logistyczne) --- */
.krscds-sp-tabs {
	background: var(--wp--preset--color--background, #fff);
	border-radius: var(--wp--custom--border-radius--md, 16px);
	padding: 25px;
	box-shadow: var(--wp--custom--shadow--md, 0 4px 20px rgba(0, 0, 0, 0.05));
	margin-top: var(--wp--preset--spacing--70, 3rem);
}

.krscds-sp-tabs__nav {
	display: flex;
	gap: 40px;
	border-bottom: 1px solid var(--wp--preset--color--border, #E1E8ED);
	margin-bottom: 30px;
}

.krscds-sp-tabs__tab {
	padding: 15px 0;
	font-weight: 700;
	color: var(--wp--preset--color--muted, #666);
	cursor: pointer;
	border: none;
	background: none;
	border-bottom: 3px solid transparent;
	transition: color 0.2s, border-color 0.2s;
	font-family: inherit;
	font-size: inherit;
	margin-bottom: -1px;
}

.krscds-sp-tabs__tab:hover {
	color: var(--wp--preset--color--foreground, #111);
}

.krscds-sp-tabs__tab--active {
	color: #C0392B;
	border-bottom-color: #C0392B;
}

.krscds-sp-tabs__panel {
	font-size: 15px;
	line-height: 1.8;
	color: var(--wp--preset--color--muted, #666);
}

.krscds-sp-tabs__panel ul {
	margin-top: 20px;
	list-style: disc;
	margin-left: 20px;
}

/* Specification/logistics table inside tabs */
.krscds-sp-spec-table {
	width: 100%;
	border-collapse: collapse;
}

.krscds-sp-spec-table th {
	background: var(--wp--preset--color--surface, #F7F9FB);
	padding: 10px 15px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wp--preset--color--muted, #666);
	text-align: left;
	border: 1px solid var(--wp--preset--color--border, #E1E8ED);
	width: 40%;
}

.krscds-sp-spec-table td {
	padding: 10px 15px;
	font-size: 14px;
	border: 1px solid var(--wp--preset--color--border, #E1E8ED);
	background: var(--wp--preset--color--background, #fff);
}

/* --- Related products header with "Zobacz wszystko" link --- */
.krscds-sp-related__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.krscds-sp-related__header h2 {
	margin-bottom: 0 !important;
}

.krscds-sp-related__link {
	color: #C0392B;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	border-bottom: 2px solid #C0392B;
	transition: color 0.2s, border-color 0.2s;
	white-space: nowrap;
}

.krscds-sp-related__link:hover {
	color: var(--wp--preset--color--rose-gold, #B76E79);
	border-color: var(--wp--preset--color--rose-gold, #B76E79);
}

/* --- Single product: title sizing --- */
.single-product .wp-block-post-title {
	font-size: 32px !important;
	margin-bottom: 20px !important;
	line-height: 1.2 !important;
}

/* --- Single product: short description --- */
.single-product .wp-block-post-excerpt__excerpt {
	font-size: 15px;
	line-height: 1.7;
	color: var(--wp--preset--color--muted, #666);
	margin-bottom: 25px;
}

/* --- Single product: responsive --- */
@media (max-width: 992px) {
	.krscds-sp-price-bar {
		flex-direction: column;
		gap: 10px;
	}

	.krscds-sp-condition__row {
		flex-wrap: wrap;
	}

	.single-product .wp-block-woocommerce-add-to-cart-form form.cart {
		flex-direction: column;
	}

	.krscds-sp-qty {
		width: 100%;
		justify-content: center;
	}

	.single-product .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button {
		width: 100%;
	}
}

@media (max-width: 576px) {
	.krscds-sp-price-bar__net .krscds-sp-price-bar__value,
	.krscds-sp-price-bar__net .krscds-sp-price-bar__value .woocommerce-Price-amount {
		font-size: 26px;
	}

	.single-product .wp-block-post-title {
		font-size: 24px !important;
	}

	.krscds-sp-tabs__nav {
		gap: 20px;
	}
}

/* --- Single product: gallery sticky on scroll (desktop) --- */
@media (min-width: 769px) {
	.single-product .wp-block-columns > .wp-block-column:first-child {
		position: sticky;
		top: calc(var(--wp--custom--header--total-height, 170px) + var(--wp--preset--spacing--40, 1rem));
		align-self: flex-start;
	}
}

/* --- Single product: responsive layout --- */
@media (max-width: 768px) {
	.single-product .wp-block-columns {
		flex-direction: column;
	}

	.single-product .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ==========================================================================
   DEFECT ACCEPTANCE — EU directive compliance notice
   ========================================================================== */

/* Notice container: warm amber gradient, prominent but not alarming */
.krscds-defect-notice {
	background: linear-gradient(135deg, #FFF8E1, #FFF3E0);
	border: 1px solid #FFB74D;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 25px;
}

/* Header row: icon + title */
.krscds-defect-notice__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	color: #E65100;
	font-size: 15px;
}

.krscds-defect-notice__header svg {
	flex-shrink: 0;
	color: #E65100;
}

/* Description text */
.krscds-defect-notice__desc {
	font-size: 14px;
	line-height: 1.6;
	color: var(--wp--preset--color--foreground, #111);
	margin-bottom: 16px;
	padding-left: 30px;
}

.krscds-defect-notice__desc p {
	margin: 0 0 8px;
}

.krscds-defect-notice__desc p:last-child {
	margin-bottom: 0;
}

/* Acceptance checkbox row */
.krscds-defect-notice__accept {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: border-color 0.2s;
	font-size: 13px;
	line-height: 1.5;
	color: var(--wp--preset--color--foreground, #111);
}

.krscds-defect-notice__accept:hover {
	border-color: #FFB74D;
}

/* Error state when user tries to submit without checking */
.krscds-defect-notice__accept--error {
	border-color: var(--wp--preset--color--error, #D32F2F);
	animation: krscds-shake 0.4s ease;
}

/* Checkbox input */
.krscds-defect-notice__checkbox {
	margin-top: 2px;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	accent-color: #E65100;
}

/* Disabled ATC button state when checkbox unchecked */
.krscds-defect-btn-disabled {
	opacity: 0.5 !important;
	pointer-events: none !important;
	cursor: not-allowed !important;
}

@keyframes krscds-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	50% { transform: translateX(5px); }
	75% { transform: translateX(-3px); }
}

/* Responsive: defect notice */
@media (max-width: 576px) {
	.krscds-defect-notice {
		padding: 15px;
	}

	.krscds-defect-notice__desc {
		padding-left: 0;
	}
}

/* Loop: "Zobacz produkt" link replacing ATC for all products.
   Inherits standard card-button styles via .wp-block-button__link;
   only text-decoration override needed. */
.krscds-view-product-link {
	text-decoration: none;
}

/* ==========================================================================
   DUAL PRICING — net + gross B2B price display
   ========================================================================== */

/* Wrapper: B2C pricing — our price + optional retail strikethrough */
.krscds-price-dual {
	display: flex;
	flex-direction: column;
	gap: 2px;
	line-height: 1.3;
}

/* Our price: large, bold, primary color */
.krscds-price-ours {
	font-size: 20px;
	font-weight: 800;
	color: var(--wp--preset--color--primary);
}

/* Retail price: small, muted, always strikethrough */
.krscds-price-retail {
	font-size: 13px;
	font-weight: 400;
	color: var(--wp--preset--color--muted);
}

.krscds-price-retail del {
	text-decoration: line-through;
	opacity: 0.7;
}

/* "cena detaliczna" label */
.krscds-price-retail .krscds-price-label {
	font-size: 11px;
	font-weight: 400;
	margin-left: 4px;
}

/* WC wraps amounts in <bdi>/<span class="amount"> — reset
   inherited color so our/retail lines control it. */
.krscds-price-ours .woocommerce-Price-amount,
.krscds-price-ours .amount {
	color: inherit;
}

.krscds-price-retail .woocommerce-Price-amount,
.krscds-price-retail .amount {
	color: inherit;
}

/* Product loop cards: slightly smaller sizing */
.wc-block-grid__product .krscds-price-ours,
ul.products .krscds-price-ours {
	font-size: 18px;
}

.wc-block-grid__product .krscds-price-retail,
ul.products .krscds-price-retail {
	font-size: 12px;
}

/* Loop/grid cards: inline price layout (our + retail on same row) */
.wp-block-woocommerce-product-template .krscds-price-dual,
.wc-block-grid__product .krscds-price-dual,
ul.products .krscds-price-dual {
	flex-direction: row;
	align-items: baseline;
	gap: 15px;
}

/* Single product page: larger sizing */
.single-product .krscds-price-ours {
	font-size: 28px;
}

.single-product .krscds-price-retail {
	font-size: 15px;
}

/* Quick view modal: match loop sizing */
.krscds-quick-view__price .krscds-price-ours {
	font-size: 22px;
}

/* Mini cart: compact inline pricing */
.krscds-mini-cart-panel__item .krscds-price-dual {
	flex-direction: row;
	gap: 6px;
	align-items: baseline;
}

.krscds-mini-cart-panel__item .krscds-price-ours {
	font-size: 14px;
	font-weight: 700;
}

.krscds-mini-cart-panel__item .krscds-price-retail {
	font-size: 11px;
}

/* Hide "cena detaliczna" label in mini cart for space */
.krscds-mini-cart-panel__item .krscds-price-label {
	display: none;
}

/* ==========================================================================
   HOMEPAGE — 3-column layout + sidebar cards
   ========================================================================== */

/* --- 3-Column Grid --- */
.krscds-homepage__grid {
	align-items: flex-start;
}

/* Left sidebar: sticky on scroll */
@media (min-width: 993px) {
	.krscds-homepage__sidebar-left {
		position: sticky;
		top: calc(var(--wp--custom--header--total-height, 170px) + var(--wp--preset--spacing--40, 1rem));
		align-self: flex-start;
	}

	.krscds-homepage__sidebar-right {
		position: sticky;
		top: calc(var(--wp--custom--header--total-height, 170px) + var(--wp--preset--spacing--40, 1rem));
		align-self: flex-start;
	}
}

/* --- Center column: consistent spacing between children --- */
.krscds-homepage__center > * + * {
	margin-top: 30px;
}

/* --- Right sidebar: spacing between children --- */
.krscds-homepage__sidebar-right > * + * {
	margin-top: 20px;
}

/* --- Category sidebar heading (dark bar) --- */
.krscds-homepage__sidebar-heading {
	font-size: 14px !important;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700 !important;
	padding: 20px !important;
	margin: 0 !important;
	background: var(--wp--preset--color--secondary, #1A1A2E);
	color: var(--wp--preset--color--background, #fff) !important;
	border-radius: var(--wp--custom--border-radius--md, 16px) var(--wp--custom--border-radius--md, 16px) 0 0;
	box-shadow: var(--wp--custom--shadow--md, 0 4px 20px rgba(0, 0, 0, 0.05));
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Remove WP block gap between heading and category grid so they
   form one seamless card (dark header + white list body). */
.krscds-homepage__sidebar-left > * + * {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}

/* Space between categories card and filter card in shop sidebar */
.krscds-shop-sidebar .krscds-shop-sidebar__categories {
	margin-bottom: var(--wp--preset--spacing--60, 2rem) !important;
}

/* Category grid in sidebar: compact list mode (homepage + shop) */
.krscds-homepage__sidebar-left .krscds-category-grid,
.krscds-shop-sidebar .krscds-category-grid {
	background: var(--wp--preset--color--background, #fff);
	border-radius: 0 0 var(--wp--custom--border-radius--md, 16px) var(--wp--custom--border-radius--md, 16px);
	box-shadow: var(--wp--custom--shadow--md, 0 4px 20px rgba(0, 0, 0, 0.05));
	overflow: hidden;
	container-type: normal !important;
}

/* Override block's grid display with flex column — !important needed
   to beat the block's container queries at @container (max-width: 480px) */
.krscds-homepage__sidebar-left .krscds-category-grid__list,
.krscds-shop-sidebar .krscds-category-grid__list {
	display: flex !important;
	flex-direction: column !important;
	gap: 0 !important;
	grid-template-columns: none !important;
}

/* Card: compact horizontal row (icon + name + count) */
.krscds-homepage__sidebar-left .krscds-category-grid__card,
.krscds-shop-sidebar .krscds-category-grid__card {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	text-align: left !important;
	gap: 10px;
	padding: 14px 20px !important;
	border-radius: 0 !important;
	border: none !important;
	border-bottom: 1px solid var(--wp--preset--color--border, #e0e0e0) !important;
	background: none !important;
	box-shadow: none !important;
	text-decoration: none;
	color: var(--wp--preset--color--foreground, #111);
	transition: background var(--wp--custom--transition--fast, 150ms ease),
		padding-left var(--wp--custom--transition--fast, 150ms ease);
	transform: none !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__card:last-child,
.krscds-shop-sidebar .krscds-category-grid__card:last-child {
	border-bottom: none !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__card:hover,
.krscds-shop-sidebar .krscds-category-grid__card:hover {
	background: var(--wp--preset--color--surface, #f5f5f5) !important;
	padding-left: 24px !important;
	transform: none !important;
	color: var(--wp--preset--color--primary, #E53935);
}

/* Prevent icon from turning white on hover (block default sets
   color: background on hover, invisible on white sidebar bg) */
.krscds-homepage__sidebar-left .krscds-category-grid__card:hover .krscds-category-grid__icon,
.krscds-shop-sidebar .krscds-category-grid__card:hover .krscds-category-grid__icon {
	color: var(--wp--preset--color--primary, #E53935) !important;
	background: transparent !important;
}

/* Icon: small inline, no circle background */
.krscds-homepage__sidebar-left .krscds-category-grid__icon,
.krscds-shop-sidebar .krscds-category-grid__icon {
	width: 24px !important;
	height: 24px !important;
	flex-shrink: 0;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--wp--preset--color--primary, #E53935);
}

.krscds-homepage__sidebar-left .krscds-category-grid__icon svg,
.krscds-shop-sidebar .krscds-category-grid__icon svg {
	width: 24px !important;
	height: 24px !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__name,
.krscds-shop-sidebar .krscds-category-grid__name {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
}

.krscds-homepage__sidebar-left .krscds-category-grid__count,
.krscds-shop-sidebar .krscds-category-grid__count {
	background: var(--wp--preset--color--surface, #f5f5f5);
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
	color: var(--wp--preset--color--muted, #757575);
	margin-left: auto;
	white-space: nowrap;
}

/* --- Expandable subcategories in sidebar --- */

/* Item wrapper: restore block layout from display:contents */
.krscds-homepage__sidebar-left .krscds-category-grid__item,
.krscds-shop-sidebar .krscds-category-grid__item {
	display: block !important;
}

/* Card row: horizontal layout with toggle button */
.krscds-homepage__sidebar-left .krscds-category-grid__card-row,
.krscds-shop-sidebar .krscds-category-grid__card-row {
	display: flex !important;
	align-items: center;
	border-bottom: 1px solid var(--wp--preset--color--border, #e0e0e0);
}

/* Card inside card-row: remove its own border-bottom (row has it) */
.krscds-homepage__sidebar-left .krscds-category-grid__card-row .krscds-category-grid__card,
.krscds-shop-sidebar .krscds-category-grid__card-row .krscds-category-grid__card {
	border-bottom: none !important;
	flex: 1;
	min-width: 0;
}

/* Last item in list: no border on the card-row */
.krscds-homepage__sidebar-left .krscds-category-grid__item:last-child .krscds-category-grid__card-row,
.krscds-shop-sidebar .krscds-category-grid__item:last-child .krscds-category-grid__card-row {
	border-bottom: none;
}

/* Toggle button (chevron) */
.krscds-homepage__sidebar-left .krscds-category-grid__toggle,
.krscds-shop-sidebar .krscds-category-grid__toggle {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	background: none;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	color: var(--wp--preset--color--muted, #757575);
	padding: 0;
	margin-right: 8px;
	transition: color 150ms ease, background 150ms ease, transform 200ms ease;
}

.krscds-homepage__sidebar-left .krscds-category-grid__toggle:hover,
.krscds-shop-sidebar .krscds-category-grid__toggle:hover {
	background: var(--wp--preset--color--surface, #f5f5f5);
	color: var(--wp--preset--color--primary, #E53935);
}

/* Rotate chevron when expanded */
.krscds-homepage__sidebar-left .krscds-category-grid__item--expanded > .krscds-category-grid__card-row > .krscds-category-grid__toggle,
.krscds-shop-sidebar .krscds-category-grid__item--expanded > .krscds-category-grid__card-row > .krscds-category-grid__toggle {
	transform: rotate(90deg);
	color: var(--wp--preset--color--primary, #E53935);
}

/* Children container */
.krscds-homepage__sidebar-left .krscds-category-grid__children,
.krscds-shop-sidebar .krscds-category-grid__children {
	display: block !important;
	background: var(--wp--preset--color--surface, #f5f5f5);
	border-bottom: 1px solid var(--wp--preset--color--border, #e0e0e0);
}

.krscds-homepage__sidebar-left .krscds-category-grid__children[hidden],
.krscds-shop-sidebar .krscds-category-grid__children[hidden] {
	display: none !important;
}

/* Last item children: no bottom border */
.krscds-homepage__sidebar-left .krscds-category-grid__item:last-child .krscds-category-grid__children,
.krscds-shop-sidebar .krscds-category-grid__item:last-child .krscds-category-grid__children {
	border-bottom: none;
}

/* Child cards: indented, smaller, no icon */
.krscds-homepage__sidebar-left .krscds-category-grid__card--child,
.krscds-shop-sidebar .krscds-category-grid__card--child {
	padding: 10px 20px 10px 54px !important;
	font-size: 13px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
	background: none !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__card--child:last-child,
.krscds-shop-sidebar .krscds-category-grid__card--child:last-child {
	border-bottom: none !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__card--child:hover,
.krscds-shop-sidebar .krscds-category-grid__card--child:hover {
	padding-left: 58px !important;
	background: rgba(0, 0, 0, 0.03) !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__card--child .krscds-category-grid__name,
.krscds-shop-sidebar .krscds-category-grid__card--child .krscds-category-grid__name {
	font-weight: 400;
	font-size: 13px;
}

/* Active category: highlighted with primary color + left accent bar */
.krscds-homepage__sidebar-left .krscds-category-grid__card--active,
.krscds-shop-sidebar .krscds-category-grid__card--active {
	color: var(--wp--preset--color--primary, #E53935) !important;
	background: rgba(229, 57, 53, 0.06) !important;
	box-shadow: inset 3px 0 0 var(--wp--preset--color--primary, #E53935) !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__card--active .krscds-category-grid__name,
.krscds-shop-sidebar .krscds-category-grid__card--active .krscds-category-grid__name {
	font-weight: 700;
	color: var(--wp--preset--color--primary, #E53935);
}

.krscds-homepage__sidebar-left .krscds-category-grid__card--active .krscds-category-grid__icon,
.krscds-shop-sidebar .krscds-category-grid__card--active .krscds-category-grid__icon {
	color: var(--wp--preset--color--primary, #E53935) !important;
}

.krscds-homepage__sidebar-left .krscds-category-grid__card--active .krscds-category-grid__count,
.krscds-shop-sidebar .krscds-category-grid__card--active .krscds-category-grid__count {
	background: var(--wp--preset--color--primary, #E53935);
	color: #fff;
}

/* --- "Zobacz wszystko" link — red with underline, matching prototype --- */
.krscds-homepage__bestsellers .has-sm-font-size a {
	color: var(--wp--preset--color--primary, #C0392B) !important;
	font-weight: 700;
	font-size: 14px;
	border-bottom: 2px solid var(--wp--preset--color--primary, #C0392B);
	padding-bottom: 2px;
	transition: color 0.2s ease, border-color 0.2s ease;
	text-decoration: none !important;
}

.krscds-homepage__bestsellers .has-sm-font-size a:hover {
	color: var(--wp--preset--color--rose-gold, #B76E79) !important;
	border-color: var(--wp--preset--color--rose-gold, #B76E79);
}

/* --- Bestsellers section header — align bottom like prototype --- */
.krscds-homepage__bestsellers .wp-block-group[class*="is-layout-flex"] {
	align-items: flex-end !important;
}

/* --- Bestsellers heading — 28px, 800 weight --- */
.krscds-homepage__bestsellers .wp-block-heading.has-xl-font-size {
	font-size: 28px !important;
	font-weight: 800 !important;
}

/* --- Sidebar Cards (BOX & PALETY) --- */

.krscds-sidebar-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	border-radius: var(--wp--custom--border-radius--md, 16px);
	padding: 30px 20px;
	transition: transform var(--wp--custom--transition--fast, 150ms ease),
		box-shadow var(--wp--custom--transition--fast, 150ms ease);
	text-decoration: none;
	position: relative;
	overflow: hidden;
}

.krscds-sidebar-card__icon {
	display: block;
	margin-bottom: 12px;
}

/* Override theme.json heading color that makes dark-bg titles invisible */
.krscds-sidebar-card__title {
	font-size: var(--wp--preset--font-size--lg, 1.25rem);
	font-weight: 800;
	text-transform: uppercase;
	margin: 0 0 8px;
	color: inherit !important;
}

.krscds-sidebar-card__desc {
	font-size: var(--wp--preset--font-size--xs, 0.75rem);
	line-height: 1.5;
	margin: 0;
	opacity: 0.7;
}

/* BOX card — dark navy */
.krscds-sidebar-card--box {
	background: linear-gradient(135deg, var(--wp--preset--color--secondary, #1A1A2E), #16213E);
	color: #fff;
	box-shadow: 0 8px 25px rgba(22, 33, 62, 0.3);
	cursor: pointer;
}

.krscds-sidebar-card--box:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 35px rgba(22, 33, 62, 0.4);
	color: #fff;
}

/* PALETY card — disabled/locked */
.krscds-sidebar-card--pallet {
	background: #e8e8e8;
	color: #999;
	border: 2px dashed #ccc;
	cursor: not-allowed;
}

.krscds-sidebar-card__locked {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(0, 0, 0, 0.1);
	color: #999;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: var(--wp--custom--border-radius--sm, 4px);
	text-transform: uppercase;
}

/* --- Category Count Board (right sidebar, compact grid) --- */
.krscds-sidebar-catboard {
	background: var(--wp--preset--color--surface, #F7F9FB);
	border: 1px solid var(--wp--preset--color--border, #E1E8ED);
	border-radius: var(--wp--custom--border-radius--sm, 8px);
	padding: 14px 10px 10px;
	margin-top: 16px;
}

.krscds-sidebar-catboard::before {
	content: "Kategorie";
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wp--preset--color--secondary, #1A1A2E);
	margin-bottom: 10px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--wp--preset--color--primary, #E53935);
}

/* Override grid to single-column compact list */
.krscds-sidebar-catboard .krscds-category-grid__list {
	display: flex !important;
	flex-direction: column !important;
	gap: 2px !important;
}

.krscds-sidebar-catboard .krscds-category-grid__card {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	padding: 5px 8px;
	gap: 6px;
	border-radius: 4px;
	text-decoration: none;
	transition: background var(--wp--custom--transition--fast, 150ms ease);
	border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.krscds-sidebar-catboard .krscds-category-grid__card:last-child {
	border-bottom: none;
}

.krscds-sidebar-catboard .krscds-category-grid__card:hover {
	background: rgba(0, 0, 0, 0.04);
}

.krscds-sidebar-catboard .krscds-category-grid__icon {
	display: none !important;
}

.krscds-sidebar-catboard .krscds-category-grid__name {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--wp--preset--color--foreground, #111);
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.krscds-sidebar-catboard .krscds-category-grid__count {
	font-size: 10px;
	font-weight: 700;
	color: var(--wp--preset--color--primary, #E53935);
	background: rgba(229, 57, 53, 0.08);
	padding: 1px 6px;
	border-radius: 10px;
	min-width: 20px;
	text-align: center;
	flex-shrink: 0;
	line-height: 1.4;
}

/* --- Homepage Responsive --- */

/* Tablet: stack columns, categories as horizontal scroll strip */
@media (max-width: 992px) {
	.krscds-homepage__grid {
		flex-wrap: wrap !important;
	}

	.krscds-homepage__sidebar-left {
		flex-basis: 100% !important;
		order: -1;
	}

	.krscds-homepage__sidebar-right {
		flex-basis: 100% !important;
		order: 3;
	}

	.krscds-homepage__center {
		flex-basis: 100% !important;
	}

	.krscds-homepage__sidebar-heading {
		border-radius: var(--wp--custom--border-radius--md, 16px) var(--wp--custom--border-radius--md, 16px) 0 0;
	}

	/* Category grid → horizontal scroll strip */
	.krscds-homepage__sidebar-left .krscds-category-grid__list {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.krscds-homepage__sidebar-left .krscds-category-grid__list::-webkit-scrollbar {
		display: none;
	}

	/* Flatten wrappers so cards scroll inline */
	.krscds-homepage__sidebar-left .krscds-category-grid__item {
		display: contents !important;
	}

	.krscds-homepage__sidebar-left .krscds-category-grid__card-row {
		display: contents !important;
	}

	/* Hide toggle + children in scroll mode */
	.krscds-homepage__sidebar-left .krscds-category-grid__toggle {
		display: none !important;
	}

	.krscds-homepage__sidebar-left .krscds-category-grid__children {
		display: none !important;
	}

	.krscds-homepage__sidebar-left .krscds-category-grid__card {
		flex-shrink: 0;
		flex-direction: column !important;
		padding: 12px 16px !important;
		min-width: 100px;
		text-align: center !important;
		border-bottom: none !important;
		border-right: 1px solid var(--wp--preset--color--border, #e0e0e0) !important;
	}

	.krscds-homepage__sidebar-left .krscds-category-grid__card:last-child {
		border-right: none !important;
	}

	.krscds-homepage__sidebar-left .krscds-category-grid__count {
		display: none;
	}

	/* Right sidebar → horizontal row */
	.krscds-homepage__sidebar-right {
		display: flex;
		flex-direction: row;
		gap: var(--wp--preset--spacing--40, 1rem);
	}

	.krscds-homepage__sidebar-right > * + * {
		margin-top: 0;
	}

	.krscds-homepage__sidebar-right .krscds-sidebar-card {
		flex: 1;
	}
}

/*
 * Phone: categories become 2-column CSS Grid (not flex).
 * CSS Grid handles the mixed HTML structure (some cards wrapped in
 * .krscds-category-grid__item, others are bare <a> links) correctly
 * because every direct child becomes a grid item regardless of tag.
 */
@media (max-width: 576px) {
	/* Switch from flex to CSS Grid — 2 columns */
	.krscds-homepage__sidebar-left .krscds-category-grid__list {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr) !important;
		flex-direction: unset !important;
		flex-wrap: unset !important;
		overflow-x: visible !important;
		gap: 0 !important;
	}

	/* Item wrapper (categories with children): display block, not contents */
	.krscds-homepage__sidebar-left .krscds-category-grid__item {
		display: block !important;
	}

	/* Card-row wrapper: don't need flex layout */
	.krscds-homepage__sidebar-left .krscds-category-grid__card-row {
		display: block !important;
	}

	/* Card styling: column layout with centered icon */
	.krscds-homepage__sidebar-left .krscds-category-grid__card {
		flex-direction: column !important;
		text-align: center !important;
		padding: 10px 6px !important;
		min-width: 0 !important;
		border-bottom: 1px solid var(--wp--preset--color--border, #e0e0e0) !important;
		border-right: 1px solid var(--wp--preset--color--border, #e0e0e0) !important;
		justify-content: center;
		align-items: center;
	}

	/* Remove right border on even columns (2nd column) */
	.krscds-homepage__sidebar-left .krscds-category-grid__list > :nth-child(2n) > .krscds-category-grid__card-row > .krscds-category-grid__card,
	.krscds-homepage__sidebar-left .krscds-category-grid__list > a.krscds-category-grid__card:nth-child(2n) {
		border-right: none !important;
	}

	/* Smaller icons for compact grid */
	.krscds-homepage__sidebar-left .krscds-category-grid__icon svg {
		width: 24px !important;
		height: 24px !important;
	}

	/* Smaller category name */
	.krscds-homepage__sidebar-left .krscds-category-grid__name {
		font-size: 11px !important;
		white-space: normal !important;
		line-height: 1.2;
	}

	/* Limit section height — show ~6 categories (3 rows), rest scrollable */
	.krscds-homepage__sidebar-left .krscds-category-grid {
		max-height: 240px;
		overflow-y: auto;
		border-radius: 0 0 var(--wp--custom--border-radius--md, 16px) var(--wp--custom--border-radius--md, 16px);
	}

	/* Fade hint at bottom to signal more content */
	.krscds-homepage__sidebar-left .krscds-category-grid::after {
		content: '';
		position: sticky;
		bottom: 0;
		left: 0;
		right: 0;
		display: block;
		height: 30px;
		background: linear-gradient(transparent, rgba(255,255,255,0.9));
		pointer-events: none;
	}
}

/* ==========================================================================
   PRODUCT CARDS — WooCommerce grid override
   Targets both product-collection blocks (FSE templates) and classic
   WC .products grids.  Matches the prototype card design: white cards
   with rose-gold hover border, pill-shaped CTA, 1:1 image ratio.
   ========================================================================== */

/* --- Grid wrapper: consistent gap --- */
.wc-block-grid,
.wp-block-woocommerce-product-template,
.woocommerce ul.products {
	gap: 25px;
}

/* --- Card container --- */
.wc-block-grid__product,
.wp-block-woocommerce-product-template > .wc-block-product,
.wp-block-woocommerce-product-template > li,
.woocommerce ul.products li.product {
	background: var(--wp--preset--color--background, #fff);
	border-radius: var(--wp--custom--border-radius--md, 16px);
	padding: 20px;
	position: relative;
	border: 1px solid transparent;
	transition: transform 0.3s ease,
		box-shadow 0.3s ease,
		border-color 0.3s ease;
}

.wc-block-grid__product:hover,
.wp-block-woocommerce-product-template > .wc-block-product:hover,
.wp-block-woocommerce-product-template > li:hover,
.woocommerce ul.products li.product:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
	border-color: var(--wp--preset--color--rose-gold, #B76E79);
}

/* --- Product image: 1:1 aspect ratio, rounded, soft background --- */
.wc-block-grid__product-image,
.wp-block-woocommerce-product-image,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail,
.woocommerce ul.products li.product img {
	border-radius: var(--wp--custom--border-radius--sm, 8px) !important;
}

/* Image wrapper: force 1:1 ratio with background fill */
.wc-block-grid__product-image,
.wp-block-woocommerce-product-image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #F0F4F8;
	border-radius: var(--wp--custom--border-radius--sm, 8px);
	margin-bottom: 12px;
}

.wc-block-grid__product-image img,
.wp-block-woocommerce-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.woocommerce ul.products li.product a img {
	background: #F0F4F8;
	border-radius: var(--wp--custom--border-radius--sm, 8px) !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin-bottom: 12px;
}

/* --- Product title: 14px, 600 weight, 2-line clamp --- */
.wc-block-grid__product-title,
.wp-block-woocommerce-product-template .wp-block-post-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	max-height: 40px;
	overflow: hidden;
	display: -webkit-box !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	margin-bottom: 8px !important;
	margin-top: 0 !important;
	padding: 0 !important;
	color: var(--wp--preset--color--foreground, #212121);
}

/* Title link: no underline/border, dark color (not theme link color) */
.wc-block-grid__product-title a,
.wp-block-woocommerce-product-template .wp-block-post-title a,
.wc-block-product-template .wp-block-post-title a,
.wp-block-woocommerce-product-collection .wp-block-post-title a,
.woocommerce ul.products li.product .woocommerce-loop-product__title a {
	text-decoration: none !important;
	border-bottom: none !important;
	color: var(--wp--preset--color--foreground, #1A1A1A) !important;
}

/* --- Product price: 20px, 800 weight, primary red --- */
.wc-block-grid__product-price,
.wp-block-woocommerce-product-price,
.woocommerce ul.products li.product .price {
	font-size: 20px !important;
	font-weight: 800 !important;
	color: var(--wp--preset--color--primary, #E53935) !important;
	margin-bottom: 12px !important;
	line-height: 1.3;
}

/* Gross/old price (del/ins/small within price) */
.wc-block-grid__product-price del,
.wp-block-woocommerce-product-price del,
.woocommerce ul.products li.product .price del {
	font-size: 13px !important;
	font-weight: 400 !important;
	color: var(--wp--preset--color--muted, #757575) !important;
	text-decoration: line-through;
	opacity: 0.8;
}

.wc-block-grid__product-price ins,
.wp-block-woocommerce-product-price ins,
.woocommerce ul.products li.product .price ins {
	text-decoration: none;
}

/* Price suffix (e.g. "netto") */
.wc-block-grid__product-price .wc-block-components-product-price__value,
.wp-block-woocommerce-product-price .wc-block-components-product-price__value {
	font-size: 20px;
	font-weight: 800;
	color: var(--wp--preset--color--primary, #E53935);
}

/* --- Add to Cart button: pill-shaped, soft bg, uppercase --- */
.wc-block-grid__product-add-to-cart .wp-block-button__link,
.wc-block-grid__product-add-to-cart .wc-block-components-product-button__button,
.wp-block-woocommerce-product-button .wc-block-components-product-button__button,
.wp-block-woocommerce-product-button .wp-block-button__link,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
	width: 100% !important;
	display: block !important;
	box-sizing: border-box;
	background: #FBF5F0 !important;
	color: var(--wp--preset--color--foreground, #1A1A1A) !important;
	border: none !important;
	padding: 12px 16px !important;
	border-radius: 20px !important;
	font-weight: 700 !important;
	font-size: 11px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em;
	cursor: pointer;
	text-align: center !important;
	text-decoration: none !important;
	transition: background 0.25s ease,
		color 0.25s ease;
	line-height: 1.4 !important;
	margin-top: auto;
}

/* Button hover: gradient rose-gold → gold, white text */
.wc-block-grid__product:hover .wp-block-button__link,
.wc-block-grid__product:hover .wc-block-components-product-button__button,
.wp-block-woocommerce-product-template > li:hover .wc-block-components-product-button__button,
.wp-block-woocommerce-product-template > li:hover .wp-block-button__link,
.wp-block-woocommerce-product-template > .wc-block-product:hover .wc-block-components-product-button__button,
.woocommerce ul.products li.product:hover .button,
.woocommerce ul.products li.product:hover .add_to_cart_button {
	background: linear-gradient(135deg,
		var(--wp--preset--color--rose-gold, #B76E79),
		var(--wp--preset--color--gold, #D4A847)) !important;
	color: #fff !important;
}

/* Button focus ring */
.wc-block-grid__product-add-to-cart .wp-block-button__link:focus-visible,
.wp-block-woocommerce-product-button .wc-block-components-product-button__button:focus-visible,
.woocommerce ul.products li.product .button:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #E53935);
	outline-offset: 2px;
}

/* --- Sale badge: HIDDEN in B2C model (all products use regular/sale
   mechanism, so badge would appear on every product) --- */
.wc-block-grid__product .wc-block-components-product-sale-badge,
.wp-block-woocommerce-product-template .wc-block-components-product-sale-badge,
.woocommerce ul.products li.product .onsale,
.single-product .onsale,
span.onsale,
.woocommerce span.onsale {
	display: none !important;
}

/* --- Promotional badge (NOWOŚĆ/BESTSELLER/HURT): absolute top-right on card --- */
.krscds-promo-badge {
	position: absolute;
	top: 15px;
	right: 15px;
	background: linear-gradient(135deg,
		var(--wp--preset--color--rose-gold, #B76E79),
		var(--wp--preset--color--gold, #D4A847));
	color: #fff;
	padding: 4px 12px;
	border-radius: var(--wp--custom--border-radius--sm, 4px);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	line-height: 1.6;
	white-space: nowrap;
	z-index: 10;
	pointer-events: none;
}

/* =========================================================
   PRODUCT CARD — matches prototype 1:1
   Order: REF → Price → Image → Title → Condition → Dims → Button → Stock
   ========================================================= */

/* --- Card container: white, rounded, padded, hover lift --- */
.wp-block-woocommerce-product-template > li,
.wp-block-woocommerce-product-template > .wc-block-product {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	padding: 20px;
	position: relative;
	transition: transform 0.3s, box-shadow 0.3s;
	border: 1px solid transparent;
	box-sizing: border-box;
}

/* Fix WC product-collection 2-column grid (WC sets width:100% as base) */
.wc-block-product-template.is-flex-container.columns-2 > li {
	width: calc((100% - 25px) / 2) !important;
}
.wc-block-product-template.is-flex-container.columns-3 > li {
	width: calc((100% - 50px) / 3) !important;
}
.wp-block-woocommerce-product-template > li:hover,
.wp-block-woocommerce-product-template > .wc-block-product:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
	border-color: var(--wp--preset--color--rose-gold, #B76E79);
}

/* Classic WC grid cards (fallback) */
.wc-block-grid__product {
	display: flex;
	flex-direction: column;
}

/* --- REF/SKU badge: monospace tag (first element in card) --- */
.krscds-ref-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	color: var(--wp--preset--color--muted, #666);
	background: var(--wp--preset--color--surface, #F7F9FB);
	padding: 3px 10px;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
	align-self: flex-start;
}

/* --- Product image: rounded, light bg --- */
.wp-block-woocommerce-product-template .wc-block-components-product-image,
.wp-block-woocommerce-product-template .wp-block-woocommerce-product-image {
	border-radius: 8px;
	overflow: hidden;
	background: #F0F4F8;
	margin-bottom: 12px;
}
.wp-block-woocommerce-product-template .wc-block-components-product-image img {
	border-radius: 8px;
}

/* --- Product title: 2-line clamp, dark color --- */
.wp-block-woocommerce-product-template .wp-block-post-title {
	font-size: 14px !important;
	font-weight: 600 !important;
	margin-bottom: 8px !important;
	line-height: 1.4 !important;
	height: 40px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* --- Condition badge: small fitted tag after title --- */
.krscds-condition-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	margin-bottom: 10px;
	text-transform: uppercase;
	align-self: flex-start;
}
.krscds-condition--new {
	background: #E8F5E9;
	color: #2E7D32;
}
.krscds-condition--checked {
	background: #E3F2FD;
	color: #1565C0;
}
.krscds-condition--used {
	background: #FFF3E0;
	color: #E65100;
}
.krscds-condition--very-good {
	background: #F3E5F5;
	color: #7B1FA2;
}
.krscds-condition--good {
	background: #ECEFF1;
	color: #546E7A;
}
.krscds-condition--unchecked {
	background: #FFF8E1;
	color: #F9A825;
}
.krscds-condition--default {
	background: #ECEFF1;
	color: #546E7A;
}

/* --- Box contents matrix (category breakdown) --- */

.krscds-box-contents--compact {
	font-size: 11px;
	color: var(--wp--preset--color--muted);
	margin-top: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.krscds-box-contents--full {
	margin-top: 16px;
}

.krscds-box-contents__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 8px;
	margin-top: 8px;
}

.krscds-box-contents__cell {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	padding: 10px 12px;
	text-align: center;
}

.krscds-box-contents__cat {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-bottom: 4px;
}

.krscds-box-contents__qty {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: var(--wp--preset--color--on-surface);
}

.krscds-box-contents__total {
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wp--preset--color--on-surface);
	text-align: right;
}

/* --- Package size badge --- */

.krscds-package-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	margin-top: 4px;
	text-transform: uppercase;
}

.krscds-package-badge--small {
	background: #E8F5E9;
	color: #2E7D32;
}

.krscds-package-badge--medium {
	background: #FFF3E0;
	color: #E65100;
}

.krscds-package-badge--large {
	background: #FFEBEE;
	color: #C62828;
}

.krscds-sp-package {
	margin-top: 12px;
}

/* --- Quality class badge (pa_class: A/B/C) --- */

/* Loop card: compact inline badge */
.krscds-class-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	margin-bottom: 4px;
	margin-right: 4px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	align-self: flex-start;
}

.krscds-class-badge--a {
	background: #E8F5E9;
	color: #2E7D32;
}

.krscds-class-badge--b {
	background: #FFF3E0;
	color: #E65100;
}

.krscds-class-badge--c {
	background: #FFEBEE;
	color: #C62828;
}

/* Single product: all 3 classes shown, active highlighted */
.krscds-class-badges--single {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.krscds-class-badges--single .krscds-class-badge {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	margin: 0;
	opacity: 0.35;
	transition: opacity 200ms ease;
}

.krscds-class-badges--single .krscds-class-badge--active {
	opacity: 1;
}

.krscds-class-badge__letter {
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
}

.krscds-class-badge__text {
	font-weight: 500;
	font-size: 11px;
	text-transform: none;
	letter-spacing: 0;
}

/* Single product: class section spacing */
.krscds-sp-class {
	margin-top: var(--wp--preset--spacing--40, 1rem);
	margin-bottom: var(--wp--preset--spacing--20, 0.5rem);
}

/* --- Product dimensions: muted, border-top separator --- */
.krscds-product-dimensions {
	font-size: 11px;
	color: var(--wp--preset--color--muted, #666);
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--wp--preset--color--border, #E1E8ED);
}

/* --- Add to cart button: prototype-matching cream style --- */
.wp-block-woocommerce-product-template .wp-block-button .wp-block-button__link,
.wp-block-woocommerce-product-template .wc-block-components-product-button .wp-element-button,
.wp-block-woocommerce-product-template .add_to_cart_button {
	width: 100%;
	background: #FBF5F0 !important;
	color: #1A1A1A !important;
	border: none !important;
	padding: 12px !important;
	border-radius: 20px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	font-size: 11px !important;
	transition: all 0.25s;
	text-align: center;
}
.wp-block-woocommerce-product-template > li:hover .wp-block-button__link,
.wp-block-woocommerce-product-template > li:hover .wp-element-button,
.wp-block-woocommerce-product-template > li:hover .add_to_cart_button {
	background: linear-gradient(135deg, #B76E79, #D4A847) !important;
	color: #fff !important;
}

/* Push button to bottom of card */
.wp-block-woocommerce-product-template > li .wp-block-woocommerce-product-button,
.wp-block-woocommerce-product-template > .wc-block-product .wp-block-woocommerce-product-button {
	margin-top: auto !important;
}

/* --- Product stock count: below button --- */
.krscds-product-stock {
	font-size: 11px;
	color: var(--wp--preset--color--muted, #666);
	text-align: center;
	margin-top: 8px;
}

/* Sold out: red, bold */
.krscds-product-stock--soldout {
	color: #E63946;
	font-weight: 700;
}

/* --- Product-template list items: remove default WC list styling --- */
.wp-block-woocommerce-product-template {
	list-style: none;
	padding: 0;
	margin: 0;
}

/* --- WooCommerce product-collection wrapper: no extra spacing --- */
.wp-block-woocommerce-product-collection .wc-block-product-template {
	gap: 25px;
}

/* --- Classic WC grid (fallback) --- */
.woocommerce ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	list-style: none;
	padding: 0;
}

.woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	float: none !important;
	width: auto !important;
}

/* --- Product cards responsive --- */

/* Tablet: 2 columns */
@media (max-width: 992px) {
	.wc-block-grid.has-3-columns,
	.wp-block-woocommerce-product-template {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* WC flex-container mode: force 2 columns on tablet */
	.wc-block-product-template.is-flex-container.columns-3 > li,
	.wc-block-product-template.is-flex-container.columns-4 > li {
		width: calc((100% - 25px) / 2) !important;
	}
}

/* Small tablet / large phone: 2 columns */
@media (max-width: 768px) {
	.wc-block-grid.has-3-columns,
	.wc-block-grid.has-2-columns,
	.wp-block-woocommerce-product-template {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* WC flex-container mode: force 2 columns */
	.wc-block-product-template.is-flex-container > li {
		width: calc((100% - 25px) / 2) !important;
	}
}

/* Mobile: 1 column, reduce padding */
@media (max-width: 576px) {
	.wc-block-grid.has-3-columns,
	.wc-block-grid.has-2-columns,
	.wp-block-woocommerce-product-template {
		grid-template-columns: 1fr !important;
	}

	/* WC flex-container mode: force 1 column on phones */
	.wc-block-product-template.is-flex-container > li {
		width: 100% !important;
	}

	.wc-block-grid__product,
	.wp-block-woocommerce-product-template > li,
	.wp-block-woocommerce-product-template > .wc-block-product,
	.woocommerce ul.products li.product {
		padding: 16px;
	}

	.wc-block-grid__product-price,
	.wp-block-woocommerce-product-price,
	.woocommerce ul.products li.product .price {
		font-size: 18px !important;
	}
}

/* Small mobile: tighter layout */
@media (max-width: 400px) {
	.wc-block-grid__product,
	.wp-block-woocommerce-product-template > li,
	.wp-block-woocommerce-product-template > .wc-block-product,
	.woocommerce ul.products li.product {
		padding: 12px;
		border-radius: var(--wp--custom--border-radius--sm, 8px);
	}
}

/* --- Loop price format: our price color to match prototype --- */
.wp-block-woocommerce-product-template .krscds-price-ours,
.wp-block-woocommerce-product-template .krscds-price-ours .woocommerce-Price-amount {
	color: #C0392B !important;
}

/* ==========================================================================
   FOOTER — dark luxury footer with gold accents
   ========================================================================== */

/* --- Footer: force Inter on everything --- */
.krscds-footer,
.krscds-footer * {
	font-family: var(--wp--preset--font-family--primary, 'Inter Variable', 'Inter', system-ui, sans-serif) !important;
}

/* --- Footer: SVG logo --- */
.krscds-footer__logo {
	margin-bottom: 0 !important;
}

.krscds-footer__logo img {
	max-width: 180px;
	height: auto;
}

/* --- Footer: description text --- */
.krscds-footer__desc {
	color: rgba(255, 255, 255, 0.6) !important;
	font-size: 0.875rem !important;
	line-height: 1.7 !important;
	margin-top: 16px !important;
}

/* --- Footer: column headings — gold, uppercase, Inter tight --- */
.krscds-footer__heading {
	color: var(--wp--preset--color--gold, #D4A847) !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	margin-bottom: 20px !important;
	margin-top: 0 !important;
}

/* --- Footer: link items (paragraph blocks) --- */
.krscds-footer__link {
	cursor: pointer;
	color: rgba(255, 255, 255, 0.6) !important;
	font-size: 0.875rem !important;
	line-height: 1.5 !important;
	margin-bottom: 8px !important;
	margin-top: 0 !important;
	transition: color 150ms ease;
}

.krscds-footer__link:hover {
	color: var(--wp--preset--color--gold, #D4A847) !important;
}

/* --- Footer: link lists (ul — Informacje, Kontakt) --- */
.krscds-footer__links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.krscds-footer__links li {
	margin-bottom: 8px;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.6);
	line-height: 1.5;
}

.krscds-footer__links a {
	color: rgba(255, 255, 255, 0.6) !important;
	text-decoration: none !important;
	transition: color 150ms ease;
}

.krscds-footer__links a:hover {
	color: var(--wp--preset--color--gold, #D4A847) !important;
}

/* --- Footer: navigation links (wp-block-navigation) --- */
.krscds-footer__nav .wp-block-navigation-item a {
	color: rgba(255, 255, 255, 0.6) !important;
	text-decoration: none !important;
	transition: color 150ms ease;
}

.krscds-footer__nav .wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--gold, #D4A847) !important;
	text-decoration: none !important;
}

/* --- Footer: separator — subtle gold divider --- */
.krscds-footer__separator {
	border: none !important;
	border-top: 1px solid rgba(212, 168, 71, 0.15) !important;
	background: none !important;
	opacity: 1 !important;
}

/* --- Footer: copyright --- */
.krscds-footer__copyright {
	color: rgba(255, 255, 255, 0.4) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.02em;
}

.krscds-footer__copyright a {
	color: rgba(255, 255, 255, 0.4) !important;
	text-decoration: none !important;
	transition: color 150ms ease;
}

.krscds-footer__copyright a:hover {
	color: var(--wp--preset--color--gold, #D4A847) !important;
}

/* --- Footer: social icons hover --- */
.krscds-footer .wp-block-social-links .wp-social-link {
	transition: opacity 150ms ease;
	opacity: 0.5;
}

.krscds-footer .wp-block-social-links .wp-social-link:hover {
	opacity: 1;
}

/* --- Footer: responsive — 2 columns on tablet --- */
@media (max-width: 992px) {
	.krscds-footer__grid {
		flex-wrap: wrap !important;
	}

	.krscds-footer__grid > .wp-block-column {
		flex-basis: calc(50% - 30px) !important;
		flex-grow: 0 !important;
	}
}

/* --- Footer: responsive — 1 column on mobile --- */
@media (max-width: 600px) {
	.krscds-footer__grid > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ==========================================================================
   INFO / LEGAL PAGES — regulamin, polityka prywatności, zwroty, wysyłka
   ========================================================================== */

.krscds-page {
	background: var(--wp--preset--color--background, #fff);
}

/* Page title */
.krscds-page__title {
	font-weight: 800 !important;
	letter-spacing: -0.02em;
	margin-bottom: var(--wp--preset--spacing--lg, 1.5rem) !important;
	padding-bottom: var(--wp--preset--spacing--md, 1rem);
	border-bottom: 2px solid var(--wp--preset--color--primary, #E53935);
}

/* Content typography */
.krscds-page__content {
	font-size: var(--wp--preset--font-size--base, 1rem);
	line-height: 1.75;
	color: var(--wp--preset--color--on-surface, #212121);
}

/* Headings within content */
.krscds-page__content h2.wp-block-heading {
	font-size: 1.35rem !important;
	font-weight: 700 !important;
	margin-top: 2.5rem !important;
	margin-bottom: 1rem !important;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--wp--preset--color--border, #E0E0E0);
	color: var(--wp--preset--color--secondary, #1A1A2E);
}

.krscds-page__content h3.wp-block-heading {
	font-size: 1.1rem !important;
	font-weight: 600 !important;
	margin-top: 1.75rem !important;
	margin-bottom: 0.75rem !important;
	color: var(--wp--preset--color--secondary, #1A1A2E);
}

/* Paragraphs */
.krscds-page__content p {
	margin-bottom: 1rem;
}

/* Lists */
.krscds-page__content ol,
.krscds-page__content ul {
	padding-left: 1.5rem;
	margin-bottom: 1.25rem;
}

.krscds-page__content li {
	margin-bottom: 0.5rem;
	line-height: 1.7;
}

.krscds-page__content li ul,
.krscds-page__content li ol {
	margin-top: 0.5rem;
	margin-bottom: 0.5rem;
}

/* Bold text */
.krscds-page__content strong {
	font-weight: 600;
	color: var(--wp--preset--color--secondary, #1A1A2E);
}

/* Tables (koszty wysyłki) */
.krscds-page__content .wp-block-table {
	margin: 1.5rem 0;
	overflow-x: auto;
}

.krscds-page__content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
}

.krscds-page__content .wp-block-table thead {
	background: var(--wp--preset--color--secondary, #1A1A2E);
	color: #fff;
}

.krscds-page__content .wp-block-table th {
	padding: 0.75rem 1rem;
	text-align: left;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
	letter-spacing: 0.02em;
}

.krscds-page__content .wp-block-table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border, #E0E0E0);
}

.krscds-page__content .wp-block-table tbody tr:hover {
	background: var(--wp--preset--color--surface, #F5F5F5);
}

/* Notice boxes (uwaga) */
.krscds-page__content .krscds-notice {
	padding: 1rem 1.25rem;
	border-radius: 6px;
	margin: 1.25rem 0;
	font-size: var(--wp--preset--font-size--sm, 0.875rem);
}

.krscds-page__content .krscds-notice--warning {
	background: #FFF3E0;
	border-left: 4px solid var(--wp--preset--color--warning, #FB8C00);
	color: #5D4037;
}

/* Separator */
.krscds-page__content .wp-block-separator {
	border: none;
	border-top: 1px solid var(--wp--preset--color--border, #E0E0E0);
	margin: 2rem 0;
	opacity: 1;
}

/* Links */
.krscds-page__content a {
	color: var(--wp--preset--color--primary, #E53935);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color 150ms ease;
}

.krscds-page__content a:hover {
	color: var(--wp--preset--color--secondary, #1A1A2E);
}

/* ==========================================================================
   NEWSLETTER CTA — horizontal layout matching prototype
   ========================================================================== */

/* Newsletter container: horizontal layout with text left, form right */
.krscds-newsletter .wp-block-group.is-layout-flex {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
}

.krscds-newsletter .krscds-newsletter__text {
	text-align: left;
}

.krscds-newsletter .krscds-newsletter__text .wp-block-heading {
	text-align: left !important;
	margin-bottom: 8px !important;
}

.krscds-newsletter .krscds-newsletter__text .has-sm-font-size {
	text-align: left !important;
}

/* Newsletter form: horizontal email input + button */
.krscds-newsletter__form {
	display: flex;
	gap: 12px;
	flex-shrink: 0;
}

.krscds-newsletter__form input[type="email"] {
	padding: 14px 24px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 30px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 14px;
	min-width: 280px;
	outline: none;
	transition: border-color 0.2s ease;
}

.krscds-newsletter__form input[type="email"]::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.krscds-newsletter__form input[type="email"]:focus {
	border-color: rgba(255, 255, 255, 0.6);
}

.krscds-newsletter__form button {
	padding: 14px 32px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 30px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.krscds-newsletter__form button:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
	.krscds-newsletter .wp-block-group.is-layout-flex {
		flex-direction: column;
		text-align: center;
	}

	.krscds-newsletter .krscds-newsletter__text .wp-block-heading,
	.krscds-newsletter .krscds-newsletter__text .has-sm-font-size {
		text-align: center !important;
	}

	.krscds-newsletter__form {
		flex-direction: column;
		width: 100%;
	}

	.krscds-newsletter__form input[type="email"] {
		min-width: auto;
		width: 100%;
	}
}

/* ==========================================================================
   SHOP ARCHIVE — Breadcrumbs, Filter Sidebar, Sort Bar, Pagination
   ========================================================================== */

/* --- Breadcrumbs --- */
.krscds-breadcrumbs {
	margin-bottom: var(--wp--preset--spacing--50);
}

.krscds-breadcrumbs,
.krscds-breadcrumbs a,
.krscds-breadcrumbs span {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}

.krscds-breadcrumbs a {
	text-decoration: none;
	transition: color var(--wp--custom--transition--fast, 150ms ease);
}

.krscds-breadcrumbs a:hover {
	color: var(--wp--preset--color--primary);
}

/* WC breadcrumbs: the block renders a .woocommerce-breadcrumb wrapper */
.krscds-breadcrumbs .woocommerce-breadcrumb {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}

/* --- Shop top bar: title + sort --- */
.krscds-shop-topbar {
	align-items: baseline;
}

.krscds-shop-topbar__title {
	margin: 0 !important;
}

/* WooCommerce catalog sorting: pill-shaped select */
.krscds-archive .woocommerce-ordering select,
.krscds-shop-topbar .woocommerce-ordering select {
	height: 40px;
	border-radius: var(--wp--custom--border-radius--full, 9999px);
	border: 1px solid var(--wp--preset--color--border);
	padding: 0 36px 0 var(--wp--preset--spacing--40, 1rem);
	font-size: var(--wp--preset--font-size--sm);
	background-color: var(--wp--preset--color--background);
	cursor: pointer;
	transition: border-color var(--wp--custom--transition--fast, 150ms ease);
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23757575'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

.krscds-archive .woocommerce-ordering select:hover,
.krscds-shop-topbar .woocommerce-ordering select:hover {
	border-color: var(--wp--preset--color--primary);
}

.krscds-archive .woocommerce-ordering select:focus,
.krscds-shop-topbar .woocommerce-ordering select:focus {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 1px var(--wp--preset--color--primary);
	outline: none;
}

/* --- Filter card (sidebar) --- */
.krscds-filter-card {
	background: var(--wp--preset--color--background);
	border-radius: var(--wp--custom--border-radius--md, 16px);
	box-shadow: var(--wp--custom--shadow--md, 0 4px 20px rgba(0, 0, 0, 0.05));
	overflow: hidden;
}

/* Filter card heading — dark bar with accent bottom border */
.krscds-filter-card__heading {
	font-size: var(--wp--preset--font-size--md) !important;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700 !important;
	padding: var(--wp--preset--spacing--40, 1rem) var(--wp--preset--spacing--50, 1.5rem) !important;
	margin: 0 !important;
	background: var(--wp--preset--color--secondary, #1A1A2E);
	color: var(--wp--preset--color--background, #fff) !important;
	border-bottom: 3px solid var(--wp--preset--color--primary, #E53935);
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Sliders icon before heading text */
.krscds-filter-card__heading::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'/%3E%3Cline x1='4' y1='10' x2='4' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12' y2='3'/%3E%3Cline x1='20' y1='21' x2='20' y2='16'/%3E%3Cline x1='20' y1='12' x2='20' y2='3'/%3E%3Cline x1='1' y1='14' x2='7' y2='14'/%3E%3Cline x1='9' y1='8' x2='15' y2='8'/%3E%3Cline x1='17' y1='16' x2='23' y2='16'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	flex-shrink: 0;
	opacity: 0.8;
}

/* Filter card body */
.krscds-filter-card__body {
	padding: var(--wp--preset--spacing--50, 1.5rem);
}

/* Filter sections — separated by subtle border */
.krscds-filter-section {
	padding-bottom: var(--wp--preset--spacing--50, 1.5rem);
	border-bottom: 1px solid var(--wp--preset--color--border, #E1E8ED);
}

.krscds-filter-section:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

/* Filter section titles */
.krscds-filter-section__title {
	margin: 0 0 var(--wp--preset--spacing--30, 0.75rem) !important;
	color: var(--wp--preset--color--foreground) !important;
}

/* WooCommerce filter block price inputs */
.krscds-filter-card .wc-block-price-filter__range-input-wrapper {
	margin-bottom: var(--wp--preset--spacing--30, 0.75rem);
}

.krscds-filter-card .wc-block-price-filter__amount,
.krscds-filter-card .wc-block-components-price-slider__amount {
	border-radius: 6px;
	border: 1px solid var(--wp--preset--color--border);
	padding: 0 var(--wp--preset--spacing--30, 0.75rem);
	height: 36px;
	font-size: var(--wp--preset--font-size--xs);
}

/* Price slider track color */
.krscds-filter-card .wc-block-components-price-slider__range-input-progress,
.krscds-filter-card .wc-block-price-filter__range-input-progress {
	--range-color: var(--wp--preset--color--primary, #E53935);
}

/* WC categories list in filter card */
.krscds-filter-card .wc-block-product-categories-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.krscds-filter-card .wc-block-product-categories-list li {
	margin-bottom: 0;
}

.krscds-filter-card .wc-block-product-categories-list li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
	transition: color var(--wp--custom--transition--fast, 150ms ease),
		padding-left var(--wp--custom--transition--fast, 150ms ease);
	border-bottom: 1px solid var(--wp--preset--color--border, #E1E8ED);
}

.krscds-filter-card .wc-block-product-categories-list li:last-child a {
	border-bottom: none;
}

.krscds-filter-card .wc-block-product-categories-list li a:hover {
	color: var(--wp--preset--color--primary);
	padding-left: 4px;
}

/* Category count badges in sidebar */
.krscds-filter-card .wc-block-product-categories-list-item-count {
	background: var(--wp--preset--color--surface, #F7F9FB);
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 10px;
	color: var(--wp--preset--color--muted);
}

/* WC attribute filter checkboxes in sidebar */
.krscds-filter-card .wc-block-attribute-filter-list,
.krscds-filter-card .wc-block-components-checkbox-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.krscds-filter-card .wc-block-attribute-filter-list li,
.krscds-filter-card .wc-block-components-checkbox-list li {
	margin-bottom: 0;
}

.krscds-filter-card .wc-block-attribute-filter-list li label,
.krscds-filter-card .wc-block-components-checkbox-list li label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: var(--wp--preset--font-size--sm);
	padding: 6px 0;
	cursor: pointer;
	transition: color var(--wp--custom--transition--fast, 150ms ease);
}

.krscds-filter-card .wc-block-attribute-filter-list li label:hover,
.krscds-filter-card .wc-block-components-checkbox-list li label:hover {
	color: var(--wp--preset--color--primary);
}

/* Style the checkbox inputs */
.krscds-filter-card input[type="checkbox"] {
	accent-color: var(--wp--preset--color--primary);
}

/* Active filters chips */
.krscds-filter-card .wc-block-active-filters__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.krscds-filter-card .wc-block-active-filters__list-item {
	background: var(--wp--preset--color--surface, #F7F9FB);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--border-radius--full, 9999px);
	padding: 4px 12px;
	font-size: var(--wp--preset--font-size--xs);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* "Clear all" link inside active filters */
.krscds-filter-card .wc-block-active-filters__clear-all {
	font-size: var(--wp--preset--font-size--xs);
	color: var(--wp--preset--color--primary);
	text-decoration: none;
	font-weight: 600;
}

.krscds-filter-card .wc-block-active-filters__clear-all:hover {
	text-decoration: underline;
}

/* Sidebar sticky on desktop */
@media (min-width: 769px) {
	.krscds-shop-sidebar {
		position: sticky;
		top: calc(var(--wp--custom--header--total-height, 170px) + var(--wp--preset--spacing--40, 1rem));
		align-self: flex-start;
	}
}

/* --- Pagination — circular page numbers (prototype style) --- */
.krscds-archive .wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--70, 3rem);
	gap: 8px;
}

/* Page number links and spans */
.krscds-archive .wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	text-decoration: none;
	transition: all var(--wp--custom--transition--fast, 150ms ease);
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
}

.krscds-archive .wp-block-query-pagination-numbers .page-numbers:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* Active/current page number — gradient background */
.krscds-archive .wp-block-query-pagination-numbers .page-numbers.current {
	background: var(--wp--preset--gradient--rose-gold-to-gold, linear-gradient(135deg, #B76E79, #D4A847));
	color: var(--wp--preset--color--background);
	border-color: transparent;
}

/* Dots / ellipsis */
.krscds-archive .wp-block-query-pagination-numbers .page-numbers.dots {
	border: none;
	background: none;
	width: auto;
	pointer-events: none;
	color: var(--wp--preset--color--muted);
}

/* Previous/next links */
.krscds-archive .wp-block-query-pagination-previous,
.krscds-archive .wp-block-query-pagination-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	border-radius: var(--wp--custom--border-radius--full, 9999px);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	text-decoration: none;
	padding: 0 var(--wp--preset--spacing--40, 1rem);
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	transition: all var(--wp--custom--transition--fast, 150ms ease);
}

.krscds-archive .wp-block-query-pagination-previous:hover,
.krscds-archive .wp-block-query-pagination-next:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* ==========================================================================
   CART PAGE — WooCommerce Blocks overrides
   ========================================================================== */

/* --- Cart layout: main + sidebar --- */
.wc-block-cart .wc-block-components-sidebar-layout {
	gap: 40px;
}

/* --- Cart items table --- */
.wc-block-cart-items {
	border-collapse: collapse;
}

/* Table header: uppercase, muted, small */
.wc-block-cart-items__header th {
	text-align: left;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-size: 11px;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	font-weight: 700;
	letter-spacing: 0.5px;
}

/* Cart item rows */
.wc-block-cart-items__row td {
	padding: 20px 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	vertical-align: middle;
}

/* Product image: rounded */
.wc-block-cart-item__image img {
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
}

/* Product name link */
.wc-block-cart-item__product .wc-block-components-product-name {
	font-weight: 700;
	font-size: 14px;
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.wc-block-cart-item__product .wc-block-components-product-name:hover {
	color: var(--wp--preset--color--primary);
}

/* Per-unit price */
.wc-block-cart-item__prices .wc-block-components-product-price__value {
	font-weight: 600;
}

/* Line total (right column) */
.wc-block-cart-item__total .wc-block-components-product-price__value {
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

/* Quantity selector: pill style */
.wc-block-cart .wc-block-components-quantity-selector {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 30px;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	height: 38px;
}

.wc-block-cart .wc-block-components-quantity-selector__button {
	border: none;
	background: none;
	cursor: pointer;
	font-weight: 700;
	font-size: 16px;
	padding: 0 12px;
	color: var(--wp--preset--color--foreground);
	transition: background 0.2s;
}

.wc-block-cart .wc-block-components-quantity-selector__button:hover {
	background: var(--wp--preset--color--surface);
}

.wc-block-cart .wc-block-components-quantity-selector__input {
	border: none;
	width: 36px;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	padding: 0;
	-moz-appearance: textfield;
	background: transparent;
}

.wc-block-cart .wc-block-components-quantity-selector__input::-webkit-inner-spin-button,
.wc-block-cart .wc-block-components-quantity-selector__input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Remove item link */
.wc-block-cart-item__remove-link {
	color: var(--wp--preset--color--primary) !important;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.wc-block-cart-item__remove-link:hover {
	opacity: 1;
}

/* --- Sidebar: summary card --- */
.wc-block-cart__sidebar {
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
	padding: 25px;
}

/* Summary title */
.wc-block-cart__totals-title {
	font-size: 20px !important;
	font-weight: 700;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

/* Totals rows: labels + values */
.wc-block-cart .wc-block-components-totals-item {
	font-size: 14px;
}

.wc-block-cart .wc-block-components-totals-item__label {
	color: var(--wp--preset--color--foreground);
}

.wc-block-cart .wc-block-components-totals-item__value {
	font-weight: 700;
}

/* Grand total row: larger, primary color */
.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-size: 18px;
	font-weight: 800;
}

.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 18px;
	font-weight: 800;
	color: var(--wp--preset--color--primary);
}

/* Coupon panel styling */
.wc-block-cart .wc-block-components-totals-coupon .wc-block-components-panel__button {
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}

/* --- Proceed to checkout button: gradient rose-gold → gold --- */
.wc-block-cart__submit-button {
	background: linear-gradient(135deg, #B76E79, #D4A847) !important;
	color: #fff !important;
	border-radius: 30px !important;
	border: none !important;
	height: 56px;
	font-weight: 800 !important;
	font-size: 16px !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: box-shadow 0.3s, transform 0.3s !important;
}

.wc-block-cart__submit-button:hover {
	box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4) !important;
	transform: translateY(-1px);
}

/* VAT note under total */
.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__description {
	font-size: 12px;
	color: var(--wp--preset--color--muted);
}

/* ==========================================================================
   CHECKOUT PAGE — WooCommerce Blocks overrides
   ========================================================================== */

/* --- Form field styling --- */
.wc-block-checkout .wc-block-components-text-input input,
.wc-block-checkout .wc-block-components-text-input textarea {
	border: 1px solid var(--wp--preset--color--border) !important;
	border-radius: 4px !important;
	height: 44px;
	padding: 0 15px;
	font-size: 14px;
}

.wc-block-checkout .wc-block-components-text-input input:focus,
.wc-block-checkout .wc-block-components-text-input textarea:focus {
	border-color: var(--wp--preset--color--primary) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--primary) !important;
	outline: none;
}

/* Form labels: bold, small */
.wc-block-checkout .wc-block-components-text-input label {
	font-size: 13px;
	font-weight: 700;
}

/* Section headings in checkout */
.wc-block-checkout .wc-block-components-checkout-step__heading {
	font-size: 20px;
	font-weight: 700;
}

.wc-block-checkout .wc-block-components-checkout-step__description {
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}

/* --- Checkout sidebar / order review --- */
.wc-block-checkout__sidebar {
	background: var(--wp--preset--color--surface);
	border-radius: 16px;
	padding: 25px;
}

/* Order summary heading */
.wc-block-checkout .wc-block-components-order-summary .wc-block-components-panel__button {
	font-size: 20px;
	font-weight: 700;
}

/* Order summary item rows */
.wc-block-checkout .wc-block-components-order-summary-item {
	font-size: 14px;
}

.wc-block-checkout .wc-block-components-order-summary-item__description .wc-block-components-product-name {
	font-weight: 700;
	font-size: 13px;
}

/* Checkout totals: match cart styling */
.wc-block-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-size: 20px;
	font-weight: 800;
}

.wc-block-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 20px;
	font-weight: 800;
	color: var(--wp--preset--color--primary);
}

/* Shipping method options */
.wc-block-checkout .wc-block-components-radio-control__label {
	font-size: 14px;
	font-weight: 600;
}

.wc-block-checkout .wc-block-components-radio-control__secondary-label {
	font-weight: 700;
}

/* Payment method options */
.wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 8px;
}

.wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__option--checked {
	border-color: var(--wp--preset--color--primary);
	background: #FFF0F3;
}

/* --- Place order button: gradient rose-gold → gold --- */
.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
	background: linear-gradient(135deg, #B76E79, #D4A847) !important;
	color: #fff !important;
	border-radius: 30px !important;
	border: none !important;
	height: 60px;
	font-weight: 800 !important;
	font-size: 18px !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: box-shadow 0.3s, transform 0.3s !important;
}

.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button:hover {
	box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4) !important;
	transform: translateY(-1px);
}

/* Return to cart link */
.wc-block-checkout__actions_row .wc-block-components-checkout-return-to-cart-button {
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

.wc-block-checkout__actions_row .wc-block-components-checkout-return-to-cart-button:hover {
	color: var(--wp--preset--color--primary);
}

/* --- Cart/checkout page titles --- */
.page-template-page-cart .wp-block-post-title,
.page-template-page-checkout .wp-block-post-title {
	font-size: 32px;
	font-weight: 800;
	margin-bottom: 40px;
}

/* ==========================================================================
   CART & CHECKOUT — Responsive overrides
   ========================================================================== */

@media (max-width: 992px) {
	.wc-block-cart .wc-block-components-sidebar-layout {
		gap: 30px;
	}

	.wc-block-cart__sidebar,
	.wc-block-checkout__sidebar {
		border-radius: 12px;
		padding: 20px;
	}
}

@media (max-width: 576px) {
	.wc-block-cart__submit-button {
		height: 50px;
		font-size: 14px !important;
	}

	.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
		height: 54px;
		font-size: 16px !important;
	}

	.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
	.wc-block-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
		font-size: 16px;
	}
}

/* --- Sticky ATC: gradient override --- */
.krscds-sticky-atc__btn {
	background: linear-gradient(135deg, #B76E79, #D4A847) !important;
	border: none !important;
	border-radius: 25px !important;
	text-transform: uppercase;
	font-weight: 700 !important;
	letter-spacing: 0.5px;
	transition: box-shadow 0.3s, transform 0.3s;
}

.krscds-sticky-atc__btn:hover {
	box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4);
	transform: translateY(-1px);
}

/* --- Mini-cart: gradient checkout button --- */
.krscds-mini-cart-panel__cta--checkout {
	background: linear-gradient(135deg, #B76E79, #D4A847) !important;
	border: none !important;
	border-radius: 25px !important;
	text-transform: uppercase;
	font-weight: 700 !important;
	letter-spacing: 0.5px;
	transition: box-shadow 0.3s, transform 0.3s;
}

.krscds-mini-cart-panel__cta--checkout:hover {
	box-shadow: 0 4px 15px rgba(183, 110, 121, 0.4);
	transform: translateY(-1px);
}

.krscds-mini-cart-panel__cta--cart {
	border-radius: 25px !important;
}

/* --- Respect reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   COOKIE CONSENT BANNER — RODO / GDPR
   ========================================================================== */

.krscds-cookie-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	background: var(--wp--preset--color--header-dark, #111827);
	border-top: 1px solid rgba(212, 168, 71, 0.2);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
	transform: translateY(100%);
	opacity: 0;
	transition: transform 350ms ease, opacity 300ms ease;
	font-family: var(--wp--preset--font-family--primary, 'Inter Variable', 'Inter', system-ui, sans-serif);
}

.krscds-cookie-banner.is-visible {
	transform: translateY(0);
	opacity: 1;
}

.krscds-cookie-banner.is-closing {
	transform: translateY(100%);
	opacity: 0;
}

.krscds-cookie-banner__inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.krscds-cookie-banner__text {
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.8125rem;
	line-height: 1.6;
	margin: 0;
	flex: 1;
}

.krscds-cookie-banner__link {
	color: var(--wp--preset--color--gold, #D4A847) !important;
	text-decoration: underline !important;
	text-underline-offset: 2px;
	transition: color 150ms ease;
}

.krscds-cookie-banner__link:hover {
	color: #f0cb5e !important;
}

.krscds-cookie-banner__actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.krscds-cookie-banner__btn {
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 10px 20px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background 150ms ease, color 150ms ease, transform 100ms ease;
	white-space: nowrap;
}

.krscds-cookie-banner__btn:active {
	transform: scale(0.97);
}

.krscds-cookie-banner__btn--accept {
	background: var(--wp--preset--color--gold, #D4A847);
	color: #1A1A2E;
}

.krscds-cookie-banner__btn--accept:hover {
	background: #e0b94f;
}

.krscds-cookie-banner__btn--reject {
	background: transparent;
	color: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.krscds-cookie-banner__btn--reject:hover {
	border-color: rgba(255, 255, 255, 0.4);
	color: rgba(255, 255, 255, 0.85);
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
	.krscds-cookie-banner__inner {
		flex-direction: column;
		text-align: center;
		padding: 16px 20px;
		gap: 14px;
	}

	.krscds-cookie-banner__actions {
		width: 100%;
		justify-content: center;
	}

	.krscds-cookie-banner__btn {
		flex: 1;
		padding: 12px 16px;
	}
}
