/*
Theme Name: Just Wedi
Theme URI: https://github.com/just-wedi/just-wedi
Author: Just Wedi
Description: Child theme of Astra for Just Wedi - front-page template and retailer styling. Do not edit the parent Astra theme.
Template: astra
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 8.3
Text Domain: just-wedi
*/

/* Parent Astra loads first. */

/* Cap the whole layout on very wide viewports (centred “letterbox” on ultrawide). */
#page {
	max-width: 1920px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	box-sizing: border-box;
}

/*
 * Astra’s .ast-container is usually capped (~1200px) via theme settings.
 * Let content use the full width inside #page (up to 1920px).
 */
.site-content .ast-container {
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
}

#primary {
	max-width: 100%;
}

:root {
	--jw-color-primary: #1a365d;
	--jw-color-primary-mid: #2c5282;
	--jw-color-primary-dark: #153e75;
	--jw-color-muted: #64748b;
	--jw-color-surface: #f8fafc;
	--jw-color-tint: #e8edf2;
	--jw-color-border: rgba(26, 54, 93, 0.12);
	--jw-audience-band-bg: #eef1f5;
}

.has-text-align-center {
	text-align: center;
}

.jw-home-content {
	padding-top: 2.5rem;
	padding-bottom: 2rem;
}

/* Keep Astra-style horizontal centre when #primary is flex; don’t pin blocks to one edge */
.jw-home-content > .ast-container,
.jw-home-content > section.ast-container {
	margin-left: auto;
	margin-right: auto;
}

.jw-home-heading {
	margin-top: 2.5rem;
	margin-bottom: 1.25rem;
	position: relative;
}

.jw-home-heading::after {
	content: "";
	display: block;
	width: 2.75rem;
	height: 3px;
	margin: 0.65rem auto 0;
	background: linear-gradient(90deg, var(--jw-color-primary), rgba(44, 82, 130, 0.35));
	border-radius: 2px;
}

.jw-audience-band {
	box-sizing: border-box;
	background: var(--jw-audience-band-bg);
	padding: 2rem clamp(0.75rem, 4vw, 2.25rem) 2.25rem;
	margin-bottom: 2.5rem;
	border-top: 1px solid rgba(26, 54, 93, 0.06);
	border-bottom: 1px solid rgba(26, 54, 93, 0.06);
}

/* Astra uses .site-content .ast-container { display: flex } - align with that */
.site-content .jw-audience-band.ast-container {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 1.5rem;
	align-items: stretch;
}

@media (min-width: 782px) {
	.site-content .jw-audience-band.ast-container {
		flex-direction: row;
	}

	.site-content .jw-audience-band.ast-container > .jw-audience__card {
		flex: 1 1 0;
		min-width: 0;
	}
}

.jw-audience__card {
	min-width: 0;
	overflow-wrap: break-word;
	border: 1px solid rgba(26, 54, 93, 0.1);
	border-left: 4px solid var(--jw-color-primary);
	padding: 1.5rem;
	background: #fff;
	box-shadow: 0 1px 2px rgba(26, 54, 93, 0.06), 0 6px 20px rgba(26, 54, 93, 0.07);
}

.jw-audience__card h3 {
	color: var(--jw-color-primary);
	margin-top: 0;
}

