/* Caradon utility classes, loaded site wide. Add them under a module's Advanced tab > Class.
 *
 *   cs-read-more       On a Text Editor (Rich Text) module: shortens long text to 45 words with a
 *                      Read More link that expands in place. cs-read-more-30 (any number) sets the word count.
 *   cs-woopack-grid    On a WooPack Product Grid module: makes each product card match the product
 *                      category archive card (square bordered image, left aligned title and price).
 *                      Columns, spacing and product count stay under the module's own controls.
 *   cs-section-heading On a Heading module: the uppercase 30px section heading (H2 small caps).
 *   cs-landing-section On a row: an anchor target (set the row ID) that stops below the sticky header.
 *   cs-category-tiles  On a Box module (grid) of tiles, each a Box with Photo, Heading (h3) and Text Editor link:
 *                      styles the tiles like the product cards (bordered square image, small title, underlined link).
 *   cs-google-rating   Output by [cs_google_rating] or the top bar (Google rating badge layout). Not a class to add by hand.
 *   cs-landing-cols    On a row of columns that each hold Heading, Text, Product Grid, Button: equal 50px
 *                      gaps, and the product grids and buttons line up across the columns whatever the text length.
 */

/* ---------- Read More ---------- */
.cs-read-more .cs-rm__short[hidden],
.cs-read-more .cs-rm__full[hidden] {
	display: none !important;
}

.cs-read-more .cs-rm__full:not([hidden]) {
	margin-bottom: 10px;
}

.fl-page .cs-read-more .cs-rm__toggle,
.fl-page .cs-read-more .cs-rm__toggle:hover,
.fl-page .cs-read-more .cs-rm__toggle:focus,
.fl-page .cs-read-more .cs-rm__toggle:active {
	position: static;
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	outline: none;
	background: none;
	box-shadow: none;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	color: inherit;
	text-decoration: underline;
	text-underline-position: from-font;
	cursor: pointer;
}

.fl-page .cs-read-more .cs-rm__toggle:hover {
	text-decoration: none;
}

.fl-page .cs-read-more .cs-rm__toggle:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}

/* ---------- Section heading (same rule as the category modules' shared.css) ---------- */
.cs-section-heading,
.fl-module .cs-section-heading,
.cs-section-heading .fl-heading {
	font-family: Arial, Helvetica, Verdana, sans-serif !important;
	font-size: 30px !important;
	font-weight: 400 !important;
	line-height: 33px !important;
	letter-spacing: 0.71px !important;
	text-transform: uppercase;
	color: #1e1e1e;
}

@media (max-width: 768px) {
	.cs-section-heading,
	.fl-module .cs-section-heading,
	.cs-section-heading .fl-heading {
		font-size: 24px !important;
		line-height: 28px !important;
	}
}

/* ---------- Landing page rows ---------- */
.cs-landing-section,
.cs-landing-cols .fl-module-heading {
	scroll-margin-top: 120px;
}

@media (min-width: 769px) {
	.cs-landing-cols .fl-col-group {
		display: flex;
		gap: 50px;
	}

	.cs-landing-cols .fl-col-group::before,
	.cs-landing-cols .fl-col-group::after {
		display: none;
	}

	.cs-landing-cols .fl-col-group > .fl-col {
		display: flex;
		flex: 1 1 0;
		width: auto !important;
		min-width: 0;
		float: none;
	}

	.cs-landing-cols .fl-col-content {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-width: 0;
	}

	/* Push the product grid (and the button after it) to the bottom of each column. */
	.cs-landing-cols .fl-col-content > .fl-module-product-grid {
		margin-top: auto !important;
	}
}

@media (max-width: 768px) {
	.cs-landing-cols .fl-col-group > .fl-col + .fl-col {
		margin-top: 50px;
	}
}

/* ---------- WooPack Product Grid: card styled like the archive card ---------- */
/* Layout (columns, spacing, count) is left to the module's settings. */
/* The theme pads WooCommerce product lists by 4% each side, which stops WooPack's columns fitting. Remove it so the module's column and spacing settings work. */
.cs-woopack-grid ul.woopack-products {
	/* Plain wrapping row instead of WooPack's scripted (absolute) positioning, which left a stale height when
	   the window was resized and let the content below overlap the grid. Widths still come from the module. */
	display: flex !important;
	flex-wrap: wrap;
	justify-content: space-between;
	height: auto !important;
	padding: 0 !important;
}

.cs-woopack-grid ul.woopack-products::before,
.cs-woopack-grid ul.woopack-products::after,
.cs-woopack-grid ul.woopack-products > li.woopack-grid-sizer {
	display: none !important;
}

.cs-woopack-grid ul.woopack-products > li.woopack-product-grid {
	position: static !important;
	top: auto !important;
	left: auto !important;
	float: none !important;
	height: auto !important;
	margin-left: 0 !important;
	transform: none !important;
}

.cs-woopack-grid li.woopack-product-grid {
	padding: 0 !important;
	border: 0;
	background: none;
	text-align: left !important;
}

.cs-woopack-grid .woopack-product-image {
	margin: 0 0 15px;
	border: 1px solid #e6e6e6;
	overflow: hidden;
}

.cs-woopack-grid .woopack-product-image img {
	display: block;
	width: 100% !important;
	max-width: none;
	height: auto !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin: 0 !important;
}

.cs-woopack-grid .woopack-product-content {
	padding: 0;
	text-align: left;
}

