/**
 * Vastraa — reusable components: product card, grid, carousel, modals,
 * drawers, toasts, chips, swatches, filters.
 */

/* ==========================================================================
   1. Product grid
   ========================================================================== */

.vs-grid {
	display: grid;
	grid-template-columns: repeat(var(--vs-cols, 4), minmax(0, 1fr));
	gap: clamp(1.5rem, 0.8rem + 1.6vw, 2.75rem) clamp(0.75rem, 0.4rem + 1vw, 1.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs-grid--2 { --vs-cols: 2; }
.vs-grid--3 { --vs-cols: 3; }
.vs-grid--4 { --vs-cols: 4; }
.vs-grid--5 { --vs-cols: 5; }

@media (max-width: 1180px) {
	.vs-grid--5 { --vs-cols: 4; }
}

@media (max-width: 900px) {
	.vs-grid--4,
	.vs-grid--5 { --vs-cols: 3; }
}

@media (max-width: 640px) {
	.vs-grid { --vs-cols: 2 !important; }
}

/* ==========================================================================
   2. Product card
   ========================================================================== */

.vs-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	list-style: none;
}

.vs-card__media {
	position: relative;
	overflow: hidden;
	background: var(--vs-sand);
	aspect-ratio: 3 / 4;
}

.vs-card__link {
	display: block;
	width: 100%;
	height: 100%;
}

.vs-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.5s var(--vs-ease), transform 0.9s var(--vs-ease);
}

.vs-card__img--hover {
	position: absolute;
	inset: 0;
	opacity: 0;
}

.vs-card__media.has-hover:hover .vs-card__img--main {
	opacity: 0;
}

.vs-card__media.has-hover:hover .vs-card__img--hover {
	opacity: 1;
}

.vs-card__media:not(.has-hover):hover .vs-card__img--main {
	transform: scale(1.045);
}

/* Badges */
.vs-card__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
	pointer-events: none;
}

/* Tools */
.vs-card__tools {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
	opacity: 0;
	transform: translateX(8px);
	transition: opacity 0.28s var(--vs-ease), transform 0.28s var(--vs-ease);
}

.vs-card:hover .vs-card__tools,
.vs-card:focus-within .vs-card__tools {
	opacity: 1;
	transform: none;
}

.vs-card__tool,
.vs-wishbtn--icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--vs-line);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	color: var(--vs-ink);
	cursor: pointer;
	transition: background-color 0.2s var(--vs-ease), color 0.2s var(--vs-ease), border-color 0.2s var(--vs-ease);
}

.vs-card__tool:hover {
	background: var(--vs-ink);
	border-color: var(--vs-ink);
	color: var(--vs-paper);
}

/* --- Quantity + add to cart, under the card body ---------------------- */

/*
 * `margin-top: auto` pushes the row to the bottom of the card, so buy controls
 * line up across a grid row even when titles wrap to different heights.
 */
.vs-card__buy {
	display: flex;
	align-items: stretch;
	gap: 6px;
	margin-top: auto;
	padding-top: var(--vs-3);
}

.vs-card__atc {
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
}

.vs-card__buy .quantity {
	flex: 0 0 auto;
}

/* A tighter stepper than the cart's, to leave room for the button. */
.vs-card__buy .quantity input.qty {
	width: 34px;
	min-height: 38px;
	font-size: var(--vs-fs-xs);
}

.vs-card__buy .quantity__step {
	width: 28px;
}

.vs-card__buy .quantity__step svg {
	width: 12px;
	height: 12px;
}

.vs-card__atc.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Added state: ink rather than green, so it reads as "in the bag", not "saved". */
.vs-card__atc.added {
	background: var(--vs-ink-70);
	border-color: var(--vs-ink-70);
	color: #fff;
}

/* Stacked once two-up cards get too narrow for a row. */
@media (max-width: 640px) {
	.vs-card__buy {
		flex-direction: column;
		gap: var(--vs-2);
	}

	.vs-card__buy .quantity {
		width: 100%;
	}

	.vs-card__buy .quantity input.qty {
		width: 100%;
		flex: 1 1 auto;
	}
}

/* WooCommerce injects a "View cart" link after an AJAX add — the drawer
   replaces it, so it stays out of the card. */
