/* =====================================================================
   WordPress and WooCommerce glue.

   Everything that exists in the design is styled by assets/css/app.css and
   the class lists copied from the source components. This file only holds
   functional rules and styles for markup WordPress/WooCommerce generates
   that has no equivalent in the design.
   ===================================================================== */

/* ---------------------------------------------------------------- basics */

[hidden] {
	display: none !important;
}

.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(--background));
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
	clip: auto !important;
	clip-path: none;
	color: hsl(var(--foreground));
	display: block;
	font-size: var(--text-small);
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* Scroll progress bar driven by JS through a custom property. */
.theme-scroll-progress-bar {
	transform: scaleX(var(--progress, 0));
	transform-origin: left center;
}

/* The design crops the round logo with an inline object-position. */
.theme-logo-img {
	object-position: 50% 46%;
}

/* Page heading shares the site container with the content below it. */
.page-title {
	font-family: var(--font-display);
	font-weight: var(--heading-weight);
}

/* Quantity input styled like the design's numeric label. */
.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	background: transparent;
	border: 0;
	padding: 0;
	height: auto;
	font-family: inherit;
	font-size: var(--text-body);
	color: inherit;
	outline: none;
}

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

.theme-qty-input:focus,
.theme-qty-input:focus-visible {
	outline: none;
	border: 0;
	box-shadow: none;
}

/* ------------------------------------------------------------ side cart */

body:not(.cart-open) #theme-cart-drawer,
body:not(.cart-open) #theme-cart-overlay {
	display: none;
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 50;
}

#theme-cart-drawer {
	z-index: 51;
}

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

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

/* ---------------------------------------------- add to cart button 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;
}

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

.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 product */

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

/* Variation table: stacked labels, selects hidden behind the theme pills. */
.single-product .variations {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.single-product .variations 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 {
	display: none;
}

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

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

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

.single-product .woocommerce-variation-price,
.single-product .woocommerce-variation-availability {
	font-family: var(--font-body);
	font-size: var(--text-body);
	color: hsl(var(--muted-foreground));
	margin-bottom: 0.5rem;
}

.single-product .single_variation_wrap {
	margin-top: 0.5rem;
}

/* ----------------------------------------------------- WooCommerce bits */

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

.woocommerce-error {
	border-color: hsl(var(--destructive));
	color: hsl(var(--destructive));
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

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

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

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

.price del {
	opacity: 0.6;
	margin-right: 0.35rem;
}

.price ins {
	text-decoration: none;
}

.woocommerce-variation-availability p,
.woocommerce-variation-availability {
	margin: 0;
}

.theme-pagination ul,
.theme-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.theme-pagination .page-numbers,
.theme-pagination .woocommerce-pagination a,
.theme-pagination .woocommerce-pagination span.current {
	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(--border));
	border-radius: 9999px;
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: 600;
	text-decoration: none;
}

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

/* ------------------------------------------------------- order received */

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

body.theme-thankyou-page .woocommerce-order {
	font-family: var(--font-body);
	font-size: var(--text-body);
	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-weight: var(--heading-weight);
	font-size: 1.5rem;
	line-height: 1.25;
	color: hsl(var(--foreground));
	padding: 0 0 1rem 0;
	margin: 2rem 0 0;
}

body.theme-thankyou-page .woocommerce-thankyou-order-received,
body.theme-thankyou-page .woocommerce-notice--success {
	font-family: var(--font-display);
	font-weight: var(--heading-weight);
	font-size: 1.875rem;
	line-height: 1.2;
	color: hsl(var(--foreground));
	margin: 0 0 1.5rem;
	padding: 0;
	border: 0;
	background: none;
}

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

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

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

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	margin-top: 1rem;
}

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

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

body.theme-thankyou-page .woocommerce-columns--addresses {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* --------------------------------------------------- checkout (blocks) */

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

body.woocommerce-checkout .site-main {
	padding-bottom: 4rem;
}

body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-checkout .wp-block-woocommerce-checkout,
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block,
body.woocommerce-checkout .wc-block-components-sidebar-layout,
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
	font-family: var(--font-body);
	font-size: var(--font-size-base);
	color: hsl(var(--foreground));
}

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:has(> .wc-block-checkout__main) {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	grid-column: 1 / -1;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 2rem;
}

body.woocommerce-checkout h2,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-order-summary-item__description {
	font-family: var(--font-display);
	font-weight: var(--heading-weight);
	color: hsl(var(--foreground));
}

/* Fields: same tokens as the design's form fields, no padding or height. */
body.woocommerce-checkout .wc-block-components-text-input input[type],
body.woocommerce-checkout .wc-block-components-textarea,
body.woocommerce-checkout .wc-block-components-select .wc-block-components-select__select,
body.woocommerce-checkout .wc-blocks-components-select__select,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input {
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--input)) !important;
	border-radius: var(--field-radius) !important;
	font-family: var(--font-body) !important;
	font-size: var(--field-font-size) !important;
	color: hsl(var(--foreground)) !important;
	box-shadow: none !important;
	width: 100% !important;
	max-width: none !important;
}

