/**
 * Functional styles for markup that has no source equivalent
 * (WooCommerce output, dynamic states) plus animation hooks.
 */

:root {
	--header-height: 80px;
	--checkout-gap: 2rem;
	--color-surface: hsl(var(--surface-soft));
	--card-radius: var(--radius);
	--section-padding: 2rem;
}

[hidden] {
	display: none !important;
}

/* Utilities used by the design markup that the compiled stylesheet omits. */
.duration-\[900ms\] {
	transition-duration: 0.9s;
}

.duration-\[1200ms\] {
	transition-duration: 1.2s;
}

.text-destructive {
	color: hsl(var(--destructive));
}

/* Marquee: one group is cloned by JS until the track covers the viewport. */
.theme-marquee-track {
	will-change: transform;
	animation: theme-marquee-loop 45s linear infinite;
}

@keyframes theme-marquee-loop {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(calc(-1 * var(--marquee-shift, 0px)));
	}
}

/* Shop cards stay visible if the reveal observer never fires. */
.stagger-group.is-visible .theme-shop-card {
	animation: theme-shop-card-in 0.8s var(--ease-soft) both;
}

@keyframes theme-shop-card-in {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.stagger-group.is-visible .theme-shop-card:nth-child(1) { animation-delay: 0s; }
.stagger-group.is-visible .theme-shop-card:nth-child(2) { animation-delay: 0.06s; }
.stagger-group.is-visible .theme-shop-card:nth-child(3) { animation-delay: 0.12s; }
.stagger-group.is-visible .theme-shop-card:nth-child(4) { animation-delay: 0.18s; }
.stagger-group.is-visible .theme-shop-card:nth-child(5) { animation-delay: 0.24s; }
.stagger-group.is-visible .theme-shop-card:nth-child(6) { animation-delay: 0.3s; }
.stagger-group.is-visible .theme-shop-card:nth-child(7) { animation-delay: 0.36s; }
.stagger-group.is-visible .theme-shop-card:nth-child(8) { animation-delay: 0.42s; }
.stagger-group.is-visible .theme-shop-card:nth-child(9) { animation-delay: 0.48s; }
.stagger-group.is-visible .theme-shop-card:nth-child(10) { animation-delay: 0.54s; }
.stagger-group.is-visible .theme-shop-card:nth-child(11) { animation-delay: 0.6s; }
.stagger-group.is-visible .theme-shop-card:nth-child(12) { animation-delay: 0.66s; }

@media (prefers-reduced-motion: reduce) {
	.theme-marquee-track {
		animation: none !important;
	}
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.site-header {
	animation: theme-header-in 0.9s var(--ease-soft) both;
}

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

.theme-mobile-panel {
	height: 0;
	opacity: 0;
	overflow: hidden;
	transition: height 0.55s var(--ease-soft), opacity 0.55s var(--ease-soft);
}

.theme-mobile-panel.is-open .theme-mobile-item {
	animation: theme-mobile-item-in 0.5s var(--ease-soft) both;
	animation-delay: var(--theme-delay, 0s);
}

@keyframes theme-mobile-item-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

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

/* ------------------------------------------------------------------
   Hero + scroll reveals
   ------------------------------------------------------------------ */
.theme-hero-item {
	opacity: 0;
	transform: translateY(26px);
	animation: theme-hero-in 1.1s var(--ease-soft) forwards;
}

.theme-hero-stagger .theme-hero-item:nth-child(1) {
	animation-delay: 0.25s;
}

.theme-hero-stagger .theme-hero-item:nth-child(2) {
	animation-delay: 0.41s;
}

.theme-hero-stagger .theme-hero-item:nth-child(3) {
	animation-delay: 0.57s;
}

.theme-hero-stagger .theme-hero-item:nth-child(4) {
	animation-delay: 0.73s;
}

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

.reveal-item {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.85s var(--ease-soft), transform 0.85s var(--ease-soft);
}

.reveal-item--right {
	transform: translateX(-18px);
}

.reveal-item[data-reveal-delay="0.12"] {
	transition-delay: 0.12s;
}

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

.stagger-item {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.78s var(--ease-soft), transform 0.78s var(--ease-soft);
}

.stagger-group.is-visible .stagger-item {
	opacity: 1;
	transform: none;
}

.stagger-group .stagger-item:nth-child(1) {
	transition-delay: 0.04s;
}

.stagger-group .stagger-item:nth-child(2) {
	transition-delay: 0.14s;
}

.stagger-group .stagger-item:nth-child(3) {
	transition-delay: 0.24s;
}

.stagger-group .stagger-item:nth-child(4) {
	transition-delay: 0.34s;
}

.stagger-group .stagger-item:nth-child(5) {
	transition-delay: 0.44s;
}

.stagger-group .stagger-item:nth-child(6) {
	transition-delay: 0.54s;
}

.stagger-group .stagger-item:nth-child(7) {
	transition-delay: 0.64s;
}

.stagger-group .stagger-item:nth-child(8) {
	transition-delay: 0.74s;
}

.stagger-group .stagger-item:nth-child(9) {
	transition-delay: 0.84s;
}

.stagger-group .stagger-item:nth-child(10) {
	transition-delay: 0.94s;
}

.stagger-group .stagger-item:nth-child(11) {
	transition-delay: 1.04s;
}

.stagger-group .stagger-item:nth-child(12) {
	transition-delay: 1.14s;
}

body.is-customizer .reveal-item,
body.is-customizer .stagger-item {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.theme-hero-item,
	.reveal-item,
	.stagger-item,
	.site-header {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* ------------------------------------------------------------------
   Cart drawer + overlay
   ------------------------------------------------------------------ */
#theme-cart-drawer {
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 0.5s var(--ease-soft), visibility 0.5s var(--ease-soft);
}

body.cart-open #theme-cart-drawer {
	transform: translateX(0);
	visibility: visible;
	transition-duration: 0.7s;
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: hsl(var(--foreground) / 0.55);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s var(--ease-soft);
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}

body.cart-open {
	overflow: hidden;
}

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

/* ------------------------------------------------------------------
   Quick view dialog
   ------------------------------------------------------------------ */
.theme-dialog-overlay {
	opacity: 0;
	transition: opacity 0.5s var(--ease-soft);
}

.theme-dialog-panel {
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.98);
	transition: opacity 0.5s var(--ease-soft), transform 0.5s var(--ease-soft);
}

.theme-dialog.is-open .theme-dialog-overlay {
	opacity: 1;
}

.theme-dialog.is-open .theme-dialog-panel {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

body.quick-view-open {
	overflow: hidden;
}

/* ------------------------------------------------------------------
   Toast
   ------------------------------------------------------------------ */
.theme-toast {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 60;
	max-width: 22rem;
	padding: 0.875rem 1rem;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	box-shadow: var(--shadow-elevated);
	font-size: 0.875rem;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}

.theme-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ------------------------------------------------------------------
   Quantity input (looks like the source's plain number)
   ------------------------------------------------------------------ */
.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	border: 0;
	background: transparent;
	color: inherit;
}

.theme-qty-input:focus {
	outline: none;
}

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

/* ------------------------------------------------------------------
   Product gallery
   ------------------------------------------------------------------ */
.theme-product-thumbnail {
	opacity: 0.65;
	transition: opacity 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft);
}

.theme-product-thumbnail:hover,
.theme-product-thumbnail.is-active {
	opacity: 1;
}

.theme-product-thumbnail.is-active {
	border-color: hsl(var(--foreground));
}

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

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

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

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

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

.single-product .variations.shop_attributes tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
}

