/* ==========================================================================
   Red Crafta — the shop archive.
   Loads after home.css, which already owns the header, the footer, .rc-btn,
   .rc-eyebrow and the reveal utilities. Everything here is the catalogue:
   the banner, the utility bar, the filter sidebar and the product grid.
   Every value is a token. No literal colour, radius or shadow appears below.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. The banner
   -------------------------------------------------------------------------- */
.rc-shop-hero {
	position: relative;
	display: grid;
	place-items: center;
	min-height: clamp(260px, 34vw, 440px);
	padding-block: var(--rc-space-xl);
	padding-inline: var(--rc-gutter);
	overflow: hidden;
	isolation: isolate;
	background: var(--rc-forest);
}

.rc-shop-hero__media {
	position: absolute;
	inset: 0;
	z-index: var(--rc-z-ornament);
}

.rc-shop-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rc-shop-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--rc-scrim);
}

.rc-shop-hero__inner {
	position: relative;
	z-index: var(--rc-z-content);
	width: 100%;
	max-width: var(--rc-container);
	margin-inline: auto;
	text-align: center;
}

.rc-shop-hero .rc-eyebrow {
	color: var(--rc-gold);
	margin-block-end: var(--rc-space-sm);
}

.rc-shop-hero__title {
	font-family: var(--rc-font-display);
	font-weight: var(--rc-weight-display);
	font-size: var(--rc-size-h2);
	line-height: var(--rc-leading-head);
	letter-spacing: var(--rc-track-display);
	color: var(--rc-on-forest);
	margin: 0;
}

.rc-shop-hero__title:lang(si) {
	font-family: var(--rc-font-sinhala);
	letter-spacing: normal;
	font-size: calc(var(--rc-size-h2) * 0.84);
	line-height: 1.4;
}

.rc-shop-hero__lead {
	margin: var(--rc-space-sm) auto 0;
	max-width: 52ch;
	font-size: var(--rc-size-lead);
	line-height: var(--rc-leading-body);
	color: var(--rc-on-forest-soft);
}

/* A category page opens with an introduction rather than a label, so it holds
   a second line and a row into its sub-categories. The extra height is set
   here and not on the shop banner, which still has only a title to carry. */
.rc-shop-hero--category {
	min-height: clamp(380px, 44vw, 560px);
}

.rc-shop-hero__note {
	margin: var(--rc-space-xs) auto 0;
	max-width: 58ch;
	font-size: var(--rc-size-small);
	line-height: var(--rc-leading-body);
	color: var(--rc-on-forest-soft);
}

.rc-shop-hero__kids {
	margin-block-start: var(--rc-space-md);
}

.rc-shop-hero__kid-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--rc-space-2xs);
}

.rc-shop-hero__kid {
	display: inline-block;
	padding: var(--rc-space-2xs) var(--rc-space-sm);
	border: var(--rc-hairline) solid var(--rc-rule-on-forest);
	border-radius: var(--rc-radius-none);
	font-size: var(--rc-size-label-lg);
	font-weight: var(--rc-weight-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--rc-on-forest);
	transition: color var(--rc-duration-fast) var(--rc-ease),
	            background-color var(--rc-duration-fast) var(--rc-ease),
	            border-color var(--rc-duration-fast) var(--rc-ease);
}

.rc-shop-hero__kid:hover,
.rc-shop-hero__kid:focus-visible {
	color: var(--rc-forest);
	background: var(--rc-cream);
	border-color: var(--rc-cream);
}

/* The element-level form, because the switcher sets lang on <html> and every
   descendant inherits it: a descendant selector would match the chip from the
   page rather than from the chip, and fire on English too. */
.rc-shop-hero__kid:lang(si) {
	letter-spacing: normal;
	text-transform: none;
}

/* --------------------------------------------------------------------------
   2. Shell
   -------------------------------------------------------------------------- */
.rc-shop {
	background: var(--rc-page);
	padding-block: var(--rc-space-xl);
}

.rc-shop__inner {
	width: 100%;
	max-width: var(--rc-container-wide);
	margin-inline: auto;
	padding-inline: var(--rc-gutter);
}

/* --------------------------------------------------------------------------
   3. The utility bar
   -------------------------------------------------------------------------- */
.rc-toolbar {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	border: var(--rc-hairline) solid var(--rc-rule-strong);
	background: var(--rc-surface);
	margin-block-end: var(--rc-space-lg);
}

.rc-toolbar__cell {
	display: flex;
	align-items: center;
	border-inline-end: var(--rc-hairline) solid var(--rc-rule);
}

.rc-toolbar__cell--views {
	margin-inline-start: auto;
	border-inline-end: 0;
	border-inline-start: var(--rc-hairline) solid var(--rc-rule);
}

/* The toggle and the sort control share one quiet, tracked-out label style. */
.rc-tool {
	display: inline-flex;
	align-items: center;
	gap: var(--rc-space-2xs);
	padding: var(--rc-space-xs) var(--rc-space-sm);
	font-size: var(--rc-size-label);
	font-weight: var(--rc-weight-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--rc-ink);
	background: transparent;
	border: 0;
	cursor: pointer;
	transition: color var(--rc-duration-fast) var(--rc-ease);
}

