/* =========================================================================
   Terence Delights — functional and WordPress/WooCommerce styling.
   The source stylesheet (app.css) ships every design utility; this file only
   adds state hooks, motion that lived in JS, and WooCommerce-generated markup.
   ========================================================================= */

[hidden] {
	display: none !important;
}

/* Build parity: the source declares this duration on the hero crossfade. */
.duration-\[1200ms\] {
	transition-duration: 1200ms;
}

/* -------------------------------------------------------------------------
   Logo sizing (single control drives every context).
   ---------------------------------------------------------------------- */
.site-header .site-logo-img {
	height: calc(var(--logo-height, 112px) * 0.7143);
	width: auto;
	display: block;
}
.site-header.is-compact .site-logo-img {
	height: calc(var(--logo-height, 112px) * 0.3929);
}
.site-menu-panel .site-logo-img--panel {
	height: calc(var(--logo-height, 112px) * 0.4286);
	width: auto;
	display: block;
}
.site-footer .site-logo-img--footer {
	height: calc(var(--logo-height, 112px) * 0.7143);
	width: auto;
	display: block;
}
@media (min-width: 768px) {
	.site-header .site-logo-img {
		height: var(--logo-height, 112px);
	}
	.site-header.is-compact .site-logo-img {
		height: calc(var(--logo-height, 112px) * 0.5);
	}
	.site-footer .site-logo-img--footer {
		height: calc(var(--logo-height, 112px) * 0.8571);
	}
}

/* -------------------------------------------------------------------------
   Hero entrance + slide crossfade.
   ---------------------------------------------------------------------- */
.theme-hero-copy {
	opacity: 0;
	transform: translateY(24px);
	animation: themeHeroIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}
@keyframes themeHeroIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.no-js .theme-hero-copy {
	opacity: 1;
	transform: none;
	animation: none;
}

/* -------------------------------------------------------------------------
   Menu panel.
   ---------------------------------------------------------------------- */
#theme-menu-panel {
	height: 100dvh;
}
.site-menu-panel__item {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 400ms ease, transform 400ms ease;
}
.site-menu-panel.is-open .site-menu-panel__item {
	opacity: 1;
	transform: translateY(0);
}
.site-menu-panel__item:nth-child(1) {
	transition-delay: 120ms;
}
.site-menu-panel__item:nth-child(2) {
	transition-delay: 180ms;
}
.site-menu-panel__item:nth-child(3) {
	transition-delay: 240ms;
}
.site-menu-panel__item:nth-child(4) {
	transition-delay: 300ms;
}
.site-menu-panel__item:nth-child(5) {
	transition-delay: 360ms;
}
.site-menu-panel__item:nth-child(6) {
	transition-delay: 420ms;
}
.site-menu-panel__item:nth-child(7) {
	transition-delay: 480ms;
}
.site-menu-panel__item:nth-child(8) {
	transition-delay: 540ms;
}

/* -------------------------------------------------------------------------
   Scroll reveals.
   ---------------------------------------------------------------------- */
.theme-reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-reveal[data-reveal-style="craft"] {
	transform: translateY(16px);
	transition-duration: 0.6s;
}
.theme-reveal[data-reveal-style="note"] {
	transform: translateY(16px);
	transition-duration: 0.5s;
}
.theme-reveal[data-reveal-style="fade-up"] {
	transform: translateY(24px);
	transition-duration: 0.6s;
}
.theme-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}
.no-js .theme-reveal,
body.is-customizer .theme-reveal {
	opacity: 1;
	transform: none;
}

/* -------------------------------------------------------------------------
   Product grid entrance (staggered).
   ---------------------------------------------------------------------- */
