/* Lucent Healing — functional styles for markup without a source equivalent. */

:root {
	--header-height: 72px;
	--card-radius: 1rem;
	--section-padding: 2rem;
}

[hidden] {
	display: none !important;
}

/* Site identity */
.site-logo-img {
	height: 40px !important;
	width: auto !important;
	display: block;
}
.site-logo-text {
	display: inline-block;
}

/* WordPress' global styles reset figure margins with :where(); neutralize it
   for the source's figure-based components so row heights match the design. */
.marquee-track > figure,
.grid > figure {
	margin: 0;
}

/* Badge hides when the cart is empty (matches the source) */
.theme-cart-count:empty {
	display: none;
}

/* Header states (source toggles the light palette over the dark hero) */
.site-header[data-on-dark="true"] .theme-nav-list a {
	color: color-mix(in srgb, var(--color-midnight-foreground) 90%, transparent);
}
.site-header[data-on-dark="true"] .theme-nav-list a:hover {
	color: var(--color-midnight-foreground);
}
.site-header[data-on-dark="true"] [data-cart-open] {
	border-color: color-mix(in srgb, var(--color-midnight-foreground) 40%, transparent);
	color: var(--color-midnight-foreground);
}
.site-header[data-on-dark="true"] [data-cart-open]:hover {
	background-color: color-mix(in srgb, var(--color-midnight-foreground) 10%, transparent);
}
.site-header[data-on-dark="true"] [data-header-book] {
	background-color: var(--color-sun);
	color: var(--color-accent-foreground);
}

.theme-nav-list a {
	display: inline-block;
}

/* Mobile / tablet nav drawer */
@media (max-width: 1279px) {
	body.mobile-menu-open {
		overflow: hidden;
	}
	body.mobile-menu-open .site-header {
		z-index: 100;
	}
	.site-mobile-menu:not([hidden]) {
		display: grid;
		position: fixed;
		left: 0;
		right: 0;
		top: 72px;
		bottom: 0;
		z-index: 99;
		max-height: none;
		border-bottom-width: 1px;
	}
	body.admin-bar .site-mobile-menu:not([hidden]) {
		top: calc(46px + 72px);
	}
	@media screen and (min-width: 783px) {
		body.admin-bar .site-mobile-menu:not([hidden]) {
			top: calc(32px + 72px);
		}
	}
}

body.theme-modal-open {
	overflow: hidden;
}

.theme-modal-layer {
	z-index: 110;
}

.theme-site-modal.flex {
	display: flex;
}

#theme-contact-modal .theme-contact-modal-title {
	padding-right: 3.5rem;
}

#theme-contact-modal .theme-site-modal-close,
#theme-hero-video-modal .theme-site-modal-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	left: auto;
	z-index: 10;
}