.rc-tool:hover,
.rc-tool:focus-visible { color: var(--rc-terracotta); }

.rc-tool__text:lang(si) {
	letter-spacing: normal;
	text-transform: none;
	font-family: var(--rc-font-sinhala);
}

.rc-tool__icon {
	display: inline-flex;
	color: var(--rc-earth);
}

.rc-tool__icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* --- sorting ------------------------------------------------------------- */
.rc-sort {
	display: inline-flex;
	align-items: center;
	gap: var(--rc-space-2xs);
	padding: var(--rc-space-xs) var(--rc-space-sm);
	position: relative;
}

.rc-sort .rc-tool__icon svg {
	width: 18px;
	height: 18px;
}

.rc-sort__select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	border-radius: var(--rc-radius-none);
	padding-inline: var(--rc-space-3xs) var(--rc-space-sm);
	padding-block: var(--rc-space-3xs);
	font-family: var(--rc-font-body);
	font-size: var(--rc-size-label);
	font-weight: var(--rc-weight-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-ink);
	cursor: pointer;
}

.rc-sort__select:lang(si) {
	letter-spacing: normal;
	text-transform: none;
	font-family: var(--rc-font-sinhala);
}

.rc-sort__chevron {
	display: inline-flex;
	pointer-events: none;
	margin-inline-start: calc(var(--rc-space-sm) * -1);
	color: var(--rc-earth);
}

.rc-sort__chevron svg {
	width: 14px;
	height: 14px;
	display: block;
}

.rc-sort__go {
	margin-inline-start: var(--rc-space-2xs);
	padding: var(--rc-space-3xs) var(--rc-space-xs);
	border: var(--rc-hairline) solid var(--rc-rule-strong);
	border-radius: var(--rc-radius-none);
	background: transparent;
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-ink);
	cursor: pointer;
}

/* --- view switchers ------------------------------------------------------ */
.rc-view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	align-self: stretch;
	color: var(--rc-ink-soft);
	border-inline-end: var(--rc-hairline) solid var(--rc-rule);
	transition: color var(--rc-duration-fast) var(--rc-ease),
	            background-color var(--rc-duration-fast) var(--rc-ease);
}

.rc-view:last-child { border-inline-end: 0; }

.rc-view svg {
	width: 18px;
	height: 18px;
	display: block;
}

.rc-view:hover,
.rc-view:focus-visible { color: var(--rc-terracotta); }

.rc-view.is-active {
	color: var(--rc-cream);
	background: var(--rc-accent);
}

/* --------------------------------------------------------------------------
   4. Sidebar and grid
   -------------------------------------------------------------------------- */
.rc-shop__body {
	display: grid;
	grid-template-columns: minmax(0, 274px) minmax(0, 1fr);
	gap: var(--rc-space-lg);
	align-items: start;
	transition: grid-template-columns var(--rc-duration) var(--rc-ease);
}

.rc-shop[data-rc-sidebar="closed"] .rc-shop__body {
	grid-template-columns: minmax(0, 0px) minmax(0, 1fr);
	gap: 0;
}

.rc-filters {
	overflow: hidden;
	transition: opacity var(--rc-duration-fast) var(--rc-ease),
	            visibility 0s linear 0s;
}

.rc-shop[data-rc-sidebar="closed"] .rc-filters {
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--rc-duration-fast) var(--rc-ease),
	            visibility 0s linear var(--rc-duration);
}

.rc-filters__form {
	display: grid;
	gap: var(--rc-space-lg);
	min-width: 234px;
}

.rc-filter__title {
	font-family: var(--rc-font-display);
	font-weight: var(--rc-weight-display);
	font-size: var(--rc-size-label-lg);
	letter-spacing: var(--rc-track-label-wide);
	text-transform: uppercase;
	color: var(--rc-ink);
	margin: 0 0 var(--rc-space-sm);
	padding-block-end: var(--rc-space-xs);
	border-bottom: var(--rc-hairline) solid var(--rc-rule-strong);
}

.rc-filter__title:lang(si) {
	font-family: var(--rc-font-sinhala);
	letter-spacing: normal;
	text-transform: none;
	font-size: var(--rc-size-body);
}

.rc-filter__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--rc-space-xs);
}

/* --- custom square checkbox ---------------------------------------------- */
.rc-check {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--rc-space-2xs);
	cursor: pointer;
	font-size: var(--rc-size-small);
	color: var(--rc-ink);
}

