/* ==========================================================================
   Theme layer.

   Only styles for markup that has no source equivalent (WordPress and
   WooCommerce output) plus functional state rules live here. The source
   stylesheet (app.css) is the single source of truth for typography, layout
   and components that exist in the original design.
   ========================================================================== */

:root {
	--header-height: 96px;
	--checkout-gap: 2rem;
}

@media (min-width: 1024px) {
	:root {
		--header-height: 112px;
	}
}

/* Logged-in preview: keep the fixed header and cart drawer below the admin bar. */
body.admin-bar {
	--theme-admin-bar-offset: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--theme-admin-bar-offset: var(--wp-admin--admin-bar--height, 46px);
	}
}

body.admin-bar [data-theme-header] {
	top: var(--theme-admin-bar-offset, 0px);
}

body.admin-bar #theme-cart-drawer {
	top: var(--theme-admin-bar-offset, 0px);
	height: calc(100% - var(--theme-admin-bar-offset, 0px));
}

/* --------------------------------------------------------------------------
   Interactive affordances
   -------------------------------------------------------------------------- */

a[href]:not([aria-disabled='true']),
button:not(:disabled),
[role='button']:not([aria-disabled='true']),
summary,
label[for],
input[type='submit']:not(:disabled),
input[type='button']:not(:disabled),
input[type='reset']:not(:disabled),
.theme-pill,
[data-theme-shop-cat],
[data-theme-shop-more],
[data-cart-open],
[data-cart-close],
[data-cart-remove],
[data-cart-qty-update],
[data-theme-menu-toggle],
[data-theme-promo-dismiss] {
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   Functional states
   -------------------------------------------------------------------------- */

.theme-cart-count:empty {
	display: none;
}

#theme-cart-drawer {
	display: none;
}

body.cart-open #theme-cart-drawer {
	display: flex;
}

#theme-cart-overlay {
	display: none;
	pointer-events: none;
}

body.cart-open #theme-cart-overlay {
	display: block;
	pointer-events: auto;
}

#theme-promo[hidden] {
	display: none !important;
}

/* Tailwind `.block` on cards overrides the native [hidden] attribute without this. */
[data-theme-shop-grid] [data-theme-product-card][hidden] {
	display: none !important;
}

[data-theme-shop-more-wrap][hidden] {
	display: none !important;
}

body:not(.cart-open) #theme-cart-drawer,
body:not(.cart-open) #theme-cart-overlay {
	pointer-events: none !important;
}

#theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}

.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 "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;
}

.site-logo-img {
	height: var(--logo-height) !important;
	width: auto !important;
	display: block;
}

.site-logo-text {
	line-height: var(--logo-height);
	display: block;
}

/* Reveal safety nets: the Customizer preview and reduced motion environments
   must never leave content hidden. */
body.is-customizer [data-reveal] {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

/* Seamless marquee: two identical groups, loop at -50% (no visible reset). */
.theme-marquee {
	overflow: clip;
}

.theme-marquee-track {
	display: flex;
	width: max-content;
	animation: theme-marquee-scroll 22s linear infinite;
	will-change: transform;
}

.theme-marquee-group {
	display: flex;
	flex-shrink: 0;
	align-items: center;
}

@keyframes theme-marquee-scroll {
	from {
		transform: translate3d(0, 0, 0);
	}
	to {
		transform: translate3d(-50%, 0, 0);
	}
}

@media (max-width: 767px) {
	.theme-marquee-track {
		animation-duration: 10s;
	}
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.theme-marquee-track {
		animation: none;
	}
}

/* --------------------------------------------------------------------------
   WordPress core helpers
   -------------------------------------------------------------------------- */

.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;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: hsl(var(--ivory));
	clip: auto !important;
	clip-path: none;
	color: hsl(var(--foreground));
	display: block;
	font-size: 14px;
	height: auto;
	left: 1rem;
	line-height: normal;
	padding: 1rem 1.25rem;
	text-decoration: none;
	top: 1rem;
	width: auto;
	z-index: 100000;
}

.entry-content > *:first-child {
	margin-top: 0;
}

/* --------------------------------------------------------------------------
   Single product
   -------------------------------------------------------------------------- */

.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;
	flex-direction: column;
	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 .theme-add-to-cart-area .single_add_to_cart_button,
.single-product .theme-add-to-cart-area [data-theme-buy-now] {
	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;
}

