/*
 * Theme styles
 *
 * Only markup with no source equivalent (WooCommerce/WordPress output) and
 * functional state rules live here. Layout and typography of elements that
 * carry source utility classes come from app.css.
 */

[hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ Header */
body.admin-bar {
	--admin-bar-offset: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--admin-bar-offset: 46px;
	}
}

body.admin-bar .site-header {
	top: var(--admin-bar-offset, 0);
}

body.admin-bar {
	--header-height: calc(115px + var(--admin-bar-offset, 0px));
}

.site-header .theme-header-bar {
	transition: background-color 500ms ease, border-color 500ms ease, backdrop-filter 500ms ease;
}

.site-header.is-solid .theme-header-bar {
	background-color: hsl(var(--ivory) / 0.9);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
}

.site-header .theme-mobile-menu {
	background-color: hsl(var(--ivory) / 0.95);
}

.site-logo-img {
	height: calc(var(--logo-height, 40px) - 4px) !important;
	width: auto !important;
	display: block;
}

@media (min-width: 640px) {
	.site-logo-img {
		height: var(--logo-height, 40px) !important;
	}
}

/* ------------------------------------------------------------ Cart drawer */
body.cart-open {
	overflow: hidden;
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 9990;
	background-color: hsl(var(--foreground) / 0.3);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 400ms ease-out, visibility 400ms ease-out;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

#theme-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: 28rem;
	height: 100%;
	max-height: 100dvh;
	z-index: 9991;
	display: flex;
	flex-direction: column;
	min-height: 0;
	background-color: hsl(var(--ivory));
	box-shadow: var(--shadow-elevated);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(0, 16px, 0);
	transition: opacity 400ms ease-out, transform 400ms ease-out, visibility 400ms ease-out;
}

body.cart-open #theme-cart-drawer {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
}

.theme-cart-drawer-chrome {
	position: relative;
	z-index: 2;
	flex-shrink: 0;
}

#theme-cart-drawer [data-cart-close] {
	position: relative;
	z-index: 3;
	cursor: pointer;
}

#theme-cart-drawer > * {
	transition: opacity 200ms ease;
}

#theme-cart-drawer.is-updating > *:not(.theme-cart-drawer-chrome) {
	opacity: 0.6;
}

.theme-cart-count:empty {
	display: none;
}

/* ---------------------------------------------------------------- Reveals */
body.is-customizer [data-reveal],
body.is-customizer [data-reveal].is-revealed {
	opacity: 1;
	transform: none;
	transition: none;
}

html.no-js [data-reveal] {
	opacity: 1;
	transform: none;
}

/* --------------------------------------------------------- Product cards */
.theme-product-card-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.theme-product-card-wrap > a:last-of-type {
	flex: 1;
}

.theme-card-link {
	display: block;
}

.theme-product-image-link {
	display: block;
}

.theme-product-image-link img,
.theme-product-card .theme-card-image {
	display: block;
}

.theme-product-card .theme-card-actions .add_to_cart_button {
	pointer-events: auto;
}

.theme-product-card .theme-card-dots [data-dot] {
	cursor: pointer;
	pointer-events: auto;
}

.theme-product-card .theme-card-dots {
	pointer-events: auto;
}

.theme-product-card .theme-card-nav {
	pointer-events: auto;
}

.theme-product-card .theme-card-link {
	pointer-events: auto;
}

/* ------------------------------------------------------ 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-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.single-product #product-main-img {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.single-product .theme-add-to-cart-area {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.single-product .theme-quantity-wrapper {
	display: inline-flex;
	align-items: center;
}

.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	border: 0;
	background: transparent;
}

.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in,
.single-product .theme-product-summary,
.single-product .theme-product-details {
	overflow-wrap: break-word;
	word-break: break-word;
}

.single-product .theme-product-details ul,
.single-product .theme-product-summary ul {
	list-style: disc;
	padding-left: 1.25rem;
	margin: 0.5rem 0;
}

.single-product .theme-product-details li,
.single-product .theme-product-summary li {
	margin-bottom: 0.4rem;
}

/* Variation table: visually reflowed, native selects stay in the DOM. */
.single-product .variations {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
}

