/**
 * WooCommerce UI — ratings, quantity +/- , login center
 */

/* ── Star rating + number ── */
.kr-rating {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0 8px;
}

.kr-rating .star-rating {
	width: 5.4em;
	height: 1.1em;
	line-height: 1.1em;
	margin: 0;
	flex-shrink: 0;
}

.kr-rating .star-rating::before,
.kr-rating .star-rating > span::before {
	font-size: 1.1em;
	color: #ffc400;
}


.kr-rating__number {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
	line-height: 1;
}

.kr-rating__count {
	font-size: 0.75rem;
	color: var(--kr-text-muted, #6b7280);
	font-weight: 500;
	display:none!important;
}

.kr-rating__count--new {
	color: var(--kr-forest-bright, #228b22);
	font-weight: 600;
}

.kr-rating--empty .star-rating > span {
	width: 0 !important;
}

.kr-rating--empty .kr-rating__number {
	display: none;
}

.kedaranchal-theme ul.products li.product .kr-rating {
	justify-content: center;
	width: 100%;
}

.kr-single-rating {
	margin-bottom: 12px;
}

.kr-single-rating .kr-rating {
	margin: 0;
	gap: 8px;
}

.kr-single-rating .kr-rating .star-rating {
	width: 6.4em;
	height: 1.2em;
}

.kr-single-rating .kr-rating__number {
	font-size: 1rem;
}

/* Review form AJAX notices */
.kr-review-notice {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: var(--kr-radius-md, 12px);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.kr-review-notice p {
	margin: 0;
}

.kr-review-notice--success {
	background: rgba(34, 139, 34, 0.1);
	border: 1px solid rgba(34, 139, 34, 0.25);
	color: #1a5c1a;
}

.kr-review-notice--error {
	background: rgba(220, 38, 38, 0.08);
	border: 1px solid rgba(220, 38, 38, 0.22);
	color: #991b1b;
}

/* ── Product card quantity ── */
.kr-qty-wrap {
	display: flex;
	width: 100%;
}

.kr-product-card__btn--cart {
	cursor: pointer;
	border: none;
	font-family: inherit;
}

.kr-product-card__btn--cart.loading {
	pointer-events: none;
	opacity: 0.75;
}

/* ── Quantity +/- buttons ── */
.kedaranchal-theme .quantity,
.kr-qty-wrap .quantity {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 130px;
	height: 42px;
	border: 1.5px solid var(--kr-border, #e8e4df);
	border-radius: var(--kr-btn-radius, 6px);
	background: #fafafa;
	overflow: visible;
	position: relative;
}

.kedaranchal-theme .quantity .qty,
.kr-qty-wrap .quantity .qty {
	flex: 1;
	width: 100%;
	min-width: 0;
	padding: 0 8px !important;
	text-align: center;
	font-size: 0.9375rem !important;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	-moz-appearance: textfield;
}

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

.kedaranchal-theme .quantity .product-qty,
.kr-qty-wrap .quantity .product-qty {
	position: static !important;
	flex: 0 0 36px;
	width: 36px !important;
	height: 36px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: var(--kr-btn-radius, 6px);
	background: var(--kr-white, #fff);
	border: 1px solid var(--kr-border-light, #f0ece4);
	color: var(--kr-saffron, #ff7722);
	transition: background 0.2s, color 0.2s, transform 0.1s;
	user-select: none;
}

.kedaranchal-theme .quantity .product-qty:hover,
.kr-qty-wrap .quantity .product-qty:hover {
	background: var(--kr-saffron-light, #fdf5f0);
	color: var(--kr-saffron-dark, #e8651a);
}

.kedaranchal-theme .quantity .product-qty:active,
.kr-qty-wrap .quantity .product-qty:active {
	transform: scale(0.94);
}

/* Fallback +/- when SVG icon missing */
.kedaranchal-theme .quantity .product-qty[data-qty="minus"]:not(:has(svg))::after,
.kr-qty-wrap .quantity .product-qty[data-qty="minus"]:not(:has(svg))::after {
	content: '−';
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
}

.kedaranchal-theme .quantity .product-qty[data-qty="plus"]:not(:has(svg))::after,
.kr-qty-wrap .quantity .product-qty[data-qty="plus"]:not(:has(svg))::after {
	content: '+';
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1;
}

.kedaranchal-theme .quantity .product-qty .woostify-svg-icon,
.kr-qty-wrap .quantity .product-qty .woostify-svg-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.kedaranchal-theme .quantity .product-qty .woostify-svg-icon svg,
.kr-qty-wrap .quantity .product-qty .woostify-svg-icon svg {
	display: block !important;
	width: 14px;
	height: 14px;
	stroke: currentColor;
}

.kedaranchal-theme .quantity .product-qty .woostify-svg-icon svg path,
.kr-qty-wrap .quantity .product-qty .woostify-svg-icon svg path {
	fill: currentColor;
}

.kedaranchal-theme .loop-product-qty .quantity,
.kr-product-card__actions .quantity {
	max-width: 110px;
	height: 38px;
}

.kedaranchal-theme .products .animated-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.kedaranchal-theme .products .animated-meta .loop-product-qty {
	flex: 0 0 auto;
}

.kedaranchal-theme .products .animated-meta .loop-add-to-cart-btn,
.kedaranchal-theme .products .animated-meta .add_to_cart_button {
	flex: 1;
	min-width: 120px;
}

/* Cart page quantity */
.kedaranchal-theme .woocommerce-cart-form .quantity {
	max-width: 120px;
	margin: 0 auto;
}

/* ── Product card actions (home grid) ── */
.kr-product-card__rating {
	margin-bottom: 2px;
}

.kr-product-card__rating .kr-rating {
	margin: 0;
	gap: 5px;
	justify-content: center;
	width: 100%;
}

.kr-product-card__rating .kr-rating .star-rating {
	width: 4.8em;
	height: 1em;
}

.kr-product-card__rating .kr-rating__number {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
}

.kr-product-card__rating .kr-rating__count {
	font-size: 0.75rem;
	color: var(--kr-text-muted, #6b7280);
}

.kr-product-card__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	margin-top: auto;
	padding-top: 8px;
}

.kr-product-card__actions .kr-qty-wrap {
	flex-shrink: 0;
	display: flex;
	justify-content: center;
}

.kr-product-card__actions .kr-product-card__btn {
	width: 100%;
	flex: none;
	margin-top: 0 !important;
	padding: 8px 14px !important;
	font-size: 13px !important;
	text-transform:uppercase;
	white-space: nowrap;
	text-align: center;
}

/* Login / Register — see assets/css/account-auth.css */

@media (max-width: 480px) {
	.kr-product-card__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.kr-product-card__actions .kr-qty-wrap {
		display: flex;
		justify-content: center;
	}

	.kr-product-card__actions .quantity {
		max-width: 140px;
	}
}

/* ── Mini cart sidebar ── */
/* Parent theme sets .woostify-svg-icon svg { display:none } — restore in cart */
#shop-cart-sidebar .woostify-svg-icon svg {
	display: block !important;
}

#shop-cart-sidebar .mini-cart-product-qty .woostify-svg-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

#shop-cart-sidebar .mini-cart-product-qty .woostify-svg-icon svg {
	width: 12px !important;
	height: 12px !important;
}

#shop-cart-sidebar .mini-cart-product-qty .woostify-svg-icon svg path {
	fill: currentColor;
}

#shop-cart-sidebar .mini-cart-product-qty:has(.woostify-svg-icon)::after,
#shop-cart-sidebar .mini-cart-product-qty:has(svg)::after {
	content: none !important;
	display: none !important;
}

#shop-cart-sidebar .mini-cart-product-qty[data-qty="minus"]:not(:has(svg path))::after,
#shop-cart-sidebar .mini-cart-product-qty[data-qty="plus"]:not(:has(svg path))::after {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1;
}

#shop-cart-sidebar .mini-cart-product-qty[data-qty="minus"]:not(:has(svg path))::after {
	content: '−';
}

#shop-cart-sidebar .mini-cart-product-qty[data-qty="plus"]:not(:has(svg path))::after {
	content: '+';
}

#close-cart-sidebar-btn .woostify-svg-icon svg {
	display: block !important;
	width: 16px !important;
	height: 16px !important;
}

#close-cart-sidebar-btn:not(:has(svg path))::after {
	content: '×';
	font-size: 1.5rem;
	line-height: 1;
	color: var(--kr-text, #1a1a1a);
}

#shop-cart-sidebar {
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	overflow: hidden;
	isolation: isolate;
}

