/* ==============================================================
   Yanshur — Shop archive layout & filter sidebar
   Loaded only on product archives (shop / category / search).
   Scoped under .rh_woo_main_archive, which ReHub puts on the
   archive container, so none of it leaks into other pages.
   ============================================================== */

.rh_woo_main_archive{
	--ysc-ink:#182430;
	--ysc-paper:#F8F5EE;
	--ysc-card:#FFFFFF;
	--ysc-red:#C33F31;
	--ysc-brass:#B08935;
	--ysc-green:#3D8361;
	--ysc-slate:#69707E;
	--ysc-line:rgba(24,36,48,0.10);
	--ysc-r-md:14px;
	--ysc-r-sm:9px;
}

/* ---------- Page width ----------
   1000px products + 300px sidebar + 32px gap. The banner wrapper carries
   .ysc-shop-wide so it lines up with the content instead of sitting at the
   theme's narrower default container width. */
.rh_woo_main_archive,
.ysc-shop-wide{
	max-width:1364px !important;
}

/* ---------- Two-column grid ----------
   ReHub floats the sidebar and the products column with percentage widths;
   a grid gives the exact pixel widths asked for and drops the float clearing
   problems that come with them.

   Both columns are placed explicitly rather than left to auto-flow. ReHub
   emits the sidebar before or after the products depending on its layout
   settings, and auto-placement follows source order — which put the products
   in the 300px column and pushed the sidebar onto its own row. Pinning the
   cells makes the result independent of markup order. */
.rh_woo_main_archive .rh-content-wrap{
	display:grid !important;
	/* Narrow filter rail, products take the rest — roughly 1070px inside the
	   1364px container, which keeps the four stat cells on a card readable. */
	grid-template-columns:260px minmax(0, 1fr);
	gap:32px;
	justify-content:center;
	align-items:start;
	float:none !important;
}
.rh_woo_main_archive .rh-content-wrap > .sidebar,
.rh_woo_main_archive .rh-content-wrap > .main-side{
	width:auto !important;
	max-width:none !important;
	float:none !important;
	margin:0 !important;
	padding:0 !important;
}
.rh_woo_main_archive .rh-content-wrap > .sidebar{
	grid-column:1;
	grid-row:1;
}
.rh_woo_main_archive .rh-content-wrap > .main-side{
	grid-column:2;
	grid-row:1;
}
/* Layouts that hide the sidebar mark the products column full_width — let it
   span both tracks so no empty 300px gutter is left behind. */
.rh_woo_main_archive .rh-content-wrap > .main-side.full_width{
	grid-column:1 / -1;
}

@media(max-width:1180px){
	.rh_woo_main_archive .rh-content-wrap{
		grid-template-columns:240px minmax(0, 1fr);
		gap:24px;
	}
}
@media(max-width:900px){
	.rh_woo_main_archive .rh-content-wrap{
		grid-template-columns:1fr;
	}
	/* Stacked: filters above the products. */
	.rh_woo_main_archive .rh-content-wrap > .sidebar{ grid-column:1; grid-row:1; }
	.rh_woo_main_archive .rh-content-wrap > .main-side{ grid-column:1; grid-row:2; }
}

/* ---------- Toolbar: result count + sorting ---------- */
.rh_woo_main_archive .woocommerce-result-count{
	font-family:'Inter',sans-serif;
	font-size:13px;
	color:var(--ysc-slate);
	margin:0;
	float:none;
	line-height:42px;
}
.rh_woo_main_archive .woocommerce-ordering{
	float:none;
	margin:0;
}
.rh_woo_main_archive form.woocommerce-ordering{
	display:inline-block;
}

/* ReHub replaces the <select> with its own .nice-select markup, so both are
   styled — whichever renders gets the same look. */
.rh_woo_main_archive .woocommerce-ordering select.orderby,
.rh_woo_main_archive .woocommerce-ordering .nice-select{
	background:var(--ysc-card);
	border:1px solid var(--ysc-line) !important;
	border-radius:100px !important;
	padding:0 40px 0 18px !important;
	height:42px !important;
	line-height:42px !important;
	font-family:'Inter',sans-serif;
	font-size:13px;
	font-weight:500;
	color:var(--ysc-ink);
	box-shadow:none !important;
}
.rh_woo_main_archive .woocommerce-ordering .nice-select::after{
	border-bottom:2px solid var(--ysc-slate);
	border-right:2px solid var(--ysc-slate);
	width:6px;
	height:6px;
	right:18px;
}
.rh_woo_main_archive .woocommerce-ordering .nice-select .list{
	border:1px solid var(--ysc-line);
	border-radius:var(--ysc-r-md);
	box-shadow:0 18px 40px -18px rgba(24,36,48,0.18);
	padding:6px;
	margin-top:6px;
}
.rh_woo_main_archive .woocommerce-ordering .nice-select .option{
	font-family:'Inter',sans-serif;
	font-size:13px;
	border-radius:var(--ysc-r-sm);
	line-height:34px;
	min-height:34px;
	padding:0 12px;
}
.rh_woo_main_archive .woocommerce-ordering .nice-select .option.selected{
	font-weight:600;
	color:var(--ysc-red);
}

