/* -------------------------------------------------------------------------
 * Theme additions.
 * The design's compiled stylesheet (app.css) is the source of truth for every
 * element that exists in the design. This file only adds functional rules and
 * styling for WordPress / WooCommerce markup that has no design equivalent.
 * ---------------------------------------------------------------------- */

:root {
	--color-surface: hsl(var(--secondary) / 0.45);
	--card-radius: calc(var(--radius) - 2px);
	--section-padding: 1.5rem;
	--header-height: 72px;
	--wp-admin-bar-height: 0px;
}

html {
	--announcement-height: 36px;
}

body.admin-bar {
	--wp-admin-bar-height: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--wp-admin-bar-height: 46px;
	}
}

/* Clickable affordance --------------------------------------------------- */
a[href],
button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
label[for],
input[type="submit"]:not(:disabled),
input[type="button"]:not(:disabled),
input[type="reset"]:not(:disabled),
select,
summary {
	cursor: pointer;
}

#theme-announcement {
	top: var(--wp-admin-bar-height, 0px);
}

[data-scroll-progress] {
	top: var(--wp-admin-bar-height, 0px);
}

body.theme-lock {
	overflow: hidden;
}

/* Attribute-based hiding must win over utility display classes. */
[hidden] {
	display: none !important;
}

/* Header ---------------------------------------------------------------- */
.theme-site-header {
	top: calc(var(--announcement-height, 36px) + var(--wp-admin-bar-height, 0px));
}

@media (min-width: 1024px) {
	.theme-logo-header {
		height: var(--logo-height, 104px);
	}
}

.theme-site-header .theme-logo-text {
	line-height: 1.1;
	display: block;
}

[data-scroll-progress] {
	transform: scaleX(0);
	transform-origin: 0% 50%;
}

/* Reveal / motion ------------------------------------------------------- */
.theme-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.65s var(--transition-smooth), transform 0.65s var(--transition-smooth);
	will-change: opacity, transform;
}

.theme-fade-up {
	opacity: 0;
	transform: translateY(40px);
	transition: opacity 0.9s var(--transition-smooth), transform 0.9s var(--transition-smooth);
	will-change: opacity, transform;
}

.theme-reveal.is-visible,
.theme-fade-up.is-visible {
	opacity: 1;
	transform: none;
}

html.no-js .theme-reveal,
html.no-js .theme-fade-up,
body.is-customizer .theme-reveal,
body.is-customizer .theme-fade-up {
	opacity: 1 !important;
	transform: none !important;
}

@keyframes themeHeroIn {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.theme-hero-in {
	animation: themeHeroIn 1.2s cubic-bezier(0.25, 0.4, 0.25, 1) 0.3s both;
}

.theme-highlight.is-visible:hover,
.theme-testimonial.is-visible:hover {
	transform: translateY(-5px);
}

.theme-highlight.is-visible:hover {
	transition: transform 0.3s var(--transition-smooth), opacity 0.3s var(--transition-smooth);
}

.theme-testimonial.is-visible:hover {
	transition: transform 0.25s var(--transition-smooth), box-shadow 0.25s var(--transition-smooth);
}

.theme-banner.is-visible:hover {
	transform: translateY(-4px);
	transition: transform 0.3s var(--transition-smooth), opacity 0.3s var(--transition-smooth);
}

@keyframes themeSlideUp {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes themeSuccessIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes themeSuccessBadge {
	0% {
		transform: scale(0);
	}
	60% {
		transform: scale(1.08);
	}
	100% {
		transform: scale(1);
	}
}

.theme-modal-success {
	animation: themeSuccessIn 0.4s ease both;
}

.theme-modal-success-badge {
	animation: themeSuccessBadge 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@media (prefers-reduced-motion: reduce) {
	.theme-hero-in,
	.theme-modal-success,
	.theme-modal-success-badge {
		animation: none;
	}
	.theme-reveal,
	.theme-fade-up {
		transition: none;
		opacity: 1;
		transform: none;
	}
}

/* FAQ accordion -------------------------------------------------------- */
.theme-faq-panel {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows 0.4s cubic-bezier(0.25, 0.4, 0.25, 1), opacity 0.4s cubic-bezier(0.25, 0.4, 0.25, 1);
}

.theme-faq-panel > div {
	overflow: hidden;
	min-height: 0;
}

.theme-faq-panel.is-open {
	grid-template-rows: 1fr;
	opacity: 1;
}

/* Mobile menu sheet ---------------------------------------------------- */
[data-theme-sheet-overlay] {
	position: fixed;
	inset: 0;
	z-index: 85;
}

[data-theme-sheet],
#theme-mobile-menu {
	z-index: 86;
}

/* Cart drawer ---------------------------------------------------------- */
#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 85;
	background-color: hsl(var(--foreground) / 0.3);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s var(--transition-smooth);
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
	animation: fadeIn 0.8s var(--transition-smooth) forwards;
}

.theme-cart-drawer,
#theme-cart-drawer {
	z-index: 86;
}

