/**
 * Functional rules for markup without a source equivalent, plus state hooks.
 * Typography and layout for source elements live in app.css.
 */

[hidden] {
	display: none !important;
}

/* ---------------------------------------------------------------- header */
body.admin-bar #site-header {
	top: 32px;
}

body.admin-bar #theme-scroll-progress {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #site-header {
		top: 46px;
	}

	body.admin-bar #theme-scroll-progress {
		top: 46px;
	}
}

.site-header.is-solid {
	background-color: hsl(var(--background));
	border-bottom: 1px solid hsl(var(--border));
}

.theme-home-main {
	padding-top: 0;
}

.site-logo-img {
	display: block;
	height: auto;
}

.site-logo-text {
	display: inline-flex;
	align-items: center;
	line-height: 1.1;
}

/* Mobile menu panel keeps the source's DOM position and classes. */
.theme-mobile-menu {
	display: block;
}

.theme-mobile-menu .theme-mobile-link:last-child {
	border-bottom: 0;
}

/* ------------------------------------------------------------- navigation */
.theme-nav-link {
	display: inline-block;
}

.theme-mobile-link {
	display: block;
}

/* ------------------------------------------------------- service preview */
.theme-service-card {
	transform-style: preserve-3d;
}

/* --------------------------------------------------- product card internals */
.theme-product-card-wrap {
	position: relative;
	height: 100%;
}

/* The fade-in is driven by the is-loaded class added when the image decodes. */
.no-js .product-image,
.product-image.is-loaded {
	opacity: 1;
}

.theme-product-card-wrap img {
	display: block;
}

.theme-product-card-wrap .theme-card-quick-add {
	position: relative;
	z-index: 3;
}

/* Add-to-cart states */
.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;
}

/* Hide "View cart" injected by WooCommerce after AJAX add-to-cart */
.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-product .single_add_to_cart_button.loading::after,
.ajax_add_to_cart.loading::after {
	display: none !important;
}

.ajax_add_to_cart.theme-btn-loading {
	opacity: 0.6 !important;
	pointer-events: none !important;
	cursor: wait !important;
}

/* ------------------------------------------------------ single product page */
.single-product .theme-product-layout {
	min-width: 0;
}

.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%;
}

/* Variable products: quantity and submit sit on one row. */
.single-product .theme-add-to-cart-area {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

.single-product .theme-add-to-cart-area .theme-quantity-wrapper {
	flex: 0 0 auto;
}

.single-product .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 160px;
}

.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in,
.single-product .description {
	overflow-wrap: break-word;
	word-break: break-word;
}

.theme-quantity-wrapper .theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	width: 3.25rem;
}

.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;
}

/* Variations */
.single-product .variations {
	width: 100%;
	border: 0;
	margin-bottom: 0;
}

.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: 0 0 0.25rem 0;
}

.single-product .variations tbody td.value {
	padding: 0;
}

.single-product .variations td.label label {
	font-size: 15px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: hsl(var(--foreground) / 0.55);
	font-weight: 400;
}

.single-product .variations select {
	width: 100%;
	height: 48px;
	padding: 0 1rem;
	border: 1px solid hsl(var(--border));
	border-radius: calc(var(--radius) - 4px);
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	font-size: 15px;
}

.theme-attr-select-hidden {
	display: none !important;
}

/* Clickable affordance for interactive controls */
a[href],
button:not(:disabled),
input[type="submit"],
input[type="button"],
input[type="reset"],
label[for],
[role="button"],
.theme-nav-link,
.theme-mobile-link,
.theme-footer-link,
.theme-service-card,
.theme-attr-pill,
.theme-product-thumb,
.theme-menu-toggle,
[data-cart-open],
[data-cart-close],
[data-cart-qty-update],
[data-magnetic="true"],
.cursor-pointer {
	cursor: pointer;
}

button:disabled,
.disabled,
[aria-disabled="true"] {
	cursor: not-allowed;
}

.theme-variation-pills .theme-attr-pill {
	cursor: pointer;
}

.single_variation_wrap {
	margin-top: 1rem;
}

.woocommerce-variation-price {
	margin-bottom: 1rem;
	font-size: 20px;
	font-weight: 500;
	color: hsl(var(--foreground) / 0.9);
}

.woocommerce-variation-availability p {
	margin-bottom: 0.75rem;
}

/* -------------------------------------------------------- cart drawer state */
#theme-cart-drawer {
	position: fixed;
	right: 0;
	top: 0;
	height: 100%;
	width: 100%;
	max-width: 28rem;
	background: hsl(var(--ivory));
	z-index: 50;
	box-shadow: var(--shadow-elevated);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
	overflow: hidden;
}

