/* Whispering Prints theme additions.
   Only rules for markup with no source equivalent, plus functional state hooks. */

[hidden] {
	display: none !important;
}

body.modal-open {
	overflow: hidden;
}

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

/* ---------------------------------------------------------------- identity */

.site-logo-img {
	height: var(--logo-height, 36px) !important;
	width: auto !important;
	display: block;
	object-fit: contain;
}

.site-logo-text {
	display: block;
	line-height: var(--logo-height, 36px);
	font-family: var(--font-display);
	font-size: calc(var(--logo-height, 36px) * 0.62);
	font-style: italic;
	color: currentColor;
	white-space: nowrap;
}

/* ------------------------------------------------------- navigation (WP) */

.site-header nav > ul,
.site-header nav li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-header nav li {
	display: inline-flex;
}

.site-header nav li a {
	display: inline-block;
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: hsl(var(--foreground));
	transition: color 0.3s var(--transition-smooth);
	text-decoration: none;
}

.site-header nav li a:hover {
	color: hsl(var(--primary));
}

#theme-mobile-menu nav li a {
	display: block;
	width: 100%;
	padding: 1rem 0.75rem;
	font-family: var(--font-body);
	font-size: 1rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: hsl(var(--foreground));
	text-decoration: none;
}

.site-footer .menu-item,
.site-footer ul li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer .menu-item a {
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: hsl(var(--background) / 0.7);
	transition: color 0.3s var(--transition-smooth);
	text-decoration: none;
}

.site-footer .menu-item a:hover {
	color: hsl(var(--primary));
}

.site-footer .menu-item + .menu-item {
	margin-top: 0.75rem;
}

/* -------------------------------------------------------------- hero motion */

.theme-hero-image {
	animation: theme-hero-image-in 1.6s cubic-bezier(0.25, 0.4, 0.25, 1) both;
}

.theme-hero-copy {
	animation: theme-hero-copy-in 1s cubic-bezier(0.25, 0.4, 0.25, 1) 0.4s both;
}

@keyframes theme-hero-image-in {
	from {
		opacity: 0;
		transform: scale(1.05);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes theme-hero-copy-in {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------------------------------------------------------- reveal fallbacks */

body:not(.theme-reveal-ready) .reveal,
body.is-customizer .reveal {
	opacity: 1;
	transform: none;
}

.theme-no-scrollbar {
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.theme-no-scrollbar::-webkit-scrollbar {
	display: none;
}

/* ------------------------------------------------------------- mobile menu */

#theme-mobile-overlay {
	opacity: 0;
	transition: opacity 0.3s ease;
}

#theme-mobile-overlay[data-state='open'] {
	opacity: 1;
}

/* ------------------------------------------------------------- cart drawer */

#theme-cart-overlay {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

#theme-cart-drawer {
	transform: translateY(24px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth), visibility 0.8s;
}

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

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

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

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

/* ------------------------------------------------------------ add to cart */

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

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

/* ---------------------------------------------------------- contact modal */

.theme-contact-success {
	animation: theme-success-in 0.4s ease both;
}

.theme-contact-success-icon {
	animation: theme-success-icon-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes theme-success-in {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@keyframes theme-success-icon-in {
	from {
		transform: scale(0);
	}
	to {
		transform: scale(1);
	}
}

/* ------------------------------------------------------- product page bits */

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

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

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

.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: nowrap;
	max-width: 100%;
	scrollbar-width: none;
}

.single-product .theme-product-thumbnails::-webkit-scrollbar {
	display: none;
}

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

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

/* -------------------------------------------------------- page typography */

.page-title {
	letter-spacing: -0.01em;
}

.entry-content a {
	color: hsl(var(--primary));
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ------------------------------------------------------------ WC notices */

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

.woocommerce-message {
	border-left-color: hsl(var(--accent));
}

.woocommerce-info {
	border-left-color: hsl(var(--primary));
}

.woocommerce-error {
	border-left-color: hsl(var(--destructive, 0 70% 45%));
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
	color: hsl(var(--primary));
	text-decoration: underline;
}

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

.woocommerce-pagination {
	margin-top: 3rem;
	font-family: var(--font-body);
}

.woocommerce-pagination ul {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	list-style: none;
	padding: 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	border: 1px solid hsl(var(--border));
	font-size: 0.75rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	text-decoration: none;
	color: hsl(var(--foreground));
}

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

/* --------------------------------------------------------- checkout block */

body.woocommerce-checkout .site-main,
body.woocommerce-checkout .theme-page-main {
	padding-top: 7rem;
	padding-bottom: 4rem;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
	max-width: none;
	margin: 0;
	padding: 0;
	color: hsl(var(--foreground));
	font-family: var(--font-body);
}

@media (min-width: 768px) {
	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-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(--secondary));
	border-radius: var(--radius);
	padding: 2rem;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper {
	border-color: hsl(var(--border));
}

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;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: var(--radius) !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-blocks-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 label,
body.woocommerce-checkout .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-components-radio-control__label,
body.woocommerce-checkout .wc-block-checkout__sidebar h2,
body.woocommerce-checkout .wc-block-components-title {
	font-family: var(--font-body) !important;
	color: hsl(var(--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: var(--radius) !important;
	font-family: var(--font-body) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.28em !important;
	text-transform: uppercase !important;
	height: 3.5rem !important;
}

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

body.woocommerce-checkout .wc-block-components-notice-banner {
	background-color: hsl(var(--secondary)) !important;
	color: hsl(var(--foreground)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: var(--radius) !important;
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
}

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

body.woocommerce-checkout .wc-block-components-order-summary-item__quantity {
	border-color: hsl(var(--border)) !important;
}

/* --------------------------------------------- cart / account / thank you */

body.woocommerce-cart .site-main,
body.woocommerce-account .site-main,
body.theme-thankyou-page .site-main,
body.woocommerce-cart .theme-page-main,
body.woocommerce-account .theme-page-main,
body.theme-thankyou-page .theme-page-main {
	padding-top: 7rem;
	padding-bottom: 4rem;
}

body.theme-thankyou-page {
	overflow-x: hidden;
}

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

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

body.theme-thankyou-page .woocommerce-order-overview li {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.35rem;
	font-family: var(--font-body);
	font-size: 0.95rem;
	letter-spacing: normal;
	text-transform: none;
	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-style: italic;
	font-size: 1.75rem;
	line-height: 1.2;
	color: hsl(var(--foreground));
	padding: 0 0 1rem 0;
	margin: 0;
}

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

body.theme-thankyou-page .woocommerce-order-details th,
body.theme-thankyou-page .woocommerce-order-details td {
	padding: 0.85rem 0;
	border-bottom: 1px solid hsl(var(--border));
	text-align: left;
	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;
}

body.theme-thankyou-page .woocommerce-customer-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-top: 2.5rem;
}

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

body.theme-thankyou-page .woocommerce-order p {
	font-size: 0.95rem;
	line-height: 1.7;
	color: hsl(var(--foreground) / 0.85);
}

/* ------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
	.theme-hero-image,
	.theme-hero-copy,
	.theme-contact-success,
	.theme-contact-success-icon {
		animation: none !important;
	}

	#theme-cart-drawer,
	#theme-cart-overlay {
		transition: none !important;
	}
}