.rc-check__input {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.rc-check__box {
	width: 15px;
	height: 15px;
	border: var(--rc-hairline) solid var(--rc-rule-strong);
	border-radius: var(--rc-radius-none);
	background: var(--rc-surface);
	position: relative;
	transition: background-color var(--rc-duration-fast) var(--rc-ease),
	            border-color var(--rc-duration-fast) var(--rc-ease);
}

.rc-check__box::after {
	content: "";
	position: absolute;
	inset-inline-start: 4px;
	inset-block-start: 1px;
	width: 4px;
	height: 8px;
	border-inline-end: 2px solid var(--rc-cream);
	border-block-end: 2px solid var(--rc-cream);
	transform: rotate(42deg) scale(0);
	transition: transform var(--rc-duration-fast) var(--rc-ease);
}

/* Forest green is the ground this site is built on - the strip, the footer,
   the nav. A ticked filter is not ground, it is something the visitor did,
   and it reads better in the accent than in the same green as the chrome
   around it. The tick itself stays cream: 4.10:1 against terracotta, which is
   what a graphical mark is held to. */
.rc-check__input:checked + .rc-check__box {
	background: var(--rc-accent);
	border-color: var(--rc-accent);
}

.rc-check__input:checked + .rc-check__box::after { transform: rotate(42deg) scale(1); }

.rc-check__input:focus-visible + .rc-check__box {
	outline: var(--rc-hairline) solid var(--rc-terracotta);
	outline-offset: 3px;
}

.rc-check__name:lang(si) { font-family: var(--rc-font-sinhala); }

.rc-check:hover .rc-check__name { color: var(--rc-terracotta); }

.rc-check__count {
	font-size: var(--rc-size-label);
	color: var(--rc-ink-soft);
	font-variant-numeric: tabular-nums;
}

/* --- dual-handle price slider -------------------------------------------- */
.rc-range {
	position: relative;
	height: 34px;
	margin-block-start: var(--rc-space-2xs);
}

.rc-range.is-disabled { opacity: 0.45; }

.rc-range__track {
	position: absolute;
	inset-inline: 7px;
	inset-block-start: 50%;
	height: 2px;
	transform: translateY(-50%);
	background: var(--rc-rule-strong);
}

.rc-range__fill {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	inset-inline-end: 0;
	background: var(--rc-terracotta);
}

.rc-range__input {
	position: absolute;
	inset-inline: 0;
	inset-block-start: 50%;
	transform: translateY(-50%);
	width: 100%;
	height: 34px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	pointer-events: none;
}

.rc-range__input:focus { outline: none; }

.rc-range__input--min { z-index: 2; }
.rc-range__input--max { z-index: 3; }

.rc-range__input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 14px;
	height: 14px;
	border-radius: var(--rc-radius-none);
	background: var(--rc-forest);
	border: var(--rc-hairline) solid var(--rc-gold);
	cursor: ew-resize;
}

.rc-range__input::-moz-range-thumb {
	pointer-events: auto;
	width: 14px;
	height: 14px;
	border-radius: var(--rc-radius-none);
	background: var(--rc-forest);
	border: var(--rc-hairline) solid var(--rc-gold);
	cursor: ew-resize;
}

.rc-range__input:focus-visible::-webkit-slider-thumb { border-color: var(--rc-terracotta); }
.rc-range__input:focus-visible::-moz-range-thumb { border-color: var(--rc-terracotta); }

.rc-range__read {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--rc-space-2xs);
	margin: var(--rc-space-xs) 0 0;
	font-size: var(--rc-size-small);
	color: var(--rc-ink);
}

.rc-range__legend {
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-ink-soft);
}

.rc-range__legend:lang(si) {
	letter-spacing: normal;
	text-transform: none;
	font-family: var(--rc-font-sinhala);
}

.rc-range__value {
	font-variant-numeric: tabular-nums;
	text-align: end;
}

.rc-range__value--pending {
	font-style: italic;
	color: var(--rc-ink-soft);
}

.rc-range__value--pending:lang(si) { font-family: var(--rc-font-sinhala); font-style: normal; }

.rc-filter__note {
	margin: var(--rc-space-xs) 0 0;
	font-size: var(--rc-size-label);
	line-height: var(--rc-leading-tight);
	color: var(--rc-ink-soft);
}

.rc-filter__note:lang(si) { font-family: var(--rc-font-sinhala); }

.rc-filter__apply {
	margin-block-start: var(--rc-space-sm);
	width: 100%;
	padding: 0.9rem var(--rc-space-sm);
	background: var(--rc-forest);
	color: var(--rc-cream);
	border: var(--rc-hairline) solid var(--rc-forest);
	border-radius: var(--rc-radius-none);
	font-family: var(--rc-font-body);
	font-size: var(--rc-size-label);
	font-weight: var(--rc-weight-label);
	letter-spacing: var(--rc-track-button);
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--rc-duration-fast) var(--rc-ease),
	            border-color var(--rc-duration-fast) var(--rc-ease);
}

.rc-filter__apply:hover,
.rc-filter__apply:focus-visible {
	background: var(--rc-terracotta);
	border-color: var(--rc-terracotta);
}

.rc-filter__apply:lang(si) {
	letter-spacing: normal;
	text-transform: none;
	font-family: var(--rc-font-sinhala);
}

