/* Shop archive: breadcrumbs, header, filter bar, product grid, pagination. */

.rb-woo { padding-block: clamp(20px, 3vw, 36px); }

/* --- archive header --------------------------------------------------- */
.rb-archivehead {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
	flex-wrap: wrap;
	padding-block: 14px 20px;
}

.rb-archivehead__title { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.75rem); }
.rb-archivehead p { color: var(--rb-ink-soft); max-width: 58ch; margin-top: 8px; }
.rb-archivehead__count {
	font-family: var(--rb-display);
	font-weight: 600;
	color: var(--rb-blue-dark);
	white-space: nowrap;
}

/* --- filter bar -------------------------------------------------------- */
.rb-filterbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding-block: 12px;
	border-block: 1px solid var(--rb-line);
	margin-bottom: 20px;
}


.rb-filterbar__sort select,
.woocommerce-ordering select {
	min-height: 40px;
	border-radius: 999px;
	border: 0;
	background: var(--rb-white);
	box-shadow: var(--rb-sh-1);
	padding: 0 14px;
	font: inherit;
	font-weight: 700;
	font-size: .875rem;
	color: var(--rb-ink);
	cursor: pointer;
}

/* --- pagination --------------------------------------------------------- */
.woocommerce-pagination { margin-top: 32px; }
.woocommerce-pagination ul {
	display: flex;
	gap: 7px;
	justify-content: center;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
}
.woocommerce-pagination li { border: 0; }
.woocommerce-pagination .page-numbers {
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 13px;
	border-radius: 999px;
	background: var(--rb-white);
	box-shadow: var(--rb-sh-1);
	font-weight: 800;
	color: var(--rb-ink);
}
.woocommerce-pagination .page-numbers.current { background: var(--rb-ink); color: var(--rb-white); }

/* --- empty state --------------------------------------------------------- */
.rb-empty { display: grid; gap: 14px; justify-items: start; max-width: 48ch; padding-block: 24px; }

/* --- notices ------------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-radius: var(--rb-r-card);
	border: 0;
	background: var(--rb-white);
	box-shadow: var(--rb-sh-1);
	padding: 14px 18px;
	list-style: none;
	font-weight: 700;
	border-left: 4px solid var(--rb-blue);
	margin-bottom: 18px;
}
.woocommerce-message { border-left-color: var(--rb-green); }
.woocommerce-error   { border-left-color: var(--rb-orange-dark); }

/* --- filters ------------------------------------------------------------
   Every control is a link or a <details>, so this all works with JS off. */

.rb-fbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.rb-fdrop { position: relative; }

.rb-fdrop > summary {
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 15px;
	border-radius: 999px;
	background: var(--rb-white);
	box-shadow: var(--rb-sh-1);
	font-weight: 700;
	font-size: .875rem;
	cursor: pointer;
	white-space: nowrap;
	user-select: none;
}

.rb-fdrop > summary::-webkit-details-marker { display: none; }

.rb-fdrop > summary::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2.2px solid var(--rb-ink-soft);
	border-bottom: 2.2px solid var(--rb-ink-soft);
	transform: rotate(45deg) translateY(-2px);
	transition: transform .16s;
}

.rb-fdrop[open] > summary { background: var(--rb-ink); color: var(--rb-white); }
.rb-fdrop[open] > summary::after { border-color: var(--rb-white); transform: rotate(225deg) translateY(-2px); }

.rb-fdrop__n {
	background: var(--rb-orange);
	color: var(--rb-white);
	border-radius: 999px;
	min-width: 20px;
	height: 20px;
	display: grid;
	place-items: center;
	font-size: .7rem;
	font-weight: 800;
}

.rb-fdrop__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 20;
	min-width: 248px;
	max-height: 60vh;
	overflow-y: auto;
	background: var(--rb-white);
	border: 1px solid var(--rb-line);
	border-radius: var(--rb-r-card);
	box-shadow: var(--rb-sh-2);
	padding: 10px;
}

.rb-facet__label { font-size: .95rem; margin-bottom: 8px; }
.rb-facet__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.rb-facet__opt {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 10px;
	border-radius: 11px;
	font-size: .9375rem;
	font-weight: 600;
	color: var(--rb-ink);
}

.rb-facet__opt:hover { background: var(--rb-sky); color: var(--rb-ink); }

