/**
 * Theme functional styles.
 *
 * app.css already ships the designed base layer, utilities and animations.
 * This file adds only: functional states, hidden helpers and styling for
 * markup generated by WordPress/WooCommerce that has no designed equivalent.
 */

[hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ Header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-logo-img {
	height: var(--logo-height, 80px);
	width: auto;
	display: block;
}

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

.theme-logo-footer {
	height: 6rem;
	width: auto;
}

.theme-nav-fallback {
	display: flex;
	gap: 1.5rem;
}

/* ------------------------------------------------------------- Announcement */

body:not(.theme-home) .site-header {
	background: hsl(var(--background) / 0.95);
}

/* ------------------------------------------------------------------ Layout */

/* --------------------------------------------------------------- Hero slide */

.theme-hero-slide {
	transition: opacity 1000ms ease, transform 7000ms ease-out;
	will-change: transform;
}

/* The compiled stylesheet only restores pointer events on button descendants. */
.pointer-events-auto,
.theme-hero-content,
.theme-hero-content a,
.theme-hero-content button {
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	.theme-hero-slide {
		transition: opacity 400ms ease;
		transform: none !important;
	}
}

/* ---------------------------------------------------------- Product cards */

.theme-shop-item {
	display: flex;
	min-width: 0;
}

.theme-shop-item > .theme-product-card,
.theme-favorites > .theme-product-card {
	min-width: 0;
}

.theme-price .price,
.theme-product-info .price {
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	color: hsl(var(--foreground) / 0.85);
	display: inline-block;
}

.theme-price .price del,
.theme-product-info .price del {
	opacity: 0.6;
	font-weight: 400;
}

.theme-price .price ins,
.theme-product-info .price ins {
	text-decoration: none;
	font-weight: 400;
}

.theme-price .woocommerce-Price-currencySymbol,
.theme-product-info .woocommerce-Price-currencySymbol {
	font-size: inherit;
}

.theme-product-cta {
	border: 0;
	width: 100%;
	font-family: 'Poppins', sans-serif;
}

.theme-product-cta.is-needs-size {
	opacity: 0.4;
	pointer-events: none;
	cursor: not-allowed;
}

/* Disabled add-to-cart controls must never look interactive. */
.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-product-cta.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,
.theme-product-cta.disabled:hover {
	opacity: 0.4 !important;
}

/* WooCommerce injects a "View cart" link after AJAX add — 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;
}

/* Locked button state while the AJAX request runs. */
.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;
}

/* ---------------------------------------------------------- Range slider */

.price-range-wrapper {
	position: relative;
	height: 1.25rem;
	display: flex;
	align-items: center;
}

.price-range-wrapper .range-track-bg {
	position: relative;
	height: 0.5rem;
	width: 100%;
	border-radius: 9999px;
	background: hsl(var(--secondary));
	pointer-events: none;
}

.price-range-wrapper .range-track-fill {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	height: 0.5rem;
	border-radius: 9999px;
	background: hsl(var(--primary));
	pointer-events: none;
}

.range-input {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	pointer-events: none;
}

.range-input::-webkit-slider-runnable-track {
	background: transparent;
	border: 0;
	height: 100%;
}

.range-input::-moz-range-track {
	background: transparent;
	border: 0;
	height: 100%;
}

.range-input::-webkit-slider-thumb {
	-webkit-appearance: none;
	pointer-events: auto;
	height: 1.25rem;
	width: 1.25rem;
	border-radius: 9999px;
	border: 2px solid hsl(var(--primary));
	background: hsl(var(--background));
	cursor: grab;
	margin-top: 0;
	box-shadow: none;
}

.range-input::-moz-range-thumb {
	pointer-events: auto;
	height: 1.25rem;
	width: 1.25rem;
	border-radius: 9999px;
	border: 2px solid hsl(var(--primary));
	background: hsl(var(--background));
	cursor: grab;
}

.range-input--max {
	z-index: 3;
}

.range-input--min {
	z-index: 4;
}

/* ----------------------------------------------------------- Icon select */

[data-icon-select] [role="listbox"] [role="option"] svg[class*="absolute"] {
	opacity: 0;
	transition: opacity 120ms ease;
}

[data-icon-select] [role="listbox"] [role="option"][aria-selected="true"] svg[class*="absolute"] {
	opacity: 1;
}

/* --------------------------------------------------------- Reviews slider */

[data-reviews-card] {
	touch-action: pan-y;
	user-select: none;
}

[data-review-quote] {
	overflow-wrap: anywhere;
}

/* -------------------------------------------------------- Inquiry dialog */

