/* ==========================================================================
   ClickMart – homepage (page template "ClickMart Homepage").
   ========================================================================== */

.cm-home-page .cs-site-content {
	margin-top: 12px;
	margin-bottom: 0;
}

.cm-home-page .cs-main-content {
	row-gap: 0;
}

.cm-home {
	display: flex;
	flex-direction: column;
	gap: 56px;
	padding-bottom: 64px;
	color: var(--cm-text);
	font-family: var(--cm-font);
}

.cm-home a {
	text-decoration: none;
}

.cm-home p {
	margin: 0;
}

.cm-section {
	min-width: 0;
}

/* Section heading row */
.cm-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.cm-home .cm-h2 {
	margin: 0;
	color: var(--cm-ink);
	font-family: var(--cm-font-display);
	font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.025em;
}

.cm-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	color: var(--cm-ink);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.cm-more .cm-i {
	width: 16px;
	height: 16px;
	transition: transform .25s var(--cm-ease);
}

.cm-more:hover {
	color: var(--cm-brand);
}

.cm-more:hover .cm-i {
	transform: translateX(3px);
}

.cm-eyebrow {
	display: block;
	margin: 0 0 12px;
	color: var(--cm-brand);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* Buttons */
.cm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 24px;
}

.cm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 24px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	transition: background-color .2s var(--cm-ease), border-color .2s var(--cm-ease), color .2s var(--cm-ease);
}

.cm-btn--primary {
	background: var(--cm-brand);
	color: #fff;
}

.cm-btn--primary:hover {
	background: var(--cm-brand-hover);
	color: #fff;
}

.cm-btn--ghost {
	border-color: rgba(15, 16, 34, .16);
	background: #fff;
	color: var(--cm-ink);
}

.cm-btn--ghost:hover {
	border-color: var(--cm-ink);
	color: var(--cm-ink);
}

/* Hero ---------------------------------------------------------------------- */

.cm-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	overflow: hidden;
	border-radius: var(--cm-radius);
	background: var(--cm-soft);
}

.cm-hero__copy {
	padding: 28px 20px 4px;
}

.cm-home .cm-hero__title {
	max-width: 17ch;
	margin: 0;
	text-wrap: balance;
	color: var(--cm-ink);
	font-family: var(--cm-font-display);
	font-size: clamp(2rem, 1.2rem + 3.4vw, 3.75rem);
	font-weight: 500;
	line-height: 1.04;
	letter-spacing: -0.035em;
}

.cm-home .cm-hero__text {
	max-width: 44ch;
	margin-top: 14px;
	color: var(--cm-text);
	font-size: 15px;
	line-height: 1.55;
}

.cm-hero__product {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 8px 20px 20px;
	color: var(--cm-ink);
}

.cm-hero__media {
	display: block;
	width: min(100%, 280px);
	aspect-ratio: 1 / 1;
}

.cm-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform .6s var(--cm-ease);
}

.cm-hero__product:hover .cm-hero__img {
	transform: scale(1.025);
}

.cm-hero__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"label arrow"
		"name arrow"
		"price arrow";
	align-items: center;
	column-gap: 16px;
	width: 100%;
	max-width: 360px;
	padding: 12px 12px 12px 16px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 16, 34, .05), 0 6px 20px rgba(15, 16, 34, .05);
}

.cm-hero__card-label {
	grid-area: label;
	color: var(--cm-muted);
	font-size: 12px;
	font-weight: 600;
}

.cm-hero__card-name {
	grid-area: name;
	overflow: hidden;
	color: var(--cm-ink);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.cm-hero__card-price {
	grid-area: price;
	color: var(--cm-text);
	font-size: 14px;
	font-weight: 500;
}

.cm-hero__card-price del {
	color: var(--cm-muted);
}

.cm-hero__card-price ins {
	text-decoration: none;
}

.cm-hero__card-arrow {
	grid-area: arrow;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: var(--cm-ink);
	color: #fff;
	transition: transform .25s var(--cm-ease);
}

.cm-hero__card-arrow .cm-i {
	width: 18px;
	height: 18px;
}

.cm-hero__product:hover .cm-hero__card-arrow {
	transform: translateX(3px);
}

.cm-from {
	color: var(--cm-muted);
	font-weight: 500;
}

@media (max-width: 767px) {
	.cm-hero__copy {
		padding: 24px 20px 0;
	}

	.cm-actions {
		flex-wrap: nowrap;
		gap: 8px;
		margin-top: 20px;
	}

	.cm-btn {
		flex: 1 1 auto;
		height: 46px;
		padding: 0 16px;
		font-size: 14px;
		white-space: nowrap;
	}

	.cm-hero__product {
		display: grid;
		grid-template-columns: 42% minmax(0, 1fr);
		align-items: center;
		gap: 12px;
		padding: 16px 16px 16px 12px;
	}

	.cm-hero__media {
		width: 100%;
	}

	.cm-hero__card {
		box-shadow: none;
		padding: 12px;
		column-gap: 10px;
	}

	.cm-hero__card-name {
		display: -webkit-box;
		white-space: normal;
		font-size: 14px;
		line-height: 1.3;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.cm-hero__card-price {
		font-size: 13px;
	}
}

@media (min-width: 768px) {
	.cm-hero {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		align-items: center;
		min-height: clamp(420px, 44vw, 560px);
	}

	.cm-hero__copy {
		padding: clamp(32px, 5vw, 72px);
		padding-right: 0;
	}

	.cm-home .cm-hero__text {
		font-size: clamp(15px, .8rem + .4vw, 18px);
	}

	.cm-actions {
		margin-top: 32px;
	}

	.cm-hero__product {
		align-self: stretch;
		justify-content: center;
		padding: 32px;
	}

	.cm-hero__media {
		width: min(100%, 500px);
	}

	.cm-hero__card {
		position: absolute;
		right: 32px;
		bottom: 32px;
		width: min(320px, calc(100% - 64px));
	}
}

/* Categories ---------------------------------------------------------------- */

.cm-cats__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-cats__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: var(--cm-ink);
}

.cm-cats__media {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 14%;
	overflow: hidden;
	border-radius: var(--cm-radius);
	background: var(--cm-soft);
	transition: background-color .25s var(--cm-ease);
}

.cm-cats__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform .4s var(--cm-ease);
}

