/**
 * ComfortMe functional styles.
 *
 * Only markup without a source equivalent (WordPress / WooCommerce output),
 * functional state rules and Customizer fallbacks live here. Elements that
 * exist in the design keep the compiled source classes from app.css.
 */

:root {
	--header-height: 72px;
	--header-gap: 2rem;
	--footer-height: 0px;
}

@media (min-width: 1024px) {
	:root {
		--header-height: 82px;
	}
}

[hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------- structure */
[data-site-header] {
	top: var(--announce-h, 0px);
}

.theme-scroll-progress {
	transform: scaleX(0);
	transform-origin: 0% 50%;
	will-change: transform;
}

.site-logo-img {
	height: var(--logo-height, 48px);
	width: auto;
	display: block;
}

@media (max-width: 639px) {
	.site-logo-img {
		height: var(--logo-height-mobile, 44px);
	}
}

.site-logo-text {
	display: inline-block;
	line-height: var(--logo-height, 48px);
}

.site-footer-logo-img {
	height: var(--footer-logo-height, 64px);
	width: auto;
	display: block;
}

body.theme-no-hero main.site-main {
	padding-top: calc(var(--announce-h, 0px) + var(--header-height) + var(--header-gap));
}

body.woocommerce-checkout main.site-main {
	padding-top: calc(var(--announce-h, 0px) + var(--header-height) + var(--header-gap));
	padding-bottom: 4rem;
}

/* -------------------------------------------------------------- navigation */
.theme-nav-list {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.theme-nav-list li {
	margin: 0;
}

@media (min-width: 1280px) {
	.theme-nav-list {
		gap: 1rem;
	}
}

footer ul.space-y-3 {
	list-style: none;
	margin: 0;
	padding: 0;
}

footer ul.space-y-3 a {
	display: inline-block;
}

/* ---------------------------------------------------------------- reveals */
body.reveal-ready .reveal-item {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s cubic-bezier(0.25, 0.4, 0.25, 1), transform 0.7s cubic-bezier(0.25, 0.4, 0.25, 1);
	will-change: opacity, transform;
}

body.reveal-ready .reveal-item.is-visible {
	opacity: 1;
	transform: none;
}

body.reveal-ready .theme-reveal-fast {
	transition-duration: 0.6s;
}

body.is-customizer .reveal-item,
body.is-customizer .theme-reveal-fast {
	opacity: 1 !important;
	transform: none !important;
}

/* ------------------------------------------------------------ cart drawer */
#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 49;
	background: hsl(var(--foreground) / 0.3);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s cubic-bezier(0.25, 0.4, 0.25, 1), visibility 0.3s;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	visibility: visible;
}

#theme-cart-drawer {
	transform: translateX(100%);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.45s cubic-bezier(0.25, 0.4, 0.25, 1), opacity 0.3s cubic-bezier(0.25, 0.4, 0.25, 1), visibility 0.45s;
}

body.cart-open #theme-cart-drawer {
	transform: none;
	opacity: 1;
	visibility: visible;
}

#theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}

.theme-cart-count:empty {
	display: none;
}