/* ---------- Filter sidebar ----------
   Every widget becomes the same white card, so price / categories /
   attribute filters stop each having their own look. */
.rh_woo_main_archive .sidebar .widget{
	background:var(--ysc-card);
	border:1px solid var(--ysc-line);
	border-radius:var(--ysc-r-md);
	padding:18px;
	margin:0 0 16px !important;
	box-shadow:none;
	float:none;
	width:auto;
}

.rh_woo_main_archive .sidebar .widget > h2,
.rh_woo_main_archive .sidebar .widget > h3,
.rh_woo_main_archive .sidebar .widget > h4,
.rh_woo_main_archive .sidebar .widget .widget-title,
.rh_woo_main_archive .sidebar .widget .widgettitle{
	font-family:'Fraunces',serif !important;
	font-size:15px !important;
	font-weight:600 !important;
	color:var(--ysc-ink) !important;
	margin:0 0 14px !important;
	padding:0 0 12px !important;
	border-bottom:1px solid var(--ysc-line) !important;
	background:none !important;
	text-transform:none !important;
	letter-spacing:0 !important;
}
.rh_woo_main_archive .sidebar .widget .widget-title::before,
.rh_woo_main_archive .sidebar .widget .widget-title::after{
	display:none !important;
}

/* Lists: categories, layered nav, attribute filters */
.rh_woo_main_archive .sidebar .widget ul{
	margin:0;
	padding:0;
	list-style:none;
}
.rh_woo_main_archive .sidebar .widget ul li{
	list-style:none;
	padding:9px 0;
	margin:0;
	border-top:1px solid var(--ysc-line);
	font-family:'Inter',sans-serif;
	font-size:13.5px;
	color:var(--ysc-ink);
	line-height:1.5;
}
.rh_woo_main_archive .sidebar .widget ul li:first-child{ border-top:none; }
.rh_woo_main_archive .sidebar .widget ul li a{
	color:var(--ysc-ink);
	text-decoration:none;
	transition:.15s;
}
.rh_woo_main_archive .sidebar .widget ul li a:hover{ color:var(--ysc-red); }
.rh_woo_main_archive .sidebar .widget ul li .count{
	color:var(--ysc-slate);
	font-family:'IBM Plex Mono',monospace;
	font-size:11px;
}
.rh_woo_main_archive .sidebar .widget ul li.chosen > a,
.rh_woo_main_archive .sidebar .widget ul li.current-cat > a{
	color:var(--ysc-red);
	font-weight:600;
}

/* ---------- Price filter ---------- */
.rh_woo_main_archive .widget_price_filter .price_slider_wrapper{ margin-top:4px; }
.rh_woo_main_archive .widget_price_filter .ui-slider{
	background:rgba(24,36,48,0.12);
	height:4px;
	border:none;
	border-radius:100px;
	margin:14px 0 20px;
}
.rh_woo_main_archive .widget_price_filter .ui-slider .ui-slider-range{
	background:var(--ysc-red);
	border-radius:100px;
}
.rh_woo_main_archive .widget_price_filter .ui-slider .ui-slider-handle{
	background:var(--ysc-card);
	border:2px solid var(--ysc-red);
	width:16px;
	height:16px;
	border-radius:50%;
	top:-6px;
	margin-left:-8px;
	box-shadow:0 2px 6px rgba(24,36,48,0.18);
}
.rh_woo_main_archive .widget_price_filter .price_slider_amount{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
}
.rh_woo_main_archive .widget_price_filter .price_slider_amount .price_label{
	font-family:'IBM Plex Mono',monospace;
	font-size:11.5px;
	color:var(--ysc-slate);
	order:2;
}
.rh_woo_main_archive .widget_price_filter .price_slider_amount .button{
	order:1;
	background:var(--ysc-ink) !important;
	color:#fff !important;
	border:none !important;
	border-radius:100px !important;
	padding:10px 22px !important;
	font-family:'Inter',sans-serif !important;
	font-size:12.5px !important;
	font-weight:600 !important;
	float:none !important;
	transition:.18s;
}
.rh_woo_main_archive .widget_price_filter .price_slider_amount .button:hover{
	background:var(--ysc-red) !important;
}

/* ---------- Active filter chips ---------- */
.rh_woo_main_archive .widget_layered_nav_filters ul li,
.rh_woo_main_archive .woocommerce-widget-layered-nav-list li.chosen{
	border:none;
	padding:0;
	margin:0 6px 6px 0;
	display:inline-block;
}
.rh_woo_main_archive .widget_layered_nav_filters ul li a{
	background:var(--ysc-paper);
	border:1px solid var(--ysc-line);
	border-radius:100px;
	padding:5px 12px;
	font-size:12px;
	display:inline-block;
}
