/* ==========================================================================
   Theme additions: only markup with no source equivalent, plus the
   functional rules the WordPress and WooCommerce output needs.
   ========================================================================== */

[hidden] {
	display: none !important;
}

figure {
	margin: 0;
}

/* Logged-in desktop: keep the sticky header and scroll bar below the admin bar. */
@media screen and (min-width: 783px) {
	body.admin-bar .site-header {
		top: 32px;
	}

	body.admin-bar .theme-scroll-progress {
		top: 32px;
	}
}

/* Logo sizing: one definition, so header and footer always agree. */
.site-logo-img {
	height: var(--logo-height, 80px) !important;
	width: auto !important;
	display: block;
}

.theme-logo-text {
	line-height: var(--logo-height, 80px);
	display: block;
}

/* The supplied logo keeps its own aspect ratio inside a fixed layout slot. */
.theme-logo-slot {
	aspect-ratio: 2531 / 2723;
	width: auto;
}

.footer-logo {
	height: 64px !important;
}

@media (min-width: 1024px) {
	.footer-logo {
		height: var(--logo-height, 80px) !important;
	}
}

/* Footer logo keeps the source's own size at every breakpoint. */
.site-footer .footer-logo {
	height: 64px !important;
}

@media (min-width: 1024px) {
	.site-footer .footer-logo {
		height: 80px !important;
	}
}

@media (max-width: 1023px) {
	.site-logo-img {
		height: var(--logo-height-mobile, 56px) !important;
	}
	.theme-logo-text {
		line-height: var(--logo-height-mobile, 56px);
	}
}

/* Keep the mobile menu inside the header once it opens. */
#theme-mobile-menu {
	z-index: 40;
}

/* Reveal fallback: content is never left invisible, including in the editor. */
body.is-customizer [data-aos],
body.is-customizer .crumb-step,
body.is-customizer .theme-card-image {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
	transition: none !important;
}

.no-js [data-aos],
.no-js .crumb-step {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
}

/* Scroll progress bar sits above the sticky header. */
.theme-scroll-progress {
	z-index: 60;
}

/* ----------------------------------------------------------------- cart drawer */

#theme-cart-drawer {
	position: relative;
	z-index: 60;
	pointer-events: none;
}

#theme-cart-drawer .theme-cart-panel {
	transform: translateX(100%);
	transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.cart-open #theme-cart-drawer .theme-cart-panel {
	transform: translateX(0);
	pointer-events: auto;
}

body.cart-open #theme-cart-drawer {
	pointer-events: auto;
}

body.admin-bar #theme-cart-drawer .theme-cart-panel {
	top: var(--wp-admin--admin-bar--height, 32px);
	height: calc(100% - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
	body.admin-bar #theme-cart-drawer .theme-cart-panel {
		top: 46px;
		height: calc(100% - 46px);
	}
}

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

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	background: hsl(var(--foreground) / 0.6);
	z-index: 55;
	opacity: 0;
	visibility: hidden;
	transition: opacity 400ms ease, visibility 400ms ease;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	visibility: visible;
}

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

/* ------------------------------------------------------------------- buttons */

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

/* WooCommerce injects this after an AJAX add; the drawer is the feedback. */
.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 .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

/* ------------------------------------------------------- product card overlay */

.theme-product-card {
	position: relative;
}

.theme-product-card > .theme-card-link {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: auto;
}

.theme-product-card .theme-add-to-cart-btn,
.theme-product-card .theme-quick-view {
	position: relative;
	z-index: 3;
	pointer-events: auto;
}

.theme-product-card__image-wrapper {
	position: relative;
	overflow: hidden;
}

.theme-product-card__actions {
	z-index: 3;
}

/* -------------------------------------------------- single product responsive */

.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 .theme-add-to-cart-area .single_add_to_cart_button,
.single-product .theme-add-to-cart-area .theme-btn-primary {
	flex: 1 1 auto;
	min-width: 160px;
}

.single-product .theme-add-to-cart-area > .theme-quantity-wrapper {
	flex: 0 0 auto;
}