.cs-woopack-grid .woopack-product-title,
.fl-page .cs-woopack-grid .woopack-product-title {
	margin: 0 0 9px !important;
	padding: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.4px;
	text-transform: none;
}

.cs-woopack-grid .woopack-product-title a {
	font-size: inherit;
	color: #333;
	text-decoration: none;
}

.cs-woopack-grid .woopack-product-title a:hover {
	text-decoration: underline;
}

.cs-woopack-grid .price {
	display: block;
	margin: 0;
}

.woocommerce .cs-woopack-grid ul.products li.product .onsale,
.cs-woopack-grid ul.products li.product .onsale {
	left: 10px;
	right: auto;
}

/* Fallback: the theme's old "Need help choosing" block, if the hook is ever restored. */
.cs-woopack-grid .woo-ask {
	display: none !important;
}

/* ---------- Top bar (above the header), content from Theme Settings ---------- */
.cs-top-bar--has-icon {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.cs-top-bar__icon {
	display: inline-flex;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: inherit;
}

.cs-top-bar__icon svg,
.cs-top-bar__icon img {
	display: block;
	width: 18px;
	height: 18px;
}

.cs-top-bar--has-icon .cs-top-bar__link {
	text-decoration: underline;
	text-underline-position: from-font;
}

.cs-top-bar--has-icon .cs-top-bar__link:hover {
	text-decoration: none;
}

/* ---------- Category tiles (Box grid of Photo + Heading + Text Editor link) ---------- */
.cs-category-tiles .fl-photo-content,
.cs-category-tiles .fl-photo-img {
	display: block;
	width: 100%;
}

.cs-category-tiles .fl-photo-img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border: 1px solid #e6e6e6;
}

.fl-page .cs-category-tiles .fl-heading,
.fl-page .cs-category-tiles .fl-heading a {
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.4px;
	text-transform: none;
	color: #333;
	text-decoration: none;
}

.fl-page .cs-category-tiles .fl-rich-text p {
	margin: 0;
	font-size: 12px;
	line-height: 17px;
}

.fl-page .cs-category-tiles .fl-rich-text a {
	color: inherit;
	text-decoration: underline;
	text-underline-position: from-font;
}

.fl-page .cs-category-tiles .fl-rich-text a:hover {
	text-decoration: none;
}

/* ---------- Google rating badge (top bar middle slot, or [cs_google_rating]) ---------- */
.cs-google-rating,
.cs-top-bar a.cs-google-rating,
.cs-top-bar a.cs-google-rating:hover,
.cs-top-bar a.cs-google-rating:focus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.cs-google-rating__g {
	display: block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.cs-google-rating__stars {
	position: relative;
	display: inline-block;
	line-height: 0;
}

.cs-google-rating__stars-base,
.cs-google-rating__stars-fill {
	display: inline-flex;
	gap: 1px;
}

.cs-google-rating__stars-base {
	opacity: 0.3;
}

.cs-google-rating__stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
}

.cs-google-rating__stars svg {
	display: block;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	fill: currentColor;
}

/* The rating and the review number share one style. */
.cs-google-rating__score,
.cs-google-rating__num {
	font-weight: 700;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
}

/* Separator dot: inline-block so the hover underline on the count does not run under it. */
.cs-google-rating__count::before {
	content: "\00B7";
	display: inline-block;
	margin-right: 8px;
	font-size: 22px;
	line-height: 0;
	vertical-align: -3px;
	opacity: 0.6;
	text-decoration: none;
}

a.cs-google-rating:hover .cs-google-rating__count {
	text-decoration: underline;
	text-underline-position: from-font;
}

/* ---------- Google reviews carousel ([cs_google_reviews]) ---------- */
.cs-google-reviews {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.cs-google-reviews > .cs-google-rating {
	align-self: flex-start;
	font-size: 14px;
}

.cs-google-reviews__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	outline-offset: 4px;
}

.cs-google-reviews__track::-webkit-scrollbar {
	display: none;
}

.cs-google-reviews__slide {
	flex: 0 0 100%;
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}

.cs-google-reviews__stars {
	display: flex;
	gap: 1px;
	margin-bottom: 12px;
}

.cs-google-reviews__stars svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.cs-google-reviews__text {
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	font-style: normal;
}

.fl-page .cs-google-reviews__text p {
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.45;
}

.cs-google-reviews__author {
	font-size: 1.4rem;
	line-height: 1.45;
	opacity: 0.7;
}

.cs-google-reviews__dots {
	display: flex;
	gap: 8px;
}

.fl-page .cs-google-reviews__dot,
.fl-page .cs-google-reviews__dot:hover,
.fl-page .cs-google-reviews__dot:focus {
	width: 8px;
	height: 8px;
	margin: 0;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.fl-page .cs-google-reviews__dot.is-active {
	background: currentColor;
}

.fl-page .cs-google-reviews__dot:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}

/* Footer under the reviews carousel: Google logo with the review count below it. */
.cs-google-reviews__footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	margin-top: 40px;
}

.cs-google-reviews__footer svg {
	display: block;
}

.cs-google-review-count,
.fl-page a.cs-google-review-count,
.fl-page a.cs-google-review-count:visited {
	font-size: 14px;
	line-height: 1;
	color: inherit;
	text-decoration: none;
}

.fl-page a.cs-google-review-count:hover {
	text-decoration: underline;
	text-underline-position: from-font;
}
