/* ─── Raw By Ky — WooCommerce CSS Overrides ─────────────────────────────── */
/* Scoped overrides for WooCommerce blocks and archive pages.
   NOT imported from index.css — enqueued separately by tmt_enqueue_assets(). */

/* ─── Header ─────────────────────────────────────────────────────────────── */
.tmt-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	transition: background-color 0.3s ease, border-color 0.3s ease;
	background: transparent;
	border-bottom: 1px solid transparent;
}

.tmt-site-header.is-solid {
	background: hsl(0 0% 0% / 0.95);
	backdrop-filter: blur(8px);
	border-bottom-color: hsl(42 20% 22%);
}

/* ─── Cart badge (matches React header after AJAX fragment replaces markup) ─ */
.tmt-cart-btn .theme-cart-count:not(:empty) {
	position: absolute;
	top: -0.125rem;
	right: -0.125rem;
	width: 1.25rem;
	height: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.625rem;
	font-weight: 500;
	line-height: 1;
	border-radius: 9999px;
	background-color: hsl(42 70% 55%);
	color: #000;
}

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

/* ─── Cart drawer (managed by React in #tmt-cart-root) ───────────────────── */
#tmt-cart-root {
	position: relative;
	z-index: 9998;
}

/* ─── Add to cart button overrides ───────────────────────────────────────── */
.single_add_to_cart_button.button,
.add_to_cart_button.button,
a.single_add_to_cart_button,
a.add_to_cart_button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background-color: hsl(42 70% 55%) !important;
	color: #000 !important;
	border: none !important;
	border-radius: 999px !important;
	cursor: pointer !important;
	transition: opacity 0.2s ease !important;
	font-family: var(--font-body, 'Inter', sans-serif) !important;
}

.single_add_to_cart_button.button:hover,
.add_to_cart_button.button:hover {
	opacity: 0.85 !important;
}

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

/* ─── Button loading state ────────────────────────────────────────────────── */
.ajax_add_to_cart.theme-btn-loading {
	opacity: 0.6 !important;
	pointer-events: none !important;
	cursor: wait !important;
}

/* ─── Hide WC "View cart" link after add ─────────────────────────────────── */
.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;
}

/* ─── Hide WC notices on single product (React CartDrawer provides feedback) */
.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

/* ─── Product grid layout ─────────────────────────────────────────────────── */
.tmt-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.5rem;
	align-items: stretch;
}

.tmt-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.tmt-card-overlay-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.tmt-product-card * {
	pointer-events: none;
}

.tmt-add-to-cart-btn,
.tmt-cart-btn,
[data-cart-open],
[data-cart-close] {
	pointer-events: auto;
	position: relative;
	z-index: 2;
}

/* ─── Page content padding (for header) ──────────────────────────────────── */
.tmt-page-content {
	padding-top: 5rem;
}

@media (min-width: 1024px) {
	.tmt-page-content {
		padding-top: 6rem;
	}
}

/* ─── Checkout: WooCommerce Block overrides ───────────────────────────────── */
body.woocommerce-checkout .tmt-entry-content {
	max-width: 1200px;
	margin: 0 auto;
}

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

/* Checkout: spacing + equal columns without a second grid (layout stays WC Blocks) */
@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-checkout {
		gap: 2rem;
	}

	body.woocommerce-checkout .wc-block-checkout__main,
	body.woocommerce-checkout .wc-block-checkout__sidebar {
		min-width: 0;
		width: auto !important;
		max-width: none !important;
		flex: 1 1 0% !important;
	}
}

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__sidebar {
	background: hsl(0 0% 9%);
	padding: 1.5rem;
	border-radius: 1rem;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-select select {
	width: 100% !important;
	max-width: none !important;
	font-family: var(--font-body, 'Inter', sans-serif) !important;
	color: hsl(42 55% 88%) !important;
	background-color: hsl(0 0% 11%) !important;
	border: 1px solid hsl(42 20% 22%) !important;
	border-radius: 0.5rem !important;
}

body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-select select:focus {
	outline: none !important;
	border-color: hsl(42 70% 55%) !important;
	box-shadow: 0 0 0 2px hsl(42 70% 55% / 0.2) !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(42 70% 55%) !important;
	color: #000 !important;
	border: none !important;
	border-radius: 9999px !important;
	font-family: var(--font-body, 'Inter', sans-serif) !important;
	font-weight: 600 !important;
	width: 100%;
	padding: 0.875rem 2rem !important;
	transition: opacity 0.2s ease !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	opacity: 0.85 !important;
}

/* ─── Thank you page ─────────────────────────────────────────────────────── */
body.woocommerce-order-received .tmt-thankyou .woocommerce-order { }

body.woocommerce-order-received .tmt-thankyou .woocommerce-order-details table {
	width: 100%;
}

body.woocommerce-order-received .tmt-thankyou .woocommerce-order-details tfoot th {
	text-align: left;
}

body.woocommerce-order-received .tmt-thankyou .woocommerce-order-details tfoot td {
	text-align: right;
}

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

/* ─── Single product responsive ──────────────────────────────────────────── */
.tmt-single-product {
	min-height: 100vh;
}

/* ─── Mobile checkout ────────────────────────────────────────────────────── */
@media (max-width: 767px) {
	body.woocommerce-checkout .wc-block-checkout__sidebar {
		margin-top: 2rem;
	}
}

/* ─── WooCommerce notices styling ────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	font-family: var(--font-body, 'Inter', sans-serif) !important;
	border-radius: 0.5rem !important;
	background: hsl(0 0% 9%) !important;
	color: hsl(42 55% 88%) !important;
	border-color: hsl(42 20% 22%) !important;
}

/* ─── Sold out badge ─────────────────────────────────────────────────────── */
.tmt-sold-out-badge {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	padding: 0.25rem 0.6rem;
}

/* ─── Price filter ────────────────────────────────────────────────────────── */
[data-price] {
	position: relative;
}
