/* ==========================================================================
   Stellar Compounds theme
   Colours, type and spacing come from theme.json presets (--wp--preset--*).
   ========================================================================== */

:root {
	--stellar-radius: 0.875rem;
	--stellar-radius-sm: 0.6rem;
	--stellar-border: 1px solid var(--wp--preset--color--border);
	--stellar-shadow: var(--wp--preset--shadow--card);
	--stellar-gradient: var(--wp--preset--gradient--brand);
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* ---------- Header ---------- */

.stellar-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: var(--stellar-border);
	background: rgba(255, 255, 255, 0.92) !important;
	backdrop-filter: saturate(160%) blur(10px);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
}

.admin-bar .stellar-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .stellar-header { top: 46px; } }

.stellar-logo { display: inline-flex; align-items: center; line-height: 0; }
.stellar-logo img { width: 120px; height: auto; }
.stellar-logo--footer img { width: 160px; }

.stellar-nav .wp-block-navigation-item__content {
	font-weight: 600;
	color: var(--wp--preset--color--midnight);
	text-decoration: none;
}
.stellar-nav .wp-block-navigation-item__content:hover,
.stellar-nav .current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--violet);
}

/* Customer account link + cart: match the menu text colour. */
.stellar-account-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--midnight);
	text-decoration: none;
	white-space: nowrap;
}
.stellar-account-link:hover {
	border-color: var(--wp--preset--color--violet);
	color: var(--wp--preset--color--violet);
}
.stellar-header .wc-block-mini-cart__button { color: var(--wp--preset--color--midnight); }
.stellar-header .wc-block-mini-cart__button:hover { color: var(--wp--preset--color--violet); }
@media (max-width: 600px) {
	.stellar-account-link span { display: none; }
	.stellar-account-link { padding: 0.45rem; }
}

/* ---------- Buttons ---------- */

.wp-element-button,
.wp-block-button__link {
	transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 8px 20px -10px rgba(127, 34, 254, 0.6);
}
.wp-element-button:hover,
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Every button is the same brand gradient, including "outline" style buttons
   added later in the editor. */
.wp-block-button > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--stellar-gradient) !important;
	color: #ffffff !important;
	border: 0 !important;
	box-shadow: 0 8px 20px -10px rgba(127, 34, 254, 0.6);
}
.wp-block-button > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--stellar-gradient) !important;
	color: #ffffff !important;
	filter: brightness(1.12);
}

/* ---------- Banners ---------- */

.stellar-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--cyan);
	margin-bottom: 0.25rem;
}
.stellar-eyebrow--dark { color: var(--wp--preset--color--violet); }

/* No gap between the sticky header, the banner and the footer. */
.wp-site-blocks > * + * { margin-block-start: 0; }

.stellar-hero h1 { text-wrap: balance; }

/* Banners: darken the image itself instead of using an overlay layer, so the
   text can never end up underneath the darkening. */
.stellar-hero .wp-block-cover__background,
.stellar-cta .wp-block-cover__background,
.stellar-page-banner .wp-block-cover__background {
	display: none !important;
}
.stellar-hero .wp-block-cover__image-background,
.stellar-cta .wp-block-cover__image-background,
.stellar-page-banner .wp-block-cover__image-background {
	filter: brightness(0.42) saturate(1.15);
}
.stellar-page-banner .wp-block-cover__image-background { filter: brightness(0.38) saturate(1.15); }
.stellar-hero .wp-block-cover__inner-container,
.stellar-cta .wp-block-cover__inner-container,
.stellar-page-banner .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

/* Banner text: always white, with a soft shadow for contrast over the image. */
.stellar-hero h1,
.stellar-hero h2,
.stellar-cta h1,
.stellar-cta h2,
.stellar-page-banner .wp-block-post-title,
.stellar-page-banner h1 {
	color: #ffffff !important;
	text-shadow: 0 2px 28px rgba(2, 6, 24, 0.75);
	text-wrap: balance;
}
.stellar-page-banner .wp-block-post-title,
.stellar-page-banner h1 { margin: 0; }
.stellar-hero p:not(.stellar-eyebrow),
.stellar-cta p:not(.stellar-eyebrow) {
	color: #e2e8f0 !important;
	text-shadow: 0 1px 16px rgba(2, 6, 24, 0.8);
}
.stellar-hero .stellar-eyebrow { text-shadow: 0 1px 12px rgba(2, 6, 24, 0.8); }

/* ---------- Cards ---------- */

.stellar-card {
	background: #ffffff;
	border: var(--stellar-border);
	border-radius: var(--stellar-radius);
	box-shadow: var(--stellar-shadow);
	padding: var(--wp--preset--spacing--40) !important;
}
.stellar-card h3 { margin-top: 0.25rem; }
.stellar-card__icon {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	border-radius: 0.75rem;
	background: var(--stellar-gradient);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.1rem;
}