#shop-cart-sidebar .cart-sidebar-head {
	display: flex !important;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 18px 20px;
	height: auto;
	min-height: 58px;
	border-bottom: 1px solid var(--kr-border-light, #f0ece4);
	position: relative;
	z-index: 4;
	background: #fff;
}

#shop-cart-sidebar .cart-sidebar-title {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--kr-font);
	font-size: 1.0625rem;
	font-weight: 700;
	text-transform: none;
	color: var(--kr-text, #1a1a1a);
	margin: 0;
}

#shop-cart-sidebar .cart-sidebar-head .shop-cart-count {
	background: var(--kr-saffron, #ff7722);
	border-radius: 50%;
	min-width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.6875rem;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
	order: 2;
}

#shop-cart-sidebar #close-cart-sidebar-btn {
	order: 3;
	flex-shrink: 0;
	margin-left: auto;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--kr-border-light, #f0ece4);
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	padding: 0;
	margin: 0;
	position: relative !important;
	top: auto !important;
	right: auto !important;
	margin-top: 0 !important;
	transition: border-color 0.2s, background 0.2s;
}

#shop-cart-sidebar #close-cart-sidebar-btn:hover {
	border-color: var(--kr-saffron, #ff7722);
	background: var(--kr-saffron-light, #fdf5f0);
}

/* Mini cart line item — thumb | title + remove / qty | price */
#shop-cart-sidebar .cart-sidebar-content .mini_cart_item,
#shop-cart-sidebar .woocommerce-mini-cart-item,
#shop-cart-sidebar .product_list_widget li.mini_cart_item {
	display: grid !important;
	grid-template-columns: 64px minmax(0, 1fr);
	grid-template-rows: auto auto;
	gap: 8px 12px !important;
	padding: 16px 40px 16px 14px !important;
	min-height: 0 !important;
	position: relative !important;
	border-bottom: 1px solid var(--kr-border-light, #f0ece4);
	list-style: none;
	align-items: start;
	transition: background 0.15s ease;
}

#shop-cart-sidebar .mini_cart_item:hover {
	background: var(--kr-cream, #fdf6ec);
}

#shop-cart-sidebar .mini_cart_item .remove,
#shop-cart-sidebar .mini_cart_item .remove_from_cart_button {
	position: absolute !important;
	top: 16px !important;
	right: 12px !important;
	left: auto !important;
	width: 28px !important;
	height: 28px !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	opacity: 1 !important;
	z-index: 3;
	font-size: 0 !important;
	line-height: 1;
	color: transparent !important;
	background: #fff;
	border-radius: 50%;
	border: 1px solid var(--kr-border-light, #f0ece4);
	overflow: hidden;
	transition: border-color 0.2s, background 0.2s;
}

#shop-cart-sidebar .mini_cart_item .remove .woostify-svg-icon,
#shop-cart-sidebar .mini_cart_item .remove_from_cart_button .woostify-svg-icon {
	display: none !important;
}