.single-product .variations tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
	display: block;
	width: 100%;
}

.single-product .variations tbody td.label,
.single-product .variations td.label {
	display: none;
	padding: 0;
}

.single-product .variations tbody td.value {
	padding: 0;
}

.theme-attr-select-hidden {
	display: none !important;
}

.single_variation_wrap .woocommerce-variation-price {
	margin-bottom: 1rem;
	font-size: 20px;
	font-weight: 500;
	color: hsl(var(--foreground) / 0.9);
}

.single_variation_wrap .woocommerce-variation-availability {
	margin-bottom: 1rem;
	color: hsl(var(--foreground) / 0.7);
}

/* Disabled add-to-cart buttons (variable products, sold out). */
.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 adds. */
.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;
}

/* Loading lock + suppress WooCommerce's own spinner. */
.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;
}

/* ------------------------------------------------------- Shop / notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	padding: 0.9rem 1.1rem;
	margin-bottom: 1.25rem;
	border: 1px solid hsl(var(--foreground) / 0.12);
	border-radius: 0.25rem;
	background-color: hsl(var(--linen));
	color: hsl(var(--foreground) / 0.8);
	font-size: 14px;
	line-height: 1.6;
}

.woocommerce-error {
	border-color: hsl(var(--flag-red));
	color: hsl(var(--flag-red));
	background-color: hsl(var(--ivory));
}

.woocommerce-message .button,
.woocommerce-info .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 2.25rem;
	padding: 0 1rem;
	margin-left: 0.75rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--primary));
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.woocommerce-breadcrumb {
	display: none;
}

.woocommerce-pagination .page-numbers {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-pagination .page-numbers li {
	list-style: none;
}

.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--foreground) / 0.2);
	font-size: 14px;
	color: hsl(var(--foreground) / 0.8);
	text-decoration: none;
}

.woocommerce-pagination .page-numbers span.current {
	background-color: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

/* --------------------------------------------------- Cart / account pages */
body.woocommerce-cart .theme-page-shell,
body.woocommerce-account .theme-page-shell,
body.woocommerce-checkout .theme-page-shell {
	max-width: 80rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

body.woocommerce-checkout .theme-page-shell,
body.woocommerce-cart .theme-page-shell,
body.woocommerce-account .theme-page-shell {
	min-width: 0;
}

body.woocommerce-checkout .entry-content,
body.woocommerce-cart .entry-content,
body.woocommerce-account .entry-content {
	max-width: 100%;
	min-width: 0;
}

body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar,
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__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;
	border: 1px solid hsl(var(--foreground) / 0.15) !important;
	border-radius: 0.25rem !important;
	background-color: hsl(var(--ivory)) !important;
	color: hsl(var(--foreground)) !important;
	font-family: Geist, system-ui, sans-serif !important;
	font-size: 14px !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: none !important;
}

body.woocommerce-checkout .wc-block-components-text-input input::placeholder,
body.woocommerce-checkout .wc-block-components-textarea textarea::placeholder {
	color: hsl(var(--foreground) / 0.45) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-cart .wc-block-components-button.wc-block-cart__submit-button {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 9999px !important;
	font-family: Geist, system-ui, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	min-height: 3rem;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover,
body.woocommerce-cart .wc-block-components-button.wc-block-cart__submit-button:hover {
	background-color: hsl(var(--primary) / 0.9) !important;
}

body.woocommerce-checkout .wc-block-checkout__sidebar,
body.woocommerce-cart .wc-block-cart__sidebar {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: 1rem;
	padding: 1.75rem;
}

body.woocommerce-checkout .wc-block-components-notice-banner,
body.woocommerce-cart .wc-block-components-notice-banner {
	border-radius: 0.25rem;
	border-color: hsl(var(--foreground) / 0.12);
	background-color: hsl(var(--linen));
	color: hsl(var(--foreground) / 0.8);
	font-family: Geist, system-ui, sans-serif;
	font-size: 14px;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large,
	body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart.is-large {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}

	body.woocommerce-checkout .wc-block-components-sidebar-layout > .wc-block-components-notice-banner,
	body.woocommerce-cart .wc-block-components-sidebar-layout > .wc-block-components-notice-banner {
		grid-column: 1 / -1;
	}
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
}

/* Classic WooCommerce buttons (login, cart tables, coupon rows). */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.625rem 1.5rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--primary));
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-family: Geist, system-ui, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	text-decoration: none;
	transition: background-color 200ms ease, border-color 200ms ease;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
	background-color: hsl(var(--primary) / 0.9);
	border-color: hsl(var(--primary) / 0.9);
	color: hsl(var(--primary-foreground));
}