.rc-filter__clear {
	display: inline-block;
	margin-block-start: var(--rc-space-xs);
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-earth);
	text-decoration: none;
	border-bottom: var(--rc-hairline) solid var(--rc-rule-accent);
}

.rc-filter__clear:hover,
.rc-filter__clear:focus-visible { border-bottom-color: var(--rc-terracotta); color: var(--rc-terracotta); }

.rc-filter__clear:lang(si) { letter-spacing: normal; text-transform: none; font-family: var(--rc-font-sinhala); }

/* --------------------------------------------------------------------------
   5. The product grid
   -------------------------------------------------------------------------- */
.rc-shop__main { min-width: 0; }

.rc-shop__count {
	margin: 0 0 var(--rc-space-sm);
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-ink-soft);
}

.rc-shop__count:lang(si) { letter-spacing: normal; text-transform: none; font-family: var(--rc-font-sinhala); }

.rc-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--rc-space-md);
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rc-shop[data-rc-view="grid-3"] .rc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rc-shop[data-rc-view="grid-2"] .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc-shop[data-rc-view="list"] .rc-grid { grid-template-columns: minmax(0, 1fr); }

.rc-card {
	display: flex;
	flex-direction: column;
	background: var(--rc-surface);
	border: var(--rc-hairline) solid var(--rc-rule);
	border-radius: var(--rc-radius-none);
	transition: border-color var(--rc-duration-fast) var(--rc-ease),
	            box-shadow var(--rc-duration) var(--rc-ease);
}

.rc-card:hover {
	border-color: var(--rc-rule-accent);
	box-shadow: var(--rc-shadow-lift);
}

/* --- the square plate ----------------------------------------------------- */
/* One ratio for every piece, whatever shape the photograph arrived in: the
   frame is the square and the image is cropped to fill it, so a row of cards
   reads as a row rather than a staircase. */
.rc-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: var(--rc-page);
	border-radius: var(--rc-radius-none);
}

.rc-card__shot {
	display: block;
	width: 100%;
	height: 100%;
}

.rc-card__img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--rc-radius-none);
	transition: transform var(--rc-duration-slow) var(--rc-ease);
}

.rc-card:hover .rc-card__img { transform: scale(1.03); }

/* --- the three actions ---------------------------------------------------- */
/* Down until the card is pointed at or tabbed into. The hiding is opacity and
   pointer-events, never visibility: a visibility-hidden button is out of the
   tab order, so a keyboard visitor would tab straight past all three and never
   learn they exist. Left faded they stay focusable, and the first Tab onto one
   satisfies :focus-within, which brings the whole row up. */
.rc-card__actions {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: var(--rc-z-content);
	display: flex;
	justify-content: center;
	gap: var(--rc-space-3xs);
	padding: var(--rc-space-2xs);
	opacity: 0;
	pointer-events: none;
	transform: translateY(var(--rc-space-sm));
	transition: opacity var(--rc-duration-fast) var(--rc-ease),
	            transform var(--rc-duration-fast) var(--rc-ease);
}

.rc-card:hover .rc-card__actions,
.rc-card:focus-within .rc-card__actions {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

/* A phone has no hover to give. Gated on hover alone the row would never come
   up there, and because it is left un-tappable while down every tap meant for
   quick view, wishlist or compare would fall through to the image link behind
   it. On a touch screen the row simply stays up. */
@media (hover: none) {
	.rc-card__actions {
		opacity: 1;
		pointer-events: auto;
		transform: none;
	}
}

.rc-card__action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 2.75rem;
	block-size: 2.75rem;
	padding: 0;
	background: var(--rc-cream);
	color: var(--rc-forest);
	border: var(--rc-hairline) solid var(--rc-rule);
	border-radius: var(--rc-radius-none);
	cursor: pointer;
	transition: color var(--rc-duration-fast) var(--rc-ease),
	            border-color var(--rc-duration-fast) var(--rc-ease),
	            background-color var(--rc-duration-fast) var(--rc-ease);
}

.rc-card__action svg {
	inline-size: 1.25rem;
	block-size: 1.25rem;
}

.rc-card__action:hover,
.rc-card__action:focus-visible {
	background: var(--rc-cream-light);
	color: var(--rc-terracotta);
	border-color: var(--rc-terracotta);
}

/* Wishlist and compare are toggles, so they have to look held down once they
   are. Gold, not terracotta, so "on" never reads as "hovered". */
.rc-card__action.is-on {
	color: var(--rc-gold);
	border-color: var(--rc-gold);
}

.rc-card__action.is-on:hover,
.rc-card__action.is-on:focus-visible { color: var(--rc-terracotta); border-color: var(--rc-terracotta); }

.rc-card__tip {
	position: absolute;
	inset-block-end: calc(100% + var(--rc-space-3xs));
	inset-inline-start: 50%;
	transform: translateX(-50%);
	padding: 0.3rem 0.55rem;
	background: var(--rc-forest);
	color: var(--rc-on-forest);
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity var(--rc-duration-fast) var(--rc-ease);
}

