/* -------------------------------------------------------------------
 * Functional rules and styling for WordPress/WooCommerce-generated
 * markup only. Elements that carry source classes are styled by
 * app.css and are never restyled here.
 * ----------------------------------------------------------------- */

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

/* ---- Reveal (source fadeUp: opacity 0->1, y 18px->0, .6s, once) ---- */
.theme-reveal {
	opacity: 1;
}

/* The initial offset only applies once JS has confirmed it can observe
   the node, so content is never hidden when the script cannot run. */
.theme-reveal.is-pending {
	opacity: 0;
	transform: translateY(18px);
}

.theme-reveal.is-visible {
	opacity: 1;
	transform: none;
	transition: opacity 0.6s cubic-bezier(0.25, 0.4, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.4, 0.25, 1);
}

body.is-customizer .theme-reveal,
.no-js .theme-reveal {
	opacity: 1 !important;
	transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.theme-reveal,
	.theme-reveal.is-pending {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ---- Logo: one definition for every context (header + footer) ---- */
.site-logo-img {
	height: var(--logo-height, 32px) !important;
	width: auto !important;
	display: block;
}

.site-identity {
	max-width: 100%;
}

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

.site-identity .site-logo-text.theme-header-brand {
	display: inline;
	line-height: 1.2;
}

/* ---- Brand name next to the logo (optional) ---- */
.theme-header-brand {
	margin-left: 0;
}

/* ---- Header state hook (source classes are toggled by main.js) ---- */

/* ---- Cart badge: hidden while the cart is empty (matches the source) ---- */
.theme-cart-count:empty {
	display: none;
}

/* ---- Cart drawer + overlay ---- */
#theme-cart-drawer {
	display: none;
}

body.cart-open #theme-cart-drawer {
	display: block;
}

body.cart-open {
	overflow: hidden;
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 105;
	background: transparent;
	display: none;
}

body.cart-open #theme-cart-overlay {
	display: block;
}

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

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

/* ---- Add to cart: disabled + loading 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,
.theme-single-add.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;
}

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

/* WooCommerce's post-add "View cart" link is not part of the design. */
.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;
}

/* ---- Quantity input inside the theme wrapper ---- */
.theme-quantity-wrapper input.qty,
.theme-quantity-wrapper .theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	border: 0;
	background: transparent;
	color: hsl(var(--charcoal));
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 16px;
	width: 3rem;
	height: 3rem;
	padding: 0;
	text-align: center;
}

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

/* ---- Single product layout ---- */
.single-product .theme-product-layout {
	min-width: 0;
}

.single-product .theme-product-gallery,
.single-product .theme-product-info,
.single-product .theme-product-info-col {
	min-width: 0;
	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 .theme-quantity-wrapper {
	flex: 0 0 auto;
}

.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,
.single-product .theme-product-info {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Variation dropdowns (matches Lovable size select). */
.single-product select.theme-variation-select {
	width: 100%;
	height: 3rem;
	padding: 0 0.75rem;
	background-color: hsl(var(--gallery-white));
	border: 1px solid hsl(var(--muted-grey));
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--charcoal));
	border-radius: 0;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231F2937' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 16px 16px;
	padding-right: 2.5rem;
	cursor: pointer;
}

.single-product select.theme-variation-select:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px hsl(var(--charcoal) / 0.6);
}

.single-product .theme-variation-field + .theme-variation-field {
	margin-top: 1.5rem;
}

/* Variation price / availability block injected by WooCommerce. */
.single-product .single_variation_wrap {
	margin-top: 1.5rem;
}

.single-product .woocommerce-variation-price {
	color: hsl(var(--brick));
	font-size: 1rem;
	margin-bottom: 0.75rem;
}

.single-product .woocommerce-variation-availability p.stock {
	font-size: 14px;
	color: hsl(var(--charcoal) / 0.7);
}

/* Variation form: the theme renders quantity + button inside the wrap. */
.single-product .single_variation_wrap .theme-add-to-cart-area {
	margin-top: 0.5rem;
}

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

.single-product form.variations_form .woocommerce-variation-add-to-cart {
	display: block;
}

/* ---- Product cards: equal height, media ratio ---- */
.theme-product-card-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.theme-product-media {
	height: clamp(320px, 34vw, 440px);
}