#shop-cart-sidebar .mini_cart_item .remove::after,
#shop-cart-sidebar .mini_cart_item .remove_from_cart_button::after {
	content: '×';
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1;
	color: var(--kr-text-muted, #9ca3af);
}

#shop-cart-sidebar .mini_cart_item .remove:hover,
#shop-cart-sidebar .mini_cart_item .remove_from_cart_button:hover {
	border-color: #fecaca;
	background: #fef2f2;
}

#shop-cart-sidebar .mini_cart_item .remove:hover::after,
#shop-cart-sidebar .mini_cart_item .remove_from_cart_button:hover::after {
	color: #dc2626;
}

#shop-cart-sidebar .mini_cart_item .remove:focus::before,
#shop-cart-sidebar .mini_cart_item .remove_from_cart_button:focus::before {
	content: none !important;
	animation: none !important;
	border: none !important;
}

#shop-cart-sidebar .mini_cart_item > a:not(.remove):not(.remove_from_cart_button) {
	display: contents !important;
	text-decoration: none;
	color: var(--kr-text, #1a1a1a);
}

#shop-cart-sidebar .kr-mini-cart-item-thumb {
	grid-column: 1;
	grid-row: 1 / 3;
	width: 64px;
	height: 64px;
	display: block;
	overflow: hidden;
	border-radius: var(--kr-btn-radius, 6px);
	background: #fff;
	border: 1px solid var(--kr-border-light, #f0ece4);
	align-self: start;
}