@media (max-width: 1279px) {
	.theme-hscroll-wrap .theme-hscroll-scroller {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.theme-hscroll-wrap .theme-hscroll-scroller::-webkit-scrollbar {
		display: none;
	}
	.theme-hscroll-btn {
		position: absolute;
		top: 50%;
		z-index: 2;
		display: flex;
		height: 2.25rem;
		width: 2.25rem;
		align-items: center;
		justify-content: center;
		border-radius: 9999px;
		border: 1px solid var(--color-border);
		background: color-mix(in srgb, var(--color-background) 92%, transparent);
		font-size: 1.25rem;
		line-height: 1;
		box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
		transform: translateY(-50%);
	}
	.theme-hscroll-btn--prev {
		left: 0.25rem;
	}
	.theme-hscroll-btn--next {
		right: 0.25rem;
	}
	.theme-hscroll-btn:disabled {
		opacity: 0.35;
		pointer-events: none;
	}
	.theme-hscroll-btn[hidden] {
		display: none;
	}
	.marquee.overflow-x-auto {
		overflow-x: auto;
	}
}

@media (min-width: 1280px) {
	.theme-hscroll-wrap .theme-hscroll-btn {
		display: none;
	}
}

/* Reveal fallbacks: never leave content invisible */
body.is-customizer .reveal,
body.is-customizer .reveal-up,
body.is-customizer .reveal-left,
body.is-customizer .reveal-right,
body.is-customizer .reveal-scale,
.no-js .reveal {
	opacity: 1 !important;
	transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
	.reveal {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* Hero video */
.hero-video {
	background-color: var(--color-midnight);
}

/* Gallery slides stack in the fixed-ratio stage */
[data-gallery-stage] > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Sticky-header offset for inner pages */
body.theme-no-hero .site-main {
	padding-top: calc(var(--header-height) + 3.5rem);
}

/* Logged-in admin bar: keep the fixed header below the bar on desktop only. */
@media screen and (min-width: 783px) {
	body.admin-bar .site-header {
		top: 32px;
	}
}

/* Typography — match Lovable (src/styles.css @layer base). */
body {
	font-family: var(--font-sans);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-display {
	font-family: var(--font-display);
	letter-spacing: 0;
	font-weight: 400;
}

html {
	scroll-padding-top: 88px;
}

/* ------------------------------------------------------------------
   Product cards
------------------------------------------------------------------ */
.theme-featured-products {
	align-items: stretch;
}
.theme-product-card-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
}
.theme-product-card__image-link {
	display: block;
}
.theme-product-card__image-link img {
	display: block;
	width: 100%;
}

/* ------------------------------------------------------------------
   WooCommerce: buttons, notices, forms
------------------------------------------------------------------ */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border: 1px solid var(--color-border);
	border-radius: var(--card-radius);
	background: var(--color-card);
	color: var(--color-foreground);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	list-style: none;
}
.woocommerce-error {
	border-color: var(--color-destructive);
}
.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}
#theme-cart-drawer .woocommerce-message {
	display: none;
}

.woocommerce a.added_to_cart.wc-forward,
.woocommerce-page a.added_to_cart.wc-forward,
.single-product a.added_to_cart.wc-forward,
body a.added_to_cart.wc-forward {
	display: none !important;
}

.single_add_to_cart_button.button:disabled,
.single_add_to_cart_button.button.disabled,
.add_to_cart_button.button:disabled,
.add_to_cart_button.button.disabled {
	cursor: not-allowed !important;
	opacity: 0.4 !important;
	pointer-events: none !important;
}
.single_add_to_cart_button.button:disabled:hover,
.single_add_to_cart_button.button.disabled:hover,
.add_to_cart_button.button:disabled:hover,
.add_to_cart_button.button.disabled:hover {
	opacity: 0.4 !important;
}

.ajax_add_to_cart.theme-btn-loading {
	opacity: 0.6 !important;
	pointer-events: none !important;
	cursor: wait !important;
}

.single-product .single_add_to_cart_button.loading::after,
.ajax_add_to_cart.loading::after {
	display: none !important;
}

/* Quantity + add to cart row */
.single-product .theme-add-to-cart-area {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 0.75rem;
}
.single-product .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 160px;
}
.theme-quantity-wrapper .theme-qty-input {
	-moz-appearance: textfield;
}
.theme-quantity-wrapper .theme-qty-input::-webkit-outer-spin-button,
.theme-quantity-wrapper .theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.theme-quantity-wrapper button {
	cursor: pointer;
}

/* Variation pills */
.theme-attr-select-hidden {
	display: none !important;
}
.theme-attr-pill {
	border-color: var(--color-border);
}
.theme-attr-pill.border-primary {
	border-color: var(--color-primary);
}
.single-product .variations tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
	display: block;
	width: 100%;
}
.single-product .variations tbody td.label {
	padding-bottom: 0.25rem;
}
.single-product .variations tbody td.value {
	padding-top: 0;
}