.theme-quantity-wrapper .theme-qty-input {
	appearance: textfield;
	-moz-appearance: textfield;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0.625rem 0;
	width: 2.75rem;
	min-width: 2.75rem;
	text-align: center;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: inherit;
	height: auto;
}

.theme-quantity-wrapper .theme-qty-input:focus {
	outline: none;
}

.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 table stacks label above control like the design. */
.single-product .variations {
	width: 100%;
	margin-bottom: 1.25rem;
	border-collapse: collapse;
}

.single-product .variations 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;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 12px;
	color: hsl(var(--foreground) / 0.55);
}

.single-product .variations tbody td.value {
	padding: 0 0 0.75rem 0;
}

.single-product .theme-variation-select {
	width: 100%;
	height: 3rem;
	padding: 0 2.5rem 0 1rem;
	background-color: hsl(var(--ivory));
	border: 1px solid hsl(var(--foreground) / 0.15);
	border-radius: calc(var(--radius) - 2px);
	color: hsl(var(--foreground));
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b8b8b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
}

.single-product .theme-variation-select:focus {
	outline: none;
	border-color: hsl(var(--primary));
}

.single-product .theme-attr-select-hidden,
.variations_form.cart .theme-attr-select-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.single-product .theme-variation-pills,
.variations_form.cart .theme-variation-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.35rem;
}

.single-product .theme-variation-pill,
.variations_form.cart .theme-variation-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.95rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--foreground) / 0.2);
	background: transparent;
	color: hsl(var(--foreground) / 0.85);
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
	cursor: pointer;
}

.single-product .theme-variation-pill.is-selected,
.variations_form.cart .theme-variation-pill.is-selected {
	background: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.single-product .theme-variation-pill:disabled,
.variations_form.cart .theme-variation-pill:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.single-product .single_variation_wrap {
	margin-bottom: 1rem;
}

.single-product .woocommerce-variation-price {
	font-size: 20px;
	font-weight: 500;
	margin-bottom: 0.75rem;
}

.single-product .woocommerce-variation-availability {
	font-size: 14px;
	color: hsl(var(--foreground) / 0.7);
	margin-bottom: 0.75rem;
}

.single-product .reset_variations {
	display: inline-block;
	font-size: 13px;
	margin-bottom: 0.75rem;
	color: hsl(var(--foreground) / 0.6);
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   WooCommerce notices
   -------------------------------------------------------------------------- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	background: hsl(var(--linen));
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: calc(var(--radius) - 2px);
	color: hsl(var(--foreground));
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
}

.woocommerce-error {
	border-color: hsl(var(--destructive) / 0.6);
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 0.75rem;
	padding: 0.4rem 1rem;
	border-radius: 9999px;
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-size: 13px;
	font-weight: 500;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info,
#theme-cart-drawer .woocommerce-message {
	display: none;
}

/* --------------------------------------------------------------------------
   WooCommerce pagination
   -------------------------------------------------------------------------- */

.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-pagination ul li {
	border: 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: 1px solid hsl(var(--foreground) / 0.15);
	border-radius: 9999px;
	color: hsl(var(--foreground) / 0.75);
	font-size: 14px;
}

.woocommerce-pagination ul li span.current,
.woocommerce-pagination ul li a:hover {
	background: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

/* --------------------------------------------------------------------------
   Checkout (WooCommerce Blocks)
   -------------------------------------------------------------------------- */

body.woocommerce-checkout {
	overflow-x: hidden;
}

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;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--checkout-gap, 2rem);
		align-items: start;
	}

	body.woocommerce-checkout .wc-block-checkout__main {
		order: 1;
	}

	body.woocommerce-checkout .wc-block-checkout__sidebar {
		order: 2;
	}
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: calc(var(--radius) * 1.4);
	padding: 1.5rem;
}

