/* ==========================================================================
   Gus Bradt's Art Store - functional styles and WordPress/WooCommerce markup.
   Source classes and their compiled utilities live in app.css; this file only
   covers markup that does not exist in the original design plus functional
   state hooks.
   ========================================================================== */

:root {
	--header-height: 108px;
	--checkout-gap: 2rem;
}

/* Customizer preview: reveal targets must always be visible while editing. */
body.is-customizer [data-reveal] {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

body.is-customizer .kb-slide {
	animation: none !important;
	opacity: 1;
	transform: none;
}

body.is-customizer .kb-slide ~ .kb-slide {
	opacity: 0;
}

/* --------------------------------------------------------------------------
   Quantity control (numeric input replaces the design's text readout)
   -------------------------------------------------------------------------- */

.site-logo-img {
	height: var(--logo-height) !important;
	width: auto !important;
	display: block;
}

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

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

.theme-qty-input {
	-moz-appearance: textfield;
	appearance: textfield;
	width: 44px;
	border: 0;
	background: transparent;
}

.single-product .single_add_to_cart_button,
.single-product [data-theme-buy-now-variation] {
	flex: 1 1 auto;
	min-width: 160px;
}

.single-product [data-theme-buy-now-variation]:disabled {
	cursor: not-allowed;
	opacity: 0.4;
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Cart badge, drawer and overlay
   -------------------------------------------------------------------------- */

.theme-cart-count:empty {
	display: none;
}

#theme-cart-overlay {
	display: none;
}

body.cart-open #theme-cart-overlay {
	display: block;
	animation: fade-in 0.7s ease-out both;
}

#theme-cart-drawer {
	visibility: hidden;
	transform: translateX(100%);
}

body.cart-open #theme-cart-drawer {
	visibility: visible;
	transform: none;
	animation: slide-in-bottom 0.7s ease-out both;
}

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

/* --------------------------------------------------------------------------
   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 {
	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-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;
}

/* --------------------------------------------------------------------------
   Shared page heading for WordPress pages
   -------------------------------------------------------------------------- */

.page-title {
	font-family: 'Instrument Serif', Georgia, serif;
	font-weight: 400;
	font-size: 2.25rem;
	line-height: 1.05;
	letter-spacing: 0;
	color: hsl(var(--foreground));
	margin: 0 0 2.5rem;
}

@media (min-width: 768px) {
	.page-title {
		font-size: 3rem;
	}
}

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

/* --------------------------------------------------------------------------
   Variable product attribute pills (no source equivalent: the design has no
   variation UI, so these follow the design's button language).
   -------------------------------------------------------------------------- */

.theme-variation-pills {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-bottom: 1.5rem;
}

.theme-variation-label {
	margin: 0 0 0.625rem;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: hsl(var(--foreground) / 0.55);
}

.theme-variation-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.theme-attr-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	padding: 0.55rem 1rem;
	border: 1px solid hsl(var(--foreground) / 0.25);
	border-radius: 9999px;
	background-color: transparent;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: hsl(var(--foreground) / 0.75);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-attr-pill:hover {
	border-color: hsl(var(--foreground));
}

.theme-attr-pill.is-active {
	background-color: hsl(var(--foreground));
	border-color: hsl(var(--foreground));
	color: hsl(var(--background));
}

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

/* --------------------------------------------------------------------------
   Single product: WooCommerce generated markup
   -------------------------------------------------------------------------- */

.single-product .variations {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1rem;
}

.single-product .variations tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
	display: block;
	width: 100%;
}

.single-product .variations tbody td.label {
	display: none;
	padding: 0 0 0.25rem;
}

.single-product .variations tbody td.value {
	padding: 0;
}

.single-product .variations label {
	display: block;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: hsl(var(--foreground) / 0.55);
}

.single-product .variations select,
.single-product .woocommerce-variation-add-to-cart .qty {
	display: block;
	width: 100%;
	height: 3rem;
	border: 1px solid hsl(var(--foreground) / 0.15);
	border-radius: 0.25rem;
	background-color: hsl(var(--ivory));
	padding: 0 1rem;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 14px;
	color: hsl(var(--foreground));
}

.single-product .variations select:focus {
	border-color: hsl(var(--primary));
	outline: none;
}

.single-product .woocommerce-variation-price,
.single-product .woocommerce-variation-availability,
.single-product .woocommerce-variation-description {
	font-size: 14px;
	color: hsl(var(--foreground) / 0.75);
	margin-bottom: 0.75rem;
}

.single-product .woocommerce-variation-price .price {
	font-size: 20px;
	font-weight: 500;
	color: hsl(var(--foreground) / 0.9);
}

.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-add-to-cart-area {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 0.75rem;
}

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

.theme-product-details ul,
.theme-product-details ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.theme-product-details li {
	position: relative;
	padding-left: 1.25rem;
	margin-bottom: 0.625rem;
	line-height: 1.6;
}

.theme-product-details li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.65rem;
	width: 0.25rem;
	height: 0.25rem;
	border-radius: 9999px;
	background-color: hsl(var(--primary));
}

.theme-product-details p {
	margin: 0 0 0.75rem;
}

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