.vs-card .added_to_cart {
	display: none;
}

.vs-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 5px;
	padding-top: var(--vs-3);
}

.vs-card__cat {
	color: var(--vs-ink-35);
	font-size: 0.625rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.vs-card__title {
	margin: 0;
	font-family: var(--vs-font-sans);
	font-size: 0.9375rem;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.4;
}

.vs-card__title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-decoration: none;
}

.vs-card .vs-rating {
	margin-top: -2px;
}

.vs-card .vs-price {
	margin-top: 2px;
}

/* Swatches */
.vs-swatches {
	display: flex;
	align-items: center;
	gap: 5px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.vs-swatches__dot {
	width: 13px;
	height: 13px;
	border: 1px solid var(--vs-line-strong);
	border-radius: 50%;
	background: var(--swatch, var(--vs-sand-deep));
}

.vs-swatches__more {
	color: var(--vs-ink-35);
	font-size: 0.6875rem;
}

@media (hover: none) {
	/* Touch devices have no hover, so the tools stay visible. */
	.vs-card__tools {
		opacity: 1;
		transform: none;
	}
}

@media (max-width: 640px) {
	.vs-card__tools {
		flex-direction: row;
	}

	.vs-card__tool,
	.vs-wishbtn--icon {
		width: 32px;
		height: 32px;
	}
}

/* ==========================================================================
   3. Wishlist button
   ========================================================================== */

.vs-wishbtn {
	position: relative;
	cursor: pointer;
}

.vs-wishbtn__on {
	display: none;
	color: var(--vs-accent);
}

.vs-wishbtn.is-active .vs-wishbtn__off {
	display: none;
}

.vs-wishbtn.is-active .vs-wishbtn__on {
	display: inline-flex;
}

.vs-wishbtn.is-busy {
	opacity: 0.5;
	pointer-events: none;
}

.vs-wishbtn--inline {
	display: inline-flex;
	align-items: center;
	gap: var(--vs-2);
	width: auto;
	height: auto;
	padding: var(--vs-2) 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--vs-ink-70);
	font-family: inherit;
	font-size: var(--vs-fs-xs);
	font-weight: 500;
	letter-spacing: var(--vs-tracking-label);
	text-transform: uppercase;
}

.vs-wishbtn--inline:hover {
	color: var(--vs-accent);
	background: transparent;
}

/* ==========================================================================
   4. Carousel
   ========================================================================== */

.vs-carousel {
	position: relative;
}

/*
 * Track sizes are fixed, not `minmax(0, …)`. With a minimum of 0 the grid is
 * free to shrink every column when the row overflows — which it always does in
 * a carousel — collapsing the cards to min-content on narrow screens instead
 * of scrolling them.
 */
.vs-carousel__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * 1.5rem) / 4);
	gap: 1.5rem;
	margin: 0;
	padding: 0 1px 4px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.vs-carousel__track::-webkit-scrollbar {
	display: none;
}

.vs-carousel__track > * {
	scroll-snap-align: start;
}

.vs-carousel__nav {
	position: absolute;
	top: 32%;
	z-index: 3;
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--vs-line);
	border-radius: 50%;
	background: var(--vs-paper);
	color: var(--vs-ink);
	cursor: pointer;
	box-shadow: var(--vs-shadow);
	transition: opacity 0.24s var(--vs-ease), background-color 0.24s var(--vs-ease), color 0.24s var(--vs-ease);
}

.vs-carousel.has-controls .vs-carousel__nav {
	display: flex;
}

.vs-carousel__nav:hover {
	background: var(--vs-ink);
	color: var(--vs-paper);
}

.vs-carousel__nav[disabled] {
	opacity: 0;
	pointer-events: none;
}

.vs-carousel__nav--prev {
	left: -22px;
}

.vs-carousel__nav--next {
	right: -22px;
}

@media (max-width: 1180px) {
	.vs-carousel__track {
		grid-auto-columns: calc((100% - 2 * 1.25rem) / 3);
		gap: 1.25rem;
	}

	.vs-carousel__nav {
		display: none !important;
	}
}

@media (max-width: 900px) {
	.vs-carousel__track {
		grid-auto-columns: 46%;
	}
}