body.theme-dialog-open {
	overflow: hidden;
}

[data-dialog-content] {
	transition: opacity 200ms ease, transform 200ms ease;
}

[data-dialog-overlay] {
	transition: opacity 200ms ease;
}

[data-dialog-content][data-state="closed"] {
	transform: translate(-50%, -48%) scale(0.97);
}

[data-dialog-content][data-state="open"] {
	transform: translate(-50%, -50%) scale(1);
}

[data-cal-body] .rdp-day {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0 auto;
	border-radius: 9999px;
	font-family: 'Poppins', sans-serif;
	font-size: 0.875rem;
	cursor: pointer;
}

[data-cal-body] .rdp-day:hover:not(:disabled) {
	background: hsl(var(--secondary));
}

[data-cal-body] .rdp-day_outside {
	opacity: 0.45;
}

[data-cal-body] .rdp-day_disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

[data-cal-body] .rdp-day_selected,
[data-cal-body] .rdp-day_selected:hover {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

.rdp-caption_label {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 600;
	font-size: 1.125rem;
}

.rdp-weekday {
	font-family: 'Poppins', sans-serif;
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: hsl(var(--muted-foreground));
	padding: 0.25rem 0;
}

#inquiry-dialog-title,
[data-inquiry-success] h2 {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 600;
}

[data-inquiry-form] input,
[data-inquiry-form] textarea {
	font-family: 'Poppins', sans-serif;
}

/* ------------------------------------------------------------- Side cart */

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 49;
	background: hsl(var(--foreground) / 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 300ms ease, visibility 300ms ease;
	cursor: pointer;
}

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

#theme-cart-drawer {
	position: fixed;
	right: 0;
	top: 0;
	height: 100%;
	width: 100%;
	max-width: 28rem;
	z-index: 50;
	background: hsl(var(--background));
	box-shadow: var(--shadow-elevated);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 300ms var(--transition-smooth), visibility 300ms var(--transition-smooth);
}

body.cart-open #theme-cart-drawer {
	transform: translateX(0);
	visibility: visible;
}

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

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

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

.theme-attr-select-hidden {
	display: none !important;
}

.single-product .theme-add-to-cart-area {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1rem;
}

.single-product .theme-quantity-wrapper {
	border: 1px solid hsl(var(--border));
	display: inline-flex;
	align-items: center;
}

.single-product .theme-add-to-cart-area .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 160px;
	width: auto;
	border: 0;
}

.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-thumb img {
	display: block;
}

.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 .woocommerce-variation-price {
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	margin-bottom: 0.75rem;
}

.single-product .woocommerce-variation-availability {
	font-family: 'Poppins', sans-serif;
	font-size: 0.875rem;
	color: hsl(var(--muted-foreground));
	margin-bottom: 0.75rem;
}

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

.single-product .quantity {
	display: inline-flex;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

.woocommerce-notices-wrapper {
	margin-bottom: 1.5rem;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	margin: 0 0 1rem;
	padding: 1rem 1.25rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.375rem;
	background: hsl(var(--secondary) / 0.6);
	color: hsl(var(--foreground));
	font-family: 'Poppins', sans-serif;
	font-size: 0.875rem;
	line-height: 1.5;
}

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

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
	display: none;
}

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

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

.woocommerce-pagination a,
.woocommerce-pagination span {
	display: grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.5rem;
	border: 1px solid hsl(var(--border));
	border-radius: 9999px;
	font-family: 'Poppins', sans-serif;
	font-size: 0.875rem;
	color: hsl(var(--foreground));
}

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

.woocommerce-result-count,
.woocommerce-ordering {
	font-family: 'Poppins', sans-serif;
	font-size: 0.875rem;
}

.woocommerce-ordering select {
	height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid hsl(var(--border));
	border-radius: 0.375rem;
	background: hsl(var(--background));
	font-family: 'Poppins', sans-serif;
}

/* ------------------------------------------------------------- Checkout */

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

