/* -------------------------------------------------------------------------
   Theme additions. Only markup that has no equivalent in the source design is
   styled here; every element the design already covers keeps its source classes
   and is styled exclusively by app.css.
   ------------------------------------------------------------------------- */

/* Hidden attribute must win over any display utility. */
[hidden] {
	display: none !important;
}

/* Reveal fallbacks: content must never be stuck invisible. */
body.is-customizer [data-aos],
body.is-customizer .hero-reveal {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
	transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
	[data-aos],
	.hero-reveal {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
	}
}

/* Header state hooks ----------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
}

/* Keep sticky chrome below the WordPress admin bar. */
body.admin-bar .site-header,
body.admin-bar .theme-scroll-progress {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .site-header,
	body.admin-bar .theme-scroll-progress {
		top: 46px;
	}
}

@media screen and (max-width: 600px) {
	body.admin-bar .site-header,
	body.admin-bar .theme-scroll-progress {
		top: 0;
	}
}

/* Pointer cursor on interactive controls. */
a,
button:not(:disabled):not([disabled]),
[role="button"]:not([aria-disabled="true"]),
input[type="submit"]:not(:disabled),
input[type="button"]:not(:disabled),
input[type="reset"]:not(:disabled),
input[type="checkbox"],
input[type="radio"],
input[type="file"],
select,
summary,
label[for],
.theme-product-card,
.theme-card-link,
.theme-card-action,
[data-cart-open],
[data-menu-toggle],
[data-shop-filter-toggle],
[data-shop-clear],
[data-shop-more] button,
[data-theme-form-submit],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	cursor: pointer;
}

button:disabled,
button[disabled],
input:disabled,
.disabled,
a.disabled {
	cursor: not-allowed;
}

.site-logo-img {
	width: auto !important;
	display: block;
}

/* Header logo: the source scales it with a top-left origin transform, so the
   layout slot stays fixed. The height token controls the desktop size and the
   mobile size is three quarters of it, matching the design's h-12 lg:h-16. */
.site-header .site-logo-img {
	height: calc(var(--logo-height, 64px) * 0.75) !important;
}

@media (min-width: 1024px) {
	.site-header .site-logo-img {
		height: var(--logo-height, 64px) !important;
	}
}

.site-logo-text {
	line-height: var(--logo-height, 64px);
	display: block;
}

.site-footer-logo {
	height: auto;
	max-width: 170px;
}

/* Home: hero tucks under the fixed header; inner pages keep the offset. */
body.home .site-main,
body.front-page .site-main {
	padding-top: 0;
}

body:not(.home):not(.front-page) .site-main {
	padding-top: 0;
}

/* Cart drawer ------------------------------------------------------------ */
#theme-cart-drawer {
	transform: translateX(100%);
	transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
	max-height: 100dvh;
}

body.cart-open #theme-cart-drawer {
	transform: translateX(0);
	pointer-events: auto;
}

#theme-cart-drawer .theme-cart-drawer__items {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: hsl(var(--foreground) / 0.6);
	opacity: 0;
	pointer-events: none;
	transition: opacity 300ms ease;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}

#theme-cart-drawer.is-updating .theme-cart-drawer__items {
	opacity: 0.72;
	transition: opacity 120ms ease;
}

#theme-cart-drawer .theme-cart-drawer__items {
	touch-action: pan-y;
}

.theme-cart-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Cart badge: hidden while the cart is empty, matching the design. */
.theme-cart-count:empty {
	display: none;
}

/* Product card overlay link (source pattern A) --------------------------- */
.theme-product-card {
	position: relative;
}

.theme-product-card > .theme-card-link {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: auto;
}

.theme-product-card *:not(.theme-card-link):not(.theme-card-action) {
	pointer-events: none;
}

.theme-product-card .theme-card-action {
	position: relative;
	z-index: 3;
	pointer-events: auto;
}

.theme-product-card-wrap {
	min-width: 0;
}

/* 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,
.single_add_to_cart_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;
}

a.added_to_cart.wc-forward,
.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-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single-product #product-main-img:not(.theme-product-placeholder) {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.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;
}

/* Variation controls: native selects stay in the DOM but are hidden. */
.theme-attr-select-hidden {
	display: none !important;
}

.single-product .variations {
	display: none !important;
}

.single-product .theme-quantity-wrapper input[type='number'] {
	width: 44px;
	-moz-appearance: textfield;
	appearance: textfield;
}

.single-product .theme-quantity-wrapper input[type='number']::-webkit-outer-spin-button,
.single-product .theme-quantity-wrapper input[type='number']::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.theme-product-form .woocommerce-variation-price,
.theme-product-form .woocommerce-variation-availability,
.theme-product-form .woocommerce-variation-description {
	display: none;
}

.theme-product-form .single_variation_wrap {
	margin-bottom: 1.25rem;
}

.theme-product-form .woocommerce-variation.single_variation:empty {
	display: none;
}

/* Image fade used by the product cards before decode. */
.theme-product-card .img-fade-in {
	opacity: 1;
}

/* Product imagery: fill the square frame without the old portrait crop zoom. */
.theme-product-card .relative.aspect-square,
.single-product .theme-product-gallery .aspect-square {
	isolation: isolate;
}

.theme-product-card .relative.aspect-square > img,
.single-product #product-main-img,
.single-product .theme-product-thumb img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center center !important;
}

.theme-product-card .product-zoom {
	transform: translateZ(0) scale(1);
}

.theme-product-card.group:hover .product-zoom {
	transform: translateZ(0) scale(1.06);
}

