/*
 * Clickservice — front page styles.
 * Loaded only on the front page (see inc/enqueue.php). Mirrors the Figma
 * homepage frame (node 1:3): hero, trust bar, categories, bestsellers,
 * 4-step RO explainer, features, reviews, CTA banner, FAQ, newsletter.
 */

.cs-home {
	overflow-x: clip; /* decorative waves/floats must not create horizontal scroll */
}

/* Shared section furniture (.cs-eyebrow, .cs-h2, .cs-section-head, .cs-more,
   .cs-catgrid, .cs-catcard) lives in main.css — also used on content pages. */
.cs-eyebrow--light { color: #9ec7ef; }
.cs-cta .cs-eyebrow--light { color: #fff; opacity: 0.92; }
.cs-h2--light { color: #fff; }

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */
.cs-hero { padding-block: 2.5rem 4.5rem; }

.cs-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 3rem;
	align-items: center;
}

.cs-pill {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	background: var(--wp--preset--color--sky);
	color: var(--wp--preset--color--primary);
	font-size: 0.8rem;
	font-weight: 600;
}

.cs-hero__title {
	margin: 1.4rem 0 0;
	font-size: clamp(2.3rem, 4.6vw, 3.4rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.02em;
}
.cs-hero__title-accent { color: var(--wp--preset--color--primary); }

.cs-hero__sub {
	margin: 1.4rem 0 0;
	max-width: 32rem;
	color: var(--wp--preset--color--text-muted);
	font-size: 1.05rem;
}

.cs-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	margin-top: 2rem;
}

.cs-hero__checks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 2rem;
	margin: 1.9rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.9rem;
	color: var(--wp--preset--color--text-muted);
}
.cs-check { color: var(--wp--preset--color--primary); font-weight: 700; margin-right: 0.3rem; }

.cs-hero__visual { position: relative; }
.cs-hero__panel {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 24px;
	background: linear-gradient(135deg, #cfe5f9 0%, #eaf4fd 55%, #f3f9fe 100%);
	padding: 2.6rem 2rem;
}
.cs-hero__img {
	width: min(100%, 480px);
	height: auto;
	mix-blend-mode: multiply; /* white-background product shot on tinted panel */
}

.cs-float {
	position: absolute;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(14, 27, 46, 0.12);
	font-size: 0.85rem;
}
.cs-float--rating {
	top: -1.1rem;
	right: 1.4rem;
	padding: 0.7rem 1rem;
	color: var(--wp--preset--color--accent);
	font-weight: 700;
	letter-spacing: 0.05em;
}
.cs-float--rating span { color: var(--wp--preset--color--contrast); letter-spacing: 0; margin-left: 0.2rem; }
.cs-float--shipping {
	left: -1.1rem;
	bottom: 2.4rem;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.8rem 1.1rem;
}
.cs-float__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 10px;
	background: #e4f4e4;
	color: var(--wp--preset--color--success);
	font-weight: 700;
}
.cs-float__text { display: flex; flex-direction: column; line-height: 1.25; }
.cs-float__text strong { font-size: 0.88rem; }
.cs-float__text small { color: var(--wp--preset--color--text-muted); font-size: 0.78rem; }

/* ------------------------------------------------------------------ *
 * Trust bar
 * ------------------------------------------------------------------ */
.cs-trustbar { border-block: 1px solid var(--wp--preset--color--border); }
.cs-trustbar__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}
.cs-trustbar__item {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 1.4rem 1.9rem;
}
.cs-trustbar__item + .cs-trustbar__item { border-left: 1px solid var(--wp--preset--color--border); }
.cs-trustbar__item strong { font-size: 1.25rem; font-weight: 800; }
.cs-trustbar__item span { font-size: 0.85rem; color: var(--wp--preset--color--text-muted); }

/* ------------------------------------------------------------------ *
 * Sky band with wavy edges (categories section)
 * ------------------------------------------------------------------ */
