/* Voyah — магазин авто в наявності (плитка / список + фільтри) */

.vshop {
	--vshop-ink: #14181f;
	--vshop-muted: #6b7280;
	--vshop-accent: #406a70;
	--vshop-accent-dark: #2f5257;
	--vshop-line: #e7ebee;
	--vshop-radius: 20px;
	font-size: 16px;
	line-height: 1.4;
	color: var(--vshop-ink);
}
.vshop__title { font-size: clamp(24px, 3.5vw, 36px); font-weight: 700; margin: 0 0 22px; color: inherit; }

/* ---------- Фільтри: рівні блоки на всю ширину ---------- */
.vshop__filters {
	display: grid;
	grid-template-columns: repeat(var(--vshop-fcols, 4), minmax(0, 1fr));
	gap: 10px;
	width: 100%;
	margin-bottom: 12px;
}
/* Кастомний дропдаун (замість нативного select — щоб оформити у нашому стилі) */
.vshop__dd { position: relative; }
.vshop__dd-btn {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	width: 100%; box-sizing: border-box; min-height: 46px;
	background: #fff; border: 1px solid var(--vshop-line); border-radius: 999px;
	padding: 11px 16px;
	font: inherit; font-size: 14px; line-height: 1.4; color: var(--vshop-ink);
	cursor: pointer; text-align: left;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.vshop__dd-btn:hover { border-color: var(--vshop-accent); }
.vshop__dd.is-open .vshop__dd-btn { border-color: var(--vshop-accent); box-shadow: 0 0 0 3px rgba(64, 106, 112, .12); }
.vshop__dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vshop__dd-caret { flex: 0 0 auto; color: var(--vshop-accent); transition: transform .2s ease; }
.vshop__dd.is-open .vshop__dd-caret { transform: rotate(180deg); }

.vshop__dd-menu {
	position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
	background: #fff; border: 1px solid var(--vshop-line); border-radius: 14px;
	box-shadow: 0 14px 34px rgba(0, 0, 0, .16); padding: 6px; max-height: 320px; overflow: auto;
}
.vshop__dd-opt {
	display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box;
	text-align: left; background: transparent; border: 0; border-radius: 10px;
	padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.35; color: var(--vshop-ink); cursor: pointer;
}
.vshop__dd-opt:hover { background: #f2f5f6; }
.vshop__dd-opt.is-active { background: var(--vshop-accent); color: #fff; }
.vshop__dd-opt[hidden] { display: none; }
.vshop__dd-dot {
	flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%;
	background-color: var(--vshop-dot, #c9ccd1);
	background-image: radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 55%);
	box-shadow: inset 0 -1px 2px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(0, 0, 0, .14);
}

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

/* ---------- Панель під фільтрами: лічильник/скидання + перемикач ---------- */
.vshop__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.vshop__bar-left { display: flex; align-items: center; gap: 14px; }
.vshop__count { color: var(--vshop-muted); font-size: 14px; }
.vshop__reset { background: transparent; border: 0; color: var(--vshop-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 4px 2px; }

.vshop__views { display: inline-flex; border: 1px solid var(--vshop-line); border-radius: 999px; overflow: hidden; background: #fff; }
.vshop__view { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 38px; border: 0; background: transparent; color: var(--vshop-muted); cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.vshop__view + .vshop__view { border-left: 1px solid var(--vshop-line); }
.vshop__view:hover { color: var(--vshop-accent); }
.vshop__view.is-active { background: var(--vshop-accent); color: #fff; }

/* ---------- Картка (плитка) ---------- */
.vshop__item[hidden] { display: none !important; }

.vshop__card {
	display: flex; flex-direction: column; height: 100%;
	background: #fff; border: 1px solid var(--vshop-line); border-radius: var(--vshop-radius);
	overflow: hidden; transition: transform .22s ease, box-shadow .22s ease;
}
@media (hover: hover) {
	.vshop--tile .vshop__item:hover .vshop__card { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, .12); }
}

.vshop__media { position: relative; display: block; aspect-ratio: 4 / 3; background: #f2f4f6; overflow: hidden; }
/* обидва фото (окрім лого) завжди заповнюють область — !important перекриває тему img{height:auto} */
.vshop__media > img:not(.vshop__logo) { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; }
.vshop__media-hover { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
@media (hover: hover) { .vshop__media:hover .vshop__media-hover { opacity: 1; } }
/* тема форсує img{height:auto!important}, тому лого теж через !important */
.vshop__logo { position: absolute; left: 12px; top: 12px; height: 40px !important; width: auto !important; max-width: none !important; z-index: 2; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }

.vshop__info { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; flex: 1 1 auto; }
.vshop__name { font-weight: 600; font-size: 17px; color: var(--vshop-ink); text-decoration: none; overflow-wrap: anywhere; }
.vshop__name:hover { text-decoration: underline; }

/* список характеристик — той самий лівий край, що й у назви (перекриваємо ul-відступ теми) */
.vshop ul.vshop__specs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.vshop .vshop__specs li { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0; padding: 0; }
.vshop__specs li::before { content: attr(data-label); color: var(--vshop-muted); font-size: 13px; min-width: 96px; flex: 0 0 auto; }
.vshop__dot { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
	background-color: var(--vshop-dot, #c9ccd1);
	background-image: radial-gradient(circle at 33% 27%, rgba(255,255,255,.7) 0%, rgba(255,255,255,.15) 30%, rgba(255,255,255,0) 55%);
	box-shadow: inset 0 -2px 4px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.2);
}

/* ціна завжди притиснута до низу картки -> вирівняна із сусідніми */
.vshop__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--vshop-line); }
.vshop__price { font-weight: 700; white-space: nowrap; }
.vshop__price--none { font-weight: 500; color: var(--vshop-muted); }
.vshop__actions { display: inline-flex; align-items: center; gap: 14px; }
.vshop a.vshop__btn { display: inline-block; border: 1.5px solid var(--vshop-accent); border-radius: 999px; padding: 9px 22px; font-weight: 600; color: var(--vshop-accent); text-decoration: none; white-space: nowrap; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.vshop a.vshop__btn:hover, .vshop a.vshop__btn:focus-visible { background: var(--vshop-accent); border-color: var(--vshop-accent); color: #fff !important; }
.vshop__more { font-weight: 600; color: var(--vshop-ink); text-decoration: none; white-space: nowrap; }
.vshop__more:hover { text-decoration: underline; }

/* ---------- Сітка плитки ---------- */
.vshop--tile .vshop__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.vshop--tile .vshop__aslist { display: none; }

/* ---------- Список (вигляд [voyah_stock]) ---------- */
.vshop--list .vshop__grid { display: flex; flex-direction: column; gap: 14px; }
.vshop--list .vshop__card { display: none; }
.vshop--list .vshop__item { border: 0; background: transparent; }

.vshop__empty { padding: 30px; text-align: center; color: var(--vshop-muted); border: 1px dashed var(--vshop-line); border-radius: var(--vshop-radius); }

@media (max-width: 480px) {
	.vshop--tile .vshop__grid { grid-template-columns: 1fr; }
	.vshop__actions { width: 100%; justify-content: space-between; }
}