@media (max-width: 600px) {
	.vs-carousel__track {
		grid-auto-columns: 62%;
		gap: 1rem;
		padding-inline: 0;
	}
}

/* ==========================================================================
   5. Chips
   ========================================================================== */

.vs-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--vs-2);
	margin-bottom: var(--vs-5);
}

.vs-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 13px;
	border: 1px solid var(--vs-line-strong);
	border-radius: var(--vs-radius-pill);
	background: var(--vs-paper);
	color: var(--vs-ink-70);
	font-size: var(--vs-fs-xs);
	letter-spacing: 0.04em;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s var(--vs-ease), background-color 0.2s var(--vs-ease), color 0.2s var(--vs-ease);
}

.vs-chip:hover {
	border-color: var(--vs-ink);
	color: var(--vs-ink);
}

.vs-chip--clear {
	border-style: dashed;
	color: var(--vs-accent);
}

/* ==========================================================================
   6. Filters
   ========================================================================== */

.vs-filters__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--vs-3);
	padding-bottom: var(--vs-3);
	border-bottom: 1px solid var(--vs-ink);
}

.vs-filters__clear {
	color: var(--vs-accent);
	font-size: var(--vs-fs-xs);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

.vs-filter-group {
	border-bottom: 1px solid var(--vs-line);
}

.vs-filter-group__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--vs-3);
	width: 100%;
	padding: var(--vs-4) 0;
	border: 0;
	background: transparent;
	color: var(--vs-ink);
	font-family: inherit;
	font-size: var(--vs-fs-xs);
	font-weight: 500;
	letter-spacing: var(--vs-tracking-label);
	text-align: left;
	text-transform: uppercase;
	cursor: pointer;
}

.vs-filter-group__title svg {
	transition: transform 0.24s var(--vs-ease);
	color: var(--vs-ink-50);
}

.vs-filter-group__title[aria-expanded='false'] svg {
	transform: rotate(-90deg);
}

.vs-filter-group__body {
	padding-bottom: var(--vs-4);
	max-height: 264px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.vs-filter-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs-filter-list__link {
	display: flex;
	align-items: center;
	gap: var(--vs-3);
	padding: 6px 0;
	color: var(--vs-ink-70);
	font-size: 0.875rem;
	text-decoration: none;
	transition: color 0.18s var(--vs-ease);
}

.vs-filter-list__link:hover {
	color: var(--vs-ink);
}

.vs-filter-list__link.is-active {
	color: var(--vs-ink);
	font-weight: 500;
}

.vs-filter-box {
	flex: none;
	width: 17px;
	height: 17px;
	border: 1px solid var(--vs-line-strong);
	background: var(--vs-paper);
	transition: background-color 0.18s var(--vs-ease), border-color 0.18s var(--vs-ease);
}

.vs-filter-list__link.is-active .vs-filter-box {
	border-color: var(--vs-ink);
	background-color: var(--vs-ink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.vs-filter-chips,
.vs-filter-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: var(--vs-2);
	margin: 0;
	padding: 2px 0;
	list-style: none;
}

.vs-filter-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	padding: 8px 11px;
	border: 1px solid var(--vs-line-strong);
	color: var(--vs-ink-70);
	font-size: var(--vs-fs-xs);
	letter-spacing: 0.04em;
	text-decoration: none;
	transition: border-color 0.18s var(--vs-ease), background-color 0.18s var(--vs-ease), color 0.18s var(--vs-ease);
}

.vs-filter-chip:hover {
	border-color: var(--vs-ink);
	color: var(--vs-ink);
}

.vs-filter-chip.is-active {
	background: var(--vs-ink);
	border-color: var(--vs-ink);
	color: var(--vs-paper);
}

.vs-filter-swatch {
	position: relative;
	display: block;
	width: 30px;
	height: 30px;
	border: 1px solid var(--vs-line-strong);
	border-radius: 50%;
	background: var(--swatch, var(--vs-sand-deep));
	transition: box-shadow 0.18s var(--vs-ease);
}

.vs-filter-swatch.is-active {
	box-shadow: 0 0 0 2px var(--vs-paper) inset, 0 0 0 2px var(--vs-ink);
}

.vs-pricefilter__inputs {
	display: flex;
	align-items: center;
	gap: var(--vs-2);
	margin-bottom: var(--vs-3);
}

.vs-pricefilter__inputs input {
	min-height: 42px;
	padding-inline: var(--vs-3);
	text-align: center;
	font-size: var(--vs-fs-sm);
}

/* ==========================================================================
   7. Variation swatches (product page)
   ========================================================================== */

.vs-varrow {
	margin-bottom: var(--vs-5);
}

.vs-varrow__head {
	display: flex;
	align-items: baseline;
	gap: var(--vs-2);
	margin-bottom: var(--vs-3);
}

.vs-varrow__label {
	font-size: var(--vs-fs-xs);
	font-weight: 500;
	letter-spacing: var(--vs-tracking-label);
	text-transform: uppercase;
}

.vs-varrow__value {
	color: var(--vs-ink-50);
	font-size: var(--vs-fs-sm);
}

.vs-swatches-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--vs-2);
}