.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in,
.product .posted_in {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Quantity input keeps the pill geometry without browser spinners. */
.theme-qty-input {
	appearance: textfield;
	-moz-appearance: textfield;
}

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

.theme-quantity-wrapper > button,
.theme-quantity-wrapper > .theme-qty-input {
	height: 44px;
	line-height: 1.5;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.theme-quantity-wrapper > .theme-qty-input {
	width: 44px;
	min-width: 44px;
	padding-left: 0;
	padding-right: 0;
	text-align: center;
}

.theme-quantity-wrapper > .theme-qty-input:focus {
	outline: none;
	box-shadow: none;
}

/* Variations: keep the native selects in the DOM but off screen. */
.theme-attr-select-hidden {
	display: none !important;
}

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

/* --------------------------------------------------------- WooCommerce notices */

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

.woocommerce-error {
	border-color: hsl(var(--destructive) / 0.4);
	background: hsl(var(--destructive) / 0.06);
}

.woocommerce-message .button,
.woocommerce-info .button {
	margin-left: 0.75rem;
}

.woocommerce-notices-wrapper:empty {
	display: none;
}

/* ------------------------------------------------------------ shop pagination */

.woocommerce-pagination {
	margin-top: 3rem;
	display: flex;
	justify-content: center;
}

.woocommerce-pagination ul {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 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-radius: 999px;
	border: 1px solid hsl(var(--border));
	font-size: 15px;
	font-weight: 600;
	color: hsl(var(--foreground));
}

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

/* ------------------------------------------------------------------- checkout */

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

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

body.woocommerce-checkout .wc-block-checkout {
	display: block;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		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-components-notice-banner,
body.woocommerce-checkout .wc-block-components-notice-banner.is-error {
	grid-column: 1 / -1;
	border-radius: var(--radius, 0.5rem);
	font-size: 15px;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--border) / 0.6);
	border-radius: var(--radius, 0.5rem);
	padding: 1.75rem;
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 700;
	color: hsl(var(--foreground));
	letter-spacing: 0;
}

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 {
	font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif !important;
	font-size: 15px !important;
	color: hsl(var(--foreground)) !important;
	background-color: hsl(var(--ivory)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: calc(var(--radius, 0.5rem) - 4px) !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(--primary)) !important;
	outline: none !important;
	box-shadow: 0 0 0 1px hsl(var(--primary)) !important;
}

body.woocommerce-checkout .wc-block-components-text-input input::placeholder,
body.woocommerce-checkout .wc-block-components-textarea textarea::placeholder {
	color: hsl(var(--muted-foreground)) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	border-radius: 999px !important;
	font-family: 'Nunito Sans', system-ui, sans-serif !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	min-height: 3rem;
}

body.woocommerce-checkout .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-checkout .wc-block-components-totals-item {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
}

body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .woocommerce {
	max-width: 100%;
}

body.woocommerce-cart .wc-block-components-sidebar,
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content {
	min-width: 0;
}

/* Cart block: match the design's type scale, colours and pill buttons. */
body.woocommerce-cart .wc-block-components-title,
body.woocommerce-cart .wc-block-cart__totals-title,
body.woocommerce-cart .wc-block-components-totals-item__label {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}

body.woocommerce-cart .wc-block-cart-items__header th {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
	font-weight: 600;
}

body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart a.components-button,
body.woocommerce-cart .wc-block-components-product-name:visited {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: hsl(var(--foreground)) !important;
	text-decoration: none;
}

body.woocommerce-cart .wc-block-components-product-name:hover {
	color: hsl(var(--primary)) !important;
}

body.woocommerce-cart .wc-block-components-product-price,
body.woocommerce-cart .wc-block-components-product-price__value,
body.woocommerce-cart .wc-block-components-totals-item__value {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
}

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

body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-size: 18px;
	color: hsl(var(--foreground));
}

body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-cart .wc-block-components-button:not(.is-link),
body.woocommerce-cart .wc-block-components-quantity-selector {
	border-radius: 999px !important;
}

body.woocommerce-cart .wc-block-cart__submit-button,
body.woocommerce-cart .wc-block-cart__submit-button:hover,
body.woocommerce-account .woocommerce-Button,
body.woocommerce-account .woocommerce-Button:hover,
body.woocommerce-account button.button,
body.woocommerce-account button.button:hover {
	background-color: hsl(var(--primary)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	font-family: 'Nunito Sans', system-ui, sans-serif !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	min-height: 3rem;
}

body.woocommerce-cart .wc-block-components-button.is-link,
body.woocommerce-cart .wc-block-components-button.is-link:hover {
	background: transparent !important;
	border: 0 !important;
	color: hsl(var(--primary)) !important;
	font-size: 15px !important;
}

body.woocommerce-cart .wc-block-components-quantity-selector input {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
	background: transparent;
}

body.woocommerce-account .woocommerce form.login,
body.woocommerce-account .woocommerce form.register,
body.woocommerce-account .woocommerce-form {
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius, 0.5rem);
	padding: 1.75rem;
	background: hsl(var(--card));
}

body.woocommerce-account .woocommerce form .form-row input.input-text,
body.woocommerce-account .woocommerce form .form-row textarea {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
	background-color: hsl(var(--ivory));
	border: 1px solid hsl(var(--border));
	border-radius: calc(var(--radius, 0.5rem) - 4px);
	padding: 0.75rem 1rem;
}

/* ------------------------------------------------------- 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 {
	margin-bottom: 2rem;
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 700;
	font-size: 1.5rem;
	padding: 0 0 1rem 0;
	color: hsl(var(--foreground));
}

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

body.theme-thankyou-page .woocommerce-order-overview li {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 15px;
	color: hsl(var(--foreground) / 0.75);
}

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

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 15px;
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid hsl(var(--border) / 0.6);
	text-align: left;
	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: 15px;
	line-height: 1.6;
}

/* --------------------------------------------------------------- my account */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: inline-flex;
	align-items: center;
	height: 2.5rem;
	padding: 0 1rem;
	border-radius: 999px;
	border: 1px solid hsl(var(--border));
	font-size: 15px;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

/* -------------------------------------------------------------- classic forms */

.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 {
	font-family: 'Nunito Sans', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
	background-color: hsl(var(--ivory));
	border: 1px solid hsl(var(--border));
	border-radius: calc(var(--radius, 0.5rem) - 4px);
	padding: 0.75rem 1rem;
}

/* Screen-reader text used by WordPress and WooCommerce. */
.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 !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Entry content from the block editor. */
.entry-content > * + * {
	margin-top: 1.25rem;
}

.entry-content h2,
.entry-content h3 {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 700;
	color: hsl(var(--foreground));
}

.entry-content a {
	color: hsl(var(--primary));
	text-decoration: underline;
}