/* --------------------------------------------------------------------------
   WooCommerce notices (kept visible where the design has no feedback path)
   -------------------------------------------------------------------------- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid hsl(var(--foreground) / 0.15);
	border-radius: 0.5rem;
	background-color: hsl(var(--linen));
	color: hsl(var(--foreground) / 0.8);
	font-size: 14px;
	line-height: 1.6;
}

.woocommerce-error {
	background-color: hsl(var(--accent) / 0.12);
	border-color: hsl(var(--accent) / 0.4);
	color: hsl(var(--foreground));
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 2.5rem;
	padding: 0 1.25rem;
	margin-left: 0.75rem;
	border-radius: 9999px;
	background-color: hsl(var(--primary));
	border: 1px solid hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Cart, account and order pages
   -------------------------------------------------------------------------- */

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

.woocommerce-cart .woocommerce,
.woocommerce-account .woocommerce {
	font-size: 15px;
	color: hsl(var(--foreground) / 0.8);
}

.woocommerce-cart table.cart,
.woocommerce-account table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td,
.woocommerce-account table th,
.woocommerce-account table td {
	padding: 1rem 0.75rem;
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
	text-align: left;
	vertical-align: middle;
}

.woocommerce-cart table.cart img {
	width: 80px;
	height: 96px;
	object-fit: cover;
	border-radius: 0.375rem;
	background-color: hsl(var(--bone));
}

.woocommerce-cart .quantity input.qty,
.woocommerce-account input.input-text {
	height: 2.75rem;
	width: 5rem;
	border: 1px solid hsl(var(--foreground) / 0.15);
	border-radius: 0.25rem;
	background-color: hsl(var(--ivory));
	padding: 0 0.75rem;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 14px;
	color: hsl(var(--foreground));
}

.woocommerce-cart .button,
.woocommerce-account .button,
.woocommerce-cart button.button,
.woocommerce-cart a.button.alt,
.woocommerce-account .woocommerce-Button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 3rem;
	padding: 0 1.75rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--primary));
	background-color: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.woocommerce-cart .button:hover,
.woocommerce-account .button:hover {
	background-color: hsl(var(--primary) / 0.9);
}

.woocommerce-cart .cart_totals {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: 1rem;
	padding: 1.5rem;
}

.woocommerce-cart .cart_totals h2,
.woocommerce-account h2,
.woocommerce-account h3 {
	font-family: 'Instrument Serif', Georgia, serif;
	font-weight: 400;
	font-size: 1.5rem;
	color: hsl(var(--foreground));
	margin-bottom: 1rem;
}

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

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

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

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

body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
	min-width: 0;
	width: 100%;
	max-width: none;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout,
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--checkout-gap, 2rem);
		align-items: start;
	}
}

body.woocommerce-checkout .wc-block-checkout__main {
	padding: 0;
}

body.woocommerce-checkout .wc-block-components-checkout-step__title,
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__heading {
	font-family: 'Instrument Serif', Georgia, serif;
	font-weight: 400;
	color: hsl(var(--foreground));
}

body.woocommerce-checkout .wc-block-components-checkout-step__description,
body.woocommerce-checkout .wc-block-components-checkout-order-summary__title,
body.woocommerce-checkout .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-components-totals-item {
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 14px;
	color: hsl(var(--foreground) / 0.75);
}

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,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
	font-family: 'Geist', system-ui, sans-serif !important;
	font-size: 14px !important;
	color: hsl(var(--foreground)) !important;
	border: 1px solid hsl(var(--foreground) / 0.15) !important;
	border-radius: 0.25rem !important;
	background-color: hsl(var(--ivory)) !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-block-components-textarea:focus,
body.woocommerce-checkout .wc-block-components-combobox .components-combobox-control__input:focus {
	border-color: hsl(var(--primary)) !important;
	outline: none !important;
	box-shadow: none !important;
}

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

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: 1rem;
	padding: 1.5rem;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-wrapper {
	background-color: transparent;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 3rem;
	padding: 0 1.75rem;
	border-radius: 9999px;
	border: 1px solid hsl(var(--primary));
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-transform: none;
}

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

body.woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: 0.5rem;
	background-color: hsl(var(--linen));
	color: hsl(var(--foreground));
	font-family: 'Geist', system-ui, sans-serif;
	font-size: 14px;
}

body.woocommerce-checkout .wc-block-components-notice-banner.is-error {
	background-color: hsl(var(--accent) / 0.12);
	border-color: hsl(var(--accent) / 0.4);
}

/* --------------------------------------------------------------------------
   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: 'Instrument Serif', Georgia, serif;
	font-weight: 400;
	font-size: 1.5rem;
	color: hsl(var(--foreground));
	padding: 0 0 1rem;
}

body.theme-thankyou-page .woocommerce-order-details table,
body.theme-thankyou-page .woocommerce-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 14px;
	color: hsl(var(--foreground) / 0.8);
}

body.theme-thankyou-page .woocommerce-order-details th,
body.theme-thankyou-page .woocommerce-order-details td {
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
	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-order-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 0 0 2rem;
	padding: 1.5rem;
	background-color: hsl(var(--linen));
	border-radius: 1rem;
	font-size: 14px;
	color: hsl(var(--foreground) / 0.75);
}

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

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: 14px;
	line-height: 1.7;
	color: hsl(var(--foreground) / 0.75);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	#theme-cart-drawer,
	#theme-cart-overlay {
		animation: none !important;
	}
}
