/* The Family Unit theme styles. Only WooCommerce/WordPress markup and functional hooks. */

[hidden] {
	display: none !important;
}

:root {
	--header-height: 96px;
	--checkout-gap: 2rem;
	--card-radius: 1rem;
}

/* Desktop: offset fixed header below the logged-in admin bar (mobile unchanged). */
@media (min-width: 783px) {
	body.admin-bar [data-theme-header] {
		top: 32px;
	}
}

/* Logged-in: cart drawer and overlay sit below the admin bar (all breakpoints). */
body.admin-bar #theme-cart-drawer,
body.admin-bar #theme-cart-overlay {
	top: 46px;
	height: calc(100% - 46px);
}

@media (min-width: 783px) {
	body.admin-bar #theme-cart-drawer,
	body.admin-bar #theme-cart-overlay {
		top: 32px;
		height: calc(100% - 32px);
	}
}

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

/* Site identity */
.site-logo-link:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

.site-logo-img {
	height: 2.75rem !important;
	width: auto !important;
	display: block;
}

.site-logo-text {
	line-height: 2.75rem;
	display: block;
}

/* Cart badge */
.theme-cart-count:empty {
	display: none;
}

/* Cart drawer */
#theme-cart-drawer {
	opacity: 0;
	transform: translateY(20px);
	visibility: hidden;
	pointer-events: none;
	transition: opacity 700ms ease-out, transform 700ms ease-out, visibility 700ms ease-out;
	will-change: opacity, transform;
}

body.cart-open #theme-cart-drawer {
	opacity: 1;
	transform: translateY(0);
	visibility: visible;
	pointer-events: auto;
}

#theme-cart-overlay {
	opacity: 0;
	visibility: hidden;
	transition: opacity 700ms ease-out, visibility 700ms ease-out;
}

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

/* Buttons locked while an AJAX add is in flight */
.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;
}

/* Hide WooCommerce's injected View cart link */
.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;
}

/* Disabled add-to-cart buttons */
.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;
}

/* Reveal fallbacks */
.is-customizer [data-reveal],
.is-customizer .reveal,
.is-customizer [data-aos] {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* Page shell */
.theme-page-main {
	padding-top: calc(var(--header-height) + 2rem);
	padding-bottom: 4rem;
}

.theme-archive-main {
	padding-top: calc(var(--header-height) + 3rem);
	padding-bottom: 5rem;
}

.theme-qty-input {
	width: 44px;
	min-width: 44px;
	border: 0;
	background: transparent;
}

.page-title {
	font-family: 'Newsreader', 'Instrument Serif', Georgia, serif;
	font-weight: 400;
	letter-spacing: -0.014em;
	line-height: 1.05;
}

body.woocommerce-checkout .theme-page-container .entry-content > a:first-of-type,
body.woocommerce-checkout .theme-page-container .entry-content > p:first-child a {
	display: none;
}

body.woocommerce-checkout .theme-page-main,
body.woocommerce-cart .theme-page-main,
body.woocommerce-account .theme-page-main,
body.theme-thankyou-page .theme-page-main {
	padding-top: calc(var(--header-height) + 2rem);
	padding-bottom: 4rem;
}

/* Single product layout safety */
.single-product .product,
.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;
	flex-direction: column;
	align-items: stretch;
	gap: 1.5rem;
	min-width: 0;
}

.single-product .theme-add-to-cart-area > div:last-child {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.single-product .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 160px;
}

@media (min-width: 640px) {
	.single-product .theme-product-buttons > .single_add_to_cart_button,
	.single-product .theme-product-buttons > [data-buy-now-simple],
	.single-product .theme-product-buttons > [data-buy-now] {
		flex: 1 1 0%;
		width: 0;
		min-width: 160px;
	}
}

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

/* Product card quick actions (visible on touch; hover reveal on fine pointers) */
.theme-product-card-actions {
	opacity: 1;
	transition: opacity 0.5s ease-out;
}

@media (hover: hover) and (pointer: fine) {
	.theme-product-card-actions {
		opacity: 0;
	}

	.theme-product-card.group:hover .theme-product-card-actions {
		opacity: 1;
	}
}

/* FAQ accordion collapsed state */
[data-faq-panel] {
	grid-template-rows: 0fr;
}

[data-faq-panel] > * {
	min-height: 0;
	overflow: hidden;
}

/* Variable product controls */
.theme-attr-select-hidden {
	display: none !important;
}

.single-product .theme-variations {
	display: none;
}

.single-product .single_variation_wrap {
	display: flex !important;
	flex-direction: column;
}

.single-product .single_variation_wrap > .theme-price-fallback,
.single-product .single_variation_wrap > .single_variation {
	order: 1;
}

.single-product .single_variation_wrap > .theme-product-description {
	order: 2;
}

.single-product .single_variation_wrap > .theme-variation-group {
	order: 3;
}

.single-product .single_variation_wrap > .theme-add-to-cart-area {
	order: 4;
}

.single-product .single_variation_wrap > .theme-variations,
.single-product .single_variation_wrap > input {
	order: 5;
}

.single-product .woocommerce-variation-price {
	margin-bottom: 1.75rem;
}

.single-product .woocommerce-variation-price .price {
	font-size: 20px;
	font-weight: 500;
	color: hsl(var(--foreground) / 0.9);
	font-family: 'Switzer', system-ui, -apple-system, sans-serif;
}

.single-product .woocommerce-variation-availability,
.single-product .woocommerce-variation-description {
	display: none;
}

.single-product .theme-quantity-wrapper input.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
}

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

.single-product .reset_variations {
	display: none !important;
}

