/**
 * VV Child Theme — Component Styles
 *
 * Reusable UI component styles used across all pages.
 */

html,
body,
button,
input,
select,
textarea,
optgroup {
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* =============================================================
   CONTAINER
   ============================================================= */

.vv-container {
	width: 100%;
	max-width: 1280px;
	margin-right: auto;
	margin-left: auto;
	padding-right: 24px;
	padding-left: 24px;
}

.vv-container--narrow {
	max-width: 860px;
}

.vv-container--wide {
	max-width: 1440px;
}

.vv-container--full {
	max-width: 100%;
	padding-right: 0;
	padding-left: 0;
}

/* =============================================================
   BUTTONS
   ============================================================= */

.vv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	padding: 12px 28px;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
}

.vv-btn--primary {
	/* Primary button styles will be added during Hero build */
}

.vv-btn--secondary {
	/* Secondary button styles will be added during Hero build */
}

.vv-btn--outline {
	/* Outline button styles will be added during Hero build */
}

/* =============================================================
   SECTION TITLE
   ============================================================= */

.vv-section-title {
	margin-bottom: 48px;
}

.vv-section-title--center {
	text-align: center;
}

.vv-section-title--left {
	text-align: left;
}

.vv-section-title--right {
	text-align: right;
}

.vv-section-title__heading {
	/* Heading styles will be built out section by section */
}

.vv-section-title__subheading {
	/* Subheading styles will be built out section by section */
}

/* =============================================================
   BADGE
   ============================================================= */

.vv-badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 2px;
}

/* =============================================================
   PRODUCT GRID
   ============================================================= */

.vv-product-grid {
	display: grid;
	gap: 24px;
}

.vv-product-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.vv-product-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.vv-product-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* =============================================================
   PRODUCT CARD
   Vehicle listing card — Spinny-style reference design
   ============================================================= */

.vv-product-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
	border: 1px solid #eaeaea;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03), 0 1px 4px rgba(0, 0, 0, 0.02);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	/* Carousel sizing — overridden by .vv-fp__track context */
	flex-shrink: 0;
}

.vv-product-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.vv-product-card:hover .vv-product-card__title {
	color: #e8001c;
}

/* ── Stretched Link (whole card clickable) ─────────────── */

.vv-product-card__link {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
}

/* ── Image Area ──────────────────────────────────────────── */

.vv-product-card__image {
	position: relative;
	overflow: hidden;
	background: #f5f5f5;
	aspect-ratio: 4 / 3;
	flex-shrink: 0;
}

.vv-product-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Featured Badge ─────────────────────────────────────── */

.vv-product-card__badge--featured {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #FFD000;
	color: #1a1a1a;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 6px;
	letter-spacing: 0.02em;
	z-index: 1;
}

/* ── Sold Badge ─────────────────────────────────────────── */

.vv-product-card__badge--sold {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #e8001c;
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 6px;
	letter-spacing: 0.02em;
	z-index: 1;
}

/* ── Wishlist Button ────────────────────────────────────── */

.vv-product-card__wishlist {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ffffff;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #484848;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
	z-index: 3;
	padding: 0;
}

.vv-product-card__wishlist svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 2px;
	fill: none;
	transition: fill 0.15s ease, stroke 0.15s ease;
}

.vv-product-card__wishlist:hover {
	transform: scale(1.05);
	color: #e53935;
}

.vv-product-card__wishlist:hover svg {
	fill: #e53935;
	stroke: #e53935;
}

/* ── Card Body ───────────────────────────────────────────── */

.vv-product-card__body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 0;
	flex: 1;
}

/* ── Brand + Title Row ───────────────────────────────────── */

.vv-product-card__brand-title-row {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-bottom: 8px;
}

.vv-product-card__brand {
	font-size: 0.72rem;
	font-weight: 600;
	color: #8e8e93;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1.2;
}

.vv-product-card__title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.25;
	letter-spacing: -0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vv-product-card__title a {
	color: inherit;
	text-decoration: none;
	display: inline-block;
}

.vv-product-card__title a:hover {
	color: #e8001c;
}

/* ── Pricing Row ─────────────────────────────────────────── */

.vv-product-card__pricing-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	border-top: 1px solid #f2f2f2;
	padding-top: 8px;
	padding-bottom: 0;
	margin-top: auto;
	gap: 6px;
}

.vv-product-card__price-label {
	display: block;
	font-size: 0.72rem;
	color: #8e8e93;
	margin-bottom: 2px;
	font-weight: 500;
	line-height: 1.2;
}