.single-product .variations tbody td.label label {
	display: block;
	margin: 0;
	font-family: var(--font-body);
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: hsl(var(--muted-foreground));
}

.single-product .variations tbody td.value {
	padding-top: 0;
}

.single-product .single_variation_wrap .woocommerce-variation-price {
	display: none;
}

.single-product .single_variation_wrap .woocommerce-variation-availability {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
}

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

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

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

.woocommerce-error {
	border-left-color: hsl(0 72% 46%);
}

.woocommerce-error li {
	margin: 0 0 0.25rem;
}

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

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

.woocommerce-Price-amount,
.woocommerce-Price-currencySymbol {
	font: inherit;
	color: inherit;
}

/* ------------------------------------------------------------------
   Cart page
   ------------------------------------------------------------------ */
.theme-cart-page .page-title,
body.woocommerce-cart .page-title {
	max-width: none;
}

/* ------------------------------------------------------------------
   Checkout (native WooCommerce Checkout Block)
   ------------------------------------------------------------------ */
body.woocommerce-checkout .site-main {
	padding-top: var(--header-height);
	padding-bottom: 4rem;
}

body.woocommerce-checkout .entry-content {
	max-width: none;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
	max-width: none;
	padding: 0;
}

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

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-title {
	font-family: var(--font-display);
	font-weight: 600;
	letter-spacing: 0;
	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 {
	width: 100% !important;
	max-width: none !important;
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: var(--radius) !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(--ring)) !important;
	box-shadow: 0 0 0 1px hsl(var(--ring)) !important;
	outline: none !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,
body.woocommerce-checkout .wc-block-components-textarea label {
	color: hsl(var(--muted-foreground));
	font-family: var(--font-body);
	font-size: 0.75rem;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 0 !important;
	border-radius: var(--radius) !important;
	height: 3rem !important;
	font-family: var(--font-body) !important;
	font-size: 0.75rem !important;
	font-weight: 500 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.22em !important;
	box-shadow: none !important;
}

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-button:not(.wc-block-components-checkout-place-order-button) {
	border-radius: var(--radius);
	font-family: var(--font-body);
}

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

body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-checkout .wc-block-components-order-summary {
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: hsl(var(--foreground));
}

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

body.woocommerce-checkout .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-totals-item__value {
	color: hsl(var(--muted-foreground));
}

body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: hsl(var(--foreground));
	font-family: var(--font-display);
	font-weight: 600;
}

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

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

body.theme-thankyou-page .woocommerce-notice--success {
	border: 1px solid hsl(var(--border));
	border-left: 4px solid hsl(var(--accent));
	border-radius: var(--radius);
	background: hsl(var(--card));
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	font-size: 0.875rem;
	line-height: 1.6;
}

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: 600;
	font-size: 1.5rem;
	padding: 0 0 1rem;
	color: hsl(var(--foreground));
}

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

body.theme-thankyou-page .woocommerce-order-overview li {
	margin: 0;
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
}

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

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

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));
	text-align: left;
	vertical-align: top;
	overflow-wrap: 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;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 1.25rem;
	font-style: normal;
	font-size: 0.875rem;
	line-height: 1.7;
}