.cs-band {
	position: relative;
	background: #e9f2fb;
	margin-block: 3.5rem 4.5rem;
	padding-block: 3rem 3.6rem;
}
.cs-band::before,
.cs-band::after {
	content: "";
	position: absolute;
	left: 0;
	width: 200%;
	height: 52px;
	/* Two identical wave periods; slides one period for a seamless loop. */
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2880 52' preserveAspectRatio='none'%3E%3Cpath d='M0,26 C240,2 480,2 720,26 C960,50 1200,50 1440,26 C1680,2 1920,2 2160,26 C2400,50 2640,50 2880,26 L2880,52 L0,52 Z' fill='%23e9f2fb'/%3E%3C/svg%3E") no-repeat left top / 100% 100%;
}
.cs-band::before { top: -51px; animation: cs-wave-drift 11s linear infinite; }
.cs-band::after { bottom: -51px; transform: scaleY(-1); animation: cs-wave-drift-flip 11s linear infinite; }
@keyframes cs-wave-drift-flip {
	from { transform: scaleY(-1) translateX(0); }
	to { transform: scaleY(-1) translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.cs-band::before, .cs-band::after { animation: none; }
}

/* Category cards: .cs-catgrid / .cs-catcard styles live in main.css. */

/* ------------------------------------------------------------------ *
 * Bestseller product cards
 * ------------------------------------------------------------------ */
.cs-bestsellers { padding-block: 0 4.5rem; }

.cs-pgrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}
.cs-pcard {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cs-pcard:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(14, 27, 46, 0.1);
}
.cs-pcard__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Mockup card media is near-white with a whisper of blue. */
	background: linear-gradient(160deg, #eef5fc 0%, #fbfdff 100%);
	padding: 1rem;
	min-height: 190px;
}
.cs-pcard__media img {
	width: 100%;
	height: 170px;
	object-fit: contain; /* never crop wide product photos */
	mix-blend-mode: multiply;
}
.cs-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 0.25rem 0.55rem;
	border-radius: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	color: #fff;
}
.cs-badge--sale { background: var(--wp--preset--color--sale); }
.cs-badge--info { background: var(--wp--preset--color--primary); }
.cs-badge--dark { background: var(--wp--preset--color--navy); }

.cs-pcard__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.1rem 1.15rem 1.25rem;
}
.cs-pcard__kicker {
	margin: 0 0 0.35rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}
.cs-pcard__title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.35; min-height: 2.7em; }
.cs-pcard__title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.cs-pcard__title a:hover { color: var(--wp--preset--color--primary); }
.cs-pcard__price {
	display: flex;
	align-items: baseline;
	gap: 0.55rem;
	margin: 0.8rem 0 1rem;
}
.cs-price { font-size: 1.35rem; font-weight: 800; }
.cs-price-old { font-size: 0.9rem; color: var(--wp--preset--color--text-muted); }
.cs-pcard__cta { margin-top: auto; text-align: center; }

/* ------------------------------------------------------------------ *
 * 4-step RO explainer (navy panel)
 * ------------------------------------------------------------------ */
.cs-steps-wrap { padding-block: 0 4.5rem; }
.cs-steps {
	box-sizing: border-box; /* content-box let the padding push past the 1192 grid line */
	background: var(--wp--preset--color--navy);
	border-radius: 16px;
	padding: 3rem 2.9rem 3.2rem;
	color: #fff;
}
.cs-steps__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	margin-top: 2.2rem;
}
.cs-step { position: relative; padding-right: 1.5rem; }
.cs-step__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	font-weight: 700;
	font-size: 1.05rem;
}
.cs-step h3 { margin: 1rem 0 0.4rem; font-size: 1.05rem; font-weight: 700; color: #fff; }
.cs-step p { margin: 0; font-size: 0.88rem; line-height: 1.5; color: rgba(255, 255, 255, 0.65); }
.cs-step:not(:last-child)::after {
	content: "→";
	position: absolute;
	top: 0.55rem;
	right: 0;
	color: #fff;
	font-size: 1.3rem;
}

/* ------------------------------------------------------------------ *
 * Feature cards
 * ------------------------------------------------------------------ */
.cs-features { padding-block: 0 4.5rem; }
.cs-features__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}
.cs-feature {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: 1.7rem;
	background: var(--wp--preset--color--muted); /* light tint like the mockup */
}
.cs-feature__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 12px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-size: 1.2rem;
	font-weight: 700;
}
.cs-feature__icon--heart { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--sale); }
.cs-feature h3 { margin: 1rem 0 0.4rem; font-size: 1.05rem; font-weight: 700; }
.cs-feature p { margin: 0; font-size: 0.9rem; color: var(--wp--preset--color--text-muted); }

/* ------------------------------------------------------------------ *
 * Reviews
 * ------------------------------------------------------------------ */