body.cart-open #theme-cart-drawer {
	transform: translateX(0);
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 45;
	background: hsl(var(--video-overlay) / 0.6);
	opacity: 0;
	visibility: hidden;
	transition: opacity 300ms ease, visibility 300ms ease;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	visibility: visible;
}

#theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}

.theme-cart-count:empty {
	display: none;
}

#theme-cart-drawer .quantity {
	font-size: 15px;
}

/* ----------------------------------------------------------- shop archive */
.theme-product-grid {
	align-items: stretch;
}

.theme-product-grid > * {
	min-width: 0;
}

.theme-product-card-wrap > div {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.theme-product-card-wrap h3 a {
	display: block;
	overflow-wrap: break-word;
}

/* WooCommerce notices */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	border-radius: calc(var(--radius) - 4px);
	border-left: 4px solid hsl(var(--accent));
	background: hsl(var(--secondary));
	color: hsl(var(--foreground));
	font-size: 15px;
}

.woocommerce-error {
	border-left-color: hsl(var(--destructive));
}

.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce-notices-wrapper .woocommerce-info::before,
.woocommerce-notices-wrapper .woocommerce-error::before {
	display: none;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info,
#theme-cart-drawer .woocommerce-message {
	display: none;
}

.shop-filters {
	margin-bottom: 2rem;
}

.woocommerce-result-count,
.woocommerce-ordering {
	display: none;
}

.woocommerce-pagination {
	margin-top: 3rem;
	text-align: center;
}

.woocommerce-pagination ul {
	display: inline-flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--border));
	font-size: 15px;
	color: hsl(var(--foreground));
}

.woocommerce-pagination ul li span.current {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border-color: hsl(var(--primary));
}

/* ------------------------------------------------------- checkout + blocks */
body.woocommerce-checkout .entry-content {
	max-width: 100%;
}

body.woocommerce-checkout .site-main {
	padding-top: var(--header-height, 80px);
	padding-bottom: 4rem;
}

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 .woocommerce-checkout .form-row .input-text,
body.woocommerce-checkout .woocommerce-checkout .form-row select {
	width: 100% !important;
	max-width: none !important;
	font-family: var(--font-body) !important;
	font-size: 15px !important;
	color: hsl(var(--foreground)) !important;
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: calc(var(--radius) - 4px) !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,
body.woocommerce-checkout .wc-blocks-components-select__select:focus {
	outline: 2px solid hsl(var(--ring)) !important;
	outline-offset: 2px !important;
	border-color: hsl(var(--primary)) !important;
}

body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-checkout .wc-block-components-sidebar-layout {
	display: block;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-checkout.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__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
	min-width: 0;
	width: 100%;
	max-width: none;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--linen));
	border-radius: var(--radius);
	padding: 2rem;
}

body.woocommerce-checkout .wc-block-checkout__sidebar h2,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-title {
	font-family: var(--font-display);
	font-weight: 400;
	color: hsl(var(--foreground));
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border-radius: 9999px !important;
	border: 1px solid hsl(var(--primary)) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	min-height: 3rem;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: hsl(var(--primary) / 0.9) !important;
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: calc(var(--radius) - 4px);
	background-color: hsl(var(--secondary));
	color: hsl(var(--foreground));
	border: 1px solid hsl(var(--border));
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary-item__image img,
body.woocommerce-checkout .wc-block-cart-items img {
	border-radius: calc(var(--radius) - 8px);
}

body.woocommerce-checkout .wc-block-components-notice-banner,
body.woocommerce-checkout .wc-block-checkout__sidebar-notices {
	grid-column: 1 / -1;
}

/* --------------------------------------------------------- cart block page */
body.woocommerce-cart .wc-block-cart,
body.woocommerce-cart .wc-block-cart-items,
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
	max-width: 100%;
}

body.woocommerce-cart .wc-block-components-sidebar-layout {
	display: block;
}

@media (min-width: 768px) {
	body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart.is-large {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
}

body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
	min-width: 0;
	width: 100%;
}

body.woocommerce-cart .wc-block-cart__sidebar {
	background-color: hsl(var(--linen));
	border-radius: var(--radius);
	padding: 2rem;
}

body.woocommerce-cart .wc-block-cart__sidebar h2,
body.woocommerce-cart .wc-block-components-title,
body.woocommerce-cart .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-cart-item__quantity {
	font-family: var(--font-body);
}

body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart .wc-block-cart-item__product .wc-block-components-product-name {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: 1.05rem;
	color: hsl(var(--foreground));
	text-decoration: none;
}

body.woocommerce-cart .wc-block-cart-items thead,
body.woocommerce-cart .wc-block-cart-items__header {
	display: none;
}

body.woocommerce-cart .wc-block-cart-items td,
body.woocommerce-cart .wc-block-cart-items th {
	border-color: hsl(var(--border));
	padding: 1.25rem 0;
}

