/* =========================================================
   Vendora — front page styles (hero / cases / news / widgets)
   Common styles live in style.css
   ========================================================= */

/* ---------- Hero ---------- */

.vd-hero {
	position: relative;
	padding: 36px;
	overflow: visible;
}

.vd-hero-copy {
	max-width: 470px;
	position: relative;
	z-index: 2;
}

.vd-hero-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 17px;
	font-weight: 800;
	color: var(--vd-primary);
}

.vd-hero-year {
	font-size: 12.5px;
	font-weight: 700;
	background: var(--vd-primary-soft);
	color: var(--vd-primary);
	padding: 3px 11px;
	border-radius: 999px;
}

.vd-hero h1 {
	font-size: 46px;
	line-height: 1.14;
	font-weight: 800;
	letter-spacing: -.03em;
	margin: 14px 0 16px;
}

.vd-hero-sub {
	font-size: 16.5px;
	color: var(--vd-text-2);
	max-width: 480px;
	line-height: 1.7;
}

.vd-hero-actions {
	display: flex;
	gap: 14px;
	margin-top: 28px;
	flex-wrap: wrap;
}

/* Product showcase panel */

.vd-showcase {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 260px;
	height: 330px;
}

/* Owner dashboard mockup */

.vd-dash {
	position: absolute;
	inset: 0;
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: 20px;
	box-shadow: 0 14px 34px rgba(16, 24, 40, .12);
	padding: 16px;
}

.vd-dash-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}

.vd-dash-head-l {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.vd-dash-title {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--vd-text-2);
}

.vd-dash-head-l small {
	font-size: 10.5px;
	color: var(--vd-text-3);
	margin-top: 3px;
}

.vd-dash-head-r {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	flex: none;
}

.vd-dash-head-r b {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.02em;
}

.vd-dash-head-r .up {
	font-size: 10.5px;
	font-weight: 800;
	color: var(--vd-green);
	background: var(--vd-green-soft);
	padding: 1px 7px;
	border-radius: 999px;
	margin-top: 3px;
}

.vd-dash-live {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--vd-green-soft);
	border-radius: 999px;
	padding: 2px 8px;
	font-size: 10px;
	font-weight: 700;
	color: var(--vd-green);
}

.vd-dash-live i {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--vd-green);
	animation: vd-pulse 1.6s ease-in-out infinite;
}

@keyframes vd-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .3; }
}

.vd-dash-chart {
	display: block;
	width: 100%;
	height: 90px;
	margin-top: 14px;
	overflow: visible;
}

.vd-dash-chart .grid {
	stroke: var(--vd-border);
	stroke-dasharray: 3 4;
}

.vd-dash-chart .fill {
	fill: url(#vdChartFill);
}

.vd-dash-chart .line {
	fill: none;
	stroke: var(--vd-primary);
	stroke-width: 2.5;
	stroke-linecap: round;
}

.vd-dash-chart .dot {
	fill: var(--vd-primary);
	stroke: var(--vd-inset);
	stroke-width: 2;
}

.vd-dash-tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 10px;
}

.vd-dash-tile {
	background: var(--vd-card);
	border: 1px solid var(--vd-border);
	border-radius: 12px;
	padding: 9px 12px;
}

.vd-dash-tile small {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--vd-text-3);
}

.vd-dash-tile b {
	display: block;
	font-size: 16px;
	font-weight: 800;
	margin-top: 1px;
}

/* Live activity row (rotating toasts inside the card) */

.vd-toasts {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	height: 40px;
	z-index: 6;
}

.vd-home-toast {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--vd-inset);
	border-radius: 12px;
	padding: 0 10px;
	opacity: 0;
	transition: opacity .5s;
}

.vd-home-toast.active {
	opacity: 1;
}

.vd-toast-ava {
	width: 24px;
	height: 24px;
	border-radius: 999px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
}

.vd-toast-body {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.vd-toast-body b {
	font-size: 12px;
	font-weight: 700;
}

.vd-toast-body span {
	font-size: 11px;
	color: var(--vd-text-3);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- Case studies ---------- */

.vd-cases {
	padding-bottom: 26px;
}

.vd-case-cats {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
	padding: 0 24px;
}

.vd-case-cat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
}

.vd-case-cat .ico {
	width: 58px;
	height: 58px;
	border-radius: 16px;
	background: var(--vd-inset);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--vd-text-2);
	transition: all .2s;
}

.vd-case-cat .ico svg {
	width: 24px;
	height: 24px;
}

