/* ==========================================================================
   VAYUÉ — Shop / product archive.
   Filter rail + toolbar + product grid, in the logo-decoded palette.
   Light-first: no prefers-color-scheme blocks. Text forced with both `color`
   and `-webkit-text-fill-color`.
   ========================================================================== */

:root {
	/* ---- Dark theme. Gold is decoded from the logo pixels; the greys are
	   built around the logo's own #0F0E13 background. ---- */
	--vy-gold: #BB9D50;        /* decoded: logo core gold */
	--vy-gold-lt: #C8B57E;     /* decoded: logo highlight */
	--vy-gold-dk: #C8B57E;     /* on dark, the LIGHT gold is the readable one */
	--vy-on-gold: #0F0E13;     /* text sitting on a gold fill */
	--vy-slate: #7F9CAB;

	--vy-bg: #0B0A0E;          /* page */
	--vy-deep: #060609;        /* deepest bands / flags */
	--vy-surface: #15141A;     /* cards, panels, inputs */
	--vy-surface-2: #1E1C24;   /* raised / hover */
	--vy-text: #F2EEE4;        /* body text */
	--vy-muted: #A29C92;       /* secondary text */
	--vy-line: #2C2A33;        /* hairlines */
	--vy-line-strong: #494450; /* stronger borders */

	/* Legacy aliases kept so any rule this script did not rewrite still
	   resolves to something sane rather than an invalid value. */
	--vy-ink: #0B0A0E;
	--vy-ivory: #F2EEE4;
	--vy-paper: #0B0A0E;
	--vy-line-dk: #2C2A33;

	--vy-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--vy-sans: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--vy-btn-r: 2px;
	--vs-cbtn-h: 46px;
}

body { overflow-x: hidden; }

.vs {
	background: var(--vy-bg);
	font-family: var(--vy-sans);
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
	padding-bottom: 70px;
}
.vs-shell { max-width: 1320px; margin-inline: auto; padding-inline: 20px; }

/* ------------------------------------------------------------------ head */
.vs-head { text-align: center; padding: 48px 0 34px; }
.vs-title {
	font-family: var(--vy-serif);
	font-weight: 300;
	font-size: clamp(32px, 4.4vw, 50px);
	letter-spacing: 0.03em;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
	margin: 0 0 12px;
}
.vs-head p {
	max-width: 68ch;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.8;
	color: var(--vy-muted);
	-webkit-text-fill-color: var(--vy-muted);
}

/* ---------------------------------------------------------------- layout */
.vs-layout { display: grid; grid-template-columns: 268px 1fr; gap: 42px; align-items: start; }

/* ------------------------------------------------------------ filter rail */
.vs-rail__panel {
	border: 1px solid var(--vy-line);
	background: var(--vy-bg);
	padding: 26px 22px;
	position: sticky;
	top: 24px;
}
.vs-rail__top { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.vs-rail__title {
	font-family: var(--vy-serif);
	font-weight: 300;
	font-size: 24px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
	margin: 0;
	flex: 1 1 auto;
}
.vs-reset {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--vy-gold-dk);
	-webkit-text-fill-color: var(--vy-gold-dk);
}
.vs-reset.is-off { opacity: 0.4; pointer-events: none; }
.vs-rail__close { display: none; }

/* groups */
.vs-group { border-top: 1px solid var(--vy-line); margin-top: 18px; padding-top: 4px; }
.vs-group__h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 0;
	cursor: pointer;
	list-style: none;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
}
.vs-group__h::-webkit-details-marker { display: none; }
.vs-chev { width: 16px; height: 16px; flex: 0 0 16px; color: var(--vy-muted); transition: transform 200ms ease; }
.vs-group[open] > .vs-group__h .vs-chev { transform: rotate(180deg); }

/* term rows */
.vs-terms { list-style: none; margin: 0 0 16px; padding: 0; }
.vs-terms li { margin-bottom: 2px; }
.vs-term {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	text-decoration: none;
	font-size: 14px;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
}
.vs-box {
	width: 15px; height: 15px; flex: 0 0 15px;
	border: 1px solid var(--vy-line);
	border-radius: 1px;
	background: var(--vy-bg);
	position: relative;
	transition: background 160ms ease, border-color 160ms ease;
}
.vs-term:hover .vs-box { border-color: var(--vy-gold); }
.vs-term.is-on .vs-box { background: var(--vy-gold); border-color: var(--vy-gold); }
.vs-term.is-on .vs-box::after {
	content: "";
	position: absolute; left: 4px; top: 1px;
	width: 4px; height: 8px;
	border: solid var(--vy-on-gold);
	border-width: 0 1.6px 1.6px 0;
	transform: rotate(45deg);
}
.vs-term__t { flex: 1 1 auto; }
.vs-term.is-on .vs-term__t { color: var(--vy-text); -webkit-text-fill-color: var(--vy-text); font-weight: 500; }
.vs-term__n { font-size: 12px; color: var(--vy-muted); -webkit-text-fill-color: var(--vy-muted); }