.rc-card__tip:lang(si) { letter-spacing: normal; text-transform: none; font-family: var(--rc-font-sinhala); }

.rc-card__action:hover .rc-card__tip,
.rc-card__action:focus-visible .rc-card__tip { opacity: 1; }

/* --- name, price, cart: these three and nothing else ---------------------- */
.rc-card__body {
	flex: 1 1 auto;
	padding: var(--rc-space-sm);
	display: grid;
	gap: var(--rc-space-2xs);
	align-content: start;
	justify-items: center;
	text-align: center;
}

.rc-card__title {
	margin: 0;
	font-family: var(--rc-font-display);
	font-weight: var(--rc-weight-display);
	font-size: var(--rc-size-h5);
	line-height: var(--rc-leading-tight);
	letter-spacing: var(--rc-track-display);
}

.rc-card__title a {
	color: var(--rc-forest);
	text-decoration: none;
}

.rc-card__title a:hover,
.rc-card__title a:focus-visible { color: var(--rc-terracotta); }

.rc-card__price {
	margin: 0;
	font-size: var(--rc-size-small);
	font-weight: var(--rc-weight-label);
	color: var(--rc-accent-ink);
	font-variant-numeric: tabular-nums;
}

.rc-card__price del { color: var(--rc-ink-soft); font-weight: inherit; margin-inline-end: var(--rc-space-3xs); }
.rc-card__price ins { text-decoration: none; color: var(--rc-earth); }

.rc-card__price--pending {
	font-style: italic;
	font-weight: inherit;
	color: var(--rc-ink-soft);
}

.rc-card__price--pending:lang(si) { font-family: var(--rc-font-sinhala); font-style: normal; }

/* The cart button never hides behind a hover: it sits under the price at all
   times, which is the whole point of putting it there. */
.rc-card__cart {
	width: 100%;
	margin-block-start: var(--rc-space-3xs);
	justify-content: center;
	font-size: var(--rc-size-label);
	padding-block: 0.8rem;
	padding-inline: var(--rc-space-xs);
	text-align: center;
	background: var(--rc-forest);
	color: var(--rc-cream);
	border-color: var(--rc-forest);
}

.rc-card__cart:hover,
.rc-card__cart:focus-visible {
	background: var(--rc-terracotta);
	border-color: var(--rc-terracotta);
	color: var(--rc-cream-light);
}

.rc-card__cart.loading { opacity: 0.6; cursor: progress; }

/* WooCommerce drops its own "View cart" link in after a successful add. It is
   not one of the three, so it is kept quiet — a text link, not a second
   button. */
.rc-card__body .added_to_cart {
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-earth);
	text-decoration: none;
	border-bottom: var(--rc-hairline) solid var(--rc-rule-strong);
	padding-block-end: var(--rc-space-3xs);
}

.rc-card__body .added_to_cart:hover,
.rc-card__body .added_to_cart:focus-visible { color: var(--rc-terracotta); border-color: var(--rc-terracotta); }

.rc-card__body .added_to_cart:lang(si) { letter-spacing: normal; text-transform: none; font-family: var(--rc-font-sinhala); }

/* --- list view ------------------------------------------------------------ */
.rc-shop[data-rc-view="list"] .rc-card {
	display: grid;
	grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
	align-items: center;
}

.rc-shop[data-rc-view="list"] .rc-card__body {
	text-align: start;
	justify-items: start;
	align-content: center;
	padding: var(--rc-space-sm) var(--rc-space-md);
}

.rc-shop[data-rc-view="list"] .rc-card__cart { width: auto; }

@media (prefers-reduced-motion: reduce) {
	.rc-card__actions,
	.rc-card:hover .rc-card__actions,
	.rc-card:focus-within .rc-card__actions { transform: none; }

	.rc-card:hover .rc-card__img { transform: none; }
}

/* --------------------------------------------------------------------------
   6. Pagination, notices, empty state
   -------------------------------------------------------------------------- */
.rc-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rc-space-2xs);
	justify-content: center;
	margin-block-start: var(--rc-space-lg);
}

.rc-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding-inline: var(--rc-space-2xs);
	border: var(--rc-hairline) solid var(--rc-rule);
	border-radius: var(--rc-radius-none);
	font-size: var(--rc-size-small);
	color: var(--rc-ink);
	text-decoration: none;
	transition: border-color var(--rc-duration-fast) var(--rc-ease),
	            color var(--rc-duration-fast) var(--rc-ease);
}

.rc-pagination .page-numbers:hover { border-color: var(--rc-terracotta); color: var(--rc-terracotta); }

.rc-pagination .page-numbers.current {
	background: var(--rc-forest);
	border-color: var(--rc-forest);
	color: var(--rc-cream);
}

.rc-shop__empty {
	display: grid;
	gap: var(--rc-space-sm);
	justify-items: start;
	padding-block: var(--rc-space-lg);
}