.theme-card-title {
	line-height: 1.15;
	font-size: clamp(1.25rem, 1.6vw, 1.5rem);
	min-height: 2.3em;
}

.theme-card-desc {
	min-height: 3.6em;
}

/* ---- Shop / archive notices and pagination ---- */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	border: 1px solid hsl(var(--charcoal) / 0.15);
	background: hsl(var(--gallery-white));
	color: hsl(var(--charcoal));
	list-style: none;
}

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

.woocommerce-message {
	border-left: 3px solid hsl(var(--brick));
}

.woocommerce-info {
	border-left: 3px solid hsl(var(--blush-deep));
}

.woocommerce .woocommerce-pagination ul.page-numbers,
.woocommerce nav.woocommerce-pagination ul {
	display: flex;
	gap: 0.5rem;
	border: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce nav.woocommerce-pagination ul li {
	border: 0;
	margin: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid hsl(var(--charcoal) / 0.2);
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 14px;
	color: hsl(var(--charcoal));
	text-decoration: none;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
	background: hsl(var(--charcoal));
	color: hsl(var(--gallery-white));
	border-color: hsl(var(--charcoal));
}

/* ---- Single product page: notices stay visible but themed ---- */
.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

/* ---- Page title (also used on checkout) ---- */
.page-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 300;
}

/* ---- Checkout Block: full restyle, scoped to the checkout body class -- */
body.woocommerce-checkout .site-main {
	padding-top: 0;
	padding-bottom: 0;
}

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

body.woocommerce-checkout .wc-block-checkout {
	display: block;
	font-family: 'Jost', system-ui, sans-serif;
	color: hsl(var(--charcoal));
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
		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-checkout__main {
	order: 1;
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	order: 2;
}

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

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary {
	background: hsl(var(--canvas-white));
	border: 1px solid hsl(var(--muted-grey) / 0.5);
	padding: 1.5rem;
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title,
body.woocommerce-checkout h2.wc-block-components-title {
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 18px;
	font-weight: 500;
	letter-spacing: -0.01em;
	font-variation-settings: 'wdth' 115, 'wght' 500;
	color: hsl(var(--charcoal));
	border-bottom: 1px solid hsl(var(--muted-grey) / 0.6);
	padding-bottom: 0.75rem;
	margin-bottom: 1.5rem;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .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.components-combobox-control__input {
	background-color: hsl(var(--canvas-white)) !important;
	border: 1px solid hsl(var(--muted-grey)) !important;
	border-radius: 0 !important;
	color: hsl(var(--charcoal)) !important;
	font-family: 'Jost', system-ui, sans-serif !important;
	font-size: 15px !important;
	width: 100% !important;
	max-width: none !important;
	box-shadow: none !important;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-textarea textarea:focus,
body.woocommerce-checkout .wc-block-components-select select:focus {
	border-color: hsl(var(--charcoal)) !important;
	outline: none !important;
	box-shadow: 0 0 0 1px hsl(var(--charcoal)) !important;
}

body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-components-select label,
body.woocommerce-checkout .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-components-radio-control__label {
	font-family: 'Jost', system-ui, sans-serif !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	color: hsl(var(--charcoal)) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--charcoal)) !important;
	color: hsl(var(--gallery-white)) !important;
	border: 0 !important;
	border-radius: 0 !important;
	min-height: 56px;
	font-family: 'Jost', system-ui, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	letter-spacing: 0.02em;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: hsl(var(--charcoal) / 0.9) !important;
	color: hsl(var(--gallery-white)) !important;
}

body.woocommerce-checkout .wc-block-components-button:not(.wc-block-components-checkout-place-order-button) {
	border-radius: 0;
	font-family: 'Jost', system-ui, sans-serif;
}

body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-checkout .wc-block-components-order-summary-item {
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 14px;
	color: hsl(var(--charcoal));
}

body.woocommerce-checkout .wc-block-components-totals-item,
body.woocommerce-checkout .wc-block-components-totals-footer-item {
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 14px;
	color: hsl(var(--charcoal) / 0.8);
}

body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 24px;
	font-variation-settings: 'wdth' 115, 'wght' 500;
	color: hsl(var(--charcoal));
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: 0;
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 15px;
}

/* ---- Cart block page width parity ---- */
body.woocommerce-cart .entry-content .wp-block-woocommerce-cart,
body.woocommerce-account .entry-content {
	max-width: none;
}

/* ---- Thank you page ---- */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	font-family: 'Jost', system-ui, sans-serif;
	color: hsl(var(--charcoal));
}

