/* Home layout: presentation only; product cards are owned by skin-archive.css. */
.vap-auto-home {
	width: min(100% - 2 * var(--vap-gutter), var(--vap-container));
	margin-inline: auto;
	padding-block: 30px 40px;
}

.vap-auto-home > * + * {
	margin-top: 28px;
}

.vap-auto-home__categories,
.vap-auto-home__products {
	min-width: 0;
}

.vap-auto-home .vap-auto-title {
	margin: 0 0 16px;
	color: var(--vap-primary);
	font-family: var(--vap-font-head);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.vap-auto-home__category-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}

.vap-auto-home__category {
	display: flex;
	min-width: 0;
	box-sizing: border-box;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	padding: 12px 12px 16px;
	border: 1px solid var(--vap-line);
	border-radius: 16px;
	background: var(--vap-white);
	box-shadow: 0 4px 14px rgb(0 0 0 / 6%);
	color: var(--vap-text);
	text-align: center;
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}

.vap-auto-home__category-media {
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	background: #F0F7FD;
}

.vap-auto-home__category-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.vap-auto-home__category strong {
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vap-auto-home__category:hover {
	border-color: var(--vap-primary);
	box-shadow: 0 8px 20px rgb(14 116 144 / 14%);
	color: var(--vap-primary);
	transform: translateY(-2px);
}

.vap-auto-home__category:focus-visible {
	outline: 2px solid var(--vap-primary);
	outline-offset: 2px;
}

@media (max-width: 1100px) {
	.vap-auto-home__category-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.vap-auto-home__products {
	min-width: 0;
	padding: 0;
	border-radius: 0;
	background: transparent;
}

.vap-auto-home__products .vap-auto-title {
	margin: 0;
	color: var(--vap-primary);
}

.vap-seat-colours__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	grid-auto-rows: 1fr;
}

.vap-seat-colours__grid .vap-pcard {
	min-width: 0;
}

.vap-seat-colours__grid .vap-pcard__title {
	height: 2.8em;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.vap-seat-colours__grid .vap-pcard__media a,
.vap-seat-colours__grid .vap-pcard__media img {
	display: block;
	width: 100%;
	height: 100%;
}

.vap-seat-colours__grid .vap-pcard__media img {
	object-fit: contain;
}

.vap-auto-home .wp-block-woocommerce-product-collection {
	margin: 0;
}

.vap-auto-home .wp-block-woocommerce-product-template {
	gap: 12px;
}

.vap-auto-home__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.vap-auto-home__section-head .vap-auto-title {
	flex: 1;
}

.vap-auto-home__section-head > a {
	color: var(--vap-primary);
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.vap-auto-home {
		width: min(100% - 2 * var(--vap-gutter), var(--vap-container));
		padding-block: 16px 28px;
	}

	.vap-auto-home > * + * {
		margin-top: 22px;
	}

	.vap-auto-home .vap-auto-title {
		margin-bottom: 12px;
		font-size: 21px;
	}

	.vap-auto-home__category-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
	}

	.vap-auto-home__category {
		gap: 8px;
		padding: 8px 8px 10px;
		border-radius: 12px;
	}

	.vap-auto-home__category-media {
		border-radius: 8px;
	}

	.vap-auto-home__category strong {
		font-size: 14px;
	}

	.vap-auto-home__products {
		padding: 0;
	}

	.vap-seat-colours__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.vap-seat-colours__grid .vap-pcard__title {
		font-size: 14px;
	}

	.vap-auto-home .wp-block-woocommerce-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.vap-auto-home__section-head {
		align-items: flex-start;
	}

	.vap-auto-home__section-head > a {
		font-size: 13px;
	}
}


/* Colour grids (home and seat-cover category): 5 per row like the reference shop, 2 on phones. */
.vap-product-grid.vap-seat-colours__grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--vap-gap);
}

@media (max-width: 1023px) {
	.vap-product-grid.vap-seat-colours__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.vap-product-grid.vap-seat-colours__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
}