.rc-shop .woocommerce-notices-wrapper ul,
.rc-shop .woocommerce-notices-wrapper div {
	list-style: none;
	margin: 0 0 var(--rc-space-sm);
	padding: var(--rc-space-xs) var(--rc-space-sm);
	border: var(--rc-hairline) solid var(--rc-rule-strong);
	background: var(--rc-surface);
	font-size: var(--rc-size-small);
	color: var(--rc-ink);
}

/* --------------------------------------------------------------------------
   7. Quick view
   -------------------------------------------------------------------------- */
/* The shell carries hidden while it is shut, so nothing inside it is tabbable
   or readable until it is actually open — the fade is decoration, the
   attribute is the state. */
.rc-quick[hidden] { display: none; }

.rc-quick {
	position: fixed;
	inset: 0;
	z-index: var(--rc-z-modal);
	display: grid;
	place-items: center;
	padding: var(--rc-space-md);
}

.rc-quick__scrim {
	position: absolute;
	inset: 0;
	background: var(--rc-scrim);
	opacity: 0;
	transition: opacity var(--rc-duration-fast) var(--rc-ease);
}

.rc-quick__panel {
	position: relative;
	inline-size: min(60rem, 100%);
	max-block-size: min(44rem, 88vh);
	overflow: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--rc-space-md);
	padding: var(--rc-space-md);
	background: var(--rc-surface);
	border: var(--rc-hairline) solid var(--rc-rule-strong);
	border-radius: var(--rc-radius-none);
	box-shadow: var(--rc-shadow-image);
	opacity: 0;
	transform: translateY(var(--rc-space-sm));
	transition: opacity var(--rc-duration-fast) var(--rc-ease),
	            transform var(--rc-duration-fast) var(--rc-ease);
}

.rc-quick.is-open .rc-quick__scrim { opacity: 1; }

.rc-quick.is-open .rc-quick__panel {
	opacity: 1;
	transform: translateY(0);
}

.rc-quick__close {
	position: absolute;
	inset-block-start: var(--rc-space-2xs);
	inset-inline-end: var(--rc-space-2xs);
	z-index: var(--rc-z-content);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	padding: 0;
	background: var(--rc-cream);
	color: var(--rc-forest);
	border: var(--rc-hairline) solid var(--rc-rule);
	border-radius: var(--rc-radius-none);
	cursor: pointer;
	transition: color var(--rc-duration-fast) var(--rc-ease),
	            border-color var(--rc-duration-fast) var(--rc-ease);
}

.rc-quick__close:hover,
.rc-quick__close:focus-visible { color: var(--rc-terracotta); border-color: var(--rc-terracotta); }

.rc-quick__close svg { inline-size: 1.15rem; block-size: 1.15rem; }

.rc-quick__inner {
	display: contents;
}

.rc-quick__media {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--rc-page);
}

.rc-quick__img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.rc-quick__body {
	display: grid;
	gap: var(--rc-space-2xs);
	align-content: start;
	padding-inline-end: var(--rc-space-md);
}

.rc-quick__cat {
	margin: 0;
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-earth);
}

.rc-quick__cat:lang(si) { letter-spacing: normal; text-transform: none; font-family: var(--rc-font-sinhala); }

.rc-quick__title {
	margin: 0;
	font-family: var(--rc-font-display);
	font-weight: var(--rc-weight-display);
	font-size: var(--rc-size-h2);
	line-height: var(--rc-leading-tight);
	letter-spacing: var(--rc-track-display);
	color: var(--rc-forest);
}

.rc-quick__price {
	margin: 0;
	font-size: var(--rc-size-h3);
	color: var(--rc-terracotta);
	font-variant-numeric: tabular-nums;
}

.rc-quick__price del { color: var(--rc-ink-soft); margin-inline-end: var(--rc-space-3xs); }
.rc-quick__price ins { text-decoration: none; color: var(--rc-earth); }

.rc-quick__text { color: var(--rc-ink-soft); }
.rc-quick__text p { margin: 0 0 var(--rc-space-2xs); }

.rc-quick__specs {
	margin: 0;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: var(--rc-space-3xs) var(--rc-space-sm);
	font-size: var(--rc-size-small);
	border-block-start: var(--rc-hairline) solid var(--rc-rule);
	padding-block-start: var(--rc-space-2xs);
}

.rc-quick__specs dt {
	margin: 0;
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-ink-soft);
}

.rc-quick__specs dd { margin: 0; color: var(--rc-ink); }

.rc-quick__foot {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rc-space-2xs);
	margin-block-start: var(--rc-space-2xs);
}

/* The cart button is the card's, borrowed: in here it sits beside the full
   details link rather than filling a column on its own. */
.rc-quick__foot .rc-card__cart { width: auto; margin-block-start: 0; }

.rc-quick__foot .added_to_cart {
	align-self: center;
	font-size: var(--rc-size-label);
	letter-spacing: var(--rc-track-label);
	text-transform: uppercase;
	color: var(--rc-earth);
	text-decoration: none;
	border-bottom: var(--rc-hairline) solid var(--rc-rule-strong);
}