/* price */
.vs-price { padding-bottom: 18px; }
.vs-slider { position: relative; height: 30px; margin: 4px 2px 6px; }
.vs-slider__rail, .vs-slider__fill {
	position: absolute; top: 14px; height: 2px; border-radius: 2px;
}
.vs-slider__rail { left: 0; right: 0; background: var(--vy-line); }
.vs-slider__fill { background: var(--vy-gold); }
.vs-slider__in {
	position: absolute; left: 0; top: 0; width: 100%; height: 30px;
	margin: 0; background: none; pointer-events: none;
	-webkit-appearance: none; appearance: none;
}
.vs-slider__in::-webkit-slider-thumb {
	-webkit-appearance: none; appearance: none;
	width: 15px; height: 15px; border-radius: 50%;
	background: var(--vy-bg); border: 2px solid var(--vy-gold);
	cursor: pointer; pointer-events: auto; margin-top: 0;
}
.vs-slider__in::-moz-range-thumb {
	width: 15px; height: 15px; border-radius: 50%;
	background: var(--vy-bg); border: 2px solid var(--vy-gold);
	cursor: pointer; pointer-events: auto;
}
.vs-slider__in::-webkit-slider-runnable-track { height: 30px; background: none; }
.vs-slider__in::-moz-range-track { height: 30px; background: none; }

.vs-price__row { display: flex; align-items: center; gap: 6px; }
.vs-cur { font-size: 14px; color: var(--vy-muted); -webkit-text-fill-color: var(--vy-muted); }
.vs-price__row input[type="number"] {
	flex: 1 1 0;
	min-width: 0;
	height: 40px;
	padding: 0 8px;
	border: 1px solid var(--vy-line);
	border-radius: var(--vy-btn-r);
	background: var(--vy-bg);
	font-family: var(--vy-sans);
	font-size: 14px;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
	-moz-appearance: textfield;
	appearance: textfield;
}
.vs-price__row input::-webkit-outer-spin-button,
.vs-price__row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vs-price__row input:focus { border-color: var(--vy-gold); outline: none; }
.vs-dash { color: var(--vy-muted); -webkit-text-fill-color: var(--vy-muted); }
.vs-price__go {
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--vy-line-strong);
	border-radius: var(--vy-btn-r);
	background: var(--vy-deep);
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
	font-family: var(--vy-sans);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
}
.vs-price__go:hover { background: var(--vy-gold); border-color: var(--vy-gold); color: var(--vy-on-gold); -webkit-text-fill-color: var(--vy-on-gold); }

/* --------------------------------------------------------------- toolbar */
.vs-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--vy-line);
	margin-bottom: 26px;
}
.vs-count {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--vy-muted);
	-webkit-text-fill-color: var(--vy-muted);
}
.vs-sort { display: flex; align-items: center; gap: 12px; margin: 0; }
.vs-sort__l {
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--vy-muted);
	-webkit-text-fill-color: var(--vy-muted);
}
.vs-select { position: relative; }
.vs-select select {
	appearance: none;
	-webkit-appearance: none;
	height: 42px;
	padding: 0 38px 0 14px;
	border: 1px solid var(--vy-line);
	border-radius: var(--vy-btn-r);
	background: var(--vy-bg);
	font-family: var(--vy-sans);
	font-size: 14px;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
	cursor: pointer;
	min-width: 190px;
}
.vs-select select:focus { border-color: var(--vy-gold); outline: none; }
.vs-select .vs-chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }

/* chips */
.vs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; }
.vs-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border: 1px solid var(--vy-line);
	border-radius: 30px;
	background: var(--vy-surface);
	font-size: 12px;
	letter-spacing: 0.04em;
	text-decoration: none;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
}
.vs-chip svg { width: 11px; height: 11px; color: var(--vy-muted); }
.vs-chip:hover { border-color: var(--vy-gold); }
.vs-chip:hover svg { color: var(--vy-gold-dk); }