.rb-facet__box {
	width: 18px;
	height: 18px;
	border-radius: 5px;
	border: 2px solid var(--rb-line);
	background: var(--rb-white);
	flex: none;
	position: relative;
}

.rb-facet__opt.is-on .rb-facet__box { background: var(--rb-blue-dark); border-color: var(--rb-blue-dark); }

.rb-facet__opt.is-on .rb-facet__box::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 5px;
	height: 9px;
	border: solid var(--rb-white);
	border-width: 0 2.4px 2.4px 0;
	transform: rotate(45deg) translate(-1px, -1px);
}

.rb-facet__opt.is-on { font-weight: 800; }
.rb-facet__name { flex: 1; min-width: 0; }
.rb-facet__n { font-size: .78rem; font-weight: 800; color: var(--rb-ink-soft); font-variant-numeric: tabular-nums; }
.rb-facet__opt.is-empty { opacity: .45; }

.rb-ftoggle {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	padding: 0 15px;
	border-radius: 999px;
	background: var(--rb-white);
	box-shadow: var(--rb-sh-1);
	font-weight: 700;
	font-size: .875rem;
	color: var(--rb-ink);
	white-space: nowrap;
}

.rb-ftoggle:hover { box-shadow: var(--rb-sh-2); color: var(--rb-ink); }
.rb-ftoggle.is-on { background: var(--rb-ink); color: var(--rb-white); }
.rb-ftoggle.is-on .rb-facet__box { background: var(--rb-sun); border-color: var(--rb-sun); }

/* --- active chips -------------------------------------------------------- */
.rb-active { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }

.rb-active__label {
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--rb-ink-soft);
}

.rb-active__list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }

.rb-active__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 38px;
	padding: 0 13px;
	border-radius: 999px;
	background: var(--rb-sky);
	color: var(--rb-blue-deep);
	font-weight: 800;
	font-size: .84rem;
}

.rb-active__chip:hover { background: var(--rb-blue-deep); color: var(--rb-white); }
.rb-active__x { font-size: 1rem; line-height: 1; opacity: .7; }
.rb-active__clear { font-weight: 800; font-size: .84rem; color: var(--rb-orange-dark); text-decoration: underline; min-height: 38px; display: inline-flex; align-items: center; }

/* --- mobile sheet --------------------------------------------------------- */
.rb-fsheet { display: none; }
.rb-fsheet__open { list-style: none; }
.rb-fsheet__open::-webkit-details-marker { display: none; }

@media (max-width: 860px) {
	.rb-fbar { display: none; }

	.rb-fsheet { display: block; }

	.rb-fsheet__open {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		min-height: 44px;
		padding: 0 18px;
		border-radius: 999px;
		background: var(--rb-ink);
		color: var(--rb-white);
		font-weight: 800;
		font-size: .9rem;
		cursor: pointer;
	}

	.rb-fsheet__n {
		background: var(--rb-orange);
		border-radius: 999px;
		min-width: 20px;
		height: 20px;
		display: grid;
		place-items: center;
		font-size: .7rem;
	}

	.rb-fsheet[open] { position: fixed; inset: 0; z-index: 80; background: rgba(14, 24, 32, .5); }
	.rb-fsheet[open] .rb-fsheet__open { position: absolute; left: -9999px; }

	.rb-fsheet__panel {
		position: absolute;
		inset-inline: 0;
		bottom: 0;
		max-height: 86vh;
		display: flex;
		flex-direction: column;
		background: var(--rb-cream);
		border-radius: var(--rb-r-slab) var(--rb-r-slab) 0 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		animation: rb-sheet-up .24s cubic-bezier(.2, .8, .3, 1);
	}

	@keyframes rb-sheet-up { from { transform: translateY(100%); } }

	.rb-fsheet__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 18px 18px 12px;
		border-bottom: 1px solid var(--rb-line);
	}

	.rb-fsheet__head h2 { font-size: 1.2rem; }
	.rb-fsheet__clear { font-weight: 800; font-size: .875rem; color: var(--rb-orange-dark); text-decoration: underline; }
	.rb-fsheet__body { overflow-y: auto; padding: 14px 18px 24px; display: grid; gap: 20px; }

	body.rb-sheet-open { overflow: hidden; }
}