.rc-quick__foot .added_to_cart:lang(si) { letter-spacing: normal; text-transform: none; font-family: var(--rc-font-sinhala); }

.rc-quick__note {
	margin: 0;
	grid-column: 1 / -1;
	text-align: center;
	color: var(--rc-ink-soft);
}

.rc-quick__note:lang(si) { font-family: var(--rc-font-sinhala); }

@media (max-width: 860px) {
	.rc-quick__panel { grid-template-columns: minmax(0, 1fr); }
	.rc-quick__body { padding-inline-end: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.rc-quick__panel { transform: none; transition: none; }
	.rc-quick__scrim { transition: none; }
}

/* --------------------------------------------------------------------------
   8. Narrower screens

   The lines are the site's own, declared once in tokens.css: desktop from
   1024px, tablet below it, phone below 768px. This sheet used to draw its
   own at 1280 / 1100 / 900 / 620, so the shop changed shape at four widths
   nothing else on the site recognised. The 1280 step survives because it is
   about one view's cards rather than about the page; the other three are
   gone, replaced by the two shared ones.

   The default view steps down a column per tier: three across on a desktop,
   two on a tablet, one on a phone. The other views are still in the bar for
   anyone who wants them, and they step down with it.
   -------------------------------------------------------------------------- */

/* The drawer's two new pieces are invisible until a tier asks for them, so
   neither can ever appear on a desktop or on a page without JavaScript. */
.rc-filters__scrim { display: none; }
.rc-filters__head { display: none; }
.rc-filter--sort { display: none; }

/* Set by shop.js for exactly as long as the drawer is open. */
body.rc-drawer-open { overflow: hidden; }

/* Four across is still offered, but a quarter column stops being a
   photograph once the rail is open and the window is under about 1280px, so
   that view gives up a column rather than letting the cards shrink past the
   point where the piece in them can be seen. */
@media (max-width: 1280px) {
	.rc-shop[data-rc-view="grid-4"] .rc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Tablet and phone: two across, and the rail stops being a rail
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
	.rc-shop[data-rc-view="grid-4"] .rc-grid,
	.rc-shop[data-rc-view="grid-3"] .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	/* The body is a single column at this width whatever rc_sidebar says:
	   there is no room for a 274px rail beside a grid of photographs. */
	.rc-shop__body,
	.rc-shop[data-rc-sidebar="closed"] .rc-shop__body {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--rc-space-lg);
	}

	.rc-filters__form { min-width: 0; }

	.rc-toolbar__cell--views { margin-inline-start: 0; }

	/* Sorting has moved into the panel, where there is room to label it. */
	.rc-toolbar__cell--sort { display: none; }
	.rc-filter--sort { display: block; }

	.rc-sort--panel {
		display: flex;
		inline-size: 100%;
		padding: var(--rc-space-3xs) var(--rc-space-2xs);
		border: var(--rc-hairline) solid var(--rc-rule-strong);
		background: var(--rc-page);
	}

	.rc-sort--panel .rc-sort__select {
		flex: 1 1 auto;
		min-inline-size: 0;
		min-height: var(--rc-tap);
	}

	/* -- The bar that stays with you ----------------------------------------
	   It parks directly under the navigation row, which is sticky too, and
	   below it in the stack so the navigation's own dropdown is never cut in
	   half by it. Its parent is the whole shop, so it holds through the grid
	   and lets go at the end of it rather than floating over the footer. */
	.rc-toolbar {
		position: sticky;
		top: calc(var(--rc-navbar-h) + var(--rc-navbar-rule));
		z-index: var(--rc-z-sticky);
	}

	.rc-toolbar__cell--toggle { flex: 1 1 auto; }

	.rc-toolbar__cell--toggle .rc-tool {
		inline-size: 100%;
		justify-content: center;
		min-height: var(--rc-tap);
	}

	/* -- The filter drawer --------------------------------------------------
	   Everything here hangs off data-rc-drawer, which shop.js adds and PHP
	   never prints. Its presence is therefore the same statement as "a script
	   ran", which is the only condition under which a panel that can only be
	   opened by a script is safe to offer. Without it the filters stay what
	   they have always been at this width: an ordinary block above the grid,
	   every control in it reachable and already open. */
	.rc-shop[data-rc-drawer] .rc-filters {
		position: fixed;
		inset-block: 0;
		inset-inline-start: 0;
		z-index: var(--rc-z-modal);
		display: flex;
		flex-direction: column;
		inline-size: var(--rc-drawer-w);
		max-inline-size: 100%;
		padding: var(--rc-space-sm);
		background: var(--rc-surface);
		border-inline-end: var(--rc-hairline) solid var(--rc-rule-strong);
		box-shadow: var(--rc-shadow-image);
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		opacity: 1;
		transform: translateX(-100%);
	}

	/* visibility rather than display, so the panel can slide rather than
	   blink, and inert rather than nothing, so a closed drawer cannot be
	   tabbed into even on an engine that declines to run the transition. */
	.rc-shop[data-rc-drawer="closed"] .rc-filters { visibility: hidden; }

	.rc-shop[data-rc-drawer="open"] .rc-filters {
		visibility: visible;
		transform: translateX(0);
	}

	/* Set one tick after the attribute above, so the state it describes was
	   already on screen before anything was allowed to move towards it. */
	.rc-shop[data-rc-drawer-ready] .rc-filters {
		transition:
			transform var(--rc-duration) var(--rc-ease),
			visibility 0s linear var(--rc-duration);
	}

	.rc-shop[data-rc-drawer-ready][data-rc-drawer="open"] .rc-filters {
		transition:
			transform var(--rc-duration) var(--rc-ease),
			visibility 0s linear 0s;
	}

	.rc-shop[data-rc-drawer] .rc-filters__form {
		flex: 1 1 auto;
		align-content: start;
		gap: var(--rc-space-md);
	}

	.rc-shop[data-rc-drawer] .rc-filters__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--rc-space-sm);
		margin-block-end: var(--rc-space-sm);
		padding-block-end: var(--rc-space-xs);
		border-block-end: var(--rc-hairline) solid var(--rc-rule-strong);
	}

	.rc-filters__heading {
		margin: 0;
		font-family: var(--rc-font-display);
		font-weight: var(--rc-weight-display);
		font-size: var(--rc-size-label-lg);
		letter-spacing: var(--rc-track-label-wide);
		text-transform: uppercase;
		color: var(--rc-ink);
	}

	.rc-filters__heading:lang(si) {
		font-family: var(--rc-font-sinhala);
		letter-spacing: normal;
		text-transform: none;
		font-size: var(--rc-size-body);
	}

	.rc-filters__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		inline-size: var(--rc-tap);
		block-size: var(--rc-tap);
		padding: 0;
		background: var(--rc-cream);
		color: var(--rc-forest);
		border: var(--rc-hairline) solid var(--rc-rule);
		border-radius: var(--rc-radius-none);
		cursor: pointer;
		transition: color var(--rc-duration-fast) var(--rc-ease),
			border-color var(--rc-duration-fast) var(--rc-ease);
	}

	.rc-filters__close:hover,
	.rc-filters__close:focus-visible {
		color: var(--rc-terracotta);
		border-color: var(--rc-terracotta);
	}

	.rc-filters__close svg { inline-size: 1.15rem; block-size: 1.15rem; display: block; }

	.rc-shop[data-rc-drawer] .rc-filters__scrim {
		display: block;
		position: fixed;
		inset: 0;
		z-index: calc(var(--rc-z-modal) - 1);
		background: var(--rc-scrim);
		opacity: 0;
		visibility: hidden;
	}

	.rc-shop[data-rc-drawer="open"] .rc-filters__scrim {
		opacity: 1;
		visibility: visible;
	}

	.rc-shop[data-rc-drawer-ready] .rc-filters__scrim {
		transition:
			opacity var(--rc-duration-fast) var(--rc-ease),
			visibility 0s linear var(--rc-duration-fast);
	}

	.rc-shop[data-rc-drawer-ready][data-rc-drawer="open"] .rc-filters__scrim {
		transition:
			opacity var(--rc-duration-fast) var(--rc-ease),
			visibility 0s linear 0s;
	}
}