.theme-cart-drawer {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transform: translateY(24px);
}

body.cart-open .theme-cart-drawer {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transform: none;
	animation: themeSlideUp 0.8s var(--transition-smooth) forwards;
}

.theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}

.theme-cart-count:empty {
	display: none;
}

/* Product cards -------------------------------------------------------- */
.theme-product-card-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.theme-product-card-wrap > .theme-product-card {
	flex: 1 1 auto;
}

/* Product page --------------------------------------------------------- */
.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 .theme-add-to-cart-area .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;
}

.single-product .theme-product-details-short ul {
	list-style: disc;
	padding-left: 1.25rem;
	margin-top: 0;
}

.single-product .theme-product-details-short li {
	margin-top: 0.625rem;
	line-height: 1.625;
}

.single-product .theme-product-details-short li::marker {
	color: hsl(var(--primary));
}

.single-product .theme-product-details-short p {
	margin-bottom: 0.75rem;
}

/* Quantity control ----------------------------------------------------- */
.theme-quantity-wrapper {
	height: 3.5rem;
}

.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	font-family: var(--font-body);
	color: hsl(var(--foreground));
}

.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Variations ----------------------------------------------------------- */
.theme-attr-select-hidden {
	display: none !important;
}

/* Native WC attribute table is only for variation JS — pills are the UI. */
.single-product .variations {
	display: none !important;
}

.single-product [data-theme-attr-group] {
	margin-bottom: 20px;
}

.single-product .single_variation_wrap {
	display: block !important;
	margin-top: 0;
	padding-top: 0;
}

.single-product .single_variation_wrap .woocommerce-variation-price,
.single-product .single_variation_wrap .woocommerce-variation-availability,
.single-product .single_variation_wrap .woocommerce-variation-description {
	display: none !important;
}

/* 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,
.single_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,
.single_add_to_cart_button.button[disabled]:hover {
	opacity: 0.4 !important;
}

.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 .single_add_to_cart_button.loading::after,
.ajax_add_to_cart.loading::after {
	display: none !important;
}

.ajax_add_to_cart.theme-btn-loading {
	opacity: 0.6 !important;
	pointer-events: none !important;
	cursor: wait !important;
}

/* WooCommerce notices -------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid hsl(var(--border));
	border-radius: var(--card-radius);
	background-color: hsl(var(--secondary));
	color: hsl(var(--foreground));
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.6;
}

.woocommerce-error {
	border-color: hsl(var(--accent));
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
	float: right;
	margin-left: 1rem;
	padding: 0.35rem 1rem;
	border: 1px solid hsl(var(--primary));
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-family: var(--font-condensed);
	font-size: 0.7rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

#theme-cart-drawer .woocommerce-message {
	display: none;
}

.theme-notices {
	margin-bottom: 2rem;
}

/* WooCommerce tables and forms ----------------------------------------- */
.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid hsl(var(--border));
	background-color: hsl(var(--background));
	font-family: var(--font-body);
	font-size: 0.875rem;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 0.9rem 1rem;
	border-bottom: 1px solid hsl(var(--border));
	text-align: left;
	vertical-align: middle;
}

.woocommerce table.shop_table thead th {
	font-family: var(--font-condensed);
	font-size: 0.7rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .cart .quantity input.qty {
	border: 1px solid hsl(var(--border));
	border-radius: var(--card-radius);
	background-color: hsl(var(--background));
	color: hsl(var(--foreground));
	font-family: var(--font-body);
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	outline: none;
	border-color: hsl(var(--primary));
	box-shadow: 0 0 0 1px hsl(var(--primary));
}

.woocommerce .button,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border: 1px solid hsl(var(--primary));
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-family: var(--font-condensed);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	border-radius: 0;
	transition: background-color 0.22s var(--transition-smooth), color 0.22s var(--transition-smooth);
}

.woocommerce .button:hover,
.woocommerce #respond input#submit:hover {
	background-color: hsl(var(--background));
	color: hsl(var(--primary));
}

.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 3rem 0 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.5rem;
	border: 1px solid hsl(var(--border));
	font-family: var(--font-body);
	font-size: 0.75rem;
	color: hsl(var(--foreground));
}

