/**
 * Theme styles for markup that has no equivalent in the source design
 * (WooCommerce generated output, the cart drawer, WordPress page titles)
 * plus the functional rules the templates rely on.
 */

[hidden] {
	display: none !important;
}

/* Clickable elements use the hand cursor */
a,
button,
summary,
label,
select,
[role="button"],
[role="tab"],
[role="menuitem"],
[data-cart-open],
[data-cart-close],
[data-cart-remove],
[data-menu-toggle],
[data-theme-nav-link],
.theme-thumb,
.theme-attr-pill,
.btn-motion,
.add_to_cart_button,
.single_add_to_cart_button,
input[type="submit"],
input[type="button"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
input[type="file"],
input[type="image"] {
	cursor: pointer !important;
}

a:disabled,
button:disabled,
input:disabled,
select:disabled,
[aria-disabled="true"],
.disabled {
	cursor: not-allowed !important;
}

/* Keep the sticky header below the WordPress admin bar */
body.admin-bar header.sticky {
	top: 32px !important;
}

@media screen and (max-width: 782px) {
	body.admin-bar header.sticky {
		top: 46px !important;
	}
}

@media screen and (max-width: 600px) {
	body.admin-bar header.sticky {
		top: 0 !important;
	}
}

/* Brand text shown next to the logo */
.site-brand-text {
	margin-left: 0.75rem;
}

/* Navigation lists rendered by WordPress */
.theme-nav-list {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.theme-footer-nav li {
	list-style: none;
}

/* Site identity — header 98px and footer 168px match the source design */
.site-logo-img,
.site-header-logo {
	height: var(--logo-height, 98px) !important;
	width: var(--logo-height, 98px) !important;
	display: block;
	object-fit: contain;
}

.site-footer-logo {
	height: 168px !important;
	width: 168px !important;
	display: block;
	object-fit: contain;
}

.site-logo-text {
	line-height: var(--logo-height);
	display: block;
}

/* Product card link must not leave inline gaps */
.theme-card-image-link {
	display: block;
	overflow: hidden;
}

.theme-card-image-link img {
	display: block;
	width: 100%;
}

.theme-product-card {
	height: 100%;
}

.theme-cart-item-link {
	display: block;
	flex: 0 0 auto;
}

/* Cart badge disappears when the box is empty, like the source */
.theme-cart-count:empty {
	display: none;
}

/* Reveal fallbacks */
body.is-customizer [data-reveal],
body.is-customizer [data-reveal="left"],
body.is-customizer [data-reveal="right"],
body.is-customizer [data-reveal="zoom"] {
	opacity: 1 !important;
	transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
	[data-reveal] {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* -------------------------------------------------------------------------
 * Cart drawer + overlay
 * ---------------------------------------------------------------------- */

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 40;
	background: color-mix(in oklab, var(--cocoa) 40%, transparent);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}

#theme-cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}

#theme-cart-drawer > aside {
	transform: translateX(100%);
	transition: transform 0.35s var(--ease-out-soft);
	pointer-events: auto;
}

body.cart-open #theme-cart-drawer > aside {
	transform: translateX(0);
}

#theme-cart-drawer.is-updating > aside > * {
	opacity: 0.6;
	pointer-events: none;
}

/* -------------------------------------------------------------------------
 * Add to cart states
 * ---------------------------------------------------------------------- */

.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;
}

.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;
}

/* Hide the "View cart" link WooCommerce appends after AJAX adds */
.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;
}

/* -------------------------------------------------------------------------
 * Single product
 * ---------------------------------------------------------------------- */

.single-product .theme-product-layout {
	min-width: 0;
}

.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-add-to-cart-area {
	display: flex;
	align-items: stretch;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.theme-product-card .add_to_cart_button,
.theme-product-card .btn-motion {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	text-align: center;
}

.single-product .single_add_to_cart_button,
.theme-add-to-cart-area .add_to_cart_button,
.theme-add-to-cart-area .single_add_to_cart_button {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-width: 160px;
	text-align: center;
}

.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-message,
.single-product .woocommerce-info {
	display: none;
}

#theme-cart-drawer .woocommerce-message {
	display: none;
}

.theme-thumb {
	background: transparent;
	padding: 0;
	line-height: 0;
	border-color: var(--border);
}

.theme-thumb.is-active {
	border-color: var(--primary);
}

.theme-qty-input {
	width: 2rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--cocoa);
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Variations table stacks label above control */
.single-product .variations.shop_attributes tbody,
.single-product .variations tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
	display: block;
	width: 100%;
}

.single-product .variations tbody td.label {
	padding-bottom: 0.25rem;
}

.single-product .variations tbody td.value {
	padding-top: 0;
}

.theme-attr-select-hidden {
	display: none !important;
}