.vs-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--vs-line-strong);
	background: var(--vs-paper);
	color: var(--vs-ink-70);
	font-family: inherit;
	cursor: pointer;
	transition: border-color 0.18s var(--vs-ease), background-color 0.18s var(--vs-ease), color 0.18s var(--vs-ease);
}

.vs-swatch--text {
	min-width: 52px;
	height: 44px;
	padding-inline: var(--vs-3);
	font-size: var(--vs-fs-sm);
	letter-spacing: 0.04em;
}

.vs-swatch--colour {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--swatch, var(--vs-sand-deep));
}

.vs-swatch:hover:not(.is-disabled) {
	border-color: var(--vs-ink);
	color: var(--vs-ink);
}

.vs-swatch--text.is-selected {
	background: var(--vs-ink);
	border-color: var(--vs-ink);
	color: var(--vs-paper);
}

.vs-swatch--colour.is-selected {
	box-shadow: 0 0 0 2px var(--vs-paper) inset, 0 0 0 2px var(--vs-ink);
}

.vs-swatch.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.vs-swatch.is-disabled::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--vs-line-strong) 50%, transparent calc(50% + 0.5px));
}

.reset_variations {
	display: inline-block;
	margin-bottom: var(--vs-4);
	color: var(--vs-ink-50);
	font-size: var(--vs-fs-xs);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.woocommerce-variation-price {
	margin-bottom: var(--vs-3);
}

.woocommerce-variation-availability .stock {
	margin: 0 0 var(--vs-3);
}

/* ==========================================================================
   8. Quantity stepper
   ========================================================================== */

.quantity {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--vs-line-strong);
	border-radius: var(--vs-radius);
	overflow: hidden;
	background: var(--vs-paper);
}

.quantity input.qty {
	width: 54px;
	min-height: 46px;
	padding: 0;
	border: 0;
	border-radius: 0;
	text-align: center;
	font-size: var(--vs-fs-sm);
	font-variant-numeric: tabular-nums;
	-moz-appearance: textfield;
}

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

.quantity input.qty:focus {
	box-shadow: none;
}

.quantity__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--vs-ink-50);
	cursor: pointer;
	transition: background-color 0.18s var(--vs-ease), color 0.18s var(--vs-ease);
}

.quantity__step:hover {
	background: var(--vs-sand);
	color: var(--vs-ink);
}

.quantity--readonly input.qty {
	width: 46px;
	background: transparent;
}

/* ==========================================================================
   9. Modals
   ========================================================================== */

.vs-modal {
	position: fixed;
	inset: 0;
	z-index: var(--vs-z-modal);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--vs-4);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.28s var(--vs-ease), visibility 0.28s;
	pointer-events: none;
}

.vs-modal[hidden] {
	display: flex;
}

.vs-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.vs-modal__inner {
	position: relative;
	width: min(1000px, 100%);
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--vs-paper);
	box-shadow: var(--vs-shadow-lg);
	transform: translateY(16px) scale(0.99);
	transition: transform 0.32s var(--vs-ease);
}

.vs-modal--wide .vs-modal__inner {
	width: min(1060px, 100%);
}

.vs-modal.is-open .vs-modal__inner {
	transform: none;
}

.vs-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	background: rgba(255, 255, 255, 0.9);
}

.vs-modal__body {
	padding: 0;
}

