/* Simply Wicked Handcrafz theme styles.
   Only markup with no source equivalent, plus functional state rules. */

/* WordPress admin bar offset -------------------------------------------- */
body.admin-bar #site-header,
body.admin-bar #theme-scroll-progress {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #site-header,
	body.admin-bar #theme-scroll-progress {
		top: 46px;
	}
}

/* Clickable cursor ------------------------------------------------------ */
a[href],
button:not(:disabled),
[role='button'],
[data-contact-open],
[data-contact-close],
[data-cart-open],
[data-cart-close],
[data-search-open],
[data-search-close],
[data-menu-open],
[data-menu-close],
[data-faq-toggle],
[data-search-category],
summary,
label[for],
select,
input[type='submit'],
input[type='button'],
input[type='reset'],
input[type='checkbox'],
input[type='radio'],
input[type='range'],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	cursor: pointer;
}

button:disabled,
[aria-disabled='true'],
.disabled,
.woocommerce a.button.disabled,
.woocommerce button.button.disabled {
	cursor: not-allowed;
}

#theme-scroll-progress {
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform 0.1s linear;
}

[hidden] {
	display: none !important;
}

body.modal-open {
	overflow: hidden;
}

/* Site identity -------------------------------------------------------- */
.site-logo-img {
	width: auto;
	display: block;
}

.site-logo-text {
	font-family: var(--font-display);
	font-size: 1.5rem;
	line-height: 1.1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: hsl(var(--foreground));
}

.theme-site-logo--header {
	height: var(--logo-height, 114px) !important;
	width: auto !important;
}

@media (min-width: 768px) {
	.theme-site-logo--header {
		height: calc(var(--logo-height, 114px) + 12px) !important;
	}
}

/* Mobile menu ---------------------------------------------------------- */
#theme-mobile-menu {
	z-index: 60;
}

#theme-search {
	z-index: 80;
}

#theme-contact-modal {
	z-index: 90;
}

#theme-mobile-menu .theme-mobile-panel {
	transform: translateX(-100%);
	transition: transform 0.3s ease;
}

body.mobile-menu-open #theme-mobile-menu .theme-mobile-panel {
	transform: translateX(0);
}

#theme-mobile-menu .theme-mobile-overlay {
	opacity: 0;
	transition: opacity 0.3s ease;
}

body.mobile-menu-open #theme-mobile-menu .theme-mobile-overlay {
	opacity: 1;
}

/* Contact modal -------------------------------------------------------- */
#theme-contact-modal .theme-modal-overlay {
	opacity: 0;
	transition: opacity 0.2s ease;
}

#theme-contact-modal .theme-modal-panel {
	opacity: 0;
	transform: translate(-50%, -48%) scale(0.95);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

body.modal-open #theme-contact-modal .theme-modal-overlay {
	opacity: 1;
}

body.modal-open #theme-contact-modal .theme-modal-panel {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* Cart drawer ---------------------------------------------------------- */
#theme-cart-drawer {
	position: fixed;
	right: 0;
	top: 0;
	height: 100%;
	width: 100%;
	max-width: 32rem;
	background: hsl(var(--background));
	z-index: 50;
	box-shadow: var(--shadow-elevated);
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transform: translateY(24px);
	transition: transform 0.4s var(--transition-smooth), opacity 0.4s var(--transition-smooth), visibility 0.4s;
}

body.cart-open #theme-cart-drawer {
	opacity: 1;
	visibility: visible;
	transform: none;
}

#theme-cart-overlay {
	position: fixed;
	inset: 0;
	background: hsl(var(--foreground) / 0.3);
	z-index: 50;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

body.cart-open #theme-cart-overlay {
	opacity: 1;
	pointer-events: auto;
}

#theme-cart-drawer.is-updating > * {
	opacity: 0.6;
	pointer-events: none;
}

.theme-cart-count:empty {
	display: none;
}

.theme-cart-item-meta dl {
	margin: 0;
}

.theme-cart-item-meta dt,
.theme-cart-item-meta dd {
	display: inline;
	margin: 0;
}

.theme-cart-item-meta dt::after {
	content: ': ';
}

.theme-cart-item-meta dd::after {
	content: ' / ';
}

.theme-cart-item-meta dd:last-of-type::after {
	content: '';
}