/* ------------------------------------------------------------ modal motion */
.theme-success-badge {
	animation: themeSpringIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes themeSpringIn {
	from {
		opacity: 0;
		transform: scale(0);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

[data-contact-success] {
	animation: themeFadeScale 0.4s cubic-bezier(0.25, 0.4, 0.25, 1) both;
}

@keyframes themeFadeScale {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

[data-contact-modal-content][data-state='closed'] {
	animation: themeDialogOut 0.2s ease both;
}

@keyframes themeDialogOut {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

/* ------------------------------------------------------- product quantity */
.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	width: 2.5rem;
}

.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.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;
}

/* ------------------------------------------- WooCommerce button overrides */
.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;
}

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

/* ------------------------------------------------------- single product */
.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-add-to-cart-area {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.single-product .theme-add-to-cart-area .single_add_to_cart_button {
	min-width: 160px;
}

.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in,
.single-product .theme-product-description {
	overflow-wrap: break-word;
	word-break: break-word;
}

.single-product .theme-product-description p {
	margin: 0;
}

.single-product .theme-product-description p + p {
	margin-top: 1rem;
}

.theme-attr-select-hidden {
	display: none !important;
}

.single-product .variations.shop_attributes 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 .variations td.label {
	display: none;
}

.single-product .variations {
	width: 100%;
	border: 0;
	margin: 0;
}

.single-product .variations tr,
.single-product .variations td {
	border: 0;
	padding: 0;
	background: transparent;
}

.single-product .single_variation_wrap {
	display: block !important;
	width: 100%;
}

.single-product .woocommerce-variation-price,
.single-product .woocommerce-variation-availability {
	margin-top: 1rem;
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
}

/* ------------------------------------------------------------ product grid */
.theme-product-card-wrap {
	display: block;
	min-width: 0;
}

/* ------------------------------------------------------ WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.6;
}

.woocommerce-message {
	border-left: 3px solid hsl(var(--primary));
}

.woocommerce-error {
	border-left: 3px solid hsl(var(--destructive));
}

.woocommerce-info {
	border-left: 3px solid hsl(var(--accent));
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
	margin-left: 1rem;
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info,
#theme-cart-drawer .woocommerce-message {
	display: none;
}

.woocommerce-pagination {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--font-body);
	font-size: 0.875rem;
}

.woocommerce-pagination .page-numbers {
	padding: 0.5rem 0.9rem;
	border: 1px solid hsl(var(--border));
	border-radius: 999px;
	color: hsl(var(--forest));
}

.woocommerce-pagination .page-numbers.current {
	background: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

/* --------------------------------------------------------- WordPress bits */
.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;
}

.page-title {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

.entry-content > h1.page-title {
	margin-bottom: 2rem;
}

/* ---------------------------------------------------------------- checkout */
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;
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	grid-column: 1 / -1;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-checkout.wc-block-components-sidebar-layout.is-large,
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--secondary));
	border-radius: var(--radius);
	padding: 2rem;
}

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 {
	width: 100% !important;
	max-width: none !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: 0.375rem !important;
	background-color: hsl(var(--background)) !important;
	color: hsl(var(--foreground)) !important;
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
	box-shadow: 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 {
	border-color: hsl(var(--primary)) !important;
	outline: none !important;
	box-shadow: 0 0 0 1px hsl(var(--primary)) !important;
}

body.woocommerce-checkout .wc-block-components-text-input input::placeholder,
body.woocommerce-checkout .wc-block-components-textarea textarea::placeholder {
	color: hsl(var(--muted-foreground)) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 999px !important;
	font-family: var(--font-body) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.2em !important;
	text-transform: uppercase !important;
	font-weight: 600 !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: transparent !important;
	color: hsl(var(--primary)) !important;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary,
body.woocommerce-checkout .wc-block-components-totals-item,
body.woocommerce-checkout .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-components-order-summary-item__description {
	font-family: var(--font-body) !important;
	color: hsl(var(--foreground)) !important;
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout h2 {
	font-family: var(--font-display) !important;
	font-weight: 400 !important;
	color: hsl(var(--forest)) !important;
}

/* --------------------------------------------------- cart / account parity */
body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .woocommerce {
	width: 100%;
	max-width: none;
}

body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
	min-width: 0;
}

body.woocommerce-cart .wc-block-components-button,
body.woocommerce-account .woocommerce-Button,
body.woocommerce-account button.button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 999px !important;
	font-family: var(--font-body) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.18em !important;
	text-transform: uppercase !important;
	font-weight: 600 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-family: var(--font-body);
	font-size: 0.875rem;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
	color: hsl(var(--forest));
}

/* ------------------------------------------------------------- thank you */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order,
body.theme-thankyou-page .woocommerce-customer-details,
body.theme-thankyou-page .woocommerce-order-details {
	font-family: var(--font-body);
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: var(--font-display);
	font-weight: 400;
	color: hsl(var(--forest));
	padding: 0 0 1rem 0;
	margin-top: 2rem;
}

body.theme-thankyou-page .woocommerce-order-overview {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin: 1.5rem 0 2rem;
	padding: 1.5rem;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	background: hsl(var(--card));
	font-family: var(--font-body);
	font-size: 0.875rem;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	margin: 0;
	border: 0;
	padding: 0;
	float: none;
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 0.875rem;
}

body.theme-thankyou-page .woocommerce-order-details th,
body.theme-thankyou-page .woocommerce-order-details td {
	padding: 0.75rem 0;
	border-bottom: 1px solid hsl(var(--border));
	overflow-wrap: break-word;
	word-break: break-word;
}

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;
}

body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
	font-style: normal;
}

/* --------------------------------------------------------------- forms */
.theme-newsletter-embed {
	font-family: var(--font-body);
	color: hsl(var(--background));
}

@media (prefers-reduced-motion: reduce) {
	body.reveal-ready .reveal-item {
		opacity: 1;
		transform: none;
	}
}