/* Single product layout */
.single-product .theme-product-layout,
.single-product .theme-product-gallery,
.single-product .theme-product-info {
	min-width: 0;
	max-width: 100%;
}
.single-product .theme-product-thumbnails {
	flex-wrap: wrap;
	max-width: 100%;
}
.single-product .theme-product-thumbnails button {
	cursor: pointer;
}
.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* ------------------------------------------------------------------
   Side cart drawer
------------------------------------------------------------------ */
#theme-cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 60;
	pointer-events: none;
	visibility: hidden;
}
body.cart-open #theme-cart-drawer {
	pointer-events: auto;
	visibility: visible;
}
#theme-cart-drawer #theme-cart-overlay {
	opacity: 0;
	pointer-events: none;
}
body.cart-open #theme-cart-drawer #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}
body.admin-bar #theme-cart-drawer {
	top: 46px;
	height: calc(100% - 46px);
}
@media screen and (min-width: 783px) {
	body.admin-bar #theme-cart-drawer {
		top: 32px;
		height: calc(100% - 32px);
	}
}
#theme-cart-drawer > aside {
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
	height: 100%;
}
body.cart-open #theme-cart-drawer > aside {
	transform: translateX(0);
	pointer-events: auto;
}
body.cart-open {
	overflow: hidden;
}
#theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}
#theme-cart-drawer button {
	cursor: pointer;
}

/* ------------------------------------------------------------------
   Checkout / cart / account / thank you (WooCommerce Blocks)
------------------------------------------------------------------ */
body.woocommerce-checkout .site-main {
	padding-top: calc(var(--header-height) + 3.5rem);
	padding-bottom: 4rem;
}
body.woocommerce-checkout .entry-content,
body.woocommerce-cart .entry-content,
body.woocommerce-account .entry-content {
	max-width: 100%;
}
body.woocommerce-checkout .page-title,
body.woocommerce-cart .page-title,
body.woocommerce-account .page-title {
	margin-bottom: 2.5rem;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
}
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
	min-width: 0;
	width: 100%;
	max-width: none;
}

@media (min-width: 768px) {
	/* One grid owner only: the element that directly contains main + sidebar. */
	body.woocommerce-checkout .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
	body.woocommerce-checkout .wc-block-components-sidebar-layout > .wc-block-checkout__main,
	body.woocommerce-checkout .wc-block-components-sidebar-layout > .wc-block-checkout__sidebar {
		grid-column: auto;
	}
	body.woocommerce-checkout .wc-block-components-notice-banner {
		grid-column: 1 / -1;
	}
}

/* Older Blocks markup without the sidebar layout wrapper */
@supports selector(:has(*)) {
	@media (min-width: 768px) {
		body.woocommerce-checkout .wc-block-checkout:not(:has(.wc-block-components-sidebar-layout)) {
			display: grid;
			grid-template-columns: 1fr 1fr;
			gap: 2rem;
			align-items: start;
		}
	}
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: var(--color-soft);
	border-radius: var(--card-radius);
	padding: var(--section-padding);
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-blocks-components-select__select,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
	font-family: var(--font-sans);
	font-size: 1rem;
	color: var(--color-foreground);
	background-color: var(--color-background);
	border: 1px solid var(--color-border) !important;
	border-radius: 0.75rem !important;
	width: 100% !important;
	max-width: none !important;
}
body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-select select:focus,
body.woocommerce-checkout .wc-block-components-textarea textarea:focus {
	outline: 2px solid var(--color-ring);
	outline-offset: 2px;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: var(--color-primary) !important;
	color: var(--color-primary-foreground) !important;
	border-radius: 9999px !important;
	font-family: var(--font-sans);
	font-weight: 500;
}
body.woocommerce-checkout .wc-block-components-checkbox label {
	font-family: var(--font-sans);
	color: var(--color-foreground);
}
body.woocommerce-checkout .wc-block-cart-items__row {
	border-color: var(--color-border);
}
body.woocommerce-checkout .wc-block-components-notice-banner {
	background-color: var(--color-card);
	border-color: var(--color-border);
	border-radius: var(--card-radius);
	color: var(--color-foreground);
}
body.woocommerce-checkout h2,
body.woocommerce-checkout h3 {
	font-family: var(--font-display);
	font-weight: 400;
}

