:root {
	--anyao-night-bg: #0b0e13;
	--anyao-night-surface: #12161d;
	--anyao-night-surface-2: #171c24;
	--anyao-night-border: rgba(255, 255, 255, 0.11);
	--anyao-night-text: #f4f6f8;
	--anyao-night-muted: #aeb6c2;
	--anyao-night-soft: #d9dee5;
	--anyao-light-accent: #d9ad56;
	--anyao-light-glow: #ffd978;
}

/* Compact toolbar control. Theme button rules are intentionally reset here. */
.anyao-shop-light-control {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 12px 0 0 !important;
	padding: 0 !important;
	clear: none !important;
	vertical-align: middle;
}

.anyao-shop-light-control--manual {
	display: flex !important;
	width: 100% !important;
	margin: 0 0 24px !important;
	justify-content: center !important;
}

.anyao-shop-light-toggle,
button.anyao-shop-light-toggle {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-flow: row nowrap !important;
	flex-wrap: nowrap !important;
	gap: 8px !important;
	box-sizing: border-box !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	height: 42px !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 0 10px 0 12px !important;
	border: 1px solid rgba(17, 24, 39, 0.14) !important;
	border-radius: 11px !important;
	background: rgba(255, 255, 255, 0.92) !important;
	box-shadow: none !important;
	color: #252a33 !important;
	font: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	white-space: nowrap !important;
	cursor: pointer !important;
	transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease !important;
	-webkit-tap-highlight-color: transparent;
}

.anyao-shop-light-toggle:hover {
	border-color: rgba(17, 24, 39, 0.24) !important;
	background: #fff !important;
	box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08) !important;
}

.anyao-shop-light-toggle:focus-visible {
	outline: 2px solid rgba(217, 173, 86, 0.48) !important;
	outline-offset: 2px !important;
}

.anyao-shop-light-toggle__bulb,
.anyao-shop-light-toggle__bulb svg {
	display: block !important;
	width: 17px !important;
	height: 17px !important;
	min-width: 17px !important;
	flex: 0 0 17px !important;
}

.anyao-shop-light-toggle__bulb svg {
	fill: currentColor !important;
	transition: color 180ms ease, filter 180ms ease !important;
}

.anyao-shop-light-toggle__label {
	display: inline-block !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
	white-space: nowrap !important;
}

.anyao-shop-light-toggle__switch {
	position: relative !important;
	display: inline-block !important;
	flex: 0 0 36px !important;
	width: 36px !important;
	height: 20px !important;
	margin: 0 0 0 2px !important;
	padding: 0 !important;
	border-radius: 999px !important;
	background: #d5d9df !important;
	box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.16) !important;
	transition: background-color 180ms ease, box-shadow 180ms ease !important;
}

.anyao-shop-light-toggle__knob {
	position: absolute !important;
	top: 3px !important;
	left: 3px !important;
	display: block !important;
	width: 14px !important;
	height: 14px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 50% !important;
	background: #fff !important;
	box-shadow: 0 1px 4px rgba(17, 24, 39, 0.3) !important;
	transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 180ms ease !important;
}

.anyao-shop-light-toggle[aria-pressed="true"] {
	border-color: rgba(217, 173, 86, 0.42) !important;
	background: #171b21 !important;
	box-shadow: inset 0 0 0 1px rgba(255, 217, 120, 0.03) !important;
	color: #f8e6b7 !important;
}

.anyao-shop-light-toggle[aria-pressed="true"]:hover {
	border-color: rgba(232, 190, 103, 0.62) !important;
	background: #1b2028 !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.anyao-shop-light-toggle[aria-pressed="true"] .anyao-shop-light-toggle__bulb svg {
	filter: drop-shadow(0 0 4px rgba(255, 217, 120, 0.56)) !important;
}

.anyao-shop-light-toggle[aria-pressed="true"] .anyao-shop-light-toggle__switch {
	background: var(--anyao-light-accent) !important;
	box-shadow: inset 0 1px 2px rgba(60, 39, 0, 0.22) !important;
}

.anyao-shop-light-toggle[aria-pressed="true"] .anyao-shop-light-toggle__knob {
	transform: translateX(16px) !important;
	background: #fffaf0 !important;
}

/* Keep the control aligned with result count, sorting and view buttons. */
.anyao-shop-toolbar-has-light-control {
	column-gap: 12px;
}

.anyao-shop-toolbar-has-light-control .anyao-shop-light-control {
	align-self: center !important;
}