.woocommerce-pagination ul li span.current,
.woocommerce-pagination ul li a:hover {
	background-color: hsl(var(--primary));
	border-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.woocommerce nav.woocommerce-pagination {
	text-align: center;
}

/* Account -------------------------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0;
	font-family: var(--font-body);
	font-size: 0.8rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
	border-bottom: 1px solid hsl(var(--border));
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	display: block;
	padding: 0.85rem 0;
	color: hsl(var(--foreground));
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	color: hsl(var(--accent));
}

@media (min-width: 768px) {
	body.woocommerce-account .woocommerce:has(> .woocommerce-MyAccount-navigation) {
		display: grid;
		grid-template-columns: 220px minmax(0, 1fr);
		gap: 2rem;
		align-items: start;
	}
}

body.woocommerce-account .woocommerce-MyAccount-content,
body.woocommerce-account .woocommerce-MyAccount-navigation {
	min-width: 0;
	max-width: 100%;
}

/* Checkout (native WooCommerce Blocks) --------------------------------- */
body.woocommerce-checkout .entry-content,
body.woocommerce-cart .entry-content {
	max-width: 100%;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
	font-family: var(--font-body);
	color: hsl(var(--foreground));
}

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;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-checkout:has(> .wc-block-checkout__main),
	body.woocommerce-checkout .wc-block-components-sidebar-layout:has(> .wc-block-checkout__main),
	body.woocommerce-cart .wc-block-cart:has(> .wc-block-cart__main),
	body.woocommerce-cart .wc-block-components-sidebar-layout:has(> .wc-block-cart__main) {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		gap: 2rem;
		align-items: start;
	}
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	grid-column: 1 / -1;
	border-radius: var(--card-radius);
	border: 1px solid hsl(var(--border));
	background-color: hsl(var(--secondary));
	color: hsl(var(--foreground));
	font-family: var(--font-body);
}

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 {
	border: 1px solid hsl(var(--border)) !important;
	border-radius: var(--card-radius) !important;
	background-color: hsl(var(--background)) !important;
	color: hsl(var(--foreground)) !important;
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
}

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 {
	border-color: hsl(var(--primary)) !important;
	box-shadow: 0 0 0 1px hsl(var(--primary)) !important;
	outline: none !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-checkout__sidebar {
	background-color: var(--color-surface);
	border-radius: var(--card-radius);
	padding: var(--section-padding);
}

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: var(--card-radius) !important;
	color: hsl(var(--primary-foreground)) !important;
	font-family: var(--font-condensed) !important;
	font-size: 0.72rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.24em !important;
	text-transform: uppercase !important;
	min-height: 3rem;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: hsl(var(--background)) !important;
	color: hsl(var(--primary)) !important;
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-order-summary__button-text,
body.woocommerce-cart .wc-block-components-title {
	font-family: var(--font-display) !important;
	text-transform: uppercase;
	font-weight: 700;
	color: hsl(var(--foreground));
}

body.woocommerce-checkout .wc-block-components-product-name,
body.woocommerce-cart .wc-block-components-product-name {
	font-family: var(--font-body);
	color: hsl(var(--foreground));
}

body.woocommerce-cart .wc-block-cart {
	width: 100%;
}

body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
	font-family: var(--font-body);
}

body.woocommerce-cart .wc-block-cart__sidebar {
	background-color: var(--color-surface);
	border-radius: var(--card-radius);
	padding: var(--section-padding);
}

body.woocommerce-cart .wc-block-components-button,
body.woocommerce-cart .wc-block-cart__submit-button {
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: 1px solid hsl(var(--primary));
	border-radius: var(--card-radius);
	font-family: var(--font-condensed);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-size: 0.72rem;
}

body.woocommerce-cart .wc-block-components-button:hover,
body.woocommerce-cart .wc-block-cart__submit-button:hover {
	background-color: hsl(var(--background));
	color: hsl(var(--primary));
}

/* Thank you page ------------------------------------------------------- */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	padding: 0 0 1rem;
	font-family: var(--font-display);
	font-weight: 700;
	text-transform: uppercase;
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	border: 1px solid hsl(var(--border));
	font-family: var(--font-body);
	font-size: 0.875rem;
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid hsl(var(--border));
}

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-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	padding: 1.5rem;
	margin: 0 0 2rem;
	border: 1px solid hsl(var(--border));
	font-family: var(--font-body);
	font-size: 0.8rem;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	margin: 0;
	padding: 0;
	border: 0;
	text-transform: none;
}

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-family: var(--font-body);
	font-style: normal;
}

body.theme-thankyou-page .woocommerce-order {
	font-family: var(--font-body);
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-thankyou-order-received {
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.05;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	margin: 0 0 2rem;
}

body.theme-thankyou-page .woocommerce-order-details,
body.theme-thankyou-page .woocommerce-customer-details {
	margin-top: 2.5rem;
}

/* Cart / checkout spacing under the fixed header ----------------------- */
body.woocommerce-checkout .site-main,
body.woocommerce-cart .site-main {
	padding-bottom: 4rem;
}

@media (prefers-reduced-motion: reduce) {
	body.cart-open .theme-cart-drawer,
	body.cart-open #theme-cart-overlay {
		animation: none;
	}
}

.single-product .theme-product-description p + p {
	margin-top: 1.55em;
}