/* WooCommerce notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
	border: 1px solid hsl(var(--border));
	background: hsl(var(--linen));
	color: hsl(var(--foreground));
	border-radius: 0.75rem;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	list-style: none;
	font-size: 14px;
	line-height: 1.6;
}

.woocommerce-error {
	border-color: hsl(var(--destructive) / 0.55);
	background: hsl(var(--destructive) / 0.08);
}

.woocommerce-notice {
	border: 1px solid hsl(var(--border));
	background: hsl(var(--linen));
	color: hsl(var(--foreground));
	border-radius: 0.75rem;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	font-size: 14px;
	line-height: 1.6;
}

.woocommerce-notice--error {
	border-color: hsl(var(--destructive) / 0.55);
	background: hsl(var(--destructive) / 0.08);
}

.woocommerce-error li {
	list-style: none;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

#theme-cart-drawer .woocommerce-message {
	display: none;
}

.woocommerce-notices-wrapper:empty {
	display: none;
}

/* WooCommerce pagination */
.theme-woocommerce-pagination .woocommerce-pagination ul {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	border: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.theme-woocommerce-pagination .woocommerce-pagination ul li {
	border: 0;
	margin: 0;
}

.theme-woocommerce-pagination .woocommerce-pagination a,
.theme-woocommerce-pagination .woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.75rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--border));
	color: hsl(var(--foreground) / 0.75);
	font-size: 14px;
	text-decoration: none;
}

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

/* Checkout block */
body.woocommerce-checkout .entry-content,
body.woocommerce-cart .entry-content,
body.woocommerce-account .entry-content {
	max-width: 100%;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout,
	body.woocommerce-checkout .wc-block-checkout > .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--checkout-gap);
		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: 1px solid hsl(var(--border));
	border-radius: var(--card-radius);
	padding: 1.5rem;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary-item__image img {
	border-radius: 0.5rem;
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title {
	font-family: 'Newsreader', 'Instrument Serif', Georgia, serif;
	font-weight: 400;
	letter-spacing: -0.014em;
	color: hsl(var(--foreground));
}

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,
body.woocommerce-checkout .woocommerce-checkout .form-row .input-text,
body.woocommerce-checkout .woocommerce-checkout .form-row select {
	background-color: hsl(var(--ivory)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: 0.375rem !important;
	color: hsl(var(--foreground)) !important;
	font-family: 'Switzer', system-ui, -apple-system, sans-serif !important;
	font-size: 14px !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-blocks-components-select__select:focus,
body.woocommerce-checkout .wc-block-components-textarea textarea:focus,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus {
	border-color: hsl(var(--primary)) !important;
	outline: none !important;
	box-shadow: none !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-button.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: 9999px !important;
	font-family: 'Switzer', system-ui, -apple-system, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	height: 3rem !important;
	padding: 0 1.75rem !important;
}

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

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

body.woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: 0.75rem;
	font-size: 14px;
}

body.woocommerce-checkout .wc-block-cart-items__row,
body.woocommerce-checkout .wc-block-components-order-summary-item {
	font-size: 14px;
}

body.woocommerce-checkout .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-order-summary-item__description {
	color: hsl(var(--foreground) / 0.7);
}

body.woocommerce-checkout .wc-block-components-totals-item__value,
body.woocommerce-checkout .wc-block-components-order-summary-item__total-price {
	color: hsl(var(--foreground));
	font-weight: 500;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-product-name {
	color: hsl(var(--foreground));
	font-weight: 500;
}

/* Cart / account blocks */
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-account .woocommerce {
	max-width: none;
}

body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .wc-block-components-sidebar-layout {
	min-width: 0;
}

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

body.woocommerce-cart .wc-block-cart__sidebar {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--border));
	border-radius: var(--card-radius);
	padding: 1.5rem;
}

/* Order received */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	max-width: 100%;
}

body.theme-thankyou-page .woocommerce-order > p,
body.theme-thankyou-page .woocommerce-order > h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: 'Newsreader', 'Instrument Serif', Georgia, serif;
	font-weight: 400;
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order > h2,
body.theme-thankyou-page .woocommerce-order-details__title {
	font-size: 1.75rem;
	line-height: 1.2;
	padding: 0 0 1rem 0;
}

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

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 0;
	margin: 0;
	padding: 0;
	font-size: 13px;
	color: hsl(var(--foreground) / 0.65);
	text-transform: none;
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.25rem;
	font-size: 14px;
	color: hsl(var(--foreground));
	font-weight: 500;
}

body.theme-thankyou-page .woocommerce-order-details {
	margin-bottom: 2rem;
}

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

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

body.theme-thankyou-page .woocommerce-order-details tfoot th {
	text-align: left;
	font-weight: 500;
}

body.theme-thankyou-page .woocommerce-order-details tfoot td {
	text-align: right;
	font-weight: 500;
}

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;
	font-size: 14px;
	line-height: 1.7;
	border: 1px solid hsl(var(--border));
	border-radius: var(--card-radius);
	padding: 1.25rem;
	background: hsl(var(--ivory));
}

/* Classic checkout fields (when a plugin falls back to shortcode markup) */
body.woocommerce-checkout .woocommerce-checkout .form-row label {
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: hsl(var(--foreground) / 0.55);
}

body.woocommerce-checkout .woocommerce-checkout .form-row .input-text,
body.woocommerce-checkout .woocommerce-checkout .form-row select {
	width: 100% !important;
	max-width: none !important;
}

/* Product details table fallback */
.woocommerce-product-details__short-description {
	font-size: 15px;
	line-height: 1.7;
	color: hsl(var(--foreground) / 0.75);
}

/* Screen reader text */
.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;
}