/* Night mode is limited to the catalogue area; header and hero stay untouched. */
html.anyao-shop-night-mode body {
	--wd-text-color: var(--anyao-night-muted);
	--wd-title-color: var(--anyao-night-text);
	--wd-link-color: var(--anyao-night-soft);
	--wd-form-brd-color: var(--anyao-night-border);
	--wd-bordered-brd: var(--anyao-night-border);
	--wd-main-bgcolor: var(--anyao-night-bg);
	--bgcolor-white: var(--anyao-night-surface);
}

html.anyao-shop-night-mode body .main-page-wrapper,
html.anyao-shop-night-mode body .site-main,
html.anyao-shop-night-mode body .site-content,
html.anyao-shop-night-mode body .content-area,
html.anyao-shop-night-mode body .shop-content-area,
html.anyao-shop-night-mode body .wd-content-area,
html.anyao-shop-night-mode body .woocommerce,
html.anyao-shop-night-mode body .woocommerce-page {
	background-color: var(--anyao-night-bg) !important;
	color: var(--anyao-night-muted) !important;
}

/* Shop toolbar. */
html.anyao-shop-night-mode body .shop-loop-head,
html.anyao-shop-night-mode body .wd-shop-tools,
html.anyao-shop-night-mode body .shop-toolbar,
html.anyao-shop-night-mode body .woocommerce-products-header,
html.anyao-shop-night-mode body .products-header {
	border-color: var(--anyao-night-border) !important;
	color: var(--anyao-night-muted) !important;
}

html.anyao-shop-night-mode body .woocommerce-result-count,
html.anyao-shop-night-mode body .wd-shop-result-count,
html.anyao-shop-night-mode body .wd-products-per-page,
html.anyao-shop-night-mode body .wd-products-per-page a,
html.anyao-shop-night-mode body .wd-show-sidebar-btn,
html.anyao-shop-night-mode body .wd-show-sidebar-btn a,
html.anyao-shop-night-mode body .shop-loop-head .wd-action-btn,
html.anyao-shop-night-mode body .shop-loop-head .wd-action-btn a,
html.anyao-shop-night-mode body .products-view-grid-list,
html.anyao-shop-night-mode body .products-view-grid-list a,
html.anyao-shop-night-mode body .wd-products-shop-view,
html.anyao-shop-night-mode body .wd-products-shop-view a {
	color: var(--anyao-night-soft) !important;
}

html.anyao-shop-night-mode body .woocommerce-ordering,
html.anyao-shop-night-mode body .wd-sort-select {
	color: var(--anyao-night-soft) !important;
}

html.anyao-shop-night-mode body .woocommerce-ordering select,
html.anyao-shop-night-mode body .wd-sort-select select,
html.anyao-shop-night-mode body .shop-loop-head select,
html.anyao-shop-night-mode body .shop-toolbar select {
	border-color: var(--anyao-night-border) !important;
	background-color: var(--anyao-night-surface) !important;
	color: var(--anyao-night-soft) !important;
	box-shadow: none !important;
}

/* Product cards and every common title structure used by WooCommerce themes. */
html.anyao-shop-night-mode body ul.products li.product,
html.anyao-shop-night-mode body .products > .product,
html.anyao-shop-night-mode body .product-grid-item,
html.anyao-shop-night-mode body .wd-product,
html.anyao-shop-night-mode body .product-item,
html.anyao-shop-night-mode body .product-small,
html.anyao-shop-night-mode body .product-wrapper,
html.anyao-shop-night-mode body .product-inner,
html.anyao-shop-night-mode body .product-item-inner {
	border-color: var(--anyao-night-border) !important;
	background-color: var(--anyao-night-surface) !important;
	color: var(--anyao-night-muted) !important;
	box-shadow: none !important;
}

html.anyao-shop-night-mode body .products .product-element-top,
html.anyao-shop-night-mode body .products .product-image-link,
html.anyao-shop-night-mode body .products .product-image,
html.anyao-shop-night-mode body .products .product-thumbnail,
html.anyao-shop-night-mode body .products .woocommerce-loop-product__link {
	background-color: #050608 !important;
}