/* Carousel scroller ---------------------------------------------------- */
.theme-product-scroller {
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.theme-product-scroller::-webkit-scrollbar {
	display: none;
}

/* Product cards in the shop grid -------------------------------------- */
.theme-product-card-wrap {
	display: flex;
	height: 100%;
}

.theme-product-card-wrap > a {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.theme-product-price .woocommerce-Price-amount,
.theme-product-price .woocommerce-Price-currencySymbol {
	font: inherit;
	color: inherit;
}

/* Shop price range ----------------------------------------------------- */
.price-range-wrapper {
	position: relative;
	height: 0.5rem;
}

.range-track-bg,
.range-track-fill {
	position: absolute;
	height: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	border-radius: 9999px;
	pointer-events: none;
}

.range-track-bg {
	left: 0;
	right: 0;
	background: hsl(var(--secondary));
}

.range-track-fill {
	left: 0;
	width: 100%;
	background: hsl(var(--primary));
}

.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-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: pointer;
}

.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: pointer;
}

.range-input:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 2px hsl(var(--ring));
}

.range-input:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 2px hsl(var(--ring));
}

.range-input--max {
	z-index: 3;
}

.range-input--min {
	z-index: 4;
}

/* 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;
}

.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 {
	overflow-wrap: break-word;
	word-break: break-word;
}

.theme-magnifier-lens {
	position: absolute;
	border-radius: 9999px;
	overflow: hidden;
	border: 1px solid hsl(var(--foreground) / 0.3);
	box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
	z-index: 20;
	pointer-events: none;
	transform: translateZ(0);
	transition: opacity 0.15s ease-out;
}

.theme-magnifier-lens img {
	position: absolute;
	max-width: none;
	user-select: none;
}

/* Quantity control ----------------------------------------------------- */
.theme-quantity-wrapper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid hsl(var(--border));
	height: 3.5rem;
}

.theme-quantity-wrapper button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 0.9rem;
	color: hsl(var(--foreground));
	background: transparent;
	transition: background-color 0.2s ease;
}

.theme-quantity-wrapper button:hover {
	background: hsl(var(--secondary));
}

.theme-qty-input {
	width: 3.5rem;
	border: 0;
	background: transparent;
	color: hsl(var(--foreground));
	text-align: center;
	font-family: var(--font-body);
	font-size: 0.875rem;
	-moz-appearance: textfield;
}

.theme-qty-input::-webkit-outer-spin-button,
.theme-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Variable product ----------------------------------------------------- */
.theme-attr-select-hidden {
	display: none !important;
}

.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;
}

.single-product .variations td.label label {
	display: inline-block;
	font-family: var(--font-body);
	font-size: 0.75rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
	margin-bottom: 0.75rem;
}

.theme-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-width: 160px;
	height: 3.5rem;
	padding: 0 2rem;
	border: 1px solid hsl(var(--accent));
	background: hsl(var(--accent));
	color: hsl(var(--accent-foreground));
	font-family: var(--font-body);
	font-size: 0.75rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-btn-primary:hover {
	background: hsl(var(--primary));
	color: hsl(var(--primary-foreground));
}

/* Add to cart 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;
}

.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;
}

.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;
}

/* Notices -------------------------------------------------------------- */
.single-product .woocommerce-message,
.single-product .woocommerce-info {
	display: none;
}

#theme-cart-drawer .woocommerce-message {
	display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background: hsl(var(--secondary));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	color: hsl(var(--foreground));
	font-family: var(--font-body);
	font-size: 0.875rem;
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	list-style: none;
}

.woocommerce-error {
	border-color: hsl(var(--destructive));
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	display: none;
}

/* Page titles ---------------------------------------------------------- */
.page-title {
	font-family: var(--font-display);
	color: hsl(var(--foreground));
}

/* Checkout block ------------------------------------------------------- */
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.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__sidebar {
	background-color: hsl(var(--secondary) / 0.4);
	border-radius: var(--radius);
	padding: var(--section-padding, 2rem);
}