.stellar-lead {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--midnight);
}

/* Numbered process steps. */
.stellar-steps {
	list-style: none;
	counter-reset: stellar-step;
	padding-left: 0;
	display: grid;
	gap: 0.85rem;
}
.stellar-steps > li {
	counter-increment: stellar-step;
	position: relative;
	padding: 1rem 1.25rem 1rem 3.75rem;
	background: #ffffff;
	border: var(--stellar-border);
	border-radius: var(--stellar-radius-sm);
}
.stellar-steps > li::before {
	content: counter(stellar-step);
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 2rem;
	height: 2rem;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: var(--stellar-gradient);
	color: #ffffff;
	font-weight: 700;
	font-size: 0.9rem;
}

code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9em;
	background: var(--wp--preset--color--surface);
	border: var(--stellar-border);
	border-radius: 0.35rem;
	padding: 0.05em 0.35em;
}

/* FAQ accordions. */
.stellar-faq {
	border: var(--stellar-border);
	border-radius: var(--stellar-radius-sm);
	padding: 0.9rem 1.15rem;
	background: #ffffff;
}
.stellar-faq + .stellar-faq { margin-top: 0.6rem; }
.stellar-faq summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--wp--preset--color--midnight);
}
.stellar-faq[open] summary { color: var(--wp--preset--color--violet); margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */

.stellar-footer { border-top: var(--stellar-border); }
.stellar-footer-links { list-style: none; padding-left: 0; display: grid; gap: 0.4rem; }
.stellar-footer-links a { color: var(--wp--preset--color--text); text-decoration: none; }
.stellar-footer-links a:hover { color: var(--wp--preset--color--violet); }

/* ==========================================================================
   WooCommerce
   ========================================================================== */

.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.wc-block-components-button:not(.is-link),
.wp-block-button.wc-block-components-product-button .wp-block-button__link {
	background: var(--stellar-gradient) !important;
	color: #ffffff !important;
	border: 0 !important;
	border-radius: var(--stellar-radius-sm) !important;
	font-weight: 700 !important;
}
.woocommerce .button:hover,
.wc-block-components-button:not(.is-link):hover { filter: brightness(1.1); }

/* Product grids: classic shortcode ([products]) and block Product Collection. */
.woocommerce ul.products li.product,
.wc-block-product-template .wc-block-product,
.wp-block-post.product {
	background: #ffffff;
	border: var(--stellar-border);
	border-radius: var(--stellar-radius);
	box-shadow: var(--stellar-shadow);
	padding: 1.1rem !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.woocommerce ul.products li.product:hover,
.wc-block-product-template .wc-block-product:hover { transform: translateY(-2px); }

.woocommerce ul.products li.product img,
.wc-block-components-product-image img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: var(--wp--preset--color--surface);
	border-radius: var(--stellar-radius-sm);
	border: var(--stellar-border);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.wc-block-components-product-name,
.wp-block-post-title a {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-weight: 700;
	font-size: 1.5rem !important;
	color: var(--wp--preset--color--midnight) !important;
	text-decoration: none;
}

.woocommerce ul.products li.product .price,
.wc-block-components-product-price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--wp--preset--color--violet) !important;
	font-weight: 700;
}