body.woocommerce-cart .wc-block-cart-items img {
	border-radius: calc(var(--radius) - 8px);
}

body.woocommerce-cart .wc-block-components-quantity-selector {
	border-radius: 9999px;
	border-color: hsl(var(--border));
}

body.woocommerce-cart .wc-block-components-quantity-selector input {
	font-size: 15px;
	color: hsl(var(--foreground));
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-cart .wc-block-components-button,
body.woocommerce-page .wc-block-cart__submit-button,
body.woocommerce-page .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border-radius: 9999px !important;
	border: 1px solid hsl(var(--primary)) !important;
	font-family: var(--font-body) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	min-height: 3rem;
}

body.woocommerce-cart .wc-block-cart__submit-button:hover,
body.woocommerce-page .wc-block-cart__submit-button:hover {
	background-color: hsl(var(--primary) / 0.9) !important;
}

/* "Add to cart" buttons rendered by the cart block's product grid */
body.woocommerce-cart .wp-block-woocommerce-cart .wp-block-button__link,
body.woocommerce-cart .wc-block-grid__product-add-to-cart .wp-block-button__link {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border-radius: 9999px !important;
	border: 1px solid hsl(var(--primary)) !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	padding: 0.75rem 1.5rem !important;
	text-decoration: none !important;
}

body.woocommerce-cart .wc-block-grid__product-title,
body.woocommerce-cart .wc-block-grid__product-title a {
	font-family: var(--font-display);
	font-weight: 400;
	color: hsl(var(--foreground));
}

body.woocommerce-cart .wc-block-grid__product-price {
	font-size: 15px;
	color: hsl(var(--foreground) / 0.65);
}

/* Cart, account and thank you pages share the checkout container treatment */
body.woocommerce-cart .site-main,
body.theme-account-page .site-main,
body.theme-thankyou-page .site-main {
	padding-top: var(--header-height, 80px);
	padding-bottom: 4rem;
}

body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
}

body.theme-thankyou-page .woocommerce-order {
	max-width: 100%;
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: grid;
	gap: 1rem;
	list-style: none;
	margin: 0 0 2rem;
	padding: 1.5rem;
	border-radius: var(--radius);
	background: hsl(var(--linen));
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 0;
	margin: 0;
	padding: 0;
	font-size: 15px;
	color: hsl(var(--foreground) / 0.7);
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.25rem;
	color: hsl(var(--foreground));
	font-weight: 500;
}

body.theme-thankyou-page .woocommerce-order-details,
body.theme-thankyou-page .woocommerce-customer-details {
	margin-bottom: 2rem;
}

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;
	font-size: 1.75rem;
	padding: 0 0 1rem 0;
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	font-size: 15px;
	padding: 0.75rem 0.5rem;
	border-color: hsl(var(--border));
	color: hsl(var(--foreground));
}

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: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 768px) {
	body.theme-thankyou-page .woocommerce-customer-details {
		grid-template-columns: 1fr 1fr;
	}
}

body.theme-thankyou-page .woocommerce-customer-details address {
	min-width: 0;
	font-size: 15px;
	font-style: normal;
	line-height: 1.7;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 1.25rem;
	overflow-wrap: break-word;
}

/* ------------------------------------------------------------- wp content */
.page-title {
	overflow-wrap: break-word;
}

/* Hero / pre-contact arrow CTAs: match Lovable (Source Sans 3, no media shadow). */
.theme-arrow-button,
.media-copy .theme-arrow-button {
	font-family: var(--font-body);
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	text-shadow: none;
}

@media (max-width: 639px) {
	[data-hero-ctas] .theme-arrow-button {
		width: 100%;
		justify-content: center;
	}

	[data-hero-ctas] .theme-arrow-button [data-theme-text] {
		text-align: center;
	}
}

.entry-content > * + * {
	margin-top: 1.25rem;
}

.entry-content a {
	color: hsl(var(--primary));
	text-decoration: underline;
	text-underline-offset: 3px;
}

.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;
}

html:has(> body.is-customizer) {
	scroll-behavior: auto !important;
}

/* ------------------------------------------------------- customizer preview */
body.is-customizer [data-aos] {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
	transition: none !important;
}

body.is-customizer .hero-reveal {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
}

/* No-JS fallback so reveals never hide content permanently. */
.no-js [data-aos] {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
}

/* Logo sizing */
.site-header .brand-logo.nav-logo,
.site-header .site-logo-text.brand-logo {
	max-height: var(--logo-height, 44px);
	width: auto;
}

.site-logo-img {
	height: var(--logo-height, 44px) !important;
	width: auto !important;
}

@media (prefers-reduced-motion: reduce) {
	#theme-cart-drawer {
		transition: none;
	}
	.theme-service-card,
	.hover-img-thumbnail {
		transform: none !important;
	}
}