#shop-cart-sidebar .kr-mini-cart-item-title {
	padding-right: 4px;
	max-width: 100%;
	word-break: break-word;
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	display: block;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	hyphens: auto;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--kr-text, #1a1a1a);
}

#shop-cart-sidebar .mini_cart_item > a:not(.remove) > img {
	grid-column: 1;
	grid-row: 1 / 3;
	align-self: start;
}

#shop-cart-sidebar .product_list_widget img,
#shop-cart-sidebar .cart-sidebar-content .mini_cart_item img,
#shop-cart-sidebar .woocommerce-mini-cart img {
	position: static !important;
	left: auto !important;
	top: auto !important;
	width: 64px !important;
	height: 64px !important;
	max-width: 64px !important;
	max-height: 64px !important;
	margin: 0 !important;
	object-fit: cover;
	border-radius: var(--kr-btn-radius, 6px);
	flex-shrink: 0;
	display: block;
}

@media (min-width: 598px) {
	#shop-cart-sidebar .cart-sidebar-content .mini_cart_item,
	#shop-cart-sidebar .product_list_widget li.mini_cart_item {
		padding-left: 14px !important;
		min-height: 0 !important;
	}
}

#shop-cart-sidebar .mini_cart_item dl.variation {
	grid-column: 2;
	grid-row: 2;
	margin: 0 !important;
	padding: 0;
	font-size: 0.75rem;
	color: var(--kr-text-muted, #6b7280);
}

#shop-cart-sidebar .mini_cart_item:has(dl.variation) .mini-cart-product-infor {
	grid-row: 3;
}

#shop-cart-sidebar .mini_cart_item:has(dl.variation) .kr-mini-cart-item-thumb {
	grid-row: 1 / 4;
}

#shop-cart-sidebar .mini_cart_item .quantity:not(.mini-cart-quantity) {
	display: none !important;
}

#shop-cart-sidebar .mini-cart-product-infor {
	grid-column: 2;
	grid-row: 2;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 !important;
	padding: 0 !important;
	width: 100%;
	min-width: 0;
	flex-wrap: nowrap;
}

/* Beat parent theme .mini-cart-product-infor { height: 24px } rules */
#shop-cart-sidebar .mini-cart-product-infor .mini-cart-quantity {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: stretch !important;
	height: 34px !important;
	min-height: 34px !important;
	max-height: 34px !important;
	border: 1.5px solid var(--kr-border, #e8e4df) !important;
	overflow: hidden !important;
}

#shop-cart-sidebar .mini-cart-product-infor .mini-cart-product-qty {
	position: static !important;
	float: none !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	transform: none !important;
}

@media (max-width: 360px) {
	#shop-cart-sidebar .mini-cart-product-infor {
		flex-wrap: wrap;
		row-gap: 6px;
	}

	#shop-cart-sidebar .mini-cart-product-price,
	#shop-cart-sidebar .kr-mini-cart-line-price {
		margin-left: auto;
	}
}