body.theme-thankyou-page .woocommerce-order > p {
	font-size: 17px;
	line-height: 1.6;
	color: hsl(var(--charcoal) / 0.8);
}

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: 300;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.15;
	padding: 0 0 1rem;
	margin: 2rem 0 0;
	color: hsl(var(--charcoal));
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0 0 2.5rem;
	padding: 1.5rem 0;
	border-top: 1px solid hsl(var(--charcoal) / 0.15);
	border-bottom: 1px solid hsl(var(--charcoal) / 0.15);
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: hsl(var(--charcoal) / 0.6);
}

body.theme-thankyou-page .woocommerce-order-overview li {
	margin: 0;
	border: 0;
	padding: 0;
	float: none;
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.35rem;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: hsl(var(--charcoal));
}

body.theme-thankyou-page .woocommerce-order-details table,
body.theme-thankyou-page .woocommerce-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,
body.theme-thankyou-page .woocommerce-table th,
body.theme-thankyou-page .woocommerce-table td {
	padding: 0.75rem 0;
	border-bottom: 1px solid hsl(var(--charcoal) / 0.1);
	text-align: left;
	vertical-align: top;
	overflow-wrap: break-word;
}

body.theme-thankyou-page .woocommerce-order-details tfoot th {
	text-align: left;
	font-weight: 400;
	color: hsl(var(--charcoal) / 0.7);
}

body.theme-thankyou-page .woocommerce-order-details tfoot td {
	text-align: right;
	font-weight: 500;
}

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.7;
	border: 1px solid hsl(var(--charcoal) / 0.15);
	padding: 1.25rem 1.5rem;
}

/* ---- WooCommerce forms outside the blocks (account, review, address) ---- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-account .woocommerce-Input {
	background-color: hsl(var(--canvas-white));
	border: 1px solid hsl(var(--muted-grey));
	border-radius: 0;
	color: hsl(var(--charcoal));
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 15px;
	min-height: 48px;
	padding: 0 1rem;
	width: 100%;
}

.woocommerce form .form-row label {
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: hsl(var(--charcoal));
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	border-color: hsl(var(--charcoal));
	outline: none;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	background-color: hsl(var(--charcoal));
	color: hsl(var(--gallery-white));
	border: 0;
	border-radius: 0;
	min-height: 48px;
	padding: 0 1.5rem;
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	transition: opacity 0.2s ease;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background-color: hsl(var(--charcoal) / 0.9);
	color: hsl(var(--gallery-white));
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt {
	background-color: hsl(var(--charcoal));
	color: hsl(var(--gallery-white));
}

/* ---- Account tables / order tables ---- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid hsl(var(--charcoal) / 0.15);
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	border-bottom: 1px solid hsl(var(--charcoal) / 0.15);
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 0.9rem 0;
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 15px;
	color: hsl(var(--charcoal) / 0.8);
	text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	color: hsl(var(--charcoal));
}

.woocommerce table.shop_table {
	border: 1px solid hsl(var(--charcoal) / 0.15);
	border-collapse: collapse;
	border-radius: 0;
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 15px;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border-top: 1px solid hsl(var(--charcoal) / 0.1);
	padding: 0.85rem 1rem;
}

/* ---- Checkout (classic) fallback fields, if a shortcode is used ---- */
.woocommerce-checkout .form-row .input-text,
.woocommerce-checkout .form-row select {
	background-color: hsl(var(--canvas-white));
	border: 1px solid hsl(var(--muted-grey));
	border-radius: 0;
	color: hsl(var(--charcoal));
	font-family: 'Jost', system-ui, sans-serif;
	font-size: 15px;
}

/* ---- Responsive: single column checkout on mobile ---- */
@media (max-width: 767px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout {
		display: block;
	}

	body.woocommerce-checkout .wc-block-checkout__sidebar {
		margin-top: 2rem;
	}
}

/* ---- Responsive: product layout columns ---- */
@media (max-width: 1023px) {
	.single-product .theme-product-layout {
		display: block;
	}
}