/* ------------------------------------------------------------ product grid */
.vs-main ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.vs-main ul.products::before,
.vs-main ul.products::after { content: none; }

.vs-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--vy-line);
	background: var(--vy-bg);
	transition: border-color 260ms ease, box-shadow 260ms ease, transform 260ms ease;
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	clear: none !important;
}
.vs-card:hover {
	border-color: var(--vy-gold);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
	transform: translateY(-3px);
}

.vs-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--vy-bg);
	overflow: hidden;
}
.vs-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 18px;
	box-sizing: border-box;
	display: block;
	transition: transform 500ms ease;
}
.vs-card:hover .vs-card__media img { transform: scale(1.05); }

.vs-card__flag {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: var(--vy-deep);
	color: var(--vy-gold);
	-webkit-text-fill-color: var(--vy-gold);
	font-size: 9px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	padding: 6px 10px;
}
.vs-card__flag--out { background: #E5827A; color: var(--vy-text); -webkit-text-fill-color: var(--vy-text); }

.vs-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 4px 18px 20px;
	text-align: center;
}
.vs-card__title { margin: 0 0 4px; }
.vs-card__title a {
	font-family: var(--vy-serif);
	font-weight: 400;
	font-size: 19px;
	line-height: 1.3;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
}
.vs-card__title a:hover { color: var(--vy-gold-dk); -webkit-text-fill-color: var(--vy-gold-dk); }

.vs-card__line {
	margin: 0 0 10px;
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--vy-muted);
	-webkit-text-fill-color: var(--vy-muted);
}

.vs-card__rating { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.vs-stars { display: inline-flex; gap: 2px; }
.vs-star { width: 9px; height: 9px; color: var(--vy-line); }
.vs-star.is-on { color: var(--vy-gold); }
.vs-card__rc { font-size: 11px; color: var(--vy-muted); -webkit-text-fill-color: var(--vy-muted); }

.vs-card__price {
	margin-top: auto;
	padding: 6px 0 16px;
	font-family: var(--vy-serif);
	font-size: 21px;
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
}
.vs-card__price .amount,
.vs-card__price .woocommerce-Price-amount,
.vs-card__price .woocommerce-Price-currencySymbol {
	color: var(--vy-text);
	-webkit-text-fill-color: var(--vy-text);
}
.vs-card__price del { opacity: 0.45; font-size: 16px; margin-right: 6px; }
.vs-card__price ins { text-decoration: none; }

/* ---- card button: ONE spec shared by every in-card action ---- */
.vs-card__cta .button,
.vs-card__cta a.button,
.vs-card__cta .added_to_cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--vs-cbtn-h);
	min-height: var(--vs-cbtn-h);
	padding: 0 16px;
	border: 1px solid var(--vy-gold);
	border-radius: var(--vy-btn-r);
	background: transparent;
	color: var(--vy-gold-dk);
	-webkit-text-fill-color: var(--vy-gold-dk);
	font-family: var(--vy-sans);
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1;
	text-decoration: none;
	box-sizing: border-box;
	transition: background 180ms ease, color 180ms ease;
}
.vs-card__cta .button:hover,
.vs-card__cta a.button:hover {
	background: var(--vy-gold);
	color: var(--vy-on-gold);
	-webkit-text-fill-color: var(--vy-on-gold);
}
.vs-card__cta .added_to_cart { margin-top: 8px; background: var(--vy-deep); border-color: var(--vy-line-strong); color: var(--vy-text); -webkit-text-fill-color: var(--vy-text); }
.vs-card__cta .button.loading { opacity: 0.6; }
.vs-card__cta .button.added { display: none; }

/* ------------------------------------------------------------ empty state */
.vs-empty { text-align: center; padding: 70px 20px; border: 1px solid var(--vy-line); background: var(--vy-surface); }
.vs-empty__star { color: var(--vy-gold); margin-bottom: 18px; }
.vs-empty__star svg { width: 16px; height: 16px; }
.vs-empty__t { font-family: var(--vy-serif); font-weight: 300; font-size: 30px; margin: 0 0 10px; color: var(--vy-text); -webkit-text-fill-color: var(--vy-text); }
.vs-empty__p { font-size: 15px; color: var(--vy-muted); -webkit-text-fill-color: var(--vy-muted); margin: 0 0 24px; }
.vs-btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 54px; padding: 0 26px;
	border: 1px solid var(--vy-gold); border-radius: var(--vy-btn-r);
	background: var(--vy-gold);
	color: var(--vy-on-gold); -webkit-text-fill-color: var(--vy-on-gold);
	font-size: 13px; font-weight: 500; letter-spacing: 0.14em;
	text-transform: uppercase; text-decoration: none;
}
.vs-btn:hover { background: var(--vy-gold-dk); border-color: var(--vy-gold-dk); color: var(--vy-on-gold); -webkit-text-fill-color: var(--vy-on-gold); }