/* Hero: one 2:1 banner slot; the slides are a horizontal scroll-snap track, white dots sit on the image bottom. */
.vap-slider { position: relative; }
.vap-slider__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	border-radius: var(--vap-radius-sm);
	background: var(--vap-mist);
}
.vap-slider__track::-webkit-scrollbar { display: none; }
.vap-slider__slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; display: block; text-decoration: none; color: var(--vap-warm-gray); }
.vap-slider__slide img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
/* Phone first: the words sit under the image. */
.vap-slide__text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px 16px; background: var(--vap-mist); }
.vap-slide__logo { display: block; width: 120px; margin-bottom: 4px; }
.vap-slide__logo svg { display: block; width: 100%; height: auto; }
.vap-slide__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.vap-slide__title { font-size: 22px; line-height: 1.15; color: var(--vap-crimson); }
.vap-slide__sub { font-size: 14px; line-height: 1.4; font-weight: 600; }
.vap-slide__cta { margin-top: 6px; padding: 10px 20px; border-radius: 999px; background: var(--vap-crimson); color: var(--vap-white); font-size: 14px; font-weight: 700; }
.vap-slider__nav { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 2 / 1; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.vap-slider__nav:empty { display: none; }
.vap-slider__dots { pointer-events: auto; display: flex; margin-bottom: 8px; padding: 0 6px; border-radius: 999px; background: rgb(8 51 68 / 35%); }
.vap-slider__dot { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.vap-slider__dot::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: rgb(255 255 255 / 60%); transition: width .2s, background .2s; }
.vap-slider__dot[aria-selected="true"]::after { width: 20px; background: var(--vap-white); }
.vap-slider__dot:focus-visible { outline: 2px solid var(--vap-white); border-radius: 999px; }
/* Wider screens: the words sit over the empty left side of the image. */
@media (min-width: 768px) {
	.vap-slider__slide { display: flex; }
	.vap-slide__text {
		position: absolute;
		inset: 0 auto 0 0;
		width: 46%;
		justify-content: center;
		gap: 10px;
		padding: 0 3% 0 6%;
		background: linear-gradient(90deg, rgb(255 255 255 / 94%) 0%, rgb(255 255 255 / 70%) 65%, rgb(255 255 255 / 0%) 100%);
	}
	.vap-slide__logo { width: 22%; min-width: 150px; }
	.vap-slide__eyebrow { font-size: 14px; }
	.vap-slide__title { font-size: clamp(26px, 3.6vw, 48px); }
	.vap-slide__sub { font-size: clamp(14px, 1.6vw, 20px); }
	.vap-slide__cta { padding: 12px 26px; font-size: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
	.vap-slider__track { scroll-behavior: smooth; }
}

/* Flash sale: real WooCommerce sale prices; rows inside a card are fixed so prices line up across cards. */
.vap-flash {
	padding: 22px 24px 24px;
	border-radius: 16px;
	background: var(--vap-primary);
}
.vap-flash[hidden] { display: none; }
.vap-flash__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 18px;
}
.vap-flash__title {
	margin: 0;
	color: var(--vap-white);
	font-family: var(--vap-font-head);
	font-size: 28px;
	font-weight: 800;
	line-height: 1.2;
	text-transform: uppercase;
}
.vap-flash__timer { display: flex; align-items: center; gap: 8px; color: var(--vap-white); }
.vap-flash__timer-label { margin-right: 6px; font-size: 20px; font-weight: 600; }
.vap-flash__unit {
	display: flex;
	box-sizing: border-box;
	width: 52px;
	height: 56px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: var(--vap-white);
	color: var(--vap-text);
	font-variant-numeric: tabular-nums;
}
.vap-flash__unit[hidden] { display: none; }
.vap-flash__unit b { font-size: 22px; font-weight: 800; line-height: 1.1; }
.vap-flash__unit small { font-size: 12px; line-height: 1.2; color: var(--vap-text-2); }
.vap-flash__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 4 * 16px) / 5);
	gap: 16px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.vap-flash__track::-webkit-scrollbar { display: none; }
.vap-flash__card {
	display: flex;
	min-width: 0;
	box-sizing: border-box;
	flex-direction: column;
	padding: 12px 12px 14px;
	border-radius: 12px;
	background: var(--vap-white);
	scroll-snap-align: start;
}
.vap-flash__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	background: var(--vap-white);
}
.vap-flash__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.vap-flash__off {
	position: absolute;
	top: 6px;
	right: 6px;
	padding: 2px 7px;
	border-radius: 4px;
	background: #e3000f;
	color: var(--vap-white);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}
.vap-flash__name {
	display: -webkit-box;
	overflow: hidden;
	min-height: calc(2 * 1.4em);
	margin: 12px 0 6px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.vap-flash__name a { color: var(--vap-text); text-decoration: none; }
.vap-flash__name a:hover { color: var(--vap-primary); }
.vap-flash__rating { display: flex; align-items: center; gap: 8px; min-height: 20px; margin: 0 0 6px; color: var(--vap-text-2); font-size: 14px; }
.vap-flash__rating .vap-stars { color: #ffb400; letter-spacing: 1px; }
/* Always two lines: old price + sold on top, sale price alone below, so every card's price sits at the same height. */
.vap-flash__price { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 20px 24px; align-items: center; gap: 2px 8px; margin: auto 0 12px; }
.vap-flash__price del { grid-area: 1 / 1; overflow: hidden; color: var(--vap-text-2); font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.vap-flash__price ins { grid-area: 2 / 1 / 3 / 3; color: var(--vap-primary); font-size: 18px; font-weight: 800; line-height: 24px; text-decoration: none; white-space: nowrap; }
.vap-flash__sold { grid-area: 1 / 2; color: var(--vap-text-2); font-size: 14px; line-height: 20px; white-space: nowrap; }
.vap-flash__stock,
.vap-flash__buy {
	position: relative;
	display: flex;
	box-sizing: border-box;
	height: 26px;
	align-items: center;
	justify-content: center;
	margin: 0;
	border-radius: 13px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
}
.vap-flash__stock {
	overflow: hidden;
	background: #DCEEFC;
	color: var(--vap-white);
}
.vap-flash__stock::before {
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--vap-flash-fill, 0%);
	background: linear-gradient(90deg, #62AEEA, var(--vap-primary));
	content: "";
}
.vap-flash__stock span { position: relative; text-shadow: 0 1px 1px rgb(0 0 0 / 20%); }
.vap-flash__buy { background: var(--vap-primary); color: var(--vap-white); text-decoration: none; }
.vap-flash__buy:hover { background: #0F4F87; }

@media (max-width: 1023px) {
	.vap-flash__track { grid-auto-columns: calc((100% - 2 * 16px) / 3.2); }
}
@media (max-width: 767px) {
	.vap-flash { padding: 16px 12px 16px; border-radius: 12px; }
	.vap-flash__title { font-size: 21px; }
	.vap-flash__timer-label { font-size: 14px; }
	.vap-flash__unit { width: 42px; height: 46px; }
	.vap-flash__unit b { font-size: 18px; }
	.vap-flash__track { grid-auto-columns: calc((100% - 10px) / 2.15); gap: 10px; }
	.vap-flash__card { padding: 8px 8px 10px; }
	.vap-flash__name { font-size: 14px; }
	.vap-flash__price ins { font-size: 16px; }
	.vap-flash__price del { font-size: 13px; }
}
