/* DW Shop Sidebar - inherits fonts, text color and buttons from the active theme. */

.dwss-scope {
	/* Accent: picks up the theme's brand color (Solace, Blocksy, Elementor, Astra, Kadence, block themes).
	   Anything set under WooCommerce > DW Shop Sidebar overrides these. */
	--dwss-accent: var(--sol-color-button-initial, var(--theme-palette-color-1, var(--e-global-color-accent, var(--ast-global-color-0, var(--global-palette1, var(--wp--preset--color--primary, currentColor))))));
	--dwss-on-accent: #fff;
	--dwss-bg: var(--dwss-bg-auto, var(--sol-color-background, var(--wp--preset--color--base, #fff)));
	--dwss-card-bg: transparent;
	--dwss-line: color-mix(in srgb, currentColor 14%, transparent);
	--dwss-soft: color-mix(in srgb, currentColor 6%, transparent);
	--dwss-radius: 12px;
	--dwss-gap: 20px;
	--dwss-width: 280px;
	accent-color: var(--dwss-accent);
}
.dwss-scope *, .dwss-scope *::before, .dwss-scope *::after { box-sizing: border-box; }

.dwss-layout {
	display: grid;
	grid-template-columns: minmax(200px, var(--dwss-width)) minmax(0, 1fr);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: start;
	clear: both;
	width: 100%;
}
.dwss-layout.dwss-pos-right { grid-template-columns: minmax(0, 1fr) minmax(200px, var(--dwss-width)); }
.dwss-layout.dwss-pos-right > .dwss-sidebar { order: 2; }
.dwss-main { min-width: 0; }
.dwss-main::after { content: ""; display: table; clear: both; }

.dwss-sidebar,
.dwss-widget {
	display: flex;
	flex-direction: column;
	gap: var(--dwss-gap);
	font: inherit;
	color: inherit;
}
.dwss-sidebar.dwss-sticky { position: sticky; top: 2rem; }
.dwss-scope .dwss-title--outside { margin: 0; font-size: 1.05rem; }
.dwss-minicart.dwss-hide-empty:has(.dwss-empty) { display: none; }
.dwss-notice { padding: 1rem; border: 1px dashed rgba(127,127,127,.6); border-radius: 8px; text-align: center; font-size: .9rem; }

.dwss-drawer-head, .dwss-mobilebar, .dwss-overlay { display: none; }
.dwss-drawer-ph { display: none; }

/* Cards */
.dwss-card {
	border: 1px solid var(--dwss-line);
	border-radius: var(--dwss-radius);
	padding: 1.1rem;
	margin: 0;
	background: var(--dwss-card-bg);
}
.dwss-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	margin-bottom: .9rem;
}
.dwss-scope .dwss-title {
	display: flex;
	align-items: center;
	gap: .45rem;
	margin: 0;
	padding: 0;
	font-size: 1rem;
	line-height: 1.3;
}
.dwss-clear { font-size: .85em; text-decoration: underline; white-space: nowrap; }

/* Filter groups */
.dwss-group {
	border: 0;
	border-top: 1px solid var(--dwss-line);
	margin: 0;
	padding: .9rem 0;
	min-width: 0;
}
.dwss-group legend {
	float: left;
	width: 100%;
	padding: 0;
	margin: 0 0 .6rem;
	font-size: .78em;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .7;
}
.dwss-group legend + * { clear: both; }

.dwss-scope .dwss-list { list-style: none; margin: 0; padding: 0; }
.dwss-scope .dwss-list li { margin: 0; padding: 0; list-style: none; }
.dwss-scope .dwss-list:not(.dwss-list--child) { max-height: 260px; overflow-y: auto; }
.dwss-scope .dwss-list--child { padding-left: 1.5rem; }
.dwss-check,
.dwss-list--links li {
	display: flex;
	align-items: center;
	gap: .55rem;
	padding: .3rem 0;
	margin: 0;
	cursor: pointer;
	font-weight: inherit;
}
.dwss-check input { width: 1rem; height: 1rem; margin: 0; flex: none; }
.dwss-check span:nth-of-type(1), .dwss-list--links a { flex: 1; min-width: 0; }
.dwss-list--links a.is-current { font-weight: 600; color: var(--dwss-accent); }
.dwss-count {
	font-size: .75em;
	padding: .1em .55em;
	border-radius: 99px;
	background: var(--dwss-soft);
	opacity: .8;
}

/* Price */
.dwss-price-inputs { display: flex; align-items: flex-end; gap: .5rem; }
.dwss-price-inputs label { flex: 1; min-width: 0; margin: 0; font-size: .8em; }
.dwss-price-inputs label span { display: block; margin-bottom: .25rem; opacity: .7; }
.dwss-price-inputs input { width: 100%; min-width: 0; margin: 0; font-size: 1rem; }
.dwss-dash { padding-bottom: .55rem; opacity: .5; }

.dwss-range { position: relative; height: 28px; margin: .2rem 0 .7rem; }
.dwss-range[hidden] { display: none; }
.dwss-range-track {
	position: absolute; left: 0; right: 0; top: 50%;
	height: 4px; margin-top: -2px; border-radius: 4px;
	background: var(--dwss-line);
}
.dwss-range-fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--dwss-accent); }
.dwss-range input[type="range"] {
	-webkit-appearance: none; appearance: none;
	position: absolute; left: 0; top: 0; width: 100%; height: 28px;
	margin: 0; padding: 0; border: 0; background: none; box-shadow: none;
	pointer-events: none;
}
.dwss-range input[type="range"]::-webkit-slider-runnable-track { background: none; border: 0; height: 28px; }
.dwss-range input[type="range"]::-moz-range-track { background: none; border: 0; }
.dwss-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	pointer-events: auto; cursor: grab;
	width: 20px; height: 20px; margin-top: 4px; border-radius: 50%;
	background: var(--dwss-bg); border: 2px solid var(--dwss-accent);
	box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.dwss-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto; cursor: grab;
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--dwss-bg); border: 2px solid var(--dwss-accent);
	box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.dwss-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--dwss-accent); outline-offset: 2px; }
