/* =========================================================================
   Buttons, badges, cards, forms and other reusable pieces
   ========================================================================= */

/* ---------- buttons ---------- */

.vm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 13px 24px;
	border-radius: var(--r-pill);
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: .005em;
	line-height: 1;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast),
		border-color var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.vm-btn:active { transform: translateY(1px); }

.vm-btn--dark { background: var(--ink); color: #fff; }
.vm-btn--dark:hover { background: #2a231d; box-shadow: var(--sh-2); }

.vm-btn--gold { background: var(--gold); color: #fff; }
.vm-btn--gold:hover { background: #b0862f; box-shadow: var(--sh-gold); }

.vm-btn--outline { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.vm-btn--outline:hover { border-color: var(--ink); }

.vm-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.vm-btn--ghost:hover { background: var(--sand); border-color: var(--line-2); }

.vm-btn--sm { padding: 10px 16px; font-size: 13.5px; }
.vm-btn--lg { padding: 16px 30px; font-size: 15.5px; }
.vm-btn--block { display: flex; width: 100%; }

.vm-btn[disabled], .vm-btn.is-busy { opacity: .55; pointer-events: none; }
.vm-btn.is-done { background: var(--green); color: #fff; }

.vm-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
	white-space: nowrap;
}
.vm-link-arrow .vm-icon { transition: transform var(--t-fast); }
.vm-link-arrow:hover .vm-icon { transform: translateX(3px); }

/* ---------- badges / chips ---------- */

.vm-badge {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 10px;
	border-radius: var(--r-pill);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
}
.vm-badge--sale { background: var(--sale); color: #fff; }
.vm-badge--new { background: var(--ink); color: #fff; }
.vm-badge--out { background: var(--sand-2); color: var(--muted); }

.vm-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 15px;
	border-radius: var(--r-pill);
	background: var(--sand);
	font-size: 13.5px;
	color: var(--ink-2);
	transition: background var(--t-fast), color var(--t-fast);
}
.vm-chip:hover { background: var(--sand-2); color: var(--ink); }
.vm-chip--active { background: var(--ink); color: #fff; }
.vm-chip--active:hover { background: #33291f; color: #fff; }

.vm-chiprow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.vm-chiprow::-webkit-scrollbar { display: none; }
.vm-chiprow--wrap { flex-wrap: wrap; overflow: visible; }

.vm-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vm-chips__clear { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- section heading ---------- */

.vm-section { padding: clamp(48px, 7vw, 96px) 0; }

.vm-sec-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: clamp(24px, 3.5vw, 40px);
}
.vm-sec-head--center { flex-direction: column; align-items: center; text-align: center; }

.vm-sec-head__title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(26px, 4.2vw, 42px);
	line-height: 1.1;
	letter-spacing: -.02em;
}
.vm-sec-head__lead {
	color: var(--muted);
	font-size: 15.5px;
	margin-top: 10px;
	max-width: 52ch;
}
.vm-sec-head .vm-link-arrow { flex: none; padding-bottom: 6px; }
@media (max-width: 640px) { .vm-sec-head .vm-link-arrow { display: none; } }

/* ---------- grids and rails ---------- */

.vm-grid { display: grid; gap: clamp(14px, 2vw, 26px); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .vm-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .vm-grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .vm-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.vm-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(210px, 1fr);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 6px;
	margin-inline: calc(var(--gut) * -1);
	padding-inline: var(--gut);
	scrollbar-width: none;
}
.vm-rail::-webkit-scrollbar { display: none; }
.vm-rail > * { scroll-snap-align: start; }
@media (min-width: 1080px) {
	.vm-rail {
		grid-auto-flow: row;
		grid-template-columns: repeat(4, 1fr);
		gap: 26px;
		overflow: visible;
		margin-inline: 0;
		padding-inline: 0;
	}
}

/* ---------- product card ---------- */

.vm-card { display: flex; flex-direction: column; }

.vm-card__media {
	position: relative;
	background: var(--sand);
	border-radius: var(--r-md);
	overflow: hidden;
	aspect-ratio: 1;
}
.vm-card__link { display: block; height: 100%; }
.vm-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .7s var(--ease), opacity var(--t);
}
.vm-card__img--alt { position: absolute; inset: 0; opacity: 0; }
.vm-card:hover .vm-card__img { transform: scale(1.045); }
.vm-card:hover .vm-card__img--alt { opacity: 1; }

.vm-card__badges {
	position: absolute;
	top: 10px; left: 10px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	pointer-events: none;
}

.vm-card__action {
	position: absolute;
	left: 10px; right: 10px; bottom: 10px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity var(--t), transform var(--t);
}
.vm-card__action .vm-btn { width: 100%; }
.vm-card:hover .vm-card__action,
.vm-card:focus-within .vm-card__action { opacity: 1; transform: none; }
@media (hover: none) {
	.vm-card__action { opacity: 1; transform: none; position: static; margin-top: 10px; }
	.vm-card__action .vm-btn { border-radius: var(--r-sm); }
}

.vm-card__body { padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }

.vm-card__brand {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--gold);
}

.vm-card__title {
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vm-card__title a { transition: color var(--t-fast); }
.vm-card__title a:hover { color: var(--gold); }

.vm-card__price { display: flex; align-items: baseline; gap: 9px; margin-top: 3px; flex-wrap: wrap; }
.vm-price { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.vm-price-old { font-size: 14px; color: var(--muted-2); text-decoration: line-through; }
.vm-card__save { font-size: 12.5px; color: var(--green); font-weight: 500; }

/* ---------- accordion ---------- */

.vm-acc { display: grid; }
.vm-acc__item { border-bottom: 1px solid var(--line); }
.vm-acc--flush .vm-acc__item:first-child { border-top: 1px solid var(--line); }

.vm-acc__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	text-align: left;
	font-size: 16px;
	font-weight: 500;
	color: var(--ink);
}
.vm-acc__sign { color: var(--muted); transition: transform var(--t); flex: none; }
.vm-acc__item.is-open .vm-acc__sign { transform: rotate(45deg); }

.vm-acc__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--t);
}
.vm-acc__item.is-open .vm-acc__panel { grid-template-rows: 1fr; }
.vm-acc__body { overflow: hidden; }
.vm-acc__body > * { color: var(--muted); font-size: 15px; line-height: 1.7; }
.vm-acc__body > *:last-child { padding-bottom: 20px; }

/* ---------- tabs ---------- */

.vm-tabs__nav {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	margin-bottom: 26px;
	padding-bottom: 2px;
}
.vm-tabs__nav::-webkit-scrollbar { display: none; }

.vm-tabs__btn {
	padding: 9px 18px;
	border-radius: var(--r-pill);
	font-size: 14px;
	font-weight: 500;
	color: var(--muted);
	border: 1px solid var(--line);
	background: var(--paper);
	white-space: nowrap;
	transition: all var(--t-fast);
}
.vm-tabs__btn:hover { color: var(--ink); border-color: var(--line-2); }
.vm-tabs__btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.vm-tabs__panel { display: none; }
.vm-tabs__panel.is-active { display: block; animation: vm-fade .35s var(--ease); }

@keyframes vm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- quantity ---------- */

.vm-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--line-2);
	border-radius: var(--r-pill);
	overflow: hidden;
	background: var(--paper);
}
.vm-qty__btn {
	width: 42px; height: 46px;
	display: grid; place-items: center;
	color: var(--ink-2);
	transition: background var(--t-fast);
}
.vm-qty__btn:hover { background: var(--sand); }
.vm-qty__input {
	width: 42px;
	height: 46px;
	border: 0;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	background: none;
	outline: none;
	-moz-appearance: textfield;
}
.vm-qty__input::-webkit-outer-spin-button,
.vm-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vm-qty--sm .vm-qty__btn { width: 32px; height: 34px; }
.vm-qty--sm .vm-qty__input { width: 32px; height: 34px; font-size: 13.5px; }

/* ---------- free shipping bar ---------- */

.vm-freeship {
	background: var(--gold-wash);
	border: 1px solid #f0e3c8;
	border-radius: var(--r-md);
	padding: 13px 16px;
	margin-bottom: 18px;
}
.vm-freeship.is-earned { background: #eef6f1; border-color: #cfe6da; }
.vm-freeship__text {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13.5px;
	color: var(--ink-2);
	margin-bottom: 9px;
}
.vm-freeship__text .vm-icon { color: var(--green); }
.vm-freeship__text bdi, .vm-freeship__text .amount { font-weight: 700; color: var(--ink); }
.vm-freeship__track {
	height: 5px;
	background: rgba(20, 17, 15, .08);
	border-radius: var(--r-pill);
	overflow: hidden;
}
.vm-freeship__track span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--gold-2), var(--gold));
	border-radius: inherit;
	transition: width var(--t-slow);
}
.vm-freeship.is-earned .vm-freeship__track span { background: var(--green); }

