/* ==========================================================================
   Bryant's Loving Care — theme additions
   Only markup with no equivalent in the design, and functional state rules.
   ========================================================================== */

:root {
	--scrim: 193 67% 18%;
	--header-height: 72px;
	--checkout-gap: 2rem;
	--card-radius: var(--radius);
}

@media (min-width: 1280px) {
	:root {
		--header-height: 96px;
	}
}

/* ---------------------------------------------------------- Brand assets */

.site-logo-img {
	height: var(--logo-height) !important;
	width: auto !important;
	display: block;
}

.site-logo-mark {
	height: calc(var(--logo-height) - 4px) !important;
}

.site-logo-text {
	line-height: var(--logo-height);
}

.site-header.is-solid {
	background-color: hsl(var(--background) / 0.95);
}

/* Single product: match ProductDetail.tsx layout (no WC gallery chrome) */
body.theme-single-product .woocommerce-notices-wrapper {
	display: none !important;
}

.single-product-main .theme-product-hero-img {
	position: static !important;
	width: 100%;
	height: auto;
	display: block;
}

.single-product-main .theme-product-price {
	font-family: var(--font-display);
}

.single-product-main .woocommerce-product-gallery,
.single-product-main .woocommerce-tabs,
.single-product-main .product_meta,
.single-product-main .related.products {
	display: none !important;
}

/* Logged-in preview: keep sticky header below the WordPress admin bar */
body.admin-bar .site-header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}

/* Pointer on interactive controls (links without href keep default) */
a[href],
button:not(:disabled),
select,
summary,
[role="button"],
[data-scroll-to],
[data-cart-open],
[data-cart-close],
[data-payment-open],
[data-payment-close],
[data-shop-toggle],
[data-menu-toggle],
[data-faq-toggle],
[data-rating-value],
[data-back-to-top],
.theme-product-thumb,
.theme-attr-pill,
.btn-primary,
.btn-gold,
.btn-outline,
.nav-link {
	cursor: pointer;
}

.site-footer-logo {
	max-width: 100%;
}

/* ---------------------------------------------------------- Hero scrims */

.theme-hero-scrim {
	background: linear-gradient(
		105deg,
		hsl(var(--scrim) / 0.9) 0%,
		hsl(var(--scrim) / 0.68) 38%,
		hsl(var(--scrim) / 0.32) 70%,
		hsl(var(--scrim) / 0.14) 100%
	);
}

.theme-cta-scrim {
	background: linear-gradient(
		100deg,
		hsl(var(--scrim) / 0.94) 0%,
		hsl(var(--scrim) / 0.82) 42%,
		hsl(var(--scrim) / 0.55) 100%
	);
}

/* -------------------------------------------------------- Reveal states */

body.is-customizer [data-cs-fade],
body.is-customizer [data-img-reveal] {
	opacity: 1 !important;
	transform: none !important;
	clip-path: none !important;
}

/* --------------------------------------------------------- Cart drawer */

#theme-cart-root {
	pointer-events: none;
}

body.cart-open #theme-cart-root {
	pointer-events: auto;
}

#theme-cart-overlay {
	opacity: 0;
	pointer-events: none;
	transition: opacity 300ms ease;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}

#theme-cart-drawer {
	transform: translateX(100%);
	transition: transform 300ms ease-out;
}

body.cart-open #theme-cart-drawer {
	transform: translateX(0);
}

#theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}

/* Hide "View cart" injected by WooCommerce after AJAX add-to-cart */
.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 + add to cart */

.theme-quantity-wrapper {
	display: inline-flex;
	align-items: center;
	border: 1px solid hsl(var(--navy) / 0.2);
	border-radius: calc(var(--radius) - 2px);
}

.theme-quantity-wrapper button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	color: hsl(var(--navy));
	transition: opacity 300ms ease;
	cursor: pointer;
}

.theme-quantity-wrapper button:hover {
	opacity: 0.6;
}

.theme-qty-input {
	width: 2.75rem;
	padding: 0.35rem 0;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
	color: hsl(var(--navy));
	appearance: textfield;
	-moz-appearance: textfield;
}

.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.single-product .theme-product-gallery,
.single-product .theme-product-info,
.single-product .theme-product-layout {
	min-width: 0;
	max-width: 100%;
}

.single-product .theme-add-to-cart-area {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.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-description {
	overflow-wrap: break-word;
	word-break: break-word;
}

.single-product .theme-product-description p + p {
	margin-top: 1rem;
}

/* Disabled add to cart state (variable products, out of stock) */
.single_add_to_cart_button.button:disabled:not(.theme-force-enabled),
.single_add_to_cart_button.button.disabled:not(.theme-force-enabled),
.add_to_cart_button.button:disabled,
.add_to_cart_button.button.disabled {
	cursor: not-allowed !important;
	opacity: 0.4 !important;
	pointer-events: none !important;
}

.theme-product-page .variations_form .single_add_to_cart_button:not(:disabled) {
	pointer-events: auto !important;
	opacity: 1 !important;
	cursor: pointer !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;
}

/* Loading state on add to cart buttons */
.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;
}