.theme-product-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: hsl(var(--secondary));
	color: hsl(var(--foreground) / 0.7);
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	padding: 1rem;
}

/* Single product info column rhythm, matching Lovable. */
.single-product .theme-product-info > .theme-product-form,
.single-product .theme-product-info > form.cart {
	margin: 0;
}

.single-product .theme-product-info .theme-product-form .single_variation_wrap {
	margin-bottom: 0;
}

.single-product .theme-product-info h1 {
	max-width: 22ch;
}

.single-product .theme-product-info [data-product-price] {
	letter-spacing: -0.01em;
}

.single-product .theme-product-info .theme-add-to-cart-area {
	margin-top: 0;
}

.single-product .theme-product-info dl + ul {
	margin-top: 1rem;
}

/* Sticky header offset for section anchors. */
section[id],
aside[id] {
	scroll-margin-top: 90px;
}

/* WooCommerce notices, styled with the design tokens where they remain. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	padding: 1rem 1.25rem;
	margin: 0 0 1.25rem;
	border-radius: 0.75rem;
	border: 1px solid hsl(var(--border));
	background: hsl(var(--card));
	color: hsl(var(--foreground));
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.6;
}

.woocommerce-error {
	border-color: hsl(var(--destructive) / 0.5);
	background: hsl(var(--destructive) / 0.08);
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info,
#theme-cart-drawer .woocommerce-message {
	display: none;
}

/* Breadcrumb / shop header spacing on archive pages. */
.woocommerce-products-header {
	margin-bottom: 0;
}

/* Checkout block: full override, scoped to the checkout body class. */
body.woocommerce-checkout .site-main {
	padding-top: 2.5rem;
	padding-bottom: 4rem;
}

body.woocommerce-checkout .entry-content {
	max-width: 100%;
}

body:not(.home):not(.front-page) .entry-content,
body.woocommerce-cart .entry-content,
body.woocommerce-account .entry-content,
body.theme-thankyou-page .entry-content {
	width: 100%;
	padding-bottom: 4rem;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large,
	body.woocommerce-checkout .wc-block-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 {
	grid-column: 1 / -1;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--secondary));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 1.5rem;
}

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,
body.woocommerce-cart .wc-block-components-text-input input,
body.woocommerce-cart .wc-blocks-components-select__select {
	width: 100% !important;
	max-width: none !important;
	font-family: 'Manrope', system-ui, sans-serif !important;
	font-size: 15px !important;
	color: hsl(var(--foreground)) !important;
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: calc(var(--radius) - 4px) !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-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: 'Manrope', system-ui, sans-serif !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	height: 3rem !important;
}

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-components-title,
body.woocommerce-cart .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title {
	font-family: 'Cormorant Garamond', Georgia, serif !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	color: hsl(var(--foreground)) !important;
}

body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-cart .wc-block-cart-items {
	border: 0;
}

body.woocommerce-checkout .wc-block-components-product-name,
body.woocommerce-cart .wc-block-components-product-name {
	font-family: 'Manrope', system-ui, sans-serif !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	color: hsl(var(--foreground)) !important;
}

/* Cart / account / thank-you width parity. */
body.woocommerce-cart .wc-block-cart,
body.woocommerce-account .woocommerce,
body.theme-thankyou-page .woocommerce-order {
	width: 100%;
	max-width: none;
}

body.woocommerce-cart .wc-block-cart {
	display: block;
}

@media (min-width: 768px) {
	body.woocommerce-cart .wc-block-cart .wc-block-components-sidebar-layout,
	body.woocommerce-cart .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
}

body.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 768px) {
	body.woocommerce-account .woocommerce {
		grid-template-columns: 220px 1fr;
	}
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 0.6rem 1rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--border));
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
	text-decoration: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border-color: hsl(var(--primary));
}

/* Thank-you page -------------------------------------------------------- */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
}

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 h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 500;
	letter-spacing: 0;
	font-size: 1.5rem;
	color: hsl(var(--foreground));
	padding: 0 0 1rem 0;
}

body.theme-thankyou-page .woocommerce-order-overview {
	list-style: none;
	margin: 0 0 2rem;
	padding: 1.25rem;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	background: hsl(var(--card));
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 14px;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 0;
	margin: 0;
	padding: 0;
	float: none;
}

body.theme-thankyou-page .woocommerce-customer-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-top: 2rem;
}

body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	background: hsl(var(--card));
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 15px;
	font-style: normal;
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
	padding: 0.6rem 0.25rem;
}

/* Generic WooCommerce table / form elements that still appear on account pages. */
.woocommerce table.shop_table {
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	border-collapse: separate;
	border-spacing: 0;
	background: hsl(var(--card));
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border-top: 1px solid hsl(var(--border));
	padding: 0.75rem 1rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-EditAccountForm input,
.woocommerce-EditAccountForm select {
	width: 100%;
	background: hsl(var(--background));
	border: 1px solid hsl(var(--border));
	border-radius: calc(var(--radius) - 4px);
	padding: 0.6rem 1rem;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--foreground));
}

.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;
}

.woocommerce .button,
.woocommerce button.button.alt,
.woocommerce #respond input#submit {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	border: 1px solid hsl(var(--primary));
	border-radius: 9999px;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 15px;
	font-weight: 500;
	padding: 0.6rem 1.5rem;
}

/* Form status line, shown after an AJAX submission. */
.theme-form-status {
	margin-top: 0.25rem;
}

/* Screen reader text, required by WordPress and WooCommerce markup. */
.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;
}