html.anyao-shop-night-mode body .products .woocommerce-loop-product__title,
html.anyao-shop-night-mode body .products .woocommerce-loop-product__title a,
html.anyao-shop-night-mode body .products .wd-entities-title,
html.anyao-shop-night-mode body .products .wd-entities-title a,
html.anyao-shop-night-mode body .products .product-title,
html.anyao-shop-night-mode body .products .product-title a,
html.anyao-shop-night-mode body .products .product_name,
html.anyao-shop-night-mode body .products .product_name a,
html.anyao-shop-night-mode body .products .product-name,
html.anyao-shop-night-mode body .products .product-name a,
html.anyao-shop-night-mode body .products li.product h2,
html.anyao-shop-night-mode body .products li.product h2 a,
html.anyao-shop-night-mode body .products li.product h3,
html.anyao-shop-night-mode body .products li.product h3 a,
html.anyao-shop-night-mode body .products li.product h4,
html.anyao-shop-night-mode body .products li.product h4 a,
html.anyao-shop-night-mode body .product-grid-item h2,
html.anyao-shop-night-mode body .product-grid-item h3,
html.anyao-shop-night-mode body .product-grid-item h4,
html.anyao-shop-night-mode body .product-item h2,
html.anyao-shop-night-mode body .product-item h3,
html.anyao-shop-night-mode body .product-item h4 {
	color: var(--anyao-night-text) !important;
}

html.anyao-shop-night-mode body .products li.product > a:not(.button),
html.anyao-shop-night-mode body .products .product-grid-item > a:not(.button),
html.anyao-shop-night-mode body .products .product-item > a:not(.button),
html.anyao-shop-night-mode body .products .wd-product > a:not(.button) {
	color: var(--anyao-night-text) !important;
}

html.anyao-shop-night-mode body .products .price,
html.anyao-shop-night-mode body .products .price .amount,
html.anyao-shop-night-mode body .products .price bdi,
html.anyao-shop-night-mode body .products .woocommerce-Price-amount,
html.anyao-shop-night-mode body .products ins,
html.anyao-shop-night-mode body .products ins .amount {
	color: #f1d18c !important;
}

html.anyao-shop-night-mode body .products del,
html.anyao-shop-night-mode body .products del .amount {
	color: #7f8793 !important;
}

html.anyao-shop-night-mode body .products .product-categories,
html.anyao-shop-night-mode body .products .product-categories a,
html.anyao-shop-night-mode body .products .posted-in,
html.anyao-shop-night-mode body .products .posted-in a,
html.anyao-shop-night-mode body .products .short-description,
html.anyao-shop-night-mode body .products .product-excerpt,
html.anyao-shop-night-mode body .products .star-rating::before {
	color: var(--anyao-night-muted) !important;
}

/* Sidebar and filters. */
html.anyao-shop-night-mode body .sidebar-container,
html.anyao-shop-night-mode body .area-sidebar-shop,
html.anyao-shop-night-mode body .shop-sidebar,
html.anyao-shop-night-mode body .widget-area {
	color: var(--anyao-night-muted) !important;
}

html.anyao-shop-night-mode body .sidebar-container .widget,
html.anyao-shop-night-mode body .area-sidebar-shop .widget,
html.anyao-shop-night-mode body .shop-sidebar .widget,
html.anyao-shop-night-mode body .widget-area .widget {
	border-color: var(--anyao-night-border) !important;
	background-color: var(--anyao-night-surface) !important;
	color: var(--anyao-night-muted) !important;
}

html.anyao-shop-night-mode body .sidebar-container .widget-title,
html.anyao-shop-night-mode body .sidebar-container .widgettitle,
html.anyao-shop-night-mode body .sidebar-container h2,
html.anyao-shop-night-mode body .sidebar-container h3,
html.anyao-shop-night-mode body .sidebar-container h4,
html.anyao-shop-night-mode body .area-sidebar-shop .widget-title,
html.anyao-shop-night-mode body .area-sidebar-shop .widgettitle,
html.anyao-shop-night-mode body .area-sidebar-shop h2,
html.anyao-shop-night-mode body .area-sidebar-shop h3,
html.anyao-shop-night-mode body .area-sidebar-shop h4,
html.anyao-shop-night-mode body .shop-sidebar .widget-title,
html.anyao-shop-night-mode body .shop-sidebar .widgettitle,
html.anyao-shop-night-mode body .widget-area .widget-title {
	color: var(--anyao-night-text) !important;
}

html.anyao-shop-night-mode body .sidebar-container a,
html.anyao-shop-night-mode body .sidebar-container li,
html.anyao-shop-night-mode body .sidebar-container label,
html.anyao-shop-night-mode body .area-sidebar-shop a,
html.anyao-shop-night-mode body .area-sidebar-shop li,
html.anyao-shop-night-mode body .area-sidebar-shop label,
html.anyao-shop-night-mode body .shop-sidebar a,
html.anyao-shop-night-mode body .shop-sidebar li,
html.anyao-shop-night-mode body .shop-sidebar label,
html.anyao-shop-night-mode body .widget-area a,
html.anyao-shop-night-mode body .widget-area li,
html.anyao-shop-night-mode body .widget-area label {
	color: var(--anyao-night-soft) !important;
}