/* ---------- cart lines in the drawer ---------- */

.vm-cartlist { display: grid; gap: 18px; }
.vm-cartline { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: start; }
.vm-cartline.is-busy { opacity: .5; pointer-events: none; }
.vm-cartline__media { border-radius: var(--r-sm); overflow: hidden; background: var(--sand); }
.vm-cartline__media img { aspect-ratio: 1; object-fit: cover; }
.vm-cartline__brand { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.vm-cartline__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.35;
	margin: 2px 0 8px;
}
.vm-cartline__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vm-cartline__price { font-size: 14.5px; font-weight: 700; }
.vm-cartline__remove { color: var(--muted-2); padding: 2px; transition: color var(--t-fast); }
.vm-cartline__remove:hover { color: var(--sale); }

/* ---------- forms ---------- */

.vm-field, .woocommerce form .form-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 16px;
}
.woocommerce form .form-row label,
.vm-field label {
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-2);
}
.woocommerce form .form-row .required { color: var(--sale); text-decoration: none; }
.woocommerce form .form-row .optional { color: var(--muted-2); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="search"], input[type="url"], textarea, select,
.woocommerce .input-text {
	width: 100%;
	background: var(--paper);
	border: 1px solid var(--line-2);
	border-radius: var(--r-sm);
	padding: 13px 15px;
	font-size: 15px;
	color: var(--ink);
	outline: none;
	transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, textarea:focus, select:focus, .woocommerce .input-text:focus {
	border-color: var(--ink);
	box-shadow: 0 0 0 3px rgba(20, 17, 15, .06);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { min-height: 96px; resize: vertical; }

select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b726a' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

/* ---------- reveal on scroll ---------- */

.vm-reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .7s var(--ease), transform .7s var(--ease);
	transition-delay: calc(var(--i, 0) * 70ms);
}
.vm-reveal.is-in { opacity: 1; transform: none; }
.no-js .vm-reveal { opacity: 1; transform: none; }

/* ---------- marquee ---------- */

.vm-brands { padding: clamp(30px, 4vw, 46px) 0; border-block: 1px solid var(--line); background: var(--paper); }
.vm-brands__label {
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--muted-2);
	font-weight: 600;
	text-align: center;
	margin-bottom: 22px;
}
.vm-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.vm-marquee__track { display: flex; width: max-content; animation: vm-scroll 46s linear infinite; }
.vm-marquee:hover .vm-marquee__track { animation-play-state: paused; }
.vm-marquee__item {
	padding: 0 clamp(20px, 3vw, 40px);
	font-family: var(--font-display);
	font-size: clamp(20px, 2.6vw, 30px);
	color: var(--muted-2);
	white-space: nowrap;
	transition: color var(--t-fast);
}
.vm-marquee__item:hover { color: var(--ink); }