.theme-attr-pill.is-selected {
	background: var(--primary);
	border-color: var(--primary);
	color: var(--primary-foreground);
}

.single_variation_wrap {
	margin-top: 1rem;
}

.single_variation_wrap .woocommerce-variation-price,
.single_variation_wrap .woocommerce-variation-availability {
	color: var(--cocoa);
	margin-bottom: 0.75rem;
}

/* -------------------------------------------------------------------------
 * WordPress page titles
 * ---------------------------------------------------------------------- */

.page-title {
	margin: 0 0 1.5rem;
	font-family: var(--font-display);
	font-size: 2.25rem;
	line-height: 2.5rem;
	font-weight: 600;
	color: var(--cocoa);
}

@media (min-width: 640px) {
	.page-title {
		font-size: 3rem;
		line-height: 1;
	}
}

/* -------------------------------------------------------------------------
 * WooCommerce notices and pagination
 * ---------------------------------------------------------------------- */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--border);
	border-radius: 1rem;
	background: var(--card);
	color: var(--cocoa);
	font-size: 0.95rem;
}

.woocommerce-error {
	border-color: color-mix(in oklab, #b45454 60%, var(--border));
	color: #8c3b3b;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

.woocommerce-pagination {
	margin-top: 3rem;
}

.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.woocommerce-pagination ul li {
	border: 0;
	margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span.current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid var(--border);
	border-radius: 9999px;
	color: var(--cocoa);
	background: var(--card);
	text-decoration: none;
}

.woocommerce-pagination ul li span.current {
	background: var(--primary);
	border-color: var(--primary);
	color: var(--primary-foreground);
}

/* WooCommerce price markup */
.woocommerce-Price-amount {
	font-weight: inherit;
}

del .woocommerce-Price-amount {
	color: var(--muted-foreground);
	font-weight: 400;
}

ins {
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * Checkout (native Checkout Block)
 * ---------------------------------------------------------------------- */

body.woocommerce-checkout .site-main {
	padding-top: 3rem;
	padding-bottom: 4rem;
}

body.woocommerce-checkout .entry-content {
	max-width: 100%;
}

body.woocommerce-checkout .wc-block-checkout {
	display: block;
}

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 {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		gap: 2rem;
		align-items: start;
	}
}

body.woocommerce-checkout .wc-block-checkout__sidebar {
	background-color: var(--card);
	border: 1px solid var(--border);
	border-radius: 1.5rem;
	padding: 1.5rem;
}

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 {
	width: 100% !important;
	max-width: none !important;
	border: 1px solid var(--border) !important;
	border-radius: 0.75rem !important;
	background-color: var(--card) !important;
	color: var(--cocoa) !important;
	font-family: var(--font-body) !important;
	font-size: 1rem !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 {
	border-color: var(--ring) !important;
	box-shadow: 0 0 0 2px var(--ring) !important;
	outline: none !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button,
body.woocommerce-checkout .wc-block-components-button:not(.is-link) {
	border-radius: 9999px !important;
	background-color: var(--primary) !important;
	color: var(--primary-foreground) !important;
	font-weight: 600 !important;
}

body.woocommerce-checkout .wc-block-components-button:not(.is-link):hover {
	opacity: 0.9 !important;
}

body.woocommerce-checkout .wc-block-components-notice-banner {
	border-radius: 1rem !important;
	border-color: var(--border) !important;
	background-color: var(--card) !important;
	color: var(--cocoa) !important;
}

body.woocommerce-checkout .wc-block-cart-items,
body.woocommerce-checkout .wc-block-components-order-summary {
	color: var(--cocoa);
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title {
	font-family: var(--font-display) !important;
	font-weight: 600 !important;
	color: var(--cocoa) !important;
}

body.woocommerce-checkout .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-components-radio-control__label {
	color: var(--cocoa) !important;
}

body.woocommerce-checkout .wc-block-components-totals-item,
body.woocommerce-checkout .wc-block-components-product-name {
	color: var(--cocoa) !important;
}

/* -------------------------------------------------------------------------
 * Thank you page
 * ---------------------------------------------------------------------- */

body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	color: var(--cocoa);
}

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-size: 1.75rem;
	font-weight: 600;
	color: var(--cocoa);
	padding: 0 0 1rem 0;
}

body.theme-thankyou-page .woocommerce-order-overview {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0 0 2rem;
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: 1.5rem;
	background: var(--card);
	list-style: none;
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 0;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	color: var(--muted-foreground);
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	color: var(--cocoa);
	font-size: 1rem;
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}

body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--border);
	text-align: left;
	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-customer-details {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-top: 2rem;
}

body.theme-thankyou-page .woocommerce-customer-details address {
	max-width: 480px;
	overflow-wrap: break-word;
	border: 1px solid var(--border);
	border-radius: 1rem;
	padding: 1rem;
	font-style: normal;
}