.dwss-range input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--dwss-accent); outline-offset: 2px; }

/* On-sale toggle */
.dwss-toggle { display: flex; align-items: center; gap: .65rem; margin: 0; cursor: pointer; font-weight: inherit; }
.dwss-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.dwss-switch {
	position: relative; flex: none;
	width: 40px; height: 22px; border-radius: 99px;
	background: var(--dwss-line);
	transition: background .2s;
}
.dwss-switch::after {
	content: ""; position: absolute; top: 3px; left: 3px;
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--dwss-bg); box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: transform .2s;
}
.dwss-toggle input:checked + .dwss-switch { background: var(--dwss-accent); }
.dwss-toggle input:checked + .dwss-switch::after { transform: translateX(18px); }
.dwss-toggle input:focus-visible + .dwss-switch { outline: 2px solid var(--dwss-accent); outline-offset: 2px; }

.dwss-scope .dwss-apply { width: 100%; margin: .2rem 0 0; text-align: center; }

/* Badges */
.dwss-badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 1.5em; height: 1.5em; padding: 0 .4em;
	border-radius: 99px; font-size: .72em; font-weight: 700; line-height: 1;
	background: var(--dwss-accent); color: var(--dwss-on-accent);
}
.dwss-badge.is-empty { background: var(--dwss-soft); color: inherit; }