.vs-sizeguide {
	padding: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.vs-sizeguide__title {
	margin-bottom: var(--vs-5);
	font-size: var(--vs-fs-h3);
}

.vs-sizeguide__trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: var(--vs-4);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--vs-ink-70);
	font-family: inherit;
	font-size: var(--vs-fs-xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.vs-sizeguide__trigger:hover {
	color: var(--vs-accent);
}

/* Quick view */
.vs-qv {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
	min-height: 320px;
}

.vs-qv__loading {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	color: var(--vs-ink-50);
	font-size: var(--vs-fs-sm);
}

.vs-qv__media {
	position: relative;
	background: var(--vs-sand);
}

.vs-qv__main img {
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.vs-qv__thumbs {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: flex;
	gap: 6px;
}

.vs-qv__thumb {
	width: 46px;
	height: 60px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.7);
	background: none;
	cursor: pointer;
	overflow: hidden;
}

.vs-qv__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vs-qv__thumb.is-active {
	border-color: var(--vs-ink);
}

.vs-qv__info {
	padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
	overflow-y: auto;
}

.vs-qv__cat {
	display: block;
	margin-bottom: var(--vs-2);
	color: var(--vs-ink-35);
	font-size: 0.625rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.vs-qv__title {
	margin-bottom: var(--vs-2);
	font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem);
}

.vs-qv__excerpt {
	margin: var(--vs-4) 0;
	color: var(--vs-ink-50);
	font-size: var(--vs-fs-sm);
	line-height: 1.7;
}

.vs-qv__link {
	display: inline-block;
	margin-top: var(--vs-4);
	color: var(--vs-ink-70);
	font-size: var(--vs-fs-xs);
	letter-spacing: var(--vs-tracking-label);
	text-transform: uppercase;
}

@media (max-width: 800px) {
	.vs-qv {
		grid-template-columns: 1fr;
	}

	.vs-qv__main img {
		aspect-ratio: 4 / 3;
	}
}

/* ==========================================================================
   10. Filter panel
   --------------------------------------------------------------------------
   A bottom sheet on phones (matching the app-style chrome) and a left slide-in
   panel from tablet up, where a sheet would waste the height.
   ========================================================================== */

.vs-filterdrawer {
	top: auto;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-height: 88vh;
	border-radius: 12px 12px 0 0;
	transform: translateY(100%);
	box-shadow: 0 -12px 40px -20px rgba(23, 19, 16, 0.4);
}

@media (min-width: 783px) {
	.vs-filterdrawer {
		top: 0;
		bottom: 0;
		right: auto;
		width: min(400px, 92vw);
		max-height: none;
		border-radius: 0;
		transform: translateX(-100%);
		box-shadow: 12px 0 40px -20px rgba(23, 19, 16, 0.4);
	}
}

.vs-filterdrawer .vs-drawer__body {
	padding-inline: var(--vs-5);
}

.vs-filterdrawer .vs-filter-group__body {
	max-height: none;
}

/* ==========================================================================
   11. Toasts
   ========================================================================== */

.vs-toasts {
	position: fixed;
	right: var(--vs-4);
	bottom: var(--vs-4);
	z-index: var(--vs-z-toast);
	display: flex;
	flex-direction: column;
	gap: var(--vs-2);
	pointer-events: none;
}

.vs-toast {
	padding: var(--vs-3) var(--vs-5);
	border-left: 3px solid var(--vs-success);
	border-radius: var(--vs-radius);
	background: var(--vs-ink);
	color: var(--vs-paper);
	font-size: var(--vs-fs-sm);
	box-shadow: var(--vs-shadow);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.32s var(--vs-ease), transform 0.32s var(--vs-ease);
}

.vs-toast.is-visible {
	opacity: 1;
	transform: none;
}

.vs-toast--error {
	border-left-color: var(--vs-danger);
}

@media (max-width: 991px) {
	/* Clear the bottom tab bar. */
	.vs-toasts {
		left: var(--vs-4);
		right: var(--vs-4);
		bottom: calc(var(--vs-safe-bottom) + var(--vs-3));
	}
}

/* ==========================================================================
   12. Search results
   ========================================================================== */

.vs-search__status {
	margin: 0;
	color: var(--vs-ink-50);
	font-size: var(--vs-fs-sm);
}

.vs-sresults {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--vs-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs-sresult {
	display: flex;
	align-items: center;
	gap: var(--vs-3);
	padding: var(--vs-2);
	border: 1px solid transparent;
	text-decoration: none;
	transition: border-color 0.18s var(--vs-ease), background-color 0.18s var(--vs-ease);
}

.vs-sresult:hover {
	border-color: var(--vs-line);
	background: var(--vs-canvas);
}

.vs-sresult img {
	flex: none;
	width: 56px;
	height: 72px;
	object-fit: cover;
	background: var(--vs-sand);
}

.vs-sresult__text {
	min-width: 0;
}

.vs-sresult__cat {
	display: block;
	color: var(--vs-ink-35);
	font-size: 0.625rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.vs-sresult__name {
	display: block;
	margin: 2px 0;
	font-size: var(--vs-fs-sm);
	line-height: 1.35;
}

.vs-sresult .vs-price__now {
	font-size: var(--vs-fs-sm);
}

.vs-search__all {
	display: inline-block;
	margin-top: var(--vs-4);
	font-size: var(--vs-fs-xs);
	letter-spacing: var(--vs-tracking-label);
	text-transform: uppercase;
	border-bottom: 1px solid currentColor;
	text-decoration: none;
}

/* ==========================================================================
   13. Empty states
   ========================================================================== */

.vs-empty {
	max-width: 480px;
	margin-inline: auto;
	padding-block: var(--vs-8);
	text-align: center;
}

.vs-empty__icon {
	margin-inline: auto;
	margin-bottom: var(--vs-4);
	color: var(--vs-line-strong);
}

.vs-empty__title {
	margin-bottom: var(--vs-2);
	font-size: var(--vs-fs-h3);
}

.vs-empty__text {
	margin-bottom: var(--vs-5);
	color: var(--vs-ink-50);
	font-size: var(--vs-fs-sm);
}

/* ==========================================================================
   14. Newsletter form
   ========================================================================== */

.vs-newsletter__row {
	display: flex;
	gap: var(--vs-2);
}

.vs-newsletter__input {
	flex: 1 1 auto;
	min-width: 0;
}

.vs-newsletter__submit {
	flex: none;
}

.vs-newsletter__status {
	margin: var(--vs-2) 0 0;
	font-size: var(--vs-fs-xs);
	min-height: 1em;
}

.vs-newsletter__status.is-success {
	color: var(--vs-success);
}

.vs-newsletter__status.is-error {
	color: var(--vs-danger);
}

.vs-newsletter__note {
	margin: var(--vs-2) 0 0;
	color: var(--vs-ink-35);
	font-size: 0.6875rem;
	line-height: 1.5;
}

.vs-newsletter--footer .vs-newsletter__input {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.28);
	color: var(--vs-paper);
}

.vs-newsletter--footer .vs-newsletter__input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.vs-newsletter--footer .vs-newsletter__submit {
	background: var(--vs-paper);
	color: var(--vs-ink);
}

.vs-newsletter--footer .vs-newsletter__submit:hover {
	background: var(--vs-accent);
	color: var(--vs-accent-ink);
}

.vs-newsletter--footer .vs-newsletter__note {
	color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 420px) {
	.vs-newsletter__row {
		flex-direction: column;
	}
}

/* ==========================================================================
   15. Trust strip
   --------------------------------------------------------------------------
   Rendered inline on the front page and inside the footer everywhere else, so
   it belongs in the always-loaded component sheet.
   ========================================================================== */

.vs-usp {
	padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
	border-block: 1px solid var(--vs-line);
	background: var(--vs-canvas);
}

.vs-footer .vs-usp {
	border-block: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	background: transparent;
}

.vs-usp__list {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--vs-4) var(--vs-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs-usp__item {
	display: flex;
	align-items: flex-start;
	gap: var(--vs-3);
}

.vs-usp__icon {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--vs-line-strong);
	border-radius: 50%;
	color: var(--vs-accent);
}

.vs-footer .vs-usp__icon {
	border-color: rgba(255, 255, 255, 0.2);
	color: var(--vs-gold);
}

.vs-usp__text strong {
	display: block;
	font-size: var(--vs-fs-sm);
	font-weight: 500;
	letter-spacing: 0.02em;
}

.vs-usp__text span {
	display: block;
	margin-top: 2px;
	color: var(--vs-ink-50);
	font-size: var(--vs-fs-xs);
	line-height: 1.5;
}

.vs-footer .vs-usp__text span {
	color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
	.vs-usp__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.vs-usp__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--vs-4) var(--vs-3);
	}

	.vs-usp__icon {
		width: 34px;
		height: 34px;
	}

	.vs-usp__icon svg {
		width: 17px;
		height: 17px;
	}
}

