/* ==========================================================================
   RD Design: catalog (agent C)
   Product card (.rd-card) for every WooCommerce loop, product grid (.rd-grid),
   shop/category/search archive (.rd-cat), sidebar widgets, pagination, empty state.
   Tokens come from rd-design/base.css (agent A); fallbacks keep this file usable alone.
   ========================================================================== */

.rd-grid,
.rd-cat,
.rd-empty {
	--rdc-ink: var(--rd-ink, #141414);
	--rdc-red: var(--rd-red, #D6281F);
	--rdc-red-dark: var(--rd-red-dark, #A91E17);
	--rdc-paper: var(--rd-paper, #FAF6F0);
	--rdc-sand: var(--rd-sand, #F4EFE8);
	--rdc-line: var(--rd-line, #ECE4D8);
	--rdc-muted: var(--rd-muted, #5C5650);
	--rdc-gold: var(--rd-gold, #F2B544);
	--rdc-white: var(--rd-white, #FFFFFF);
	--rdc-radius: var(--rd-radius, 16px);
	--rdc-radius-sm: var(--rd-radius-sm, 12px);
	--rdc-pill: var(--rd-cat-pill, 999px);
	--rdc-max: var(--rd-max, 1280px);
	--rdc-font: var(--rd-font, 'Work Sans', system-ui, sans-serif);
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */

ul.products.rd-grid:not(.owl-carousel) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	float: none;
	width: auto;
}
ul.products.rd-grid::before,
ul.products.rd-grid::after {
	content: none !important;
	display: none !important;
}
@media (min-width: 768px) {
	ul.products.rd-grid:not(.owl-carousel) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}
	ul.products.rd-grid.columns-1:not(.owl-carousel) { grid-template-columns: minmax(0, 1fr); }
	ul.products.rd-grid.columns-2:not(.owl-carousel) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
	ul.products.rd-grid:not(.owl-carousel) {
		grid-template-columns: repeat(var(--rd-cols, 4), minmax(0, 1fr));
		gap: 18px;
	}
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

ul.products.rd-grid li.product.rd-card {
	position: relative;
	display: flex;
	flex-direction: column;
	/* beat .woocommerce ul.products.columns-N li.product (float/width/margin layout) */
	float: none !important;
	clear: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0;
	list-style: none;
	background: var(--rdc-white, #fff);
	border: 1px solid var(--rdc-line, #ECE4D8);
	border-radius: var(--rdc-radius, 16px);
	overflow: hidden;
	font-family: var(--rdc-font, 'Work Sans', system-ui, sans-serif);
	color: var(--rdc-ink, #141414);
	text-align: left;
	container: rdcard / inline-size;
	transition: box-shadow .2s ease, transform .2s ease;
}
ul.products.rd-grid li.product.rd-card:hover {
	box-shadow: 0 8px 24px rgba(20, 20, 20, .08);
}
@media (prefers-reduced-motion: reduce) {
	ul.products.rd-grid li.product.rd-card { transition: none; }
}

/* Media */
ul.products.rd-grid li.product.rd-card .rd-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--rdc-sand, #F4EFE8);
	overflow: hidden;
	margin: 0;
}
ul.products.rd-grid li.product.rd-card .rd-card__media picture,
ul.products.rd-grid li.product.rd-card .rd-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	box-shadow: none;
	border-radius: 0;
}
ul.products.rd-grid li.product.rd-card .rd-card__media img {
	transition: transform .35s ease;
}
ul.products.rd-grid li.product.rd-card:hover .rd-card__media img {
	transform: scale(1.03);
}
@media (prefers-reduced-motion: reduce) {
	ul.products.rd-grid li.product.rd-card .rd-card__media img,
	ul.products.rd-grid li.product.rd-card:hover .rd-card__media img { transition: none; transform: none; }
}
ul.products.rd-grid li.product.rd-card.outofstock .rd-card__media img {
	opacity: .55;
}

/* Badges */
.rd-card__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	pointer-events: none;
}
.rd-cbadge {
	display: inline-block;
	padding: 4px 9px;
	border-radius: var(--rdc-pill, 999px);
	font-family: var(--rdc-font, 'Work Sans', system-ui, sans-serif);
	font-size: 12px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	background: #fff;
	color: var(--rdc-ink, #141414);
	border: 1px solid var(--rdc-line, #ECE4D8);
}
.rd-cbadge--spicy  { background: #FDE7E4; color: #A91E17; border-color: #FDE7E4; }
.rd-cbadge--veggie { background: #E5F1E1; color: #2B5E2B; border-color: #E5F1E1; }
.rd-cbadge--sale   { background: var(--rdc-red, #D6281F); color: #fff; border-color: var(--rdc-red, #D6281F); }
.rd-cbadge--mhd    { background: var(--rdc-gold, #F2B544); color: var(--rdc-ink, #141414); border-color: var(--rdc-gold, #F2B544); }

/* Body */
ul.products.rd-grid li.product.rd-card .rd-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
	padding: 14px 16px 16px;
}
ul.products.rd-grid li.product.rd-card .rd-card__eyebrow {
	display: block;
	font-size: 12px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--rdc-muted, #5C5650);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
ul.products.rd-grid li.product.rd-card .rd-card__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}
ul.products.rd-grid li.product.rd-card .rd-card__title a {
	color: inherit;
	text-decoration: none;
}
ul.products.rd-grid li.product.rd-card .rd-card__title a::after {
	/* the whole card body area above the button is clickable via the title link */
	content: none;
}
ul.products.rd-grid li.product.rd-card .rd-card__title a:hover,
ul.products.rd-grid li.product.rd-card .rd-card__title a:focus-visible {
	color: var(--rdc-red-dark, #A91E17);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Foot: price + button */
ul.products.rd-grid li.product.rd-card .rd-card__foot {
	margin-top: auto;
	padding-top: 8px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px;
}
ul.products.rd-grid li.product.rd-card .rd-card__price {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
ul.products.rd-grid li.product.rd-card .rd-card__price .price {
	display: block;
	font-family: inherit;
	margin: 0;
	font-size: 20px;
	line-height: 1.15;
	font-weight: 800;
	color: var(--rdc-ink, #141414);
}
ul.products.rd-grid li.product.rd-card .rd-card__price .price .amount,
ul.products.rd-grid li.product.rd-card .rd-card__price .price bdi {
	font: inherit;
	color: inherit;
}
ul.products.rd-grid li.product.rd-card .rd-card__price .rd-card__from {
	font-size: 14px;
	font-weight: 600;
}
ul.products.rd-grid li.product.rd-card .rd-card__price .price del {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--rdc-muted, #5C5650);
	opacity: 1;
}
ul.products.rd-grid li.product.rd-card .rd-card__price .price ins {
	text-decoration: none;
	color: var(--rdc-red-dark, #A91E17);
	background: none;
	font-weight: 800;
}
ul.products.rd-grid li.product.rd-card .rd-card__price .price .wc-gzd-sale-price-label,
ul.products.rd-grid li.product.rd-card .rd-card__price .price .wc-gzd-sale-price-regular-label {
	font-size: 11px;
	font-weight: 500;
	color: var(--rdc-muted, #5C5650);
}
ul.products.rd-grid li.product.rd-card .rd-card__marks {
	font-size: 12px;
	line-height: 1.35;
	color: var(--rdc-muted, #5C5650);
}
ul.products.rd-grid li.product.rd-card .rd-card__marks > * {
	margin: 0;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	display: block;
}
ul.products.rd-grid li.product.rd-card .rd-card__marks .wc-gzd-additional-info,
ul.products.rd-grid li.product.rd-card .rd-card__marks p {
	margin: 0;
}
ul.products.rd-grid li.product.rd-card .rd-card__marks a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}
ul.products.rd-grid li.product.rd-card .rd-card__marks .price-unit {
	font-weight: 500;
}
ul.products.rd-grid li.product.rd-card .rd-card__marks .star-rating { display: none; }

/* Things other plugins hang after the item (Germanized garantie/nutri-score, Stripe BNPL) */
ul.products.rd-grid li.product.rd-card .rd-card__after {
	font-size: 12px;
	color: var(--rdc-muted, #5C5650);
}
ul.products.rd-grid li.product.rd-card .rd-card__after:empty { display: none; }
ul.products.rd-grid li.product.rd-card .rd-card__after .wc-stripe-bnpl-shop-message:empty { display: none; }

/* Button (a real <a class="button add_to_cart_button ajax_add_to_cart">) */
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 44px;
	min-width: 44px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: var(--rdc-pill, 999px);
	background: var(--rdc-red, #D6281F);
	color: #fff;
	font-family: var(--rdc-font, 'Work Sans', system-ui, sans-serif);
	font-size: 14px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	position: relative;
	transition: background-color .15s ease;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn:hover,
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn:focus-visible {
	background: var(--rdc-red-dark, #A91E17);
	color: #fff;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn:focus-visible {
	outline: 3px solid var(--rdc-ink, #141414);
	outline-offset: 2px;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn svg {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options {
	background: var(--rdc-ink, #141414);
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options:hover,
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options:focus-visible {
	background: #000;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--soldout {
	background: var(--rdc-sand, #F4EFE8);
	color: var(--rdc-muted, #5C5650);
	padding: 0 14px;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--soldout:hover,
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--soldout:focus-visible {
	background: var(--rdc-line, #ECE4D8);
	color: var(--rdc-ink, #141414);
}
/* WooCommerce AJAX states */
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn.loading {
	opacity: 1;
	padding-right: 16px;
	color: transparent;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, .5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rd-spin .7s linear infinite;
	font-family: inherit;
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn.added::after {
	content: none; /* WooCommerce's icon-font checkmark */
}
ul.products.rd-grid li.product.rd-card a.button.rd-card__btn.added {
	background: #2B5E2B;
}
ul.products.rd-grid li.product.rd-card a.added_to_cart {
	/* "Warenkorb anzeigen" link WooCommerce inserts after adding: the header cart shows the count */
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
@keyframes rd-spin { to { transform: rotate(360deg); } }

/* Mobile: compact card, round 44 px "+" button */
@media (max-width: 767px) {
	ul.products.rd-grid li.product.rd-card { border-radius: 14px; }
	.rd-card__badges { top: 8px; left: 8px; right: 8px; gap: 4px; }
	.rd-cbadge { font-size: 11px; padding: 3px 8px; }
	ul.products.rd-grid li.product.rd-card .rd-card__body { padding: 10px 12px 12px; gap: 4px; }
	ul.products.rd-grid li.product.rd-card .rd-card__eyebrow { font-size: 11px; }
	ul.products.rd-grid li.product.rd-card .rd-card__eyebrow-2 { display: none; }
	ul.products.rd-grid li.product.rd-card .rd-card__title { font-size: 14px; }
	ul.products.rd-grid li.product.rd-card .rd-card__foot { padding-top: 6px; gap: 6px; }
	ul.products.rd-grid li.product.rd-card .rd-card__price .price { font-size: 17px; }
	ul.products.rd-grid li.product.rd-card .rd-card__marks { font-size: 11px; }
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--cart,
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options {
		width: 44px;
		padding: 0;
	}
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--cart svg,
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options svg { width: 18px; height: 18px; }
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--cart .rd-card__btn-label,
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options .rd-card__btn-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--soldout {
		height: 32px;
		padding: 0 10px;
		font-size: 12px;
	}
}
/* Narrow cards anywhere (5-column homepage row, sliders): round "+" button instead of the pill */
@container rdcard (max-width: 279px) {
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--cart,
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options {
		width: 44px;
		padding: 0;
	}
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--cart svg,
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options svg { width: 18px; height: 18px; }
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--cart .rd-card__btn-label,
	ul.products.rd-grid li.product.rd-card a.button.rd-card__btn--options .rd-card__btn-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
	ul.products.rd-grid li.product.rd-card .rd-card__body { padding: 12px 12px 14px; }
}

/* Very narrow phones: price above button so nothing gets squeezed */
@media (max-width: 359px) {
	ul.products.rd-grid li.product.rd-card .rd-card__foot { flex-wrap: wrap; }
}

/* Owl carousels (theme related/upsell/cross-sell sliders) */
.owl-carousel .owl-item li.product.rd-card { height: 100%; }

/* --------------------------------------------------------------------------
   Archive layout
   -------------------------------------------------------------------------- */

.rd-cat {
	font-family: var(--rdc-font, 'Work Sans', system-ui, sans-serif);
	color: var(--rdc-ink, #141414);
	background: var(--rdc-paper, #FAF6F0);
	padding: 0 0 56px;
}
.rd-cat__wrap {
	max-width: var(--rdc-max, 1280px);
	margin: 0 auto;
	padding: 0 24px;
}
@media (max-width: 767px) {
	.rd-cat__wrap { padding: 0 16px; }
}

/* Breadcrumb */
.rd-cat__crumbs {
	padding: 20px 0 0;
	font-size: 13px;
	color: var(--rdc-muted, #5C5650);
}
.rd-cat__crumbs .woocommerce-breadcrumb {
	margin: 0;
	padding: 0;
	font-size: inherit;
	color: inherit;
	text-align: left;
	background: none;
}
.rd-cat__crumbs .woocommerce-breadcrumb a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--rdc-line, #ECE4D8);
	text-underline-offset: 3px;
}
.rd-cat__crumbs .woocommerce-breadcrumb a:hover { color: var(--rdc-ink, #141414); }

/* Header */
.rd-cat__head {
	padding: 14px 0 18px;
	max-width: 760px;
}
.rd-cat__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 40px;
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -.02em;
	text-transform: none;
	color: var(--rdc-ink, #141414);
	text-align: left;
}
.rd-cat__count {
	margin: 8px 0 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--rdc-muted, #5C5650);
}
.rd-cat__desc:empty { display: none; }
.rd-cat__desc .term-description,
.rd-cat__desc .page-description {
	margin: 10px 0 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.55;
	color: var(--rdc-muted, #5C5650);
}
.rd-cat__desc p { margin: 0 0 .6em; }
.rd-cat__desc p:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
	.rd-cat__crumbs { padding-top: 14px; font-size: 12px; }
	.rd-cat__head { padding: 10px 0 14px; }
	.rd-cat__title { font-size: 28px; }
	.rd-cat__count { margin-top: 4px; font-size: 13px; }
	.rd-cat__desc .term-description { font-size: 14px; }
}

/* Pills */
.rd-cat__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 22px;
}
.rd-cat-pill {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--rdc-line, #ECE4D8);
	border-radius: var(--rdc-pill, 999px);
	background: var(--rdc-white, #fff);
	color: var(--rdc-ink, #141414);
	font-family: var(--rdc-font, 'Work Sans', system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.2;
	font-weight: 600;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease;
}
.rd-cat-pill:hover,
.rd-cat-pill:focus-visible {
	border-color: var(--rdc-ink, #141414);
	color: var(--rdc-ink, #141414);
	text-decoration: none;
}
.rd-cat-pill:focus-visible { outline: 3px solid var(--rdc-ink, #141414); outline-offset: 2px; }
.rd-cat-pill.is-active {
	background: var(--rdc-ink, #141414);
	border-color: var(--rdc-ink, #141414);
	color: #fff;
}
@media (max-width: 767px) {
	.rd-cat__pills {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin: 0 -16px 14px;
		padding: 0 16px 4px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.rd-cat__pills::-webkit-scrollbar { display: none; }
	.rd-cat-pill { min-height: 44px; font-size: 14px; }
}

/* Notices */
.rd-cat .woocommerce-notices-wrapper:empty { display: none; }

/* Layout: sidebar + main */
.rd-cat__layout {
	display: block;
}
@media (min-width: 992px) {
	.rd-cat--sidebar .rd-cat__layout {
		display: grid;
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 32px;
		align-items: start;
	}
}
.rd-cat__main { min-width: 0; }

/* Toolbar: result count + sorting */
.rd-cat__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin: 0 0 16px;
	padding: 0;
	background: none;
	border: 0;
}
.rd-cat__toolbar .woocommerce-result-count {
	order: 1;
	margin: 0 auto 0 0;
	padding: 0;
	float: none;
	font-size: 14px;
	color: var(--rdc-muted, #5C5650);
}
.rd-cat__toolbar .woocommerce-ordering,
.rd-cat__toolbar .woocommerce-ordering.hidden-xs {
	order: 2;
	display: block !important;
	margin: 0;
	float: none;
}
.rd-cat__toolbar .woocommerce-ordering .orderby-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}
.rd-cat__toolbar .woocommerce-ordering label {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--rdc-ink, #141414);
	white-space: nowrap;
}
.rd-cat__toolbar select.orderby {
	height: 44px;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0 40px 0 14px;
	border: 1px solid var(--rdc-line, #ECE4D8);
	border-radius: var(--rdc-pill, 999px);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23141414' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--rdc-ink, #141414);
	box-shadow: none;
	cursor: pointer;
}
.rd-cat__toolbar select.orderby:focus-visible {
	outline: 3px solid var(--rdc-ink, #141414);
	outline-offset: 2px;
}
/* The theme's chosen/selectric wrappers, if any get applied */
.rd-cat__toolbar .woocommerce-ordering .chosen-container { display: none !important; }
.rd-cat__toolbar .woocommerce-ordering select.orderby { display: inline-block !important; }

.rd-cat__filter-btn {
	display: none;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--rdc-ink, #141414);
	border-radius: var(--rdc-pill, 999px);
	background: #fff;
	color: var(--rdc-ink, #141414);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.rd-cat__filter-btn:focus-visible { outline: 3px solid var(--rdc-ink, #141414); outline-offset: 2px; }

@media (max-width: 991px) {
	.rd-cat--js .rd-cat__filter-btn { display: inline-flex; order: 0; }
	.rd-cat__toolbar .woocommerce-result-count { order: 3; flex-basis: 100%; font-size: 13px; }
	.rd-cat__toolbar .woocommerce-ordering { margin-left: auto; }
	.rd-cat__toolbar .woocommerce-ordering label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.rd-cat__toolbar select.orderby { max-width: 210px; }
}
@media (max-width: 380px) {
	.rd-cat__toolbar select.orderby { max-width: 170px; font-size: 13px; padding-left: 12px; }
}

/* --------------------------------------------------------------------------
   Sidebar (desktop column; mobile drawer)
   -------------------------------------------------------------------------- */

.rd-cat__side {
	font-size: 15px;
	color: var(--rdc-ink, #141414);
}
.rd-cat__side-head { display: none; }
.rd-cat__side .widget {
	margin: 0 0 16px;
	padding: 18px 18px 16px;
	background: #fff;
	border: 1px solid var(--rdc-line, #ECE4D8);
	border-radius: var(--rdc-radius, 16px);
}
.rd-cat__side .widget-title,
.rd-cat__side .widgettitle {
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 800;
	text-transform: none;
	letter-spacing: 0;
	color: var(--rdc-ink, #141414);
}
.rd-cat__side .widget-title::before,
.rd-cat__side .widget-title::after,
.rd-cat__side .widget-title span::before,
.rd-cat__side .widget-title span::after { display: none !important; content: none !important; }

/* Category list */
.rd-cat__side .product-categories,
.rd-cat__side .product-categories ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.rd-cat__side .product-categories li {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
	line-height: 1.3;
}
.rd-cat__side .product-categories li::before { display: none; }
.rd-cat__side .product-categories li a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 4px 0;
	color: var(--rdc-ink, #141414);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	text-transform: none;
}
.rd-cat__side .product-categories li a:hover { color: var(--rdc-red-dark, #A91E17); text-decoration: underline; text-underline-offset: 3px; }
.rd-cat__side .product-categories .count {
	margin-left: 4px;
	font-size: 13px;
	color: var(--rdc-muted, #5C5650);
}
.rd-cat__side .product-categories .current-cat > a {
	font-weight: 700;
	color: var(--rdc-red-dark, #A91E17);
}
.rd-cat__side .product-categories .children {
	display: none;
	padding: 2px 0 6px 12px;
	border-left: 2px solid var(--rdc-line, #ECE4D8);
	margin-left: 2px;
}
.rd-cat__side .product-categories .current-cat > .children,
.rd-cat__side .product-categories .current-cat-parent > .children,
.rd-cat__side .product-categories .current-cat-ancestor > .children {
	display: block;
}
.rd-cat__side .product-categories .children a { font-size: 14px; min-height: 32px; }
/* theme's expand arrows */
.rd-cat__side .product-categories .cat-parent > .opener,
.rd-cat__side .product-categories .cat-parent > i,
.rd-cat__side .product-categories .cat-parent > span.toggle { display: none !important; }

/* Price filter */
.rd-cat__side .widget_price_filter .price_slider_wrapper { padding-top: 6px; }
.rd-cat__side .widget_price_filter .price_slider {
	margin: 8px 8px 18px;
	height: 4px;
	background: var(--rdc-line, #ECE4D8);
	border: 0;
	border-radius: 4px;
}
.rd-cat__side .widget_price_filter .ui-slider .ui-slider-range {
	background: var(--rdc-ink, #141414);
	border-radius: 4px;
	top: 0;
	height: 100%;
}
.rd-cat__side .widget_price_filter .ui-slider .ui-slider-handle {
	top: -8px;
	width: 20px;
	height: 20px;
	margin-left: -10px;
	border: 2px solid var(--rdc-ink, #141414);
	border-radius: 50%;
	background: #fff;
	box-shadow: none;
	cursor: grab;
}
.rd-cat__side .widget_price_filter .ui-slider .ui-slider-handle:focus-visible {
	outline: 3px solid var(--rdc-red, #D6281F);
	outline-offset: 2px;
}
.rd-cat__side .widget_price_filter .price_slider_amount {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	text-align: left;
	font-size: 14px;
	line-height: 1.3;
}
.rd-cat__side .widget_price_filter .price_slider_amount .button {
	order: 2;
	float: none;
	height: 40px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: var(--rdc-pill, 999px);
	background: var(--rdc-ink, #141414);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	text-transform: none;
	line-height: 40px;
}
.rd-cat__side .widget_price_filter .price_slider_amount .button:hover { background: #000; }
.rd-cat__side .widget_price_filter .price_label {
	order: 1;
	float: none;
	color: var(--rdc-muted, #5C5650);
}
.rd-cat__side .widget_price_filter .price_label span { color: var(--rdc-ink, #141414); font-weight: 700; }
.rd-cat__side .widget_price_filter .clear { display: none; }

/* Layered nav (attribute filters) */
.rd-cat__side .woocommerce-widget-layered-nav-list { margin: 0; padding: 0; list-style: none; }
.rd-cat__side .woocommerce-widget-layered-nav-list li { padding: 4px 0; }
.rd-cat__side .woocommerce-widget-layered-nav-list a { color: var(--rdc-ink, #141414); }

/* Mobile drawer */
@media (max-width: 991px) {
	/* without JS the sidebar sits below the products */
	.rd-cat__layout { display: flex; flex-direction: column; }
	.rd-cat__side { order: 2; margin-top: 32px; }
	.rd-cat__main { order: 1; }

	.rd-cat--js .rd-cat__side {
		position: fixed;
		z-index: 100000;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(86vw, 360px);
		margin: 0;
		padding: 0 16px 24px;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--rdc-paper, #FAF6F0);
		box-shadow: 0 0 40px rgba(0, 0, 0, .2);
		transform: translateX(-105%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s linear .25s;
	}
	.rd-cat--js.rd-cat--filter-open .rd-cat__side {
		transform: none;
		visibility: visible;
		transition: transform .25s ease;
	}
	.rd-cat--js .rd-cat__side-head {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0 -16px 12px;
		padding: 10px 8px 10px 16px;
		background: var(--rdc-paper, #FAF6F0);
		border-bottom: 1px solid var(--rdc-line, #ECE4D8);
	}
	.rd-cat__side-title { font-size: 18px; font-weight: 800; }
	.rd-cat__side-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: var(--rdc-ink, #141414);
		cursor: pointer;
	}
	.rd-cat__side-close:focus-visible { outline: 3px solid var(--rdc-ink, #141414); }
	.rd-cat__backdrop {
		position: fixed;
		inset: 0;
		z-index: 99999;
		background: rgba(20, 20, 20, .45);
		opacity: 0;
		visibility: hidden;
		transition: opacity .25s ease, visibility 0s linear .25s;
	}
	.rd-cat--filter-open .rd-cat__backdrop {
		opacity: 1;
		visibility: visible;
		transition: opacity .25s ease;
	}
	html.rd-noscroll, html.rd-noscroll body { overflow: hidden; }
}
@media (min-width: 992px) {
	.rd-cat__backdrop { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.rd-cat--js .rd-cat__side, .rd-cat__backdrop { transition: none !important; }
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.rd-cat .woocommerce-pagination {
	margin: 32px 0 0;
	padding: 0;
	text-align: center;
	border: 0;
}
.rd-cat .woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
	white-space: normal;
}
.rd-cat .woocommerce-pagination ul.page-numbers::before,
.rd-cat .woocommerce-pagination ul.page-numbers::after { display: none; }
.rd-cat .woocommerce-pagination ul.page-numbers li {
	float: none;
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: visible;
	background: none;
}
.rd-cat .woocommerce-pagination .page-numbers a,
.rd-cat .woocommerce-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--rdc-line, #ECE4D8);
	border-radius: var(--rdc-pill, 999px);
	background: #fff;
	color: var(--rdc-ink, #141414);
	font-family: var(--rdc-font, 'Work Sans', system-ui, sans-serif);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}
.rd-cat .woocommerce-pagination .page-numbers a:hover,
.rd-cat .woocommerce-pagination .page-numbers a:focus-visible {
	border-color: var(--rdc-ink, #141414);
	background: #fff;
	color: var(--rdc-ink, #141414);
}
.rd-cat .woocommerce-pagination .page-numbers span.current {
	background: var(--rdc-ink, #141414);
	border-color: var(--rdc-ink, #141414);
	color: #fff;
}
.rd-cat .woocommerce-pagination .page-numbers span.dots {
	border-color: transparent;
	background: transparent;
	min-width: 24px;
	padding: 0 4px;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.rd-empty {
	max-width: 640px;
	margin: 8px auto 0;
	padding: 40px 24px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--rdc-line, #ECE4D8);
	border-radius: var(--rdc-radius, 16px);
	font-family: var(--rdc-font, 'Work Sans', system-ui, sans-serif);
	color: var(--rdc-ink, #141414);
}
.rd-empty__icon { color: var(--rdc-red, #D6281F); margin: 0 auto 12px; display: block; }
.rd-empty__title {
	margin: 0 0 8px;
	font-family: inherit;
	font-size: 24px;
	line-height: 1.25;
	font-weight: 800;
	letter-spacing: -.01em;
	text-transform: none;
	color: inherit;
}
.rd-empty__text {
	margin: 0 auto 20px;
	max-width: 440px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--rdc-muted, #5C5650);
}
.rd-empty__search {
	display: flex;
	gap: 8px;
	max-width: 440px;
	margin: 0 auto 20px;
}
.rd-empty__search input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--rdc-line, #ECE4D8);
	border-radius: var(--rdc-pill, 999px);
	background: var(--rdc-paper, #FAF6F0);
	font-family: inherit;
	font-size: 16px;
	color: var(--rdc-ink, #141414);
	box-shadow: none;
}
.rd-empty__search input[type="search"]:focus-visible {
	outline: 3px solid var(--rdc-ink, #141414);
	outline-offset: 1px;
}
.rd-empty__btn {
	height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: var(--rdc-pill, 999px);
	background: var(--rdc-red, #D6281F);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.rd-empty__btn:hover { background: var(--rdc-red-dark, #A91E17); }
.rd-empty__btn:focus-visible { outline: 3px solid var(--rdc-ink, #141414); outline-offset: 2px; }
.rd-empty__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}
@media (max-width: 767px) {
	.rd-empty { padding: 28px 16px; }
	.rd-empty__title { font-size: 20px; }
}

/* Old WooCommerce "no products" notice, in case another template prints it */
.rd-cat .woocommerce-info.woocommerce-no-products-found { display: none; }

/* Pagination arrows: fixed 44 px, fit 7 items on a 360 px phone */
.rd-cat .woocommerce-pagination .page-numbers a.prev,
.rd-cat .woocommerce-pagination .page-numbers a.next {
	width: 44px;
	min-width: 44px;
	padding: 0;
	font-size: 18px;
}
.rd-cat .woocommerce-pagination .page-numbers a.prev::before,
.rd-cat .woocommerce-pagination .page-numbers a.next::before,
.rd-cat .woocommerce-pagination .page-numbers a.prev::after,
.rd-cat .woocommerce-pagination .page-numbers a.next::after { content: none; display: none; }
@media (max-width: 767px) {
	.rd-cat .woocommerce-pagination ul.page-numbers { gap: 4px; }
	.rd-cat .woocommerce-pagination .page-numbers a,
	.rd-cat .woocommerce-pagination .page-numbers span { padding: 0 8px; }
}