@media (min-width: 1024px) {
	body.woocommerce-checkout .wc-block-checkout__sidebar {
		padding: 1.75rem;
	}
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .wc-blocks-components-select__select {
	background-color: hsl(var(--ivory)) !important;
	border: 1px solid hsl(var(--foreground) / 0.15) !important;
	border-radius: calc(var(--radius) - 2px) !important;
	color: hsl(var(--foreground)) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	transition: border-color 150ms ease;
}

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,
body.woocommerce-checkout .wc-block-components-text-input.is-active input {
	border-color: hsl(var(--primary)) !important;
	outline: none !important;
	box-shadow: 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-checkout-step__title,
body.woocommerce-checkout .wc-block-components-title {
	color: hsl(var(--foreground) / 0.55);
	font-family: inherit !important;
	font-size: 12px !important;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

body.woocommerce-checkout .wc-block-components-checkout-step__heading h2,
body.woocommerce-checkout .wc-block-components-title.wc-block-components-title {
	font-family: 'Creepster', fantasy !important;
	font-size: 1.5rem !important;
	font-weight: 400 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: hsl(var(--foreground)) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--primary)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 9999px !important;
	color: hsl(var(--primary-foreground)) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	height: 3rem;
	text-transform: 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: 9999px !important;
	font-family: inherit !important;
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	background-color: hsl(var(--linen)) !important;
	border: 1px solid hsl(var(--foreground) / 0.1) !important;
	border-radius: calc(var(--radius) - 2px) !important;
	color: hsl(var(--foreground)) !important;
	font-family: inherit !important;
	font-size: 14px !important;
}

body.woocommerce-checkout .wc-block-cart-items__row,
body.woocommerce-checkout .wc-block-components-order-summary-item {
	border-color: hsl(var(--foreground) / 0.1) !important;
}

body.woocommerce-checkout .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-components-order-summary-item__description {
	color: hsl(var(--foreground)) !important;
	font-family: inherit !important;
}

body.woocommerce-checkout .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-totals-item__value {
	font-family: inherit !important;
	font-size: 14px !important;
}

body.woocommerce-checkout .wc-block-components-order-summary__button-text,
body.woocommerce-checkout .wc-block-components-panel__button {
	font-family: inherit !important;
	color: hsl(var(--foreground)) !important;
}

/* Cart and account block pages share the checkout width treatment. */
body.woocommerce-cart .entry-content,
body.woocommerce-account .entry-content,
body.theme-thankyou-page .entry-content {
	max-width: 100%;
}

body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .woocommerce {
	font-family: inherit;
	color: hsl(var(--foreground));
}

body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-cart .wc-block-components-button {
	background-color: hsl(var(--primary)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 9999px !important;
	color: hsl(var(--primary-foreground)) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 500 !important;
}

/* --------------------------------------------------------------------------
   Thank you page
   -------------------------------------------------------------------------- */

body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	color: hsl(var(--foreground));
	font-family: inherit;
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: 'Creepster', fantasy;
	font-weight: 400;
	font-size: 1.75rem;
	letter-spacing: 0;
	padding: 0 0 1rem 0;
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 1px solid hsl(var(--foreground) / 0.12);
	border-radius: calc(var(--radius) - 2px);
	padding: 0.85rem 1.1rem;
	font-size: 13px;
	text-transform: none;
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	font-size: 15px;
	margin-top: 0.25rem;
}

body.theme-thankyou-page .woocommerce-order-details table,
body.theme-thankyou-page .woocommerce-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}

body.theme-thankyou-page .woocommerce-order-details th,
body.theme-thankyou-page .woocommerce-order-details td,
body.theme-thankyou-page .woocommerce-table th,
body.theme-thankyou-page .woocommerce-table td {
	padding: 0.75rem 0.5rem;
	font-size: 14px;
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
	text-align: left;
}

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-size: 14px;
	line-height: 1.7;
	border: 1px solid hsl(var(--foreground) / 0.12);
	border-radius: calc(var(--radius) - 2px);
	padding: 1.25rem;
}

/* --------------------------------------------------------------------------
   My account forms
   -------------------------------------------------------------------------- */

.woocommerce-account .woocommerce form.login,
.woocommerce-account .woocommerce form.register {
	border: 1px solid hsl(var(--foreground) / 0.12);
	border-radius: calc(var(--radius) - 2px);
	padding: 1.5rem;
	max-width: 480px;
}

.woocommerce-account .woocommerce input.input-text,
.woocommerce-account .woocommerce select,
.woocommerce-account .woocommerce textarea {
	width: 100%;
	height: 3rem;
	padding: 0 1rem;
	background-color: hsl(var(--ivory));
	border: 1px solid hsl(var(--foreground) / 0.15);
	border-radius: calc(var(--radius) - 2px);
	color: hsl(var(--foreground));
	font-family: inherit;
	font-size: 14px;
}

.woocommerce-account .woocommerce button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 3rem;
	padding: 0 1.75rem;
	background-color: hsl(var(--primary));
	border: 1px solid hsl(var(--primary));
	border-radius: 9999px;
	color: hsl(var(--primary-foreground));
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
}