.vd-case-cat > span:last-child {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--vd-text-2);
	transition: color .2s;
}

.vd-case-cat:hover .ico {
	background: var(--vd-primary-soft);
	color: var(--vd-primary);
}

.vd-case-cat.active .ico {
	background: linear-gradient(135deg, var(--vd-primary-2), var(--vd-primary));
	color: #fff;
	box-shadow: 0 6px 14px rgba(2, 132, 199, .4);
}

.vd-case-cat.active > span:last-child {
	color: var(--vd-text);
	font-weight: 700;
}

.vd-case-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-top: 20px;
	padding: 0 24px;
}

.vd-case-item {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background-color: var(--vd-inset);
	background-size: cover;
	background-position: center;
}

.vd-case-item::before {
	content: "";
	position: absolute;
	inset: 0;
	background: inherit;
	filter: blur(18px) brightness(1.06);
	transform: scale(1.15);
}

.vd-case-item img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .4s;
}

.vd-case-item:hover img {
	transform: scale(1.04);
}

.vd-case-item.is-hidden {
	display: none;
}

.vd-case-tag {
	position: absolute;
	z-index: 2;
	left: 10px;
	bottom: 10px;
	background: rgba(23, 26, 32, .72);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	padding: 4px 11px;
	border-radius: 999px;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* ---------- Products ---------- */

.vd-products {
	padding-bottom: 26px;
}

.vd-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: start;
	gap: 14px;
	margin-top: 20px;
	padding: 0 24px;
}

.vd-product {
	display: flex;
	flex-direction: column;
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: 14px;
	overflow: hidden;
}

.vd-product-img {
	position: relative;
	display: block;
	background-color: var(--vd-inset);
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

/* Full-width, height follows the image ratio — no side letterboxing. */
.vd-product-img img {
	display: block;
	width: 100%;
	height: auto;
}

.vd-product-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--vd-red);
	color: #fff;
	border-radius: 8px;
	padding: 4px 9px;
	text-align: center;
	line-height: 1.3;
	box-shadow: 0 4px 10px rgba(220, 38, 38, .3);
}

.vd-product-badge b {
	display: block;
	font-size: 13px;
	font-weight: 800;
}

.vd-product-badge small {
	display: block;
	font-size: 10px;
	font-weight: 600;
	opacity: .9;
}

.vd-product-body {
	margin-top: auto;
	padding: 12px 14px 14px;
}

.vd-product-top {
	display: flex;
	align-items: center;
	gap: 8px;
}

.vd-product-name {
	flex: 1;
	min-width: 0;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color .2s;
}

.vd-product-name:hover {
	color: var(--vd-primary);
}

.vd-product-cart {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--vd-card);
	border: 1px solid var(--vd-border);
	color: var(--vd-primary);
	transition: all .2s;
}

.vd-product-cart svg {
	width: 16px;
	height: 16px;
}

.vd-product-cart:hover {
	background: var(--vd-primary);
	border-color: var(--vd-primary);
	color: #fff;
}

.vd-product-cart.is-busy {
	opacity: .5;
	pointer-events: none;
}

.vd-product-sub {
	margin-top: 3px;
	font-size: 13px;
	color: var(--vd-text-3);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vd-product-price {
	margin-top: 8px;
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.vd-product-price b {
	font-size: 16.5px;
	font-weight: 800;
	letter-spacing: -.01em;
}

.vd-product-price s {
	font-size: 13px;
	color: var(--vd-text-3);
}

/* ---------- News grid teaser ---------- */

.vd-newsgrid-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin-top: 18px;
	padding: 0 24px 24px;
}

.vd-newsgrid-item {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: 12px;
	padding: 10px;
}

.vd-newsgrid-img {
	position: relative;
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--vd-inset);
	background-size: cover;
	background-position: center;
}

.vd-newsgrid-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vd-newsgrid-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vd-newsgrid-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s;
}

.vd-newsgrid-item:hover .vd-newsgrid-title {
	color: var(--vd-primary);
}

.vd-newsgrid-date {
	font-size: 12.5px;
	color: var(--vd-text-3);
}

/* ---------- News ---------- */

.vd-news {
	padding-bottom: 26px;
}

.vd-news-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-top: 20px;
	padding: 0 24px;
}

.vd-post {
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: 14px;
	padding: 14px;
	display: flex;
	gap: 14px;
	min-width: 0;
}

.vd-post.is-hidden {
	display: none;
}