@keyframes vm-scroll { to { transform: translateX(-50%); } }

/* ---------- empty state ---------- */

.vm-empty { text-align: center; padding: clamp(48px, 8vw, 96px) 20px; }
.vm-empty__icon {
	display: grid;
	place-items: center;
	width: 78px; height: 78px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--sand);
	color: var(--muted);
}
.vm-empty h1, .vm-empty h2 { font-size: clamp(21px, 3.4vw, 28px); margin-bottom: 8px; }
.vm-empty p { color: var(--muted); margin-bottom: 24px; }
.vm-empty__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.vm-404 {
	font-family: var(--font-display);
	font-size: clamp(72px, 16vw, 150px);
	line-height: 1;
	color: var(--sand-2);
	margin-bottom: 10px;
}

/* ---------- breadcrumbs ---------- */

.vm-crumbs { margin-bottom: 16px; }
.vm-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.vm-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--muted-2); }
.vm-crumbs a:hover { color: var(--ink); }
.vm-crumbs [aria-current] { color: var(--ink-2); }

/* ---------- toast ---------- */

.vm-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translate(-50%, 130%);
	z-index: 120;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--ink);
	color: #fff;
	padding: 13px 20px;
	border-radius: var(--r-pill);
	font-size: 14px;
	box-shadow: var(--sh-3);
	transition: transform var(--t);
	max-width: calc(100vw - 32px);
}
.vm-toast.is-on { transform: translate(-50%, 0); }
.vm-toast .vm-icon { color: var(--gold-2); }