/* Single product. */
.stellar-ruo-notice {
	margin: 1rem 0;
	padding: 0.85rem 1rem;
	border-left: 4px solid var(--wp--preset--color--violet);
	border-radius: 0.4rem;
	background: #f5f0ff;
	color: var(--wp--preset--color--midnight);
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce div.product div.images img {
	border-radius: var(--stellar-radius);
	border: var(--stellar-border);
	background: var(--wp--preset--color--surface);
}

/* Catalog search bar (shop, categories, search results). */
.stellar-catalog-search {
	margin: 0 0 var(--wp--preset--spacing--40);
}
.stellar-catalog-search__form {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	max-width: 720px;
	padding: 0.4rem;
	background: #ffffff;
	border: 1px solid #cad5e2;
	border-radius: 999px;
	box-shadow: var(--stellar-shadow);
}
.stellar-catalog-search__form:focus-within {
	border-color: var(--wp--preset--color--violet);
	box-shadow: 0 0 0 3px rgba(127, 34, 254, 0.15), var(--stellar-shadow);
}
.stellar-catalog-search__icon {
	flex: none;
	margin-left: 0.75rem;
	color: var(--wp--preset--color--muted);
}
.stellar-catalog-search__field {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	outline: none !important;
	background: transparent;
	padding: 0.55rem 0.25rem !important;
	font: inherit;
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--midnight);
}
.stellar-catalog-search__field::-webkit-search-cancel-button { cursor: pointer; }
.stellar-catalog-search__button {
	flex: none;
	border: 0;
	border-radius: 999px;
	padding: 0.65rem 1.25rem;
	background: var(--stellar-gradient);
	color: #ffffff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.stellar-catalog-search__button:hover { filter: brightness(1.1); }
.stellar-catalog-search__meta {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
@media (max-width: 600px) {
	.stellar-catalog-search__button { padding: 0.65rem 0.9rem; }
}

/* My Account: login/register forms and account navigation. */
.woocommerce-account .woocommerce form.login,
.woocommerce-account .woocommerce form.register,
.woocommerce-account .woocommerce form.lost_reset_password {
	border: var(--stellar-border) !important;
	border-radius: var(--stellar-radius) !important;
	box-shadow: var(--stellar-shadow);
	padding: var(--wp--preset--spacing--40) !important;
	background: #ffffff;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border: 1px solid #cad5e2;
	border-radius: var(--stellar-radius-sm);
	padding: 0.7rem 0.85rem;
	font: inherit;
}
.woocommerce form .form-row input.input-text:focus {
	outline: 2px solid #a686ff;
	outline-offset: 1px;
	border-color: var(--wp--preset--color--violet);
}
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.35rem;
}
.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 0.6rem 0.9rem;
	border-radius: var(--stellar-radius-sm);
	color: var(--wp--preset--color--midnight);
	text-decoration: none;
	font-weight: 600;
}
.woocommerce-MyAccount-navigation a:hover { background: var(--wp--preset--color--surface); }
.woocommerce-MyAccount-navigation .is-active a {
	background: var(--stellar-gradient);
	color: #ffffff;
}

/* Notices. */
.woocommerce-message,
.woocommerce-info,
.wc-block-components-notice-banner {
	border-radius: var(--stellar-radius-sm) !important;
}

/* Checkout: research-use acknowledgement. */
.stellar-ruo-ack,
.wc-block-components-checkbox[class*="stellar"] {
	padding: 0.85rem 1rem;
	background: #f5f0ff;
	border-radius: var(--stellar-radius-sm);
}

/* ==========================================================================
   Age gate
   ========================================================================== */

html.sc-age-pending body { overflow: hidden; }
.sc-age-ok #sc-age-gate { display: none !important; }

.sc-agegate {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: #020618;
	font-family: var(--wp--preset--font-family--body);
}
.sc-agegate-backdrop {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.55;
	pointer-events: none;
}
.sc-agegate-panel {
	position: relative;
	width: 100%;
	max-width: 30rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 2rem 1.75rem;
	background: #ffffff;
	color: #0f172b;
	border-radius: 1rem;
	box-shadow: 0 0 0 1px rgba(127, 34, 254, 0.35), 0 25px 60px -12px rgba(20, 71, 230, 0.55);
	text-align: center;
}
.sc-agegate-logo { display: block; width: 180px; max-width: 70%; height: auto; margin: -0.5rem auto 0.5rem; }
.sc-agegate-title {
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2rem;
	line-height: 1.1;
	font-weight: 700;
	color: #0f172b;
}
.sc-agegate-body p { margin: 0 0 0.75rem; font-size: 0.95rem; line-height: 1.5; color: #45556c; }
.sc-agegate-actions { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 1.5rem; }
.sc-agegate-btn {
	width: 100%;
	padding: 0.8rem 1rem;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	border-radius: 0.5rem;
	cursor: pointer;
	transition: filter 0.15s, border-color 0.15s;
}
.sc-agegate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sc-agegate-btn:focus-visible { outline: 3px solid #a686ff; outline-offset: 2px; }
.sc-agegate-btn-primary { background: linear-gradient(90deg, #1447e6, #7f22fe); color: #ffffff; border: 0; }
.sc-agegate-btn-primary:hover:not(:disabled) { filter: brightness(1.12); }
.sc-agegate-btn-secondary { background: #ffffff; color: #45556c; border: 1px solid #cad5e2; }
.sc-agegate-btn-secondary:hover:not(:disabled) { border-color: #7f22fe; }
.sc-agegate-fineprint { margin: 1.25rem 0 0; font-size: 0.75rem; line-height: 1.4; color: #62748e; }
.sc-agegate-denied {
	margin-top: 1rem;
	padding: 0.75rem;
	border-radius: 0.5rem;
	background: #fef2f2;
	color: #9f0712;
	font-weight: 600;
	font-size: 0.9rem;
}
.sc-agegate-denied p { margin: 0; }
.sc-agegate-denied[hidden] { display: none; }