.cm-cats__link:hover .cm-cats__media {
	background: var(--cm-soft-2);
}

.cm-cats__link:hover img {
	transform: scale(1.06);
}

.cm-cats__name {
	color: var(--cm-ink);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
}

@media (min-width: 768px) {
	.cm-cats__list {
		grid-template-columns: repeat(8, minmax(0, 1fr));
		gap: 16px;
	}

	.cm-cats__name {
		font-size: 13px;
	}
}

@media (min-width: 1024px) {
	.cm-cats__name {
		font-size: 14px;
	}
}

/* Product grid (WooCommerce loop markup) -------------------------------------- */

.cm-home ul.products.cm-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cm-home ul.products.cm-grid::before,
.cm-home ul.products.cm-grid::after {
	display: none;
}

.cm-home .cm-grid li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	float: none;
	border: 0;
	background: none;
	box-shadow: none;
	text-align: left;
}

.cm-home .cm-grid .woocommerce-LoopProduct-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: inherit;
}

.cm-home .cm-grid .woocommerce-thumbnail {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	margin: 0 0 12px;
	padding: 10%;
	overflow: hidden;
	border-radius: var(--cm-radius);
	background: var(--cm-soft);
}

.cm-home .cm-grid .woocommerce-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	mix-blend-mode: multiply;
	opacity: 1;
	transition: transform .45s var(--cm-ease);
}

.cm-home .cm-grid li.product:hover .woocommerce-thumbnail img {
	transform: scale(1.04);
}

.cm-home .cm-grid .onsale {
	position: absolute;
	top: 10px;
	left: 10px;
	right: auto;
	z-index: 1;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 5px 8px;
	border-radius: 999px;
	background: #fff;
	color: var(--cm-sale);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
}

.cm-home .cm-grid .cm-card__title {
	display: -webkit-box;
	min-height: 2.7em;
	margin: 0 0 6px;
	padding: 0;
	overflow: hidden;
	color: var(--cm-ink);
	font-family: var(--cm-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 0;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.cm-home .cm-grid .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	margin: 0;
	padding: 0;
	color: var(--cm-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.cm-home .cm-grid .price .amount {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.cm-home .cm-grid .price ins {
	order: 1;
	background: none;
	text-decoration: none;
}

.cm-home .cm-grid .price del {
	order: 2;
	color: var(--cm-muted);
	font-size: 13px;
	font-weight: 400;
	opacity: 1;
}

.cm-home .cm-grid .price .screen-reader-text {
	order: 3;
}

.cm-home .cm-grid .cm-card__stock {
	margin: 4px 0 0;
	color: #a24b00;
	font-size: 12px;
	font-weight: 600;
}

.cm-home .cm-grid .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 44px;
	margin: 12px 0 0;
	padding: 0 12px;
	border: 1px solid var(--cm-line);
	border-radius: 999px;
	background: #fff;
	color: var(--cm-ink);
	font-family: var(--cm-font);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	box-shadow: none;
	transition: background-color .2s var(--cm-ease), border-color .2s var(--cm-ease), color .2s var(--cm-ease);
}

.cm-home .cm-grid .button:hover {
	border-color: var(--cm-ink);
	background: var(--cm-ink);
	color: #fff;
}

.cm-home .cm-grid .button.loading {
	opacity: .6;
	pointer-events: none;
}

.cm-home .cm-grid .button.added::after {
	display: none;
}

.cm-home .cm-grid .added_to_cart {
	display: block;
	margin-top: 8px;
	color: var(--cm-brand);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (min-width: 768px) {
	.cm-home ul.products.cm-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 40px 20px;
	}

	.cm-home .cm-grid .cm-card__title {
		font-size: 15px;
	}

	.cm-home .cm-grid .price {
		font-size: 16px;
	}
}

/* Campaign tiles ------------------------------------------------------------- */

.cm-campaigns__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
}

.cm-campaign {
	display: grid;
	grid-template-columns: 40% minmax(0, 1fr);
	overflow: hidden;
	border-radius: var(--cm-radius);
	background: var(--cm-soft);
	color: var(--cm-ink);
}

.cm-campaign__media {
	aspect-ratio: 874 / 1064;
	overflow: hidden;
	background: var(--cm-soft-2);
}

.cm-campaign__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--cm-ease);
}