/* ------------------------------------------------------------- pagination */
.vs-main .woocommerce-pagination { margin-top: 44px; text-align: center; }
.vs-main .woocommerce-pagination ul { display: inline-flex; gap: 6px; list-style: none; margin: 0; padding: 0; border: 0; }
.vs-main .woocommerce-pagination li { border: 0; margin: 0; }
.vs-main .woocommerce-pagination a,
.vs-main .woocommerce-pagination span {
	display: grid; place-items: center;
	min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--vy-line); border-radius: var(--vy-btn-r);
	font-size: 14px; text-decoration: none;
	color: var(--vy-text); -webkit-text-fill-color: var(--vy-text);
	background: var(--vy-bg);
}
.vs-main .woocommerce-pagination a:hover { border-color: var(--vy-gold); }
.vs-main .woocommerce-pagination .current {
	background: var(--vy-gold); border-color: var(--vy-gold);
	color: var(--vy-on-gold); -webkit-text-fill-color: var(--vy-on-gold);
}

/* ---------------------------------------------------- mobile filter drawer */
.vs-filter-toggle { display: none; }
.vs-scrim { display: none; }

@media (max-width: 1180px) {
	.vs-main ul.products { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
	.vs-layout { grid-template-columns: 1fr; gap: 0; }

	.vs-filter-toggle {
		display: inline-flex;
		align-items: center;
		gap: 9px;
		height: 46px;
		padding: 0 18px;
		margin-bottom: 20px;
		border: 1px solid var(--vy-line-strong);
		border-radius: var(--vy-btn-r);
		background: var(--vy-bg);
		font-family: var(--vy-sans);
		font-size: 12px;
		font-weight: 500;
		letter-spacing: 0.16em;
		text-transform: uppercase;
		color: var(--vy-text);
		-webkit-text-fill-color: var(--vy-text);
		cursor: pointer;
	}
	.vs-filter-toggle svg { width: 17px; height: 17px; }
	.vs-filter-toggle__n {
		display: grid; place-items: center;
		min-width: 19px; height: 19px; padding: 0 5px;
		border-radius: 10px;
		background: var(--vy-gold);
		color: var(--vy-on-gold); -webkit-text-fill-color: var(--vy-on-gold);
		font-size: 11px;
	}

	.vs-rail {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 9600;
		width: min(340px, 88vw);
		transform: translateX(-100%);
		transition: transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
		overflow-y: auto;
		background: var(--vy-bg);
	}
	.vs-rail.is-open { transform: translateX(0); }
	.vs-rail__panel { border: 0; position: static; min-height: 100%; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
	.vs-rail__close {
		display: grid; place-items: center;
		width: 34px; height: 34px; padding: 0;
		border: 0; background: transparent; cursor: pointer;
		color: var(--vy-text);
	}
	.vs-rail__close svg { width: 19px; height: 19px; }

	.vs-scrim {
		display: block;
		position: fixed; inset: 0; z-index: 9500;
		background: rgba(0, 0, 0, 0.45);
		opacity: 0; visibility: hidden;
		transition: opacity 260ms ease;
	}
	.vs-scrim.is-open { opacity: 1; visibility: visible; }
	body.vs-locked { overflow: hidden; }
}

@media (max-width: 760px) {
	.vs-shell { padding-inline: 16px; }
	.vs-head { padding: 32px 0 24px; }
	.vs-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
	.vs-sort { justify-content: space-between; }
	.vs-select select { flex: 1 1 auto; min-width: 0; width: 100%; }
	.vs-main ul.products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.vs-card__body { padding: 4px 12px 16px; }
	.vs-card__title a { font-size: 16px; }
	.vs-card__price { font-size: 18px; }
	.vs-card__cta .button { font-size: 10px; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
	.vs-card, .vs-card__media img, .vs-rail, .vs-scrim, .vs-chev { transition: none !important; }
}