/* ==========================================================================
   16. Anchor offset helper
   ========================================================================== */

.vs-anchor {
	display: block;
	height: 0;
	scroll-margin-top: var(--vs-header-h);
}

/* ==========================================================================
   17. Contact page
   ========================================================================== */

.vs-contact {
	padding-bottom: var(--vs-section);
}

/* Photograph beside the details. Collapses to one column on tablet down. */
.vs-contact__split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(1.5rem, 1rem + 3vw, 4rem);
	align-items: stretch;
}

/*
 * The photograph tracks the height of the details panel beside it. Taking the
 * image out of flow is what makes that possible: left in flow its intrinsic
 * 4:5 height would set the row height and leave the panel half empty.
 */
.vs-contact__media {
	position: relative;
	margin: 0;
	min-height: 440px;
	overflow: hidden;
	border-radius: var(--vs-radius-lg);
	background: var(--vs-canvas);
}

.vs-contact__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vs-contact__panel {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
	border: 1px solid var(--vs-line);
	border-radius: var(--vs-radius-lg);
	background: var(--vs-canvas);
}

.vs-contact__title {
	margin: var(--vs-2) 0 var(--vs-5);
	font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
	line-height: 1.15;
}

.vs-contact__address {
	display: flex;
	gap: var(--vs-3);
	width: 100%;
	padding-bottom: var(--vs-5);
	border-bottom: 1px solid var(--vs-line);
}