.vd-post-top {
	display: flex;
	align-items: center;
	gap: 8px;
}

.vd-post-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.vd-post-ava {
	width: 24px;
	height: 24px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	flex: none;
}

.vd-post-name {
	font-size: 13px;
	font-weight: 600;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vd-post-date {
	margin-left: auto;
	font-size: 12px;
	color: var(--vd-text-3);
	flex: none;
}

.vd-post-img {
	position: relative;
	flex: 0 0 150px;
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	display: block;
	background-color: var(--vd-inset);
	background-size: cover;
	background-position: center;
}

.vd-post-img::before {
	content: "";
	position: absolute;
	inset: 0;
	background: inherit;
	filter: blur(16px) brightness(1.06);
	transform: scale(1.15);
}

.vd-post-img img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Mobile-only image strip (1–3 in-content images under the text).
   Hidden on desktop, where the left thumbnail is used instead. */
.vd-post-m-imgs {
	display: none;
}

/* ---------- Multi-image posts: mobile-style layout on desktop ----------
   Posts with 2+ in-content images (article.has-multi) switch to the
   phone layout — text on top, image strip below. Single-image posts
   keep the left thumbnail. Scoped to desktop; <=920px mobile.css
   already applies the same layout to every post. */
@media (min-width: 921px) {
	.vd-post.has-multi {
		flex-direction: column;
		gap: 12px;
	}

	.vd-post.has-multi .vd-post-img {
		display: none;
	}

	.vd-post.has-multi .vd-post-title {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
	}

	.vd-post.has-multi .vd-post-m-imgs {
		display: flex;
		gap: 8px;
		width: 100%;
	}

	.vd-post.has-multi .vd-post-m-imgs a {
		flex: 1;
		min-width: 0;
		height: 150px;
		border-radius: 10px;
		overflow: hidden;
		background: var(--vd-inset);
	}

	.vd-post.has-multi .vd-post-m-imgs img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

.vd-post-title {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.4;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	/* Same 200ms fade as the product/news titles — without it the color
	   jumps in 0ms, which reads as a flash on a full line of text. */
	transition: color .2s;
}

.vd-post-title:hover {
	color: var(--vd-primary);
}

.vd-post-badges {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.vd-post-badge {
	font-size: 12px;
	font-weight: 600;
	padding: 2.5px 10px;
	border-radius: 999px;
	background: var(--vd-green-soft);
	color: var(--vd-green);
}

.vd-post-badge.red {
	background: var(--vd-red-soft);
	color: var(--vd-red);
}

.vd-post-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--vd-text-3);
	min-width: 0;
}

.vd-post-cat {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vd-post-cat-dot {
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--vd-primary-2), var(--vd-primary));
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vd-post-tag {
	color: var(--vd-blue);
	font-weight: 500;
	flex: none;
}

.vd-post-stats {
	display: flex;
	gap: 10px;
	font-size: 12px;
	color: var(--vd-text-3);
	margin-top: auto;
}

.vd-post-stats span {
	display: flex;
	align-items: center;
	gap: 5px;
}

.vd-post-stats svg {
	width: 14px;
	height: 14px;
}

.vd-load-more {
	width: calc(100% - 48px);
	margin: 18px 24px 0;
	padding: 13px;
	border-radius: 999px;
	background: var(--vd-inset);
	font-size: 15px;
	font-weight: 700;
	color: var(--vd-text-2);
	transition: all .2s;
}

.vd-load-more:hover {
	background: var(--vd-primary-soft);
	color: var(--vd-primary);
}

.vd-load-more.done {
	background: var(--vd-inset);
	color: var(--vd-text-3);
	cursor: default;
}

/* Sponsored */

.vd-ad-slot {
	margin-top: 12px;
	border: 1.5px dashed var(--vd-border);
	border-radius: 12px;
	background: var(--vd-inset);
	aspect-ratio: 4 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	color: var(--vd-text-3);
}

.vd-ad-slot b {
	font-size: 18px;
	font-weight: 800;
	color: var(--vd-text-2);
}

.vd-ad-slot span {
	font-size: 12.5px;
}

.vd-ad-banner {
	margin-top: 12px;
	border-radius: 12px;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, rgba(2, 132, 199, .1), rgba(2, 132, 199, .18));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px;
	gap: 5px;
}

.vd-ad-banner b {
	font-size: 16px;
	font-weight: 800;
	line-height: 1.35;
}

.vd-ad-banner span {
	font-size: 13px;
	color: var(--vd-text-2);
}