.woocommerce button.button.alt,
.woocommerce a.button.alt {
	background-color: hsl(var(--primary));
}

.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.checkout_coupon {
	border: 1px solid hsl(var(--foreground) / 0.12);
	border-radius: 0.5rem;
	padding: 1.5rem;
	background-color: hsl(var(--ivory));
	font-size: 14px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
	padding: 0.5rem 0;
	font-size: 14px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
	color: hsl(var(--foreground) / 0.75);
	text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
	color: hsl(var(--primary));
}

@media (min-width: 768px) {
	.woocommerce-account .woocommerce {
		display: grid;
		grid-template-columns: 220px 1fr;
		gap: 2.5rem;
		align-items: start;
	}
}

/* Classic WooCommerce form fields, styled like the source inputs. */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select {
	border: 1px solid hsl(var(--foreground) / 0.15);
	border-radius: 0.25rem;
	background-color: hsl(var(--ivory));
	color: hsl(var(--foreground));
	font-family: Geist, system-ui, sans-serif;
	font-size: 14px;
	padding: 0.75rem 1rem;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	border-color: hsl(var(--primary));
	outline: none;
}

/* ------------------------------------------------------------ Thank you */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order > p {
	font-size: 15px;
	line-height: 1.7;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
	font-size: 1.75rem;
	line-height: 1.15;
	color: hsl(var(--foreground));
	padding: 0 0 1rem 0;
	margin-top: 2rem;
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 1.5rem 0 2rem;
	padding: 0;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: 0.5rem;
	background-color: hsl(var(--linen));
	padding: 1rem;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: hsl(var(--foreground) / 0.55);
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.35rem;
	font-size: 14px;
	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;
	font-size: 14px;
}

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(--foreground) / 0.1);
	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;
	font-style: normal;
	font-size: 14px;
	line-height: 1.7;
	color: hsl(var(--foreground) / 0.75);
}

/* ------------------------------------------------------------- Utilities */
:root {
	--header-height: 115px;
}

body.woocommerce-checkout .theme-main,
body.woocommerce-cart .theme-main,
body.woocommerce-account .theme-main {
	padding-top: var(--header-height, 115px);
	padding-bottom: 4rem;
}

/* Single product: the drawer provides add-to-cart feedback. */
.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

#theme-cart-drawer .woocommerce-message {
	display: none;
}

/* ---------------------------------------------------- Clickable affordance */
button,
[type="button"],
[type="submit"],
[type="reset"],
a[href],
label[for],
select,
summary,
.theme-badge-toggle,
[data-menu-toggle],
[data-cart-open],
[data-cart-close],
[data-faq-toggle],
[data-shop-cat],
[data-shop-more],
[data-scroll-to],
[data-scroll-top],
[data-badge-toggle],
[data-badge-close],
[data-badge-shop],
[data-form-next],
[data-form-back],
[data-card-prev],
[data-card-next],
[data-cart-qty-update],
[data-cart-remove],
[data-cart-empty],
.theme-card-dots [data-dot],
.theme-thumbnail,
.theme-menu-btn,
.theme-cart-btn,
.theme-nav-link,
.theme-mobile-link {
	cursor: pointer;
}