body.woocommerce-checkout .entry-content,
body.woocommerce-cart .entry-content,
body.theme-account-page .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.wc-block-checkout.is-large,
	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-notices {
	grid-column: 1 / -1;
}

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

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button {
	border-radius: 9999px !important;
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
	font-family: 'Poppins', sans-serif !important;
	font-size: 12px !important;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 600;
	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-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-checkout .wc-blocks-components-select .wc-blocks-components-select__select {
	font-family: 'Poppins', sans-serif !important;
	font-size: 16px !important;
	color: hsl(var(--foreground)) !important;
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--border)) !important;
	border-radius: 0.375rem !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 {
	outline: none !important;
	border-color: hsl(var(--primary)) !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-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-cart-item__product .wc-block-cart-item__wrap a {
	font-family: 'Poppins', sans-serif;
}

body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout h1.wp-block-heading,
body.woocommerce-checkout h2.wp-block-heading {
	font-family: 'Cormorant Garamond', Georgia, serif !important;
	font-weight: 600 !important;
	color: hsl(var(--foreground)) !important;
}

body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-checkout .wc-block-components-totals-wrapper {
	border-color: hsl(var(--border)) !important;
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: 0.375rem !important;
	font-family: 'Poppins', sans-serif !important;
}

/* Cart and account pages share the checkout alignment. */
body.theme-cart-page .site-main,
body.theme-account-page .site-main,
body.theme-thankyou-page .site-main {
	padding-bottom: 4rem;
}

.woocommerce-cart-form table.shop_table,
.woocommerce-orders-table,
.woocommerce-table--order-details {
	width: 100%;
	border-collapse: collapse;
	font-family: 'Poppins', sans-serif;
}

.woocommerce-cart-form table.shop_table th,
.woocommerce-cart-form table.shop_table td,
.woocommerce-orders-table th,
.woocommerce-orders-table td,
.woocommerce-table--order-details th,
.woocommerce-table--order-details td {
	border-bottom: 1px solid hsl(var(--border));
	padding: 0.75rem;
	text-align: left;
}

/* --------------------------------------------------- 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 {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 600;
	font-size: 1.75rem;
	padding: 0 0 1rem 0;
	color: hsl(var(--foreground));
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	font-family: 'Poppins', sans-serif;
	font-size: 0.875rem;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 1px solid hsl(var(--border));
	border-radius: 0.375rem;
	padding: 0.875rem 1.25rem;
	background: hsl(var(--secondary) / 0.6);
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-family: 'Poppins', sans-serif;
}

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 address {
	min-width: 0;
	overflow-wrap: break-word;
	font-family: 'Poppins', sans-serif;
	font-style: normal;
}

@media (min-width: 768px) {
	body.theme-thankyou-page .woocommerce-customer-details {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		align-items: start;
	}
}

/* --------------------------------------------------- WordPress basics */

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

.screen-reader-text:focus {
	background-color: hsl(var(--background));
	border-radius: 3px;
	box-shadow: 0 0 2px 2px hsl(var(--foreground) / 0.2);
	clip: auto !important;
	clip-path: none;
	color: hsl(var(--foreground));
	display: block;
	font-size: 0.875rem;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.page-title {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 600;
	margin-top: 2rem;
	margin-bottom: 1rem;
}

.entry-content p {
	font-family: 'Poppins', sans-serif;
	line-height: 1.75;
	margin-bottom: 1.25rem;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.5rem;
	margin-bottom: 1.25rem;
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

/* The card link is a flex column. Without a definite width it shrink-wraps to 0,
   because its only in-flow child is width: 100%. */
.theme-product-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	height: 100%;
}

/* Every product card image fills the same square, regardless of intrinsic size. */
.theme-card-media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	flex-shrink: 0;
}

.theme-card-media img,
.theme-card-image {
	position: absolute !important;
	inset: 0 !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center !important;
}

.theme-hero-content a.theme-hero-cta-secondary:hover,
.theme-hero-content a.theme-hero-cta-secondary:focus-visible {
	background-color: hsl(var(--primary));
	color: hsl(var(--background));
	border-color: hsl(var(--primary));
}

.theme-card-image {
	transition: transform 700ms cubic-bezier(0.25, 0.4, 0.25, 1);
}

/* Request-a-quote dialog: full viewport below the sm breakpoint, 42rem from tablet up. */
@media (max-width: 639px) {
	[data-dialog-root="inquiry"] [data-dialog-content] {
		width: 100%;
		max-width: 100%;
		height: 100dvh;
		max-height: 100dvh;
		border-radius: 0;
	}
}

@media (min-width: 640px) {
	[data-dialog-root="inquiry"] [data-dialog-content] {
		width: 100%;
		max-width: 42rem;
		height: auto;
		max-height: 90vh;
	}
}

.theme-signup-embed {
	display: flex;
	justify-content: center;
	width: 100%;
	text-align: center;
}

.theme-signup-embed > * {
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
}

.theme-product-card:hover .theme-card-image {
	transform: scale(1.04);
}

/* ------------------------------------------------- Customizer preview */

body.is-customizer [data-review-slide],
body.is-customizer .theme-shop-item {
	opacity: 1;
	transform: none;
}