#shop-cart-sidebar .mini-cart-quantity {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: stretch !important;
	flex: 0 0 auto;
	width: auto;
	min-width: 102px;
	height: 34px !important;
	max-height: 34px;
	border: 1.5px solid var(--kr-border, #e8e4df);
	border-radius: var(--kr-btn-radius, 6px);
	overflow: hidden;
	background: #fff;
	flex-shrink: 0;
	position: static !important;
	z-index: auto;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#shop-cart-sidebar .mini-cart-product-qty {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 100%;
	min-width: 32px;
	min-height: 0;
	flex: 0 0 32px;
	cursor: pointer;
	pointer-events: auto !important;
	position: static !important;
	z-index: auto;
	touch-action: manipulation;
	color: var(--kr-text, #1a1a1a);
	background: #fff;
	transition: background 0.15s ease, color 0.15s ease;
	user-select: none;
	font-size: 0;
	line-height: 1;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

#shop-cart-sidebar .mini-cart-product-qty:hover {
	background: var(--kr-saffron-light, #fdf5f0);
	color: var(--kr-saffron, #ff7722);
}

#shop-cart-sidebar .mini-cart-product-qty[data-qty="minus"] {
	border: none;
	border-right: 1px solid var(--kr-border, #e8e4df);
}

#shop-cart-sidebar .mini-cart-product-qty[data-qty="plus"] {
	border: none;
	border-left: 1px solid var(--kr-border, #e8e4df);
}

#shop-cart-sidebar .mini-cart-quantity input.qty {
	width: 38px;
	min-width: 38px;
	max-width: 38px;
	flex: 0 0 38px;
	height: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	text-align: center;
	font-weight: 700;
	font-size: 0.8125rem;
	padding: 0 !important;
	line-height: 34px;
	background: #fff !important;
	box-sizing: border-box;
	-moz-appearance: textfield;
}

#shop-cart-sidebar .mini-cart-quantity input.qty::-webkit-outer-spin-button,
#shop-cart-sidebar .mini-cart-quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

#shop-cart-sidebar .mini-cart-product-price,
#shop-cart-sidebar .kr-mini-cart-line-price {
	font-weight: 700;
	font-size: 1rem;
	color: var(--kr-saffron, #ff7722);
	white-space: nowrap;
	margin-left: auto;
	flex-shrink: 0;
	text-align: right;
	letter-spacing: -0.01em;
}

#shop-cart-sidebar .cart-sidebar-content {
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	overflow: hidden !important;
	padding: 0;
	-webkit-overflow-scrolling: touch;
}

/* Scrollable product list — footer stays pinned below */
#shop-cart-sidebar .cart-sidebar-content .woocommerce-mini-cart {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	max-width: 100% !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	margin: 0 !important;
	padding: 0 16px !important;
	scrollbar-width: thin;
}

#shop-cart-sidebar .cart-sidebar-content .woocommerce-mini-cart::-webkit-scrollbar {
	width: 5px;
}

#shop-cart-sidebar .cart-sidebar-content .woocommerce-mini-cart::-webkit-scrollbar-thumb {
	background: var(--kr-border, #e8e4df);
	border-radius: 4px;
}

#shop-cart-sidebar .cart-sidebar-content .woocommerce-mini-cart__bottom {
	flex: 0 0 auto !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 12px 16px 16px;
	background: #fff;
	border-top: 1px solid var(--kr-border-light, #f0ece4);
	box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.06);
	position: relative;
	z-index: 6;
}

#shop-cart-sidebar .cart-sidebar-content .woostify-mini-cart-custom-html {
	flex: 0 0 auto;
	width: 100%;
	padding: 0 16px;
}

#shop-cart-sidebar canvas {
	z-index: 1 !important;
	pointer-events: none !important;
}

#shop-cart-sidebar .woocommerce-mini-cart__total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 0 10px;
	margin: 0;
	border-top: none;
	font-size: 0.9375rem;
	font-weight: 600;
	height: auto !important;
	min-height: 0 !important;
	color: var(--kr-text, #1a1a1a);
}