body.woocommerce-checkout .wc-block-components-text-input input[type]:focus,
body.woocommerce-checkout .wc-block-components-textarea:focus,
body.woocommerce-checkout .wc-blocks-components-select__select:focus,
body.woocommerce-checkout .wc-block-components-combobox input:focus {
	outline: 2px solid transparent !important;
	outline-offset: 2px !important;
	border-color: hsl(var(--accent)) !important;
	box-shadow: none !important;
}

body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-blocks-components-select__label,
body.woocommerce-checkout .wc-block-components-combobox label {
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: 600;
	color: hsl(var(--foreground) / 0.8);
}

body.woocommerce-checkout .wc-block-components-text-input.has-error input[type],
body.woocommerce-checkout .wc-block-components-combobox.has-error input {
	border-color: hsl(var(--destructive)) !important;
}

body.woocommerce-checkout .wc-block-components-validation-error,
body.woocommerce-checkout .wc-block-components-validation-error p {
	color: hsl(var(--destructive));
	font-size: var(--text-meta);
}

body.woocommerce-checkout .wc-block-components-radio-control__option,
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option {
	border: 1px solid hsl(var(--input));
	border-radius: var(--field-radius);
	background: hsl(var(--background));
}

body.woocommerce-checkout .wc-block-components-radio-control__option-checked,
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	border-color: hsl(var(--accent));
	box-shadow: inset 0 0 0 1px hsl(var(--accent));
}

body.woocommerce-checkout .wc-block-components-radio-control__input:checked,
body.woocommerce-checkout .wc-block-components-checkbox__input[type="checkbox"]:checked {
	border-color: hsl(var(--accent));
	background-color: hsl(var(--accent));
}

body.woocommerce-checkout .wc-block-components-checkbox__input[type="checkbox"] {
	border-color: hsl(var(--input));
	border-radius: 4px;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-cart__submit-button,
body.woocommerce-checkout .wc-block-components-button:not(.is-link) {
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: 1px solid hsl(var(--primary));
	border-radius: 9999px;
	font-family: var(--font-body);
	font-size: var(--text-body);
	font-weight: 600;
	min-height: var(--field-height);
}

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

body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block,
body.woocommerce-checkout .wc-block-components-sidebar .wc-block-components-panel {
	background: transparent;
	border: 0;
}

body.woocommerce-checkout .wc-block-cart-items__header,
body.woocommerce-checkout .wc-block-cart-items td,
body.woocommerce-checkout .wc-block-cart-items th {
	border-color: hsl(var(--border));
}

body.woocommerce-checkout .wc-block-components-order-summary-item__image img {
	border-radius: var(--field-radius);
}

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

/* ------------------------------------------------------- cart (blocks) */

body.woocommerce-cart .entry-content {
	max-width: 100%;
}

body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-cart .wc-block-cart,
body.woocommerce-cart .wc-block-components-sidebar-layout {
	font-family: var(--font-body);
	font-size: var(--font-size-base);
	color: hsl(var(--foreground));
}

body.woocommerce-cart .wc-block-components-sidebar-layout:has(> .wc-block-cart__main) {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 1024px) {
	body.woocommerce-cart .wc-block-components-sidebar-layout:has(> .wc-block-cart__main) {
		grid-template-columns: 2fr 1fr;
	}
}

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

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

body.woocommerce-cart .wc-block-cart-items__header,
body.woocommerce-cart .wc-block-cart-items th,
body.woocommerce-cart .wc-block-cart-items td {
	border-color: hsl(var(--border));
}

body.woocommerce-cart .wc-block-cart-items__row {
	border-bottom: 1px solid hsl(var(--border));
}

body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart .wc-block-cart-item__product {
	font-family: var(--font-display);
	font-weight: var(--heading-weight);
	color: hsl(var(--foreground));
}

body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-cart .wc-block-components-button:not(.is-link) {
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: 1px solid hsl(var(--primary));
	border-radius: 9999px;
	font-weight: 600;
	min-height: var(--field-height);
}

/* ------------------------------------------------------- reveal safety */

body.is-customizer [data-aos],
body.no-js [data-aos] {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

/* Customizer preview: keep the same layout width behaviour as the live site. */
body.is-customizer {
	overflow-x: clip;
	max-width: 100%;
}

body.is-customizer .container-wide,
body.is-customizer main,
body.is-customizer header,
body.is-customizer footer {
	min-width: 0;
	max-width: 100%;
}

body.is-customizer h1,
body.is-customizer h2,
body.is-customizer h3,
body.is-customizer p,
body.is-customizer a,
body.is-customizer button {
	overflow-wrap: anywhere;
	word-break: break-word;
}

nav a,
footer a,
button,
select,
summary,
[role='button'] {
	cursor: pointer;
}