.vv-product-card__emi {
	display: block;
	font-size: 0.95rem;
	font-weight: 700;
	color: #e8001c;
	white-space: nowrap;
	line-height: 1.2;
}

.vv-product-card__price {
	display: block;
	font-size: 0.95rem;
	font-weight: 700;
	color: #1a1a1a;
	white-space: nowrap;
	line-height: 1.2;
}

/* WooCommerce price HTML override */
.vv-product-card__price .woocommerce-Price-amount,
.vv-product-card__price ins .woocommerce-Price-amount {
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
}

.vv-product-card__price ins {
	text-decoration: none;
}

.vv-product-card__price del {
	color: #8e8e93;
	font-size: 0.8rem;
	margin-right: 4px;
}

/* ── Sold CTA Row ────────────────────────────────────────── */

.vv-product-card__sold-row {
	border-top: 1px solid #f2f2f2;
	padding-top: 10px;
	padding-bottom: 0;
	margin-top: auto;
	display: flex;
	align-items: center;
}

.vv-product-card__call-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 8px 14px;
	background-color: #e8001c;
	color: #ffffff;
	font-size: 0.88rem;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 2px 8px rgba(232, 0, 28, 0.2);
	position: relative;
	z-index: 3;
}

.vv-product-card__call-btn:hover,
.vv-product-card__call-btn:focus {
	background-color: #c40018;
	color: #ffffff;
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(232, 0, 28, 0.3);
}

.vv-product-card__call-btn svg {
	width: 15px;
	height: 15px;
	stroke: currentColor;
	fill: none;
	flex-shrink: 0;
}

/* ── Metadata Grid ───────────────────────────────────────── */

.vv-product-card__meta-grid {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid #f2f2f2;
	padding: 8px 0;
	margin-bottom: 8px;
}

.vv-product-card__meta-col {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.vv-product-card__meta-col--right {
	align-items: flex-end;
	text-align: right;
}

.vv-product-card__meta-label {
	font-size: 0.72rem;
	color: #8e8e93;
	font-weight: 500;
	line-height: 1.2;
}

.vv-product-card__meta-value {
	font-size: 0.9rem;
	font-weight: 700;
	color: #1a1a1a;
	white-space: nowrap;
	line-height: 1.2;
}

/* ── Loop Shop Reset ─────────────────────────────────────── */

.woocommerce ul.products li.product.vv-product-loop-item,
.woocommerce-page ul.products li.product.vv-product-loop-item {
	background: none !important;
	box-shadow: none !important;
	border: none !important;
	padding: 0 !important;
	margin-bottom: 30px !important;
}

.woocommerce ul.products li.product.vv-product-loop-item::before,
.woocommerce-page ul.products li.product.vv-product-loop-item::before {
	display: none !important;
}

/* ── Mobile 1-Column Product Cards (Mobile Only <= 920px) ───── */

@media (max-width: 920px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products,
	ul.products,
	.vv-product-grid,
	.vv-product-grid--cols-2,
	.vv-product-grid--cols-3,
	.vv-product-grid--cols-4 {
		display: flex !important;
		flex-direction: column !important;
		width: 100% !important;
		max-width: 100% !important;
		gap: 20px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.woocommerce ul.products li.product,
	.woocommerce-page ul.products li.product,
	ul.products li.product,
	.woocommerce ul.products li.product.vv-product-loop-item,
	.woocommerce-page ul.products li.product.vv-product-loop-item,
	.woocommerce .span_9 ul.products li.product,
	.woocommerce-page .span_9 ul.products li.product {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 100% !important;
		float: none !important;
		display: block !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		margin-bottom: 0 !important;
		box-sizing: border-box !important;
		clear: both !important;
	}

	.vv-product-card {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
	}
}

/* =============================================================
   CAROUSEL
   ============================================================= */

.vv-carousel {
	position: relative;
	overflow: hidden;
}

.vv-carousel__track {
	display: flex;
	transition: transform 0.35s ease;
}

.vv-carousel__slide {
	flex: 0 0 auto;
	width: 100%;
}

.vv-carousel__prev,
.vv-carousel__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 2rem;
	z-index: 2;
	padding: 8px;
}

.vv-carousel__prev { left: 8px; }
.vv-carousel__next { right: 8px; }

/* =============================================================
   MODAL
   ============================================================= */

.vv-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vv-modal[hidden] {
	display: none;
}

.vv-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.vv-modal__dialog {
	position: relative;
	background: #fff;
	border-radius: 8px;
	max-width: 640px;
	width: calc(100% - 32px);
	max-height: 90vh;
	overflow-y: auto;
}

.vv-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #eee;
}

.vv-modal__body {
	padding: 24px;
}

.vv-modal__close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
}