/* --------------------------------------------------------------------------
   Phone: one across
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.rc-shop[data-rc-view="grid-4"] .rc-grid,
	.rc-shop[data-rc-view="grid-3"] .rc-grid,
	.rc-shop[data-rc-view="grid-2"] .rc-grid { grid-template-columns: minmax(0, 1fr); }

	/* Every grid view is one column here, so the switchers have nothing left
	   to switch between. They go, and the bar becomes the one control it is
	   meant to be at this width. */
	.rc-toolbar__cell--views { display: none; }

	.rc-toolbar__cell--toggle { border-inline-end: 0; }

	.rc-shop[data-rc-view="list"] .rc-card { grid-template-columns: minmax(0, 1fr); }

	.rc-shop[data-rc-view="list"] .rc-card__body {
		text-align: center;
		justify-items: center;
		padding: var(--rc-space-sm);
	}

	.rc-shop[data-rc-view="list"] .rc-card__cart { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.rc-shop__body,
	.rc-filters,
	.rc-card,
	.rc-card__img { transition: none; }

	/* The drawer still arrives and leaves, it just does not travel. */
	.rc-shop[data-rc-drawer-ready] .rc-filters,
	.rc-shop[data-rc-drawer-ready][data-rc-drawer="open"] .rc-filters {
		transition: visibility 0s linear 0s;
	}

	.rc-shop[data-rc-drawer-ready] .rc-filters__scrim,
	.rc-shop[data-rc-drawer-ready][data-rc-drawer="open"] .rc-filters__scrim { transition: none; }
}