#shop-cart-sidebar .woocommerce-mini-cart__total .amount {
	color: var(--kr-saffron, #ff7722) !important;
	font-size: 1.125rem !important;
	font-weight: 700 !important;
}

#shop-cart-sidebar .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 0;
	margin: 0 !important;
}

#shop-cart-sidebar .cart-sidebar-content .woocommerce-mini-cart__buttons a {
	width: 100% !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 44px !important;
	padding: 0 16px !important;
	border-radius: var(--kr-btn-radius, 6px) !important;
	font-size: 0.8125rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

#shop-cart-sidebar .cart-sidebar-content .woocommerce-mini-cart__buttons a:not(.checkout) {
	background: var(--kr-cream, #fdf6ec) !important;
	color: var(--kr-text, #1a1a1a) !important;
	border: 1.5px solid var(--kr-border, #e8e4df);
}

#shop-cart-sidebar .cart-sidebar-content .woocommerce-mini-cart__buttons a.checkout {
	background: var(--kr-saffron, #ff7722) !important;
	color: #fff !important;
	border: none;
	box-shadow: 0 4px 14px rgba(255, 119, 34, 0.3);
}

html.mini-cart-updating #shop-cart-sidebar .woocommerce-mini-cart {
	pointer-events: none;
	opacity: 0.72;
}

/* Keep cart sharp when sidebar is open (add-to-cart flow) */
html.cart-sidebar-open.mini-cart-updating #shop-cart-sidebar .woocommerce-mini-cart,
html.cart-sidebar-open #shop-cart-sidebar .woocommerce-mini-cart {
	pointer-events: auto;
	opacity: 1;
}

html.cart-sidebar-open.mini-cart-updating #shop-cart-sidebar .cart-sidebar-content,
html.cart-sidebar-open #shop-cart-sidebar .cart-sidebar-content {
	opacity: 1;
	filter: none;
}

html.mini-cart-updating #shop-cart-sidebar .woocommerce-mini-cart__bottom {
	pointer-events: auto;
}

/* ── Woostify overlay (dimmed backdrop behind cart / shop filters) ── */
#woostify-overlay {
	position: fixed;
	inset: 0;
	z-index: 199;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none !important;
	cursor: pointer;
	transition: opacity 0.32s ease, visibility 0.32s ease;
	-webkit-tap-highlight-color: transparent;
}

html:not(.cart-sidebar-open):not(.sidebar-mobile-open) #woostify-overlay {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

html.cart-sidebar-open #woostify-overlay {
	z-index: 10040 !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

html.cart-sidebar-open #woostify-overlay .woostify-svg-icon {
	display: none !important;
}

html.sidebar-mobile-open #woostify-overlay {
	z-index: 10040 !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

html.sidebar-menu-open #woostify-overlay {
	display: none !important;
}

/* ── Smooth cart sidebar motion ── */
#shop-cart-sidebar {
	transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.38s ease !important;
	will-change: transform;
}

html.cart-sidebar-open #shop-cart-sidebar {
	z-index: 10050 !important;
	top: 0 !important;
	bottom: 0 !important;
	height: 100% !important;
	max-height: 100dvh !important;
	transform: translateX(0) !important;
	visibility: visible !important;
	pointer-events: auto !important;
}

html.cart-sidebar-open .main-header,
html.cart-sidebar-open .mobile-header,
html.cart-sidebar-open .kr-mobile-bar,
html.cart-sidebar-open .kr-mobile-nav-overlay {
	z-index: 999 !important;
}

.logged-in.admin-bar html.cart-sidebar-open #shop-cart-sidebar {
	top: 32px !important;
	height: calc(100dvh - 32px) !important;
	max-height: calc(100dvh - 32px) !important;
}

