/**
 * VMT Product Loop — Custom WooCommerce card styles
 * Prefix: vmt__ (all classes namespaced)
 */

ul.products.vmt__grid,
.woocommerce ul.products.vmt__grid,
.vmt__grid {
	--vmt-navy: #2D4E72;
	--vmt-navy-dark: #1e3651;
	--vmt-navy-pale: #eaf0f8;
	--vmt-orange: #D95A28;
	--vmt-orange-dk: #b84820;
	--vmt-orange-bg: #fdf0ea;
	--vmt-green: #16a34a;
	--vmt-green-bg: #dcfce7;
	--vmt-amber: #d97706;
	--vmt-red: #dc2626;
	--vmt-gray-50: #f8f9fb;
	--vmt-gray-100: #f1f4f8;
	--vmt-gray-200: #e2e8f0;
	--vmt-gray-300: #cbd5e1;
	--vmt-gray-400: #94a3b8;
	--vmt-gray-500: #64748b;
	--vmt-gray-700: #334155;
	--vmt-gray-900: #0f172a;
	--vmt-radius-sm: 6px;
	--vmt-radius-md: 10px;
	--vmt-radius-lg: 14px;
	--vmt-shadow-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
	--vmt-shadow-md: 0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
	--vmt-shadow-lg: 0 12px 32px rgba(15,23,42,.12), 0 4px 8px rgba(15,23,42,.06);
	--vmt-font-mono: 'JetBrains Mono', ui-monospace, monospace;
	--vmt-transition: 0.22s cubic-bezier(.4,0,.2,1);

	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 16px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

@media (max-width: 1100px) {
	ul.products.vmt__grid,
	.woocommerce ul.products.vmt__grid,
	.vmt__grid {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

@media (max-width: 768px) {
	ul.products.vmt__grid,
	.woocommerce ul.products.vmt__grid,
	.vmt__grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 10px !important;
	}
}

.vmt__grid.vmt__grid--list {
	grid-template-columns: 1fr !important;
}

/* ==================== CARD ==================== */
.woocommerce ul.products li.product.vmt__card,
.vmt__grid .vmt__card,
.vmt__card {
	min-width: 0;
	background: #fff;
	border-radius: var(--vmt-radius-lg);
	border: 1.5px solid var(--vmt-gray-200);
	overflow: hidden;
	display: flex !important;
	flex-direction: column;
	transition: border-color var(--vmt-transition), box-shadow var(--vmt-transition), transform var(--vmt-transition);
	animation: vmtFadeUp 0.4s ease both;
	padding: 0 !important;
	margin: 0 !important;
	width: auto !important;
	float: none !important;
	list-style: none !important;
	text-align: left !important;
}
.vmt__card::before, .vmt__card::after { display: none !important; }

.vmt__card:hover {
	border-color: var(--vmt-navy);
	box-shadow: var(--vmt-shadow-md);
	transform: translateY(-2px);
}

@keyframes vmtFadeUp {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

.vmt__card:nth-child(1) { animation-delay: .04s; }
.vmt__card:nth-child(2) { animation-delay: .08s; }
.vmt__card:nth-child(3) { animation-delay: .12s; }
.vmt__card:nth-child(4) { animation-delay: .16s; }
.vmt__card:nth-child(5) { animation-delay: .20s; }
.vmt__card:nth-child(6) { animation-delay: .24s; }
.vmt__card:nth-child(7) { animation-delay: .28s; }
.vmt__card:nth-child(8) { animation-delay: .32s; }
.vmt__card:nth-child(9) { animation-delay: .36s; }
.vmt__card:nth-child(10) { animation-delay: .40s; }

/* ==================== CARD IMAGE ==================== */
.vmt__card-img {
	position: relative;
	background: var(--vmt-gray-50);
	height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid var(--vmt-gray-200);
	overflow: hidden;
}
.vmt__img-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}
.vmt__card-img img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	padding: 16px;
	transition: transform var(--vmt-transition);
	margin: 0 !important;
}
.vmt__card:hover .vmt__card-img img { transform: scale(1.04); }
.vmt__placeholder { opacity: .18; transition: opacity var(--vmt-transition); margin: auto; }
.vmt__card:hover .vmt__placeholder { opacity: .28; }

/* ==================== BADGES ==================== */
.vmt__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 99px;
	z-index: 2;
}
.vmt__badge--hot { background: var(--vmt-navy); color: #fff; }
.vmt__badge--sale { background: var(--vmt-orange-bg); color: var(--vmt-orange-dk); border: 1px solid #f0c4a8; }
.vmt__badge--new { background: var(--vmt-green-bg); color: #15803d; border: 1px solid #a8d8b5; }
.vmt__badge--contact { background: var(--vmt-gray-100); color: var(--vmt-gray-500); border: 1px solid var(--vmt-gray-300); }

/* ==================== STOCK INDICATOR ==================== */
.vmt__stock-ind {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	gap: 5px;
	background: rgba(255,255,255,.92);
	border: 1px solid var(--vmt-gray-200);
	border-radius: 99px;
	padding: 3px 8px 3px 6px;
	font-size: 10.5px;
	font-weight: 500;
	color: var(--vmt-gray-700);
	backdrop-filter: blur(4px);
	z-index: 2;
}
.vmt__stock-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.vmt__stock-dot.s-green { background: var(--vmt-green); box-shadow: 0 0 0 2px rgba(22,163,74,.25); }
.vmt__stock-dot.s-amber { background: var(--vmt-amber); box-shadow: 0 0 0 2px rgba(217,119,6,.25); }
.vmt__stock-dot.s-red { background: var(--vmt-red); box-shadow: 0 0 0 2px rgba(220,38,38,.25); }

/* ==================== WISHLIST ==================== */
.vmt__wishlist-btn {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	background: rgba(255,255,255,.9);
	border: 1px solid var(--vmt-gray-200);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	transform: scale(.8);
	transition: all var(--vmt-transition);
	color: var(--vmt-gray-400);
	padding: 0;
	z-index: 3;
}
.vmt__card:hover .vmt__wishlist-btn { opacity: 1; transform: scale(1); }
.vmt__wishlist-btn:hover { color: var(--vmt-red); border-color: #fecaca; background: #fff5f5; }
.vmt__wishlist-btn.is-active { color: var(--vmt-red); border-color: #fecaca; background: #fff5f5; opacity: 1; transform: scale(1); }
.vmt__wishlist-btn.is-active svg { fill: currentColor; }

/* ==================== CARD BODY ==================== */
.vmt__card-body {
	padding: 14px 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.vmt__sku-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-family: var(--vmt-font-mono);
	font-size: 11px;
	color: var(--vmt-gray-400);
}

.vmt__product-name {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--vmt-gray-900);
	line-height: 1.35;
	text-decoration: none;
	transition: color var(--vmt-transition);
}
.vmt__product-name:hover { color: var(--vmt-navy); }

/* ==================== PRICING ==================== */
.vmt__pricing { display: flex; flex-direction: column; gap: 2px; }
.vmt__price-row { display: flex; align-items: baseline; gap: 8px; }
.vmt__price { font-size: 18px; font-weight: 700; color: var(--vmt-orange); }
.vmt__price-old { font-size: 12px; color: var(--vmt-gray-400); text-decoration: line-through; }
.vmt__price-unit { font-size: 11.5px; color: var(--vmt-gray-500); }
.vmt__price-contact { font-size: 15px; font-weight: 700; color: var(--vmt-navy); }

/* ==================== DIVIDER ==================== */
.vmt__divider { height: 1px; background: var(--vmt-gray-100); }

/* ==================== SPECS ==================== */
.vmt__specs { display: flex; flex-wrap: wrap; gap: 4px; }
.vmt__stag {
	font-size: 11px;
	font-weight: 500;
	background: var(--vmt-navy-pale);
	color: var(--vmt-navy);
	padding: 2px 8px;
	border-radius: 4px;
	border: 1px solid rgba(45,78,114,.12);
}
.vmt__stag--grade { background: #fff7ed; color: #9a3412; border-color: rgba(194,65,12,.15); font-family: var(--vmt-font-mono); }
.vmt__stag--standard { background: #f0fdf4; color: #166534; border-color: rgba(22,101,52,.15); }

/* ==================== INFO ROW ==================== */
.vmt__info-row {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: var(--vmt-gray-500);
}
.vmt__info-row svg { flex-shrink: 0; color: var(--vmt-gray-400); }
.vmt__info-row .vmt__val { color: var(--vmt-navy-dark); font-weight: 600; }
.vmt__info-row .vmt__warn { color: var(--vmt-amber); font-weight: 600; }

/* ==================== CARD FOOTER ==================== */
.vmt__card-footer {
	padding: 10px 14px 12px;
	display: flex;
	gap: 7px;
	border-top: 1px solid var(--vmt-gray-100);
}
.vmt__btn-cart {
	flex: 1;
	background: var(--vmt-orange);
	border: none;
	border-radius: var(--vmt-radius-sm);
	font-size: 12.5px;
	font-weight: 700;
	color: #fff;
	padding: 8px 10px;
	cursor: pointer;
	transition: background var(--vmt-transition), transform var(--vmt-transition);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	text-decoration: none;
	font-family: inherit;
}
.vmt__btn-cart:hover { background: var(--vmt-orange-dk); color: #fff; }
.vmt__btn-cart:active { transform: scale(.97); }
.vmt__btn-cart.added { background: var(--vmt-green); }
.vmt__btn-cart--contact { background: var(--vmt-navy); }
.vmt__btn-cart--contact:hover { background: var(--vmt-navy-dark); }

.vmt__btn-cart--icon {
	flex: 0 0 38px;
	width: 38px;
	padding: 0;
}

.vmt__btn-quote {
	background: #fff;
	border: 1.5px solid var(--vmt-navy);
	border-radius: var(--vmt-radius-sm);
	font-size: 12px;
	font-weight: 600;
	color: var(--vmt-navy);
	padding: 8px 10px;
	cursor: pointer;
	white-space: nowrap;
	transition: all var(--vmt-transition);
	display: flex;
	align-items: center;
	gap: 5px;
	font-family: inherit;
}
.vmt__btn-quote:hover { background: var(--vmt-navy-pale); }

/* ==================== LIST VIEW ==================== */
.vmt__grid--list .vmt__card { flex-direction: row !important; height: 140px; }
.vmt__grid--list .vmt__card-img { width: 140px; height: 140px; flex-shrink: 0; border-bottom: none; border-right: 1px solid var(--vmt-gray-200); }
.vmt__grid--list .vmt__card-body { flex-direction: row; align-items: center; padding: 12px 16px; gap: 20px; }
.vmt__grid--list .vmt__card-footer { border-top: none; border-left: 1px solid var(--vmt-gray-100); flex-direction: column; justify-content: center; padding: 10px 14px; min-width: 160px; }

/* ==================== TOOLBAR ==================== */
.vmt__toolbar {
	background: #fff;
	border: 1px solid var(--vmt-gray-200);
	border-radius: var(--vmt-radius-md);
	padding: 12px 14px;
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.vmt__filter-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--vmt-gray-700);
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 5px;
}
.vmt__filter-label::before {
	content: '';
	width: 14px;
	height: 14px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'/%3E%3C/svg%3E") no-repeat center;
}

.vmt__filter-chips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	flex: 1;
	min-width: 0;
}

.vmt__chip {
	height: 30px;
	padding: 0 12px;
	border: 1px solid var(--vmt-gray-200);
	border-radius: 99px;
	background: var(--vmt-gray-50);
	font-size: 12.5px;
	font-weight: 500;
	color: var(--vmt-gray-700);
	cursor: pointer;
	transition: all var(--vmt-transition);
	white-space: nowrap;
	font-family: inherit;
}
.vmt__chip:hover { border-color: var(--vmt-navy); color: var(--vmt-navy); background: #fff; }
.vmt__chip--active { background: var(--vmt-navy); border-color: var(--vmt-navy); color: #fff; }
.vmt__chip--active:hover { background: var(--vmt-navy-dark); color: #fff; }

.vmt__toolbar-divider {
	width: 1px;
	height: 22px;
	background: var(--vmt-gray-200);
	margin: 0 2px;
}

.vmt__toolbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.vmt__sort-select {
	height: 30px;
	padding: 0 28px 0 10px;
	border: 1px solid var(--vmt-gray-200);
	border-radius: var(--vmt-radius-sm);
	font-size: 12.5px;
	color: var(--vmt-gray-700);
	background: var(--vmt-gray-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
	appearance: none;
	cursor: pointer;
	outline: none;
	font-family: inherit;
	transition: all var(--vmt-transition);
}
.vmt__sort-select:hover { border-color: var(--vmt-navy); background-color: #fff; }
.vmt__sort-select:focus { border-color: var(--vmt-navy); background-color: #fff; }

.vmt__view-toggle {
	display: flex;
	border: 1px solid var(--vmt-gray-200);
	border-radius: var(--vmt-radius-sm);
	overflow: hidden;
	background: var(--vmt-gray-50);
}
.vmt__view-btn {
	width: 30px;
	height: 30px;
	background: transparent;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--vmt-gray-400);
	transition: all var(--vmt-transition);
	padding: 0;
}
.vmt__view-btn--active { background: var(--vmt-navy); color: #fff; }
.vmt__view-btn:hover:not(.vmt__view-btn--active) { background: #fff; color: var(--vmt-gray-700); }

.vmt__results-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
	font-size: 12.5px;
	color: var(--vmt-gray-500);
}
.vmt__results-bar strong { color: var(--vmt-navy-dark); font-weight: 700; }

/* ==================== MODAL ==================== */
.vmt__modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,.55);
	backdrop-filter: blur(3px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
}
.vmt__modal-overlay.is-open { opacity: 1; pointer-events: all; }

.vmt__modal {
	background: #fff;
	border-radius: var(--vmt-radius-lg);
	padding: 28px;
	width: 100%;
	max-width: 440px;
	box-shadow: var(--vmt-shadow-lg);
	transform: scale(.95) translateY(12px);
	transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.vmt__modal-overlay.is-open .vmt__modal { transform: scale(1) translateY(0); }

.vmt__modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.vmt__modal-title { font-size: 17px; font-weight: 700; color: var(--vmt-navy-dark); }
.vmt__modal-sub { font-size: 12.5px; color: var(--vmt-gray-500); margin-top: 3px; }
.vmt__modal-close {
	width: 30px;
	height: 30px;
	border: 1px solid var(--vmt-gray-200);
	border-radius: 50%;
	background: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--vmt-gray-500);
	transition: all var(--vmt-transition);
	padding: 0;
}
.vmt__modal-close:hover { background: var(--vmt-gray-100); color: var(--vmt-gray-900); }

.vmt__form-group { margin-bottom: 14px; }
.vmt__form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--vmt-gray-700); margin-bottom: 5px; }
.vmt__form-input {
	width: 100%;
	height: 38px;
	padding: 0 12px;
	border: 1.5px solid var(--vmt-gray-200);
	border-radius: var(--vmt-radius-sm);
	font-size: 13.5px;
	color: var(--vmt-gray-900);
	background: var(--vmt-gray-50);
	transition: border-color var(--vmt-transition);
	outline: none;
	font-family: inherit;
}
.vmt__form-input:focus { border-color: var(--vmt-navy); background: #fff; }
.vmt__form-input--readonly { background: var(--vmt-navy-pale); color: var(--vmt-navy); font-weight: 500; border-color: rgba(45,78,114,.2); cursor: default; }
.vmt__form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.vmt__btn-submit {
	width: 100%;
	height: 42px;
	margin-top: 6px;
	background: var(--vmt-navy);
	border: none;
	border-radius: var(--vmt-radius-sm);
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	transition: background var(--vmt-transition), transform var(--vmt-transition);
	font-family: inherit;
}
.vmt__btn-submit:hover { background: var(--vmt-navy-dark); }
.vmt__btn-submit:active { transform: scale(.98); }
.vmt__btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ==================== TOAST ==================== */
.vmt__toast-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	z-index: 99999;
	pointer-events: none;
}
.vmt__toast {
	background: #0f172a;
	color: #fff;
	padding: 12px 18px;
	border-radius: var(--vmt-radius-md);
	font-size: 13px;
	font-weight: 500;
	box-shadow: var(--vmt-shadow-lg);
	display: flex;
	align-items: center;
	gap: 10px;
	animation: vmtSlideIn .3s cubic-bezier(.34,1.56,.64,1) both;
	pointer-events: all;
	max-width: 320px;
}
.vmt__toast--success { border-left: 3px solid var(--vmt-green); }
.vmt__toast--info { border-left: 3px solid var(--vmt-navy); }
.vmt__toast--error { border-left: 3px solid var(--vmt-red); }
.vmt__toast-icon {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
}
.vmt__toast--success .vmt__toast-icon { background: var(--vmt-green); }
.vmt__toast--info .vmt__toast-icon { background: var(--vmt-navy); }
.vmt__toast--error .vmt__toast-icon { background: var(--vmt-red); }

@keyframes vmtSlideIn {
	from { opacity: 0; transform: translateX(40px) scale(.9); }
	to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes vmtSlideOut {
	from { opacity: 1; transform: translateX(0) scale(1); }
	to   { opacity: 0; transform: translateX(40px) scale(.9); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
	.vmt__grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
	.vmt__toolbar { padding: 10px 12px; gap: 8px; }
	.vmt__filter-chips { order: 3; width: 100%; flex: none; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
	.vmt__filter-chips::-webkit-scrollbar { display: none; }
	.vmt__filter-label { order: 1; }
	.vmt__toolbar-right { order: 2; margin-left: auto; }
	.vmt__toolbar-divider { display: none; }
	.vmt__grid--list .vmt__card { flex-direction: column !important; height: auto; }
	.vmt__grid--list .vmt__card-img { width: 100%; height: 140px; border-right: none; border-bottom: 1px solid var(--vmt-gray-200); }
	.vmt__grid--list .vmt__card-body { flex-direction: column; align-items: flex-start; }
	.vmt__grid--list .vmt__card-footer { flex-direction: row; border-left: none; border-top: 1px solid var(--vmt-gray-100); min-width: 0; }
}

@media (max-width: 480px) {
	.vmt__toolbar-right { width: 100%; margin-left: 0; }
	.vmt__form-row { grid-template-columns: 1fr; }
	.vmt__toast-container { left: 12px; right: 12px; bottom: 12px; }
}