/* Classic WC forms kept for plugin compatibility */
body.woocommerce-checkout .woocommerce-checkout .form-row .input-text,
body.woocommerce-checkout .woocommerce-checkout .form-row select {
	font-family: var(--font-sans);
	font-size: 1rem;
	color: var(--color-foreground);
	background-color: var(--color-background);
	border: 1px solid var(--color-border);
	border-radius: 0.75rem;
}

body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .woocommerce {
	max-width: none;
}

/* Thank you page */
body.theme-thankyou-page {
	overflow-x: hidden;
}
body.theme-thankyou-page .woocommerce-order {
	color: var(--color-foreground);
}
body.theme-thankyou-page .woocommerce-order-overview {
	list-style: none;
	padding: 1.5rem;
	margin: 0 0 2rem;
	border: 1px solid var(--color-border);
	border-radius: var(--card-radius);
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
}
body.theme-thankyou-page .woocommerce-order-overview li {
	border: 0;
	margin: 0;
	padding: 0;
	font-size: 0.875rem;
	color: var(--color-muted-foreground);
}
body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	color: var(--color-foreground);
	font-size: 1rem;
}
body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title {
	font-family: var(--font-display);
	font-weight: 400;
	padding: 0 0 1rem 0;
}
body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}
body.theme-thankyou-page .woocommerce-order-details tfoot th {
	text-align: left;
}
body.theme-thankyou-page .woocommerce-order-details tfoot td {
	text-align: right;
}
body.theme-thankyou-page .woocommerce-customer-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-top: 2rem;
}
body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
	font-style: normal;
}

/* Shop page heading */
.site-main .page-title {
	font-family: var(--font-display);
	font-weight: 400;
}

/* Journal single — body spacing and block editor parity with Lovable */
.theme-journal-body > * + *,
.theme-journal-body .wp-block-post-content > * + * {
	margin-top: 1.5rem;
}
.theme-journal-body h2,
.theme-journal-body h3,
.theme-journal-body h4 {
	font-family: var(--font-display);
	font-weight: 400;
	color: var(--color-foreground);
	line-height: 1.3;
}
.theme-journal-body h2 {
	font-size: 1.75rem;
}
.theme-journal-body h3 {
	font-size: 1.375rem;
}
.theme-journal-body a {
	color: var(--color-primary);
	text-decoration: underline;
	text-underline-offset: 4px;
}
.theme-journal-body a:hover {
	color: var(--color-foreground);
}
.theme-journal-body ul,
.theme-journal-body ol {
	padding-left: 1.5rem;
}
.theme-journal-body ul {
	list-style: disc;
}
.theme-journal-body ol {
	list-style: decimal;
}
.theme-journal-body li + li {
	margin-top: 0.35rem;
}
.theme-journal-body blockquote {
	border-left: 3px solid var(--color-primary);
	padding-left: 1rem;
	margin-left: 0;
	margin-right: 0;
	font-style: italic;
	color: var(--color-foreground);
}
.theme-journal-body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--card-radius);
}
.theme-journal-body figure {
	margin: 0;
}

/* Section layout tuning */
.theme-founder-grid {
	align-items: center;
}
@media (min-width: 768px) {
	.theme-founder-grid {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	}
}
.theme-founder-media img {
	max-width: min(100%, 22rem);
	margin-inline: auto;
	display: block;
}
@media (min-width: 768px) {
	.theme-founder-media img {
		margin-inline: 0;
	}
}
#team .theme-team-grid {
	gap: 1.5rem 1.25rem;
	font-size: 0.95rem;
}
#team .theme-team-grid h3 {
	font-size: 1.25rem;
	line-height: 1.3;
}
@media (min-width: 768px) {
	.theme-careers-grid {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}
}
.theme-footer-social a svg {
	display: block;
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
}

/* WordPress core helpers */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