@media (max-width: 782px) {
	.logged-in.admin-bar html.cart-sidebar-open #shop-cart-sidebar {
		top: 46px !important;
		height: calc(100dvh - 46px) !important;
		max-height: calc(100dvh - 46px) !important;
	}
}

#shop-cart-sidebar .cart-sidebar-content {
	transition: opacity 0.28s ease;
}

/* Remove Woostify loading overlay that covers the whole sidebar */
.kedaranchal-theme .updating-cart #shop-cart-sidebar:before,
.kedaranchal-theme .updating-cart #shop-cart-sidebar:after,
.kedaranchal-theme #shop-cart-sidebar:before,
.kedaranchal-theme #shop-cart-sidebar:after,
html.cart-sidebar-open #shop-cart-sidebar:before,
html.cart-sidebar-open #shop-cart-sidebar:after,
body.updating-cart #shop-cart-sidebar:before,
body.updating-cart #shop-cart-sidebar:after {
	content: none !important;
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	animation: none !important;
}

/* Checkout / view-cart buttons stay clickable above backdrop */
#shop-cart-sidebar .woocommerce-mini-cart__buttons,
#shop-cart-sidebar .woocommerce-mini-cart__buttons a {
	position: relative;
	z-index: 2;
	pointer-events: auto !important;
}

/* Remove button — no focus spinner overlap */
.kedaranchal-theme #shop-cart-sidebar .remove_from_cart_button:focus:before,
.kedaranchal-theme #shop-cart-sidebar .remove:focus:before {
	content: none !important;
	display: none !important;
	animation: none !important;
	border: none !important;
}

/* Add-to-cart button loading — single spinner, no theme/WC overlap */
.kedaranchal-theme .add_to_cart_button.loading::before,
.kedaranchal-theme .ajax_add_to_cart.loading::before,
.kedaranchal-theme .kr-product-card__btn.loading::before,
.kedaranchal-theme .product-loop-meta .loading::before,
.kedaranchal-theme .product-loop-meta .add_to_cart_button.loading::before,
.kedaranchal-theme .updating-cart .add_to_cart_button.loading::before {
	content: none !important;
	display: none !important;
	animation: none !important;
	border: none !important;
}

.kedaranchal-theme .ajax_add_to_cart.loading .woostify-svg-icon,
.kedaranchal-theme .add_to_cart_button.loading .woostify-svg-icon {
	display: none !important;
}

.kr-product-card__btn.loading,
.kr-product-card__btn--cart.loading,
.add_to_cart_button.loading,
.single_add_to_cart_button.loading {
	position: relative;
	pointer-events: none;
	min-height: 40px;
}

.kr-product-card__btn--cart.loading {
	color: transparent !important;
}

.kr-product-card__btn--cart.loading::after {
	border-color: rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
}

.kr-product-card__btn.loading,
.add_to_cart_button.loading {
	color: transparent !important;
}

.kr-product-card__btn.loading::after,
.add_to_cart_button.loading::after,
.single_add_to_cart_button.loading::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: kr-btn-spin 0.65s linear infinite;
	z-index: 1;
}

.kr-product-card__btn--outline.loading::after {
	border-color: rgba(255, 119, 34, 0.25);
	border-top-color: var(--kr-saffron, #ff7722);
}

.single_add_to_cart_button.loading::after {
	border-color: rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
}

@keyframes kr-btn-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Cart count pulse on add */
@keyframes kr-cart-badge-pulse {
	0% {
		transform: scale(1);
	}
	45% {
		transform: scale(1.22);
	}
	100% {
		transform: scale(1);
	}
}

.kr-cart-badge-pulse {
	animation: kr-cart-badge-pulse 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
	#shop-cart-sidebar,
	#woostify-overlay,
	#shop-cart-sidebar .cart-sidebar-content,
	.kr-cart-badge-pulse {
		transition: none !important;
		animation: none !important;
	}

	.kr-product-card__btn.loading::after,
	.add_to_cart_button.loading::after,
	.single_add_to_cart_button.loading::after {
		animation: none;
		border-top-color: #fff;
		opacity: 0.7;
	}
}