html.anyao-shop-night-mode body input[type="search"],
html.anyao-shop-night-mode body input[type="text"],
html.anyao-shop-night-mode body input[type="number"],
html.anyao-shop-night-mode body .sidebar-container select,
html.anyao-shop-night-mode body .area-sidebar-shop select,
html.anyao-shop-night-mode body .shop-sidebar select,
html.anyao-shop-night-mode body .widget-area select {
	border-color: var(--anyao-night-border) !important;
	background-color: var(--anyao-night-surface-2) !important;
	color: var(--anyao-night-text) !important;
	box-shadow: none !important;
}

html.anyao-shop-night-mode body input::placeholder {
	color: #8f98a5 !important;
	opacity: 1 !important;
}

html.anyao-shop-night-mode body .price_slider_wrapper .ui-widget-content,
html.anyao-shop-night-mode body .widget_price_filter .price_slider_wrapper .ui-widget-content {
	background-color: #313844 !important;
}

html.anyao-shop-night-mode body .price_slider_wrapper .ui-slider-range,
html.anyao-shop-night-mode body .price_slider_wrapper .ui-slider-handle,
html.anyao-shop-night-mode body .widget_price_filter .ui-slider-range,
html.anyao-shop-night-mode body .widget_price_filter .ui-slider-handle {
	background-color: var(--anyao-light-accent) !important;
}

/* Pagination and notices. */
html.anyao-shop-night-mode body .woocommerce-pagination a,
html.anyao-shop-night-mode body .woocommerce-pagination span,
html.anyao-shop-night-mode body .wd-pagination a,
html.anyao-shop-night-mode body .wd-pagination span,
html.anyao-shop-night-mode body .page-numbers a,
html.anyao-shop-night-mode body .page-numbers span {
	border-color: var(--anyao-night-border) !important;
	color: var(--anyao-night-soft) !important;
}

html.anyao-shop-night-mode body .woocommerce-pagination .current,
html.anyao-shop-night-mode body .wd-pagination .current,
html.anyao-shop-night-mode body .page-numbers .current {
	background-color: var(--anyao-light-accent) !important;
	color: #17120a !important;
}

html.anyao-shop-night-mode body .woocommerce-info,
html.anyao-shop-night-mode body .woocommerce-message,
html.anyao-shop-night-mode body .woocommerce-error {
	border-color: var(--anyao-night-border) !important;
	background-color: var(--anyao-night-surface) !important;
	color: var(--anyao-night-soft) !important;
}

/* Stop theme hover images covering the selected illuminated image. */
.anyao-showing-light-image img.hover-img,
.anyao-showing-light-image img.secondary-image,
.anyao-showing-light-image .hover-img img,
.anyao-showing-light-image .product-image-link > img + img {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.anyao-shop-light-switching img.wp-post-image,
.anyao-shop-light-switching img.attachment-woocommerce_thumbnail,
.anyao-shop-light-switching .product-image-link > img:first-of-type {
	opacity: 0.78 !important;
	transform: scale(0.995) !important;
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img,
.product-grid-item img,
.wd-product img,
.product-item img,
.product-small img {
	transition: opacity 180ms ease, transform 220ms ease, filter 240ms ease !important;
}

.anyao-showing-light-image {
	animation: anyao-lamp-on 420ms ease both;
}

@keyframes anyao-lamp-on {
	0% { filter: brightness(0.9); }
	55% { filter: brightness(1.06); }
	100% { filter: brightness(1); }
}

@media (max-width: 767px) {
	.anyao-shop-light-control {
		margin-right: 8px !important;
	}

	.anyao-shop-light-toggle,
	button.anyao-shop-light-toggle {
		height: 40px !important;
		min-height: 40px !important;
		padding-right: 8px !important;
		padding-left: 10px !important;
	}
}

@media (max-width: 480px) {
	.anyao-shop-light-toggle__label {
		display: none !important;
	}

	.anyao-shop-light-toggle,
	button.anyao-shop-light-toggle {
		gap: 7px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.anyao-shop-light-toggle,
	.anyao-shop-light-toggle *,
	.woocommerce ul.products li.product img,
	.woocommerce-page ul.products li.product img,
	.product-grid-item img,
	.wd-product img,
	.product-item img,
	.product-small img,
	.anyao-showing-light-image {
		transition: none !important;
		animation: none !important;
	}
}