/* ------------------------------------------------------ Product gallery */

.theme-product-thumbnails {
	display: flex;
	flex-wrap: wrap;
	max-width: 100%;
	gap: 0.75rem;
}

.theme-product-thumb {
	width: 5rem;
	height: 6.25rem;
	padding: 0;
	overflow: hidden;
	border: 1px solid hsl(var(--navy) / 0.15);
	border-radius: calc(var(--radius) - 2px);
	opacity: 0.65;
	transition: opacity 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
	cursor: pointer;
}

.theme-product-thumb:hover,
.theme-product-thumb.is-active {
	opacity: 1;
	border-color: hsl(var(--gold));
	box-shadow: inset 0 0 0 1px hsl(var(--gold));
}

.theme-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* -------------------------------------------------------- Variation UI */

.theme-attr-select-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.theme-product-page .theme-variation-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.theme-product-page .theme-variation-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.1rem;
	border: 1px solid hsl(var(--navy) / 0.25);
	border-radius: 9999px;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: hsl(var(--charcoal));
	transition: transform 300ms ease, background-color 300ms ease, color 300ms ease, border-color 300ms ease, opacity 300ms ease;
	cursor: pointer;
}

.theme-product-page .theme-variation-pill:hover:not(:disabled) {
	transform: translateY(-2px);
}

.theme-product-page .theme-variation-pill.is-selected {
	background: hsl(var(--navy));
	border-color: hsl(var(--navy));
	color: hsl(var(--cream));
}

.theme-product-page .theme-variation-pill:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.theme-attr-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.1rem;
	border: 1px solid hsl(var(--navy) / 0.25);
	border-radius: 9999px;
	font-size: 14px;
	font-weight: 500;
	color: hsl(var(--charcoal));
	transition: transform 300ms ease, background-color 300ms ease, color 300ms ease, border-color 300ms ease;
	cursor: pointer;
}

.theme-attr-pill:hover {
	transform: translateY(-2px);
}

.theme-attr-pill.is-active {
	background: hsl(var(--navy));
	border-color: hsl(var(--navy));
	color: hsl(var(--cream));
}

.single-product .variations tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
	display: block;
	width: 100%;
}

.single-product .variations td.label {
	display: none;
}

.single-product .variations td.value {
	padding: 0;
}

.single-product .single_variation_wrap .woocommerce-variation-price,
.single-product .single_variation_wrap .woocommerce-variation-availability {
	margin-bottom: 1rem;
	font-size: 15px;
	color: hsl(var(--charcoal) / 0.8);
}

/* -------------------------------------------------------- Product cards */

.theme-product-card-wrap {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.theme-product-card-wrap > div {
	flex: 1;
}

.woocommerce-Price-amount {
	color: inherit;
	font: inherit;
}

.woocommerce-Price-amount ins {
	text-decoration: none;
	background: transparent;
}

.woocommerce-Price-amount del {
	opacity: 0.55;
	margin-right: 0.35rem;
}

/* ------------------------------------------------------ Shop pagination */

.woocommerce-pagination ul.page-numbers,
.woocommerce-pagination .page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-pagination .page-numbers li {
	border: 0;
}

.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid hsl(var(--navy) / 0.2);
	border-radius: calc(var(--radius) - 2px);
	color: hsl(var(--charcoal));
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: border-color 300ms ease;
}

.woocommerce-pagination .page-numbers a:hover,
.woocommerce-pagination .page-numbers .current {
	border-color: hsl(var(--gold));
	color: hsl(var(--navy));
}

/* -------------------------------------------------- WooCommerce notices */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message {
	background: hsl(var(--cream));
	border-top: 0;
	border-left: 3px solid hsl(var(--gold));
	border-radius: calc(var(--radius) - 2px);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	color: hsl(var(--charcoal));
	font-size: 15px;
}

.woocommerce-error {
	border-left-color: hsl(var(--tomato));
}

.woocommerce-error li {
	list-style: none;
}

.single-product .woocommerce-message,
.single-product .woocommerce-info,
#theme-cart-drawer .woocommerce-message {
	display: none;
}

/* ------------------------------------------------------- Generic pages */

.page-title {
	margin: 0 0 2rem;
}