.jw-audience__card a {
	color: var(--jw-color-primary-mid);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.jw-audience__card a:hover {
	color: var(--jw-color-primary-dark);
}

.jw-split {
	margin-bottom: 2.5rem;
	box-sizing: border-box;
}

.site-content .jw-split.ast-container {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 1.5rem;
	align-items: stretch;
}

@media (min-width: 782px) {
	.site-content .jw-split.ast-container {
		flex-direction: row;
		align-items: stretch;
	}

	.site-content .jw-split.ast-container > .jw-split__media,
	.site-content .jw-split.ast-container > .jw-split__text {
		flex: 1 1 0;
		min-width: 0;
	}

	.jw-split__text {
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.jw-split__text-stack {
		flex: 1 1 auto;
		min-height: 0;
		justify-content: space-between;
		gap: 1rem;
	}
}

.jw-split__media {
	margin: 0;
	min-width: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

.jw-split__text {
	min-width: 0;
}

.jw-split__text-stack {
	display: flex;
	flex-direction: column;
	gap: 1.35rem;
}

.jw-split__img {
	display: block;
	width: auto;
	height: auto;
	max-width: min(100%, 42rem);
	max-height: min(70vh, 36rem);
	object-fit: contain;
	border-radius: 6px;
	border: 1px solid var(--jw-color-border);
}

.jw-split__blurb {
	margin: 0;
	padding: 0;
	border: 0;
}

.jw-split__blurb-title {
	margin: 0 0 0.55rem;
	font-size: clamp(1.2rem, 2.5vw, 1.45rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--jw-color-primary);
	letter-spacing: -0.02em;
}

.jw-split__blurb-text {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--jw-color-muted);
}

.jw-split__docs-note {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--jw-color-primary-mid);
	padding-top: 1rem;
	border-top: 1px solid var(--jw-color-border);
}

.jw-shop-by-intro {
	margin-bottom: 1.5rem;
	color: var(--jw-color-muted);
}

.jw-faq details a {
	color: var(--jw-color-primary-mid);
}

.jw-faq details a:hover {
	color: var(--jw-color-primary-dark);
}

.jw-shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
	margin-bottom: 2.5rem;
	text-align: center;
}

.jw-shop-grid .button {
	display: inline-block;
	text-align: center;
}

.jw-shop-grid .wp-block-button__link {
	background: var(--jw-color-primary) !important;
	color: #fff !important;
	border: 2px solid var(--jw-color-primary) !important;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.jw-shop-grid .wp-block-button__link:hover {
	background: var(--jw-color-primary-dark) !important;
	border-color: var(--jw-color-primary-dark) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.jw-products {
	margin-bottom: 2rem;
}

/*
 * #primary / Astra flex layouts: .ast-container can sit in a flex row context.
 * Stack children vertically; keep margin-inline auto + width so we don’t override
 * Astra’s centring (avoid max-width: 100% beating narrower .jw-steps rules).
 */
.jw-steps.ast-container,
.jw-testimonial.ast-container,
.jw-faq.ast-container,
.jw-products.ast-container {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	align-content: flex-start;
	box-sizing: border-box;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 0;
}

/* How ordering works - numbered process (not a quote card) */
.jw-steps.ast-container {
	max-width: 40rem;
	margin-bottom: 2.5rem;
}

.jw-faq.ast-container {
	margin-bottom: 2.5rem;
}

.jw-products.ast-container {
	margin-bottom: 2rem;
}

.jw-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: jw-step;
}

.jw-steps li {
	position: relative;
	margin: 0 0 1.125rem;
	padding-left: 2.85rem;
	line-height: 1.55;
	counter-increment: jw-step;
}

.jw-steps li:last-child {
	margin-bottom: 0;
}

.jw-steps li::before {
	content: counter(jw-step);
	position: absolute;
	left: 0;
	top: 0.15rem;
	width: 1.85rem;
	height: 1.85rem;
	border-radius: 50%;
	background: var(--jw-color-primary);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.85rem;
	text-align: center;
	box-shadow: 0 0 0 3px var(--jw-color-tint);
}

.jw-faq details {
	margin-bottom: 0.75rem;
	padding: 0.65rem 1rem;
	background: var(--jw-color-surface);
	border: 1px solid var(--jw-color-border);
	border-radius: 6px;
}

.jw-faq summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--jw-color-primary);
	list-style-position: outside;
}

.jw-faq summary:hover {
	color: var(--jw-color-primary-mid);
}

.jw-faq-more {
	margin-top: 1rem;
	margin-bottom: 2.5rem;
}

.jw-trade-footnote {
	font-size: 0.875rem;
	margin-bottom: 2rem;
	padding: 1rem 1.25rem;
	background: linear-gradient(90deg, var(--jw-color-tint), transparent);
	border-left: 4px solid var(--jw-color-primary);
	border-radius: 0 6px 6px 0;
	color: var(--jw-color-muted);
}

.jw-trade-footnote strong {
	color: var(--jw-color-primary);
}