/* Lucky draw */

.vd-draw-media {
	margin-top: 12px;
	border-radius: 12px;
	aspect-ratio: 16 / 9;
	background:
		radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .25), transparent 40%),
		linear-gradient(135deg, #38bdf8, #0284c7 55%, #075985);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px;
	gap: 4px;
}

.vd-draw-title {
	color: #fff;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.35;
}

.vd-draw-sub {
	color: rgba(255, 255, 255, .85);
	font-size: 12.5px;
}

.vd-draw-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 12px;
}

.vd-draw-cell {
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: 10px;
	padding: 9px 12px;
}

.vd-draw-cell small {
	font-size: 12px;
	color: var(--vd-text-3);
	display: block;
}

.vd-draw-cell b {
	font-size: 15px;
	font-weight: 700;
}

.vd-draw-status {
	margin-top: 10px;
	font-size: 13px;
	color: var(--vd-text-3);
	background: var(--vd-inset);
	border: 1px solid var(--vd-border);
	border-radius: 10px;
	padding: 9px 12px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.vd-draw-progress {
	margin-top: 10px;
}

.vd-draw-progress .row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--vd-text-2);
}

.vd-draw-progress .row b {
	font-weight: 700;
}

.vd-draw-bar {
	height: 8px;
	border-radius: 999px;
	background: var(--vd-inset);
	margin-top: 7px;
	overflow: hidden;
}

.vd-draw-bar i {
	display: block;
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--vd-primary-2), var(--vd-primary));
	border-radius: 999px;
}

.vd-draw-note {
	font-size: 12.5px;
	color: var(--vd-text-3);
	margin-top: 6px;
}

/* What's new feed */

.vd-feed {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 14px;
}

.vd-feed-item {
	display: flex;
	gap: 10px;
}

.vd-feed-ico {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vd-feed-ico svg {
	width: 17px;
	height: 17px;
}

.vd-feed-ico.new {
	background: var(--vd-primary-soft);
	color: var(--vd-primary);
}

.vd-feed-ico.opt {
	background: var(--vd-amber-soft);
	color: var(--vd-amber);
}

.vd-feed-ico.fix {
	background: var(--vd-blue-soft);
	color: var(--vd-blue);
}

.vd-feed-item b {
	font-size: 13.5px;
	font-weight: 700;
}

.vd-feed-item b em {
	font-style: normal;
	font-weight: 500;
	font-size: 12.5px;
	color: var(--vd-text-3);
	margin-left: 4px;
}

.vd-feed-item p {
	font-size: 13.5px;
	color: var(--vd-text-2);
	line-height: 1.55;
	margin-top: 2px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Home responsive ---------- */

@media (max-width: 1400px) {
	.vd-hero-copy {
		max-width: 380px;
	}

	.vd-hero h1 {
		font-size: 40px;
	}

	.vd-showcase {
		width: 240px;
	}
}

@media (max-width: 1180px) {
	.vd-hero {
		padding: 30px 26px;
	}

	.vd-hero-copy {
		max-width: none;
	}

	.vd-showcase {
		/* relative (not static): keeps .vd-dash/.vd-toasts (absolute inset)
		   contained inside the showcase instead of escaping to .vd-hero.
		   top/right must be reset: the desktop rule sets them for absolute
	   positioning, and a leftover right:14px would shift the box 14px left. */
		position: relative;
		top: auto;
		right: auto;
		transform: none;
		margin: 26px auto 0;
		width: 100%;
		max-width: 540px;
		height: 320px;
	}

}

@media (max-width: 920px) {
	.vd-hero {
		padding: 26px 24px;
	}

	.vd-hero h1 {
		font-size: 34px;
	}

	.vd-case-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vd-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vd-newsgrid-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}

@media (max-width: 640px) {
	.vd-newsgrid-grid {
		grid-template-columns: 1fr;
	}

	.vd-hero {
		padding: 22px 18px;
	}

	.vd-hero h1 {
		font-size: 30px;
	}

	.vd-hero-sub {
		font-size: 15px;
	}

	.vd-showcase {
		height: 300px;
	}

	.vd-card-head {
		padding: 18px 18px 0;
	}

	.vd-case-cats,
	.vd-case-grid,
	.vd-product-grid,
	.vd-news-grid {
		padding: 0 18px;
	}

	.vd-load-more {
		width: calc(100% - 36px);
		margin: 18px 18px 0;
	}

	.vd-post-img {
		flex: 0 0 140px;
	}
}