.entry-content > * + * {
	margin-top: 1.25rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25rem;
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content a {
	color: hsl(var(--navy));
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: hsl(var(--gold));
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.entry-content th,
.entry-content td {
	padding: 0.75rem;
	border-bottom: 1px solid hsl(var(--border));
	text-align: left;
}

.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;
}

/* ------------------------------------------------------- Checkout block */

body.woocommerce-checkout .site-main,
body.theme-thankyou-page .site-main {
	padding-bottom: 4rem;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
	max-width: none;
}

@media (min-width: 768px) {
	body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large,
	body.woocommerce-checkout .wc-block-checkout__main-parent {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: var(--checkout-gap);
		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__sidebar {
	background-color: hsl(var(--cream));
	border-radius: var(--card-radius);
	padding: 2rem;
	border: 1px solid hsl(var(--navy) / 0.12);
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-button.wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--gold)) !important;
	color: hsl(var(--charcoal)) !important;
	border-radius: calc(var(--radius) - 2px) !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	letter-spacing: 0.08em;
	padding: 0.95rem 1.5rem !important;
	border: 0 !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	opacity: 0.9;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .wc-blocks-components-select__select,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
	background-color: hsl(var(--background)) !important;
	border: 1px solid hsl(var(--navy) / 0.25) !important;
	border-radius: calc(var(--radius) - 2px) !important;
	color: hsl(var(--charcoal)) !important;
	font-family: var(--font-body) !important;
	font-size: 15px !important;
	box-shadow: none !important;
	width: 100% !important;
	max-width: 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-blocks-components-select__select:focus {
	border-color: hsl(var(--gold)) !important;
	outline: none !important;
	box-shadow: 0 0 0 1px hsl(var(--gold)) !important;
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary-item__description,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-product-name,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-order-summary__button-text {
	color: hsl(var(--charcoal));
	font-family: var(--font-body);
}

body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-totals-item__value {
	color: hsl(var(--navy));
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title {
	font-family: var(--font-display) !important;
	color: hsl(var(--charcoal)) !important;
	font-weight: 500 !important;
	letter-spacing: -0.02em;
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	background: hsl(var(--cream)) !important;
	border-radius: calc(var(--radius) - 2px) !important;
	color: hsl(var(--charcoal)) !important;
	border: 1px solid hsl(var(--navy) / 0.15) !important;
}

body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-checkout__main label {
	font-family: var(--font-body);
	font-size: 14px;
	color: hsl(var(--charcoal) / 0.8);
}

body.woocommerce-checkout .entry-content,
body.theme-cart-page .entry-content,
body.theme-account-page .entry-content {
	max-width: 100%;
}

/* --------------------------------------------------- Order received page */

body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	max-width: 900px;
}

body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title,
body.theme-thankyou-page .woocommerce-column__title {
	font-family: var(--font-display);
	font-weight: 500;
	color: hsl(var(--charcoal));
	letter-spacing: -0.02em;
	padding: 0 0 1rem 0;
	font-size: 1.5rem;
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	list-style: none;
	margin: 0 0 2rem;
	padding: 1.25rem;
	background: hsl(var(--cream));
	border-radius: calc(var(--radius) - 2px);
	border: 1px solid hsl(var(--navy) / 0.12);
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 0;
	margin: 0;
	padding: 0;
	font-size: 14px;
	color: hsl(var(--charcoal) / 0.7);
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.25rem;
	font-size: 15px;
	color: hsl(var(--navy));
}

body.theme-thankyou-page .woocommerce-order-details 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 {
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid hsl(var(--border));
	text-align: left;
	vertical-align: top;
}

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 {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
	padding: 1.25rem;
	background: hsl(var(--cream));
	border-radius: calc(var(--radius) - 2px);
	border: 1px solid hsl(var(--navy) / 0.12);
	font-style: normal;
	font-size: 15px;
	line-height: 1.7;
}

/* ------------------------------------------------------- Cart page table */

body.theme-cart-page .wc-block-cart {
	max-width: none;
}

/* ------------------------------------------------------------ Utilities */

.theme-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: hsl(var(--cream));
	color: hsl(var(--charcoal));
	padding: 0.5rem 1rem;
	border-radius: calc(var(--radius) - 2px);
	font-size: 14px;
}

.theme-skip-link:focus {
	left: 0.75rem;
	top: 0.75rem;
}

.theme-page-body {
	padding-top: 2.5rem;
	padding-bottom: 4rem;
}

@media (min-width: 1024px) {
	.theme-page-body {
		padding-top: 3.5rem;
		padding-bottom: 6rem;
	}
}

.theme-404 {
	min-height: 70vh;
	padding: 4rem 0;
}

.theme-out-of-stock {
	background: hsl(var(--navy) / 0.35);
	letter-spacing: 0.08em;
	cursor: not-allowed;
}

.theme-out-of-stock-label {
	color: hsl(var(--tomato));
}

.theme-brand-text {
	display: none;
	margin-left: 0.75rem;
}

@media (min-width: 1024px) {
	.theme-brand-text {
		display: block;
	}
}

/* Cart badge hides when the cart is empty */
.theme-cart-count:empty {
	display: none;
}

/* The hidden attribute must beat Tailwind display utilities */
[hidden] {
	display: none !important;
}