.cs-reviews { padding-block: 0 4.5rem; }
.cs-reviews .cs-h2 { margin-bottom: 1.6rem; }
.cs-reviews__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.15rem;
}
/* Reviews sit on the sky band in the mockup, so the cards are white. */
.cs-review {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: 1.5rem;
}
.cs-stars {
	margin: 0 0 0.7rem;
	color: var(--wp--preset--color--accent);
	letter-spacing: 0.18em;
	font-size: 0.95rem;
}
.cs-review__text { margin: 0; font-size: 0.92rem; }
.cs-review__name { margin: 0.9rem 0 0; font-size: 0.85rem; font-weight: 700; }

/* ------------------------------------------------------------------ *
 * CTA banner
 * ------------------------------------------------------------------ */
.cs-cta-wrap { padding-block: 0 4.5rem; }
.cs-cta {
	box-sizing: border-box;
	position: relative;
	overflow: hidden;
	border-radius: 18px;
	background: linear-gradient(100deg, #0f6bc2 0%, #1478d4 45%, #3f9be6 100%);
	padding: 2.7rem 2.9rem;
	color: #fff;
}
.cs-cta::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
}
.cs-cta h2 {
	margin: 0.4rem 0 0;
	max-width: 42rem;
	font-size: clamp(1.4rem, 2.4vw, 1.85rem);
	font-weight: 800;
	line-height: 1.25;
	color: #fff;
}

/* ------------------------------------------------------------------ *
 * FAQ
 * ------------------------------------------------------------------ */
.cs-faq { padding-block: 0 4.5rem; }
.cs-faq .cs-h2 { margin-bottom: 1.6rem; }
.cs-faq__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.4rem 2.5rem;
}
.cs-faq__item { display: flex; flex-direction: column; }
.cs-faq__item p { margin-bottom: auto; }
.cs-faq__item { border-bottom: 1px solid var(--wp--preset--color--border); padding-bottom: 1rem; }
.cs-faq__item summary {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.9rem 0 0;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.cs-faq__item summary::-webkit-details-marker { display: none; }
.cs-faq__item summary::after {
	content: "+";
	color: var(--wp--preset--color--primary);
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1;
}
.cs-faq__item[open] summary::after { content: "−"; }
.cs-faq__item p {
	margin: 0.6rem 0 0;
	font-size: 0.9rem;
	color: var(--wp--preset--color--text-muted);
}

/* ------------------------------------------------------------------ *
 * Newsletter
 * ------------------------------------------------------------------ */
.cs-newsletter-wrap { padding-block: 0 5rem; }
.cs-newsletter {
	box-sizing: border-box;
	background: var(--wp--preset--color--muted);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 18px;
	padding: 3.2rem 2rem 3.4rem;
	text-align: center;
}
.cs-newsletter p { margin: 0.7rem 0 0; color: var(--wp--preset--color--text-muted); }
.cs-newsletter__form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.7rem;
	margin-top: 1.6rem;
}
.cs-newsletter__form input[type="email"] {
	width: min(320px, 100%);
	padding: 0.85rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.cs-step:not(:last-child)::after { display: none; }
}

@media (max-width: 900px) {
	.cs-hero__grid { grid-template-columns: 1fr; gap: 3.4rem; }
	.cs-hero { padding-block: 2rem 3.5rem; }
	.cs-hero__panel { max-width: 560px; margin-inline: auto; }
	.cs-float--shipping { left: 0.8rem; }
	.cs-float--rating { right: 0.8rem; }
	.cs-catgrid { grid-template-columns: repeat(2, 1fr); }
	.cs-pgrid { grid-template-columns: 1fr; }
	.cs-steps__grid { grid-template-columns: repeat(2, 1fr); }
	.cs-features__grid { grid-template-columns: 1fr; }
	.cs-reviews__grid { grid-template-columns: 1fr; }
	.cs-faq__grid { grid-template-columns: 1fr; }
	.cs-trustbar__grid { grid-template-columns: repeat(2, 1fr); }
	.cs-trustbar__item { padding: 1.1rem 1.2rem; }
	.cs-trustbar__item:nth-child(3) { border-left: none; }
	.cs-trustbar__item:nth-child(n + 3) { border-top: 1px solid var(--wp--preset--color--border); }
}

@media (max-width: 560px) {
	.cs-catgrid { grid-template-columns: 1fr; }
	.cs-steps { padding: 2.2rem 1.6rem 2.4rem; }
	.cs-steps__grid { grid-template-columns: 1fr; }
	.cs-section-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}