body.woocommerce-checkout .wc-block-components-notice-banner,
body.woocommerce-checkout .wc-block-components-notices {
	grid-column: 1 / -1;
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout .wc-blocks-components-select__select,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
	border: 1px solid hsl(var(--border)) !important;
	border-radius: var(--radius) !important;
	background-color: hsl(var(--background)) !important;
	color: hsl(var(--foreground)) !important;
	font-family: var(--font-body) !important;
	font-size: 0.875rem !important;
	box-shadow: 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-block-components-select select:focus,
body.woocommerce-checkout .wc-blocks-components-select__select:focus,
body.woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus {
	border-color: hsl(var(--foreground)) !important;
	box-shadow: 0 0 0 1px hsl(var(--foreground) / 0.4) !important;
	outline: none !important;
}

body.woocommerce-checkout .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-components-select label,
body.woocommerce-checkout .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-components-radio-control__label,
body.woocommerce-checkout .wc-block-components-order-summary-item__description,
body.woocommerce-checkout .wc-block-components-totals-item {
	color: hsl(var(--foreground));
	font-family: var(--font-body);
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
	background-color: hsl(var(--accent)) !important;
	border: 1px solid hsl(var(--accent)) !important;
	border-radius: 0 !important;
	color: hsl(var(--accent-foreground)) !important;
	font-family: var(--font-body) !important;
	font-size: 0.75rem !important;
	letter-spacing: 0.28em !important;
	text-transform: uppercase !important;
	height: 3rem !important;
	box-shadow: none !important;
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
	background-color: hsl(var(--primary)) !important;
	border-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
}

body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-title,
body.woocommerce-checkout h2,
body.woocommerce-checkout h3 {
	font-family: var(--font-display);
	color: hsl(var(--foreground));
}

body.woocommerce-checkout .wc-block-components-order-summary,
body.woocommerce-checkout .wc-block-components-totals-wrapper {
	border-color: hsl(var(--border));
}

/* Quantity badge: WC uses background:currentColor + span{color:base/#fff}.
   Force a light fill with dark digits so the count stays readable. */
.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity,
body.woocommerce-checkout .wc-block-components-order-summary-item__quantity,
body.woocommerce-cart .wc-block-components-order-summary-item__quantity {
	background: hsl(var(--foreground)) !important;
	background-color: hsl(var(--foreground)) !important;
	border: 2px solid hsl(var(--background)) !important;
	box-shadow: 0 0 0 2px hsl(var(--foreground)) !important;
	color: hsl(var(--foreground)) !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity span,
body.woocommerce-checkout .wc-block-components-order-summary-item__quantity span,
body.woocommerce-cart .wc-block-components-order-summary-item__quantity span {
	color: hsl(var(--background)) !important;
	-webkit-text-fill-color: hsl(var(--background)) !important;
}

/* Cart and account pages ---------------------------------------------- */
body.woocommerce-cart .entry-content,
body.woocommerce-account .entry-content {
	max-width: 100%;
}

body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-account .woocommerce {
	width: 100%;
	max-width: none;
}

body.woocommerce-cart .wc-block-components-sidebar-layout,
body.woocommerce-account .wc-block-components-sidebar-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: start;
}

body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
	min-width: 0;
}

/* Thank you page ------------------------------------------------------- */
body.theme-thankyou-page {
	overflow-x: hidden;
}

body.theme-thankyou-page .woocommerce-order {
	font-family: var(--font-body);
	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 2.5rem;
	padding: 1.5rem;
	background: hsl(var(--secondary) / 0.4);
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
}

body.theme-thankyou-page .woocommerce-order-overview li {
	border: 0;
	margin: 0;
	padding: 0;
	font-size: 0.75rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: hsl(var(--muted-foreground));
}

body.theme-thankyou-page .woocommerce-order-overview li strong {
	display: block;
	margin-top: 0.35rem;
	font-family: var(--font-display);
	font-size: 1rem;
	letter-spacing: 0;
	text-transform: none;
	color: hsl(var(--foreground));
}

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);
	color: hsl(var(--foreground));
	padding: 0 0 1rem 0;
}

body.theme-thankyou-page .woocommerce-order-details table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-family: var(--font-body);
	font-size: 0.875rem;
}

body.theme-thankyou-page .woocommerce-order-details th,
body.theme-thankyou-page .woocommerce-order-details td {
	border-color: hsl(var(--border));
	padding: 0.75rem 0;
	text-align: left;
}

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;
	font-family: var(--font-body);
	font-style: normal;
	line-height: 1.7;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 1.5rem;
}

/* WooCommerce forms (classic fallbacks) ------------------------------- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border: 1px solid hsl(var(--border));
	background: hsl(var(--background));
	color: hsl(var(--foreground));
	border-radius: var(--radius);
	font-family: var(--font-body);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	border-color: hsl(var(--foreground));
	outline: none;
}

.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;
}