.theme-stagger-grid .theme-stagger-item {
	animation: themeStaggerIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.theme-stagger-grid .theme-stagger-item:nth-child(1) {
	animation-delay: 0ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(2) {
	animation-delay: 50ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(3) {
	animation-delay: 100ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(4) {
	animation-delay: 150ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(5) {
	animation-delay: 200ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(6) {
	animation-delay: 250ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(7) {
	animation-delay: 300ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(8) {
	animation-delay: 350ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(9) {
	animation-delay: 400ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(10) {
	animation-delay: 450ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(11) {
	animation-delay: 500ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(12) {
	animation-delay: 550ms;
}
.theme-stagger-grid .theme-stagger-item:nth-child(n + 13) {
	animation-delay: 600ms;
}
@keyframes themeStaggerIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.no-js .theme-stagger-grid .theme-stagger-item {
	animation: none;
}

/* -------------------------------------------------------------------------
   Product card hover lift (framer-motion whileHover / whileTap).
   ---------------------------------------------------------------------- */
.theme-product-card__media {
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s;
}
.theme-product-card-wrap:hover .theme-product-card__media {
	transform: translateY(-4px);
}
.theme-product-card-wrap:active .theme-product-card__media {
	transform: translateY(-4px) scale(0.98);
}

/* -------------------------------------------------------------------------
   Cart drawer + overlay.
   ---------------------------------------------------------------------- */
#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 59;
	background-color: hsl(var(--foreground) / 0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}
body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}
#theme-cart-drawer {
	height: 100dvh;
}
#theme-cart-drawer > aside {
	height: 100%;
}
body.cart-open #theme-cart-drawer {
	/* Let clicks outside the panel reach the overlay so the drawer closes. */
	pointer-events: none;
}
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-count:empty {
	display: none;
}

/* Keep the comma separator and its space inside the add-to-cart label. */
.theme-atc-sep {
	white-space: pre;
}

/* -------------------------------------------------------------------------
   Contact modal states.
   ---------------------------------------------------------------------- */
.theme-modal[hidden] {
	display: none !important;
}
.theme-modal__overlay {
	opacity: 0;
	transition: opacity 0.2s ease;
}
.theme-modal__content {
	opacity: 0;
	transform: translate(-50%, -48%) scale(0.95);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.theme-modal[data-state="open"] .theme-modal__overlay {
	opacity: 1;
}
.theme-modal[data-state="open"] .theme-modal__content {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* -------------------------------------------------------------------------
   Buttons: loading / disabled.
   ---------------------------------------------------------------------- */
.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;
}

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

/* Quantity input styling. */
.theme-quantity-wrapper input.theme-qty-input {
	appearance: textfield;
	-moz-appearance: textfield;
	border: 0;
	background: transparent;
}
.theme-quantity-wrapper input.theme-qty-input::-webkit-outer-spin-button,
.theme-quantity-wrapper input.theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Thumbnail active state. */
.theme-product-thumbnails [data-src].is-active {
	outline: 2px solid hsl(var(--primary));
	outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   Variable products.
   ---------------------------------------------------------------------- */
/* The native attribute select stays in the DOM for WooCommerce, hidden behind
   the theme dropdown. display:none keeps the field in the form submission. */
.single-product .variations select {
	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-collapse: collapse;
}
.single-product .variations tbody tr + tr {
	margin-top: 0.75rem;
}
.single-product .single_variation_wrap .woocommerce-variation-price,
.single-product .single_variation_wrap .woocommerce-variation-description,
.single-product .single_variation_wrap .woocommerce-variation-availability {
	display: none;
}

/* -------------------------------------------------------------------------
   WooCommerce notices.
   ---------------------------------------------------------------------- */
.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}
#theme-cart-drawer .woocommerce-message {
	display: none;
}
.woocommerce-notices-wrapper {
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 1.5rem;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	font-family: var(--font-body);
	font-size: 0.875rem;
	border-radius: 1.125rem;
	border: 1px solid hsl(var(--border));
	background-color: hsl(var(--secondary) / 0.6);
	color: hsl(var(--foreground));
	padding: 1rem 1.25rem;
	margin: 1rem 0;
	list-style: none;
}
.woocommerce-error {
	border-color: hsl(var(--destructive) / 0.4);
	background-color: hsl(var(--destructive) / 0.08);
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}
.woocommerce-error li {
	margin: 0.25rem 0;
}

/* -------------------------------------------------------------------------
   Page shell.
   ---------------------------------------------------------------------- */
.page-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.875rem;
	line-height: 1.2;
	letter-spacing: 0;
	color: hsl(var(--foreground));
	margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
	.page-title {
		font-size: 2.25rem;
	}
}
.entry-content > * {
	max-width: 100%;
}
.entry-content a {
	color: hsl(var(--primary));
	text-decoration: underline;
	text-underline-offset: 2px;
}
.entry-content p {
	font-family: var(--font-body);
	color: hsl(var(--foreground) / 0.8);
	line-height: 1.7;
	margin-bottom: 1rem;
}

/* -------------------------------------------------------------------------
   Checkout block.
   ---------------------------------------------------------------------- */
body.woocommerce-checkout .entry-content {
	min-width: 0;
}
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-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 {
	width: 100% !important;
	max-width: none !important;
	font-family: var(--font-body) !important;
	font-size: 1rem !important;
	color: hsl(var(--foreground)) !important;
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: 1.125rem !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 {
	outline: none !important;
	border-color: hsl(var(--foreground) / 0.6) !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-select label,
body.woocommerce-checkout .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-components-radio-control__label {
	font-family: var(--font-body) !important;
	color: hsl(var(--muted-foreground)) !important;
}
body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--secondary) / 0.6);
	border-radius: 1.75rem;
	padding: 2rem;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	font-family: var(--font-body) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.22em !important;
	text-transform: uppercase !important;
	font-weight: 600 !important;
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 1.125rem !important;
	padding: 1rem 2rem !important;
	min-height: 3.5rem;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: hsl(var(--background)) !important;
	color: hsl(var(--primary)) !important;
}
body.woocommerce-checkout .wc-block-components-notice-banner {
	font-family: var(--font-body) !important;
	border-radius: 1.125rem !important;
	background-color: hsl(var(--secondary) / 0.6) !important;
	color: hsl(var(--foreground)) !important;
}
body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-checkout .wc-block-components-order-summary {
	font-family: var(--font-body) !important;
}
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar h2 {
	font-family: var(--font-display) !important;
	color: hsl(var(--foreground)) !important;
	letter-spacing: 0 !important;
}
@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
		align-items: start;
	}
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large .wc-block-checkout__main {
		order: 1;
	}
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large .wc-block-checkout__sidebar {
		order: 2;
	}
}

/* Cart, account and order-received pages share the checkout container. */
body.woocommerce-cart .entry-content,
body.theme-account-page .entry-content,
body.theme-thankyou-page .entry-content {
	min-width: 0;
}
body.woocommerce-cart .wc-block-cart,
body.woocommerce-cart .woocommerce {
	font-family: var(--font-body);
}
body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-cart .checkout-button,
body.theme-account-page .woocommerce-Button,
body.theme-account-page button.button {
	font-family: var(--font-body) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.22em !important;
	text-transform: uppercase !important;
	font-weight: 600 !important;
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 1.125rem !important;
	padding: 0.875rem 2rem !important;
}
body.woocommerce-cart table.shop_table,
body.theme-account-page table.shop_table {
	font-family: var(--font-body);
	border: 1px solid hsl(var(--border));
	border-radius: 1.125rem;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}
body.woocommerce-cart table.shop_table th,
body.theme-account-page table.shop_table th {
	font-family: var(--font-body);
	font-size: 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
	text-align: left;
	padding: 0.875rem 1rem;
	border-bottom: 1px solid hsl(var(--border));
}
body.woocommerce-cart table.shop_table td,
body.theme-account-page table.shop_table td {
	font-family: var(--font-body);
	padding: 1rem;
	border-bottom: 1px solid hsl(var(--border) / 0.6);
}
body.woocommerce-cart .cart_totals,
body.woocommerce-cart .cross-sells {
	font-family: var(--font-body);
}

/* -------------------------------------------------------------------------
   Thank you page.
   ---------------------------------------------------------------------- */
body.theme-thankyou-page {
	overflow-x: hidden;
}
body.theme-thankyou-page .woocommerce-order,
body.theme-thankyou-page .woocommerce-order-overview,
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 h2 {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.5rem;
	color: hsl(var(--foreground));
	padding: 0 0 1rem 0;
	margin-bottom: 1rem;
}
body.theme-thankyou-page .woocommerce-order-overview {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding: 1.5rem;
	margin: 0 0 2rem;
	background-color: hsl(var(--secondary) / 0.6);
	border-radius: 1.75rem;
}
body.theme-thankyou-page .woocommerce-order-overview li {
	font-size: 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
	margin: 0;
	border: 0;
	padding: 0;
}
body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.375rem;
	font-family: var(--font-body);
	font-size: 1rem;
	letter-spacing: 0;
	text-transform: none;
	color: hsl(var(--foreground));
}
body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}
body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	padding: 0.75rem 0;
	border-bottom: 1px solid hsl(var(--border) / 0.6);
	font-size: 0.9375rem;
}
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;
	line-height: 1.7;
}
body.theme-thankyou-page .woocommerce-columns--addresses {
	display: grid;
	gap: 2rem;
}

/* -------------------------------------------------------------------------
   Accessibility helper for WordPress-generated markup.
   ---------------------------------------------------------------------- */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
