/* CRC Store Products: the Store's "All Products" section. Colours follow the site's Elementor globals. */
.crc-sp {
	--crc-green: var(--e-global-color-primary, #3aac6c);
	--crc-brown: var(--e-global-color-secondary, #6b301e);
	--crc-line: #e4ddd6;
	--crc-soft: #f4eee8;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}
.crc-sp *,
.crc-sp *::before,
.crc-sp *::after { box-sizing: border-box; }

.crc-sp-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: 16px;
}
.crc-sp-title { margin: 0; color: var(--crc-brown); }
.crc-sp-head--search-only { justify-content: center; }
.crc-sp-head--search-only .crc-sp-search { flex-basis: 520px; }

.crc-sp-search { display: flex; gap: 8px; flex: 0 1 380px; }
.crc-sp-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid var(--crc-line);
	border-radius: 999px;
	background: #fff;
	font: inherit;
}
.crc-sp-search input[type="search"]:focus { outline: 2px solid var(--crc-green); outline-offset: 1px; border-color: var(--crc-green); }
.crc-sp-search button {
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--crc-green);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.crc-sp-search button:hover { filter: brightness(1.06); }

.crc-sp-filters { display: grid; gap: 10px; margin-bottom: 20px; }
.crc-sp-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.crc-sp-group-label {
	min-width: 80px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--crc-brown);
}
.crc-sp-pill {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--crc-line);
	border-radius: 999px;
	background: #fff;
	color: var(--crc-brown);
	font-size: 15px;
	line-height: 1.3;
	text-decoration: none !important;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.crc-sp-pill:hover { border-color: var(--crc-green); color: var(--crc-green); }
.crc-sp-pill.is-active { background: var(--crc-green); border-color: var(--crc-green); color: #fff; }
.crc-sp-pill:focus-visible,
.crc-sp-page:focus-visible { outline: 2px solid var(--crc-green); outline-offset: 2px; }

.crc-sp-count { margin: 0 0 12px; font-size: 14px; color: #6f625a; min-height: 1.4em; }

.crc-sp-results { transition: opacity .2s ease; }
.crc-sp.is-loading .crc-sp-results { opacity: .45; pointer-events: none; }

.crc-sp-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px 16px;
}
.crc-sp-item,
.crc-sp-item > .elementor,
.crc-sp-item > .elementor > .e-con { height: 100%; }

.crc-sp-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.crc-sp-page {
	min-width: 40px;
	padding: 8px 12px;
	border: 1px solid var(--crc-line);
	border-radius: 8px;
	background: #fff;
	color: var(--crc-brown);
	text-align: center;
	text-decoration: none !important;
}
.crc-sp-page:hover { border-color: var(--crc-green); color: var(--crc-green); }
.crc-sp-page.is-current { background: var(--crc-brown); border-color: var(--crc-brown); color: #fff; }

.crc-sp-empty { padding: 40px 16px; text-align: center; background: var(--crc-soft); border-radius: 8px; }
.crc-sp-empty a { color: var(--crc-green); font-weight: 700; }

@media (max-width: 1024px) {
	.crc-sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.crc-sp { padding: 0 16px; }
	.crc-sp-search { flex-basis: 100%; }
	.crc-sp-group-label { min-width: 100%; }
	.crc-sp-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	.crc-sp-results, .crc-sp-pill { transition: none; }
}

.crc-sp-n { opacity: .7; font-size: .9em; }
.crc-sp-pill.is-active .crc-sp-n { opacity: .9; }

/* Cards fill their column (outside a Loop Grid, Elementor sizes the card container itself). */
.crc-sp-item > .elementor { padding: 0; margin: 0; } /* the theme pads anything with a post-ID class */
.crc-sp-item > .elementor > .e-con { --width: 100%; width: 100%; max-width: 100%; margin: 0; }

/* Featured products: centred, as many columns as products (up to 4), same card width as the grid below. */
.crc-sp-featured-title { text-align: center; margin: 0 0 24px; }
.crc-sp-featured { grid-template-columns: repeat(var(--crc-cols, 4), minmax(0, 296px)); justify-content: center; }
@media (max-width: 1024px) {
	.crc-sp-featured { grid-template-columns: repeat(min(var(--crc-cols, 4), 2), minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.crc-sp-featured { grid-template-columns: 1fr; }
}

/* Sale strip ([crc_promo_strip]): the running promotion's graphics, linked to their products.
   Big enough to read (a little wider than the rest of the page). One swipeable row on phones. */
.crc-sp.crc-promo { max-width: 1480px; padding-top: 24px; padding-bottom: 48px; }
.crc-promo-heading { margin: 0 0 16px; text-align: center; color: var(--crc-brown); }
.crc-promo-tiles {
	display: grid;
	grid-template-columns: repeat(var(--crc-cols, 4), minmax(0, 340px));
	justify-content: center;
	gap: 18px;
}
.crc-promo-tile {
	position: relative;
	display: block;
	border-radius: 8px;
	overflow: hidden;
	background: var(--crc-soft);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
	transition: transform .25s ease, box-shadow .25s ease;
}
.crc-promo-tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
a.crc-promo-tile:focus-visible { outline: 2px solid var(--crc-green); outline-offset: 2px; }
@media (hover: hover) and (min-width: 1025px) {
	a.crc-promo-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, .12); }
}
.crc-promo-cta { margin: 40px 0 0; text-align: center; }
.crc-promo-btn {
	display: inline-block;
	padding: 14px 40px;
	border-radius: 999px;
	background: var(--crc-green);
	color: #fff !important;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: .01em;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	transition: filter .2s ease;
}
.crc-promo-btn:hover { filter: brightness(1.06); }
.crc-promo-btn:focus-visible { outline: 2px solid var(--crc-brown); outline-offset: 2px; }
@media (max-width: 1024px) {
	.crc-promo-tiles {
		display: flex;
		justify-content: flex-start;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding: 2px 2px 10px;
		scrollbar-width: thin;
	}
	.crc-promo-tile { flex: 0 0 min(360px, 46%); scroll-snap-align: start; }
	.crc-promo-cta { margin-top: 32px; }
	.crc-sp.crc-promo { padding-bottom: 40px; }
}
@media (max-width: 767px) {
	/* One graphic nearly full width, the next one peeking in. */
	.crc-promo-tile { flex-basis: 82%; scroll-snap-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	.crc-promo-tile, .crc-promo-btn { transition: none; }
	a.crc-promo-tile:hover { transform: none; }
}

/* Links can jump to the grid (#crc-all-products); leave room above it. */
#crc-all-products { scroll-margin-top: 24px; }

/* "Back to top" button, shown once the shopper has scrolled a screen down the Store. */
.crc-sp-top {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 999;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--e-global-color-secondary, #6b301e);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.crc-sp-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.crc-sp-top:hover { filter: brightness(1.12); }
.crc-sp-top:focus-visible { outline: 2px solid var(--e-global-color-primary, #3aac6c); outline-offset: 2px; }
@media (max-width: 767px) {
	.crc-sp-top { right: 12px; bottom: 12px; padding: 9px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.crc-sp-top { transition: none; }
}