.vs-contact__address svg {
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--vs-gold);
}

.vs-contact__address address {
	margin: 0;
	font-style: normal;
	line-height: 1.65;
}

.vs-contact__address address span {
	display: block;
}

.vs-contact__channels {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--vs-4);
	width: 100%;
	margin: var(--vs-5) 0 var(--vs-6);
	padding: 0;
	list-style: none;
}

.vs-contact__channel {
	display: flex;
	align-items: flex-start;
	gap: var(--vs-3);
}

.vs-contact__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border: 1px solid var(--vs-line);
	border-radius: 50%;
	background: var(--vs-paper);
	color: var(--vs-accent);
}

.vs-contact__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-size: var(--vs-fs-sm);
}

.vs-contact__text a,
.vs-contact__text > span:last-child {
	overflow-wrap: anywhere;
}

.vs-contact__text a:hover {
	color: var(--vs-accent);
}

.vs-contact__label {
	color: var(--vs-ink-35);
	font-size: var(--vs-fs-xs);
	letter-spacing: var(--vs-tracking-label);
	text-transform: uppercase;
}

/*
 * Anchored to the bottom of the panel so it lines up with the foot of the
 * photograph. The spacing above it comes from the channel list, since an auto
 * margin cannot also carry a minimum.
 */
.vs-contact__dirs {
	margin-top: auto;
	gap: var(--vs-2);
}

/* Map. A fixed aspect ratio keeps the iframe from causing layout shift. */
.vs-contact__map {
	margin-top: clamp(1.5rem, 1rem + 3vw, 4rem);
	overflow: hidden;
	border: 1px solid var(--vs-line);
	border-radius: var(--vs-radius-lg);
	background: var(--vs-canvas);
	aspect-ratio: 21 / 8;
}

.vs-contact__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.vs-contact__body {
	margin-top: clamp(1.5rem, 1rem + 3vw, 4rem);
}

@media (max-width: 900px) {
	.vs-contact__split {
		grid-template-columns: minmax(0, 1fr);
	}

	.vs-contact__media,
	.vs-contact__map {
		min-height: 0;
		aspect-ratio: 4 / 3;
	}
}

@media (max-width: 520px) {
	.vs-contact__channels {
		grid-template-columns: minmax(0, 1fr);
	}

	.vs-contact__dirs {
		width: 100%;
	}
}
