/*
 * Comm Centre theme: features shop_cards and shop_help (inc/features/shop.php).
 *
 * Loaded only while shop_cards is on (shop context pages and the Our range page) or shop_help is on (the shop page). Every rule
 * is scoped to the body class its own switch adds, so the file does nothing for the other switch. Reads only the variables in
 * tokens.css. No shadows, glow or text gradients.
 */

/* ------------------------------------------------------------------ shop_cards: the whole product name on a card */

/*
 * The card name stops after three lines in assets/css/pages/shop-listing.css (shop, category, tag, search) and
 * assets/css/pages/our-range.css (the Our range grid). Those files are not edited; this lifts the limit from here. There is no
 * new limit: a clamp at any number of lines would cut a longer real product name, and the full name is what a buyer compares.
 * A card is as tall as its name needs (the grid rows already stretch to the tallest card in a row). Where a name has a very
 * long word, it may break inside the word instead of pushing the card wider than the screen.
 */
.cc-feature-shop_cards .cc-shop .cc-shop-grid .cc-shop-card .cc-shop-card__title,
.cc-feature-shop_cards .cc-p-range .cc-shop-card .cc-shop-card__title {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: none;
	overflow: visible;
	overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ shop_help: the Need help choosing band */

.cc-feature-shop_help .cc-shop-help {
	box-sizing: border-box;
	padding-block: 0 var(--cc-space-section);
}

.cc-feature-shop_help .cc-shop-help__panel {
	display: grid;
	gap: var(--cc-space-l);
	box-sizing: border-box;
	padding: var(--cc-space-l);
	background: var(--cc-color-raised);
	border: 1px solid var(--cc-color-line);
	border-radius: var(--cc-radius-m);
}

.cc-feature-shop_help .cc-shop-help__text > * {
	margin-block: 0;
}

.cc-feature-shop_help .cc-shop-help__title {
	font-size: var(--cc-font-size-xl);
	line-height: 1.15;
	text-wrap: balance;
}

.cc-feature-shop_help .cc-shop-help__lede {
	max-width: 34rem;
	margin-top: var(--cc-space-s);
	color: var(--cc-color-secondary);
	font-size: var(--cc-font-size-m);
	text-wrap: balance;
}

.cc-feature-shop_help .cc-shop-help__actions {
	margin: 0;
}

/* From a tablet the words sit on the left and the button on the right. */
@media (min-width: 48em) {
	.cc-feature-shop_help .cc-shop-help__panel {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--cc-space-xl);
		padding: var(--cc-space-xl);
	}
}

/* On a phone the button is the full width of the panel, an easy target. */
@media (max-width: 29.99em) {
	.cc-feature-shop_help .cc-shop-help__actions .cc-button {
		width: 100%;
	}
}