/* Mini cart */
.dwss-empty { margin: 0; font-size: .9em; opacity: .7; }
.dwss-scope .dwss-cart-items { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.dwss-scope .dwss-cart-item {
	display: flex; align-items: center; gap: .7rem;
	margin: 0; padding: .6rem 0; list-style: none;
	border-top: 1px solid var(--dwss-line);
}
.dwss-cart-thumb { flex: none; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--dwss-soft); }
.dwss-scope .dwss-cart-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; float: none; }
.dwss-cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.dwss-cart-name {
	font-size: .9em; font-weight: 600; line-height: 1.3; text-decoration: none;
	overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dwss-cart-meta { font-size: .8em; opacity: .75; }
.dwss-scope a.dwss-cart-remove {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 24px; height: 24px; border-radius: 50%;
	font-size: 18px; line-height: 1; text-decoration: none;
	color: inherit; background: var(--dwss-soft); opacity: .7;
	transition: opacity .15s, background .15s;
}
.dwss-scope a.dwss-cart-remove:hover { opacity: 1; background: var(--dwss-line); color: inherit; }
.dwss-cart-total {
	display: flex; justify-content: space-between; align-items: baseline;
	padding: .8rem 0; border-top: 1px solid var(--dwss-line);
}
.dwss-cart-actions { display: flex; gap: .5rem; }
.dwss-scope .dwss-cart-actions .button {
	flex: 1; margin: 0; padding-left: .5em; padding-right: .5em;
	text-align: center; white-space: nowrap; font-size: .85em;
}
.dwss-scope .dwss-btn-ghost { background: transparent; color: inherit; border: 1px solid var(--dwss-line); box-shadow: none; }
.dwss-scope .dwss-btn-ghost:hover { background: var(--dwss-soft); color: inherit; }

/* Hot deal */
.dwss-scope a.dwss-deal { display: block; padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
.dwss-scope a.dwss-deal:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.1); }
.dwss-deal-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--dwss-soft); }
.dwss-scope .dwss-deal-media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; transition: transform .4s; }
.dwss-deal:hover .dwss-deal-media img { transform: scale(1.05); }
.dwss-deal-tag, .dwss-deal-off {
	position: absolute; top: .7rem;
	display: inline-flex; align-items: center; gap: .3rem;
	padding: .3em .7em; border-radius: 99px;
	font-size: .7em; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2;
}
.dwss-deal-tag { left: .7rem; background: var(--dwss-accent); color: var(--dwss-on-accent); }
.dwss-deal-off { right: .7rem; background: var(--dwss-bg); color: inherit; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.dwss-deal-body { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem 1.1rem; }
.dwss-deal-name { font-weight: 600; line-height: 1.3; }
.dwss-scope .dwss-deal-price { font-size: .95em; margin: 0; }
.dwss-deal-price del { opacity: .55; margin-right: .3em; }
.dwss-deal-price ins { text-decoration: none; font-weight: 700; }
.dwss-deal-cta { margin-top: .3rem; font-size: .85em; font-weight: 600; color: var(--dwss-accent); }

/* ------------------------------------------------------------------
 * Tablet / mobile
 * ---------------------------------------------------------------- */
@media (max-width: 991px) {
	.dwss-layout,
	.dwss-layout.dwss-pos-right { grid-template-columns: minmax(0, 1fr); }
	.dwss-layout.dwss-pos-right > .dwss-sidebar { order: 0; }
	.dwss-sidebar.dwss-sticky { position: static; }

	/* With JavaScript: off-canvas drawer. Without: the content simply stays in the page. */
	.dwss-js .dwss-mobilebar { display: flex; gap: .5rem; margin: 0 0 1rem; }
	.dwss-js .dwss-mobilebar .button { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
	.dwss-js .dwss-mobilebar .dwss-open:first-child { flex: 1; justify-content: center; }

	/* Stand-alone filter widget: floating pill so it is reachable wherever the widget sits. */
	.dwss-js .dwss-mobilebar--float {
		position: fixed; z-index: 9990;
		left: 50%; bottom: 18px; transform: translateX(-50%);
		margin: 0;
	}
	.dwss-js .dwss-mobilebar--float .button { border-radius: 99px; padding-left: 1.4em; padding-right: 1.4em; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

	.dwss-js .dwss-drawer {
		position: fixed; z-index: 100000;
		top: 0; bottom: 0; left: 0;
		width: min(88vw, 360px);
		max-width: none;
		margin: 0;
		padding: 0 1rem 1.5rem;
		overflow-y: auto; overscroll-behavior: contain;
		background: var(--dwss-bg);
		box-shadow: 0 0 40px rgba(0,0,0,.25);
		transform: translateX(-105%);
		visibility: hidden;
		transition: transform .28s ease, visibility 0s linear .28s;
	}
	.dwss-js .dwss-drawer.is-open { transform: none; visibility: visible; transition: transform .28s ease; }

	.dwss-js .dwss-drawer .dwss-drawer-head {
		display: flex; align-items: center; justify-content: space-between;
		position: sticky; top: 0; z-index: 2;
		margin: 0 -1rem; padding: .9rem 1rem;
		background: var(--dwss-bg); border-bottom: 1px solid var(--dwss-line);
		font-size: 1.05rem;
	}
	.dwss-scope .dwss-close {
		width: 36px; height: 36px; padding: 0; margin: 0; border: 0; border-radius: 50%;
		background: var(--dwss-soft); color: inherit; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: none;
	}

	.dwss-js .dwss-overlay {
		display: block; position: fixed; inset: 0; z-index: 99999;
		background: rgba(0,0,0,.45);
		opacity: 0; pointer-events: none; transition: opacity .28s;
	}
	.dwss-js.dwss-is-open .dwss-overlay { opacity: 1; pointer-events: auto; }
	.dwss-js.dwss-is-open, .dwss-js.dwss-is-open body { overflow: hidden; }

	.dwss-drawer .dwss-list:not(.dwss-list--child), .dwss-drawer .dwss-cart-items { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
	.dwss-drawer, .dwss-overlay, .dwss-switch, .dwss-switch::after, .dwss-deal, .dwss-deal-media img { transition: none !important; }
}