.cm-campaign:hover .cm-campaign__media img {
	transform: scale(1.03);
}

.cm-campaign__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: 20px;
}

.cm-campaign__body .cm-eyebrow {
	margin-bottom: 8px;
}

.cm-home .cm-campaign__title {
	margin: 0;
	color: var(--cm-ink);
	font-family: var(--cm-font-display);
	font-size: clamp(1.25rem, 1rem + 1vw, 2rem);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.cm-campaign__text {
	display: block;
	margin-top: 8px;
	color: var(--cm-text);
	font-size: 14px;
	line-height: 1.5;
}

.cm-campaign__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
	color: var(--cm-brand);
	font-size: 14px;
	font-weight: 600;
}

.cm-campaign__cta .cm-i {
	width: 16px;
	height: 16px;
	transition: transform .25s var(--cm-ease);
}

.cm-campaign:hover .cm-campaign__cta .cm-i {
	transform: translateX(3px);
}

@media (min-width: 900px) {
	.cm-campaigns__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.cm-campaign__body {
		padding: clamp(24px, 3vw, 40px);
	}

	.cm-campaign__text {
		font-size: 15px;
	}
}

@media (min-width: 600px) and (max-width: 899px) {
	.cm-campaign {
		grid-template-columns: 30% minmax(0, 1fr);
	}
}

/* Brands ---------------------------------------------------------------------- */

@media (max-width: 767px) {
	.cm-brands .cm-chip {
		height: 36px;
		padding: 0 14px;
		font-size: 13px;
	}
}

/* Brands: one swipeable row on phones instead of five wrapped rows. */
@media (max-width: 767px) {
	.cm-brands .cm-chips {
		flex-wrap: nowrap;
		margin: 0 -20px;
		padding: 0 20px 4px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.cm-brands .cm-chips::-webkit-scrollbar {
		display: none;
	}

	.cm-brands .cm-chips li {
		flex: none;
	}
}

/* Trust ----------------------------------------------------------------------- */

.cm-trust__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px 16px;
	margin: 0;
	padding: 28px 0;
	border-top: 1px solid var(--cm-line);
	border-bottom: 1px solid var(--cm-line);
	list-style: none;
}

.cm-trust__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.cm-trust__item > .cm-i {
	width: 24px;
	height: 24px;
	color: var(--cm-brand);
}

.cm-trust__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.cm-trust__title {
	color: var(--cm-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.cm-trust__text {
	color: var(--cm-muted);
	font-size: 13px;
	line-height: 1.45;
}

a.cm-trust__text {
	color: var(--cm-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
}

a.cm-trust__text:hover {
	color: var(--cm-brand);
}

/* The whole trust item is the tap target for its link (44px+ instead of 19px). */
.cm-trust__item:has(a.cm-trust__text) {
	position: relative;
}

a.cm-trust__text::after {
	position: absolute;
	inset: -8px;
	content: "";
}

@media (min-width: 1024px) {
	.cm-trust__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 24px;
		padding: 36px 0;
	}
}

/* FAQ ------------------------------------------------------------------------- */

.cm-faq {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
}

.cm-home .cm-faq__lead {
	margin-top: 12px;
	color: var(--cm-text);
	font-size: 15px;
	line-height: 1.55;
}

.cm-faq__lead a {
	color: var(--cm-brand);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cm-faq__item {
	border-bottom: 1px solid var(--cm-line);
}

.cm-faq__item:first-child {
	border-top: 1px solid var(--cm-line);
}

.cm-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 60px;
	padding: 14px 0;
	cursor: pointer;
	list-style: none;
}

.cm-faq__item summary::-webkit-details-marker {
	display: none;
}

.cm-home .cm-faq__q {
	margin: 0;
	color: var(--cm-ink);
	font-family: var(--cm-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
}

.cm-faq__item summary .cm-i {
	width: 20px;
	height: 20px;
	color: var(--cm-muted);
	transition: transform .25s var(--cm-ease);
}

.cm-faq__item[open] summary .cm-i {
	transform: rotate(45deg);
}

.cm-home .cm-faq__a {
	max-width: 65ch;
	margin: 0 0 20px;
	color: var(--cm-text);
	font-size: 15px;
	line-height: 1.6;
}

@media (min-width: 1024px) {
	.cm-faq {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		gap: 64px;
	}
}

/* Section rhythm --------------------------------------------------------------- */

@media (min-width: 768px) {
	.cm-home {
		gap: 72px;
	}
}

@media (min-width: 1200px) {
	.cm-home {
		gap: 96px;
		padding-bottom: 96px;
	}

	.cm-hero + .cm-cats {
		margin-top: -32px;
	}
}
