/*
 * Greway Elementor widgets — CSS chỉ cho phần KHÔNG diễn đạt được bằng
 * Tailwind utility (scroll-snap, ::-webkit-scrollbar, carousel transform
 * state...). Class Tailwind trong render() các widget đã đủ style phần còn
 * lại — xem docs/greway-build-plan.md mục 5.2.
 */

/* ── values-grid.php — copy nguyên từ <style> riêng about.html ── */
.value-scroll {
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
}

.value-scroll::-webkit-scrollbar {
	display: none;
}

.value-card {
	scroll-snap-align: start;
}

/* ── home-hero.php — hiệu ứng lật từng ký tự của dòng tiêu đề đầu tiên ── */
.greway-home-hero .hero-flip-line {
	display: inline-block;
}

.greway-home-hero .hero-flip-chars .flip-char {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	height: 1.3em;
	line-height: 1.3;
	white-space: pre;
}

.greway-home-hero .hero-flip-chars .flip-char-cell {
	display: block;
	height: 1.3em;
	line-height: 1.3;
}

.greway-home-hero .hero-flip-chars .flip-char-roll {
	display: block;
	transform: translateY(0);
	transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1) var(--roll-delay, 0ms);
	will-change: transform;
}

.greway-home-hero .hero-flip-chars .flip-char-roll.rolling {
	transform: translateY(-1.3em);
}

.greway-home-hero .hero-flip-chars .flip-char-roll span {
	display: block;
	height: 1.3em;
	line-height: 1.3;
	transition: opacity 0.42s cubic-bezier(0.65, 0, 0.35, 1) var(--roll-delay, 0ms);
	will-change: opacity;
}

.greway-home-hero .hero-flip-chars .flip-char-roll .roll-cell-old,
.greway-home-hero .hero-flip-chars .flip-char-roll.rolling .roll-cell-new {
	opacity: 1;
}

.greway-home-hero .hero-flip-chars .flip-char-roll .roll-cell-new,
.greway-home-hero .hero-flip-chars .flip-char-roll.rolling .roll-cell-old {
	opacity: 0.3;
}

/* ── split-image-text.php — style <p> do WYSIWYG sinh ra, khớp đúng class
   Tailwind mà 2 đoạn <p> viết tay trong about.html gốc đang dùng ── */
.greway-split-text p {
	margin-top: 1em;
	max-width: 620px;
	font-size: 16px;
	line-height: 1.55;
	color: #737373;
}

.greway-split-text p:first-of-type {
	margin-top: 1.5rem;
}

@media (min-width: 1024px) {
	.greway-split-text p {
		font-size: 18px;
	}
}

/* ── hero-product.php — copy nguyên từ <style> riêng index.html (không phải
   Tailwind utility: stage animation, text-stroke chữ nền...) ── */
.product-hero-preview {
	position: relative;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	background: #f3f3f1;
	color: #050505;
	isolation: isolate;
}

.product-hero-word-wrap {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.product-hero-word {
	position: absolute;
	font-family: "SVN Apparat", system-ui, sans-serif;
	font-size: clamp(10rem, 34vw, 40rem);
	font-weight: 800;
	line-height: 0.8;
	letter-spacing: 0;
	color: transparent;
	-webkit-text-stroke: clamp(1px, 0.14vw, 3px) rgba(20, 20, 20, 0.22);
	white-space: nowrap;
	transform: translateY(0);
	transition: transform 0.72s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.72s ease;
}

.product-hero-word.enter-from-bottom {
	transform: translateY(115%);
	opacity: 0;
}

.product-hero-word.exit-to-top {
	transform: translateY(-115%);
	opacity: 0;
}

.product-hero-stage {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(72px, 8vw, 112px) clamp(16px, 5vw, 80px) clamp(96px, 10vw, 148px);
	pointer-events: none;
}

.product-hero-bike {
	position: absolute;
	width: min(82vw, 1320px);
	max-height: min(72svh, 720px);
	object-fit: contain;
	filter: drop-shadow(0 34px 32px rgba(0, 0, 0, 0.18));
	will-change: transform, opacity;
	transition: transform 0.78s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.48s ease;
}

.product-hero-bike.exit-left,
.product-hero-bike.enter-left {
	transform: translateX(-115vw);
	opacity: 0;
}

.product-hero-bike.exit-right,
.product-hero-bike.enter-right {
	transform: translateX(115vw);
	opacity: 0;
}

.product-hero-ui {
	position: absolute;
	inset-inline: clamp(18px, 4vw, 72px);
	bottom: clamp(26px, 4vw, 58px);
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
	align-items: center;
	gap: clamp(14px, 3vw, 36px);
}

.product-hero-actions {
	grid-column: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.product-hero-btn {
	min-width: clamp(118px, 12vw, 176px);
	height: clamp(36px, 3.4vw, 44px);
	border-radius: 9999px;
	border: 2px solid #050505;
	background: transparent;
	color: #050505;
	font-size: clamp(0.9rem, 1vw, 1.12rem);
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.product-hero-btn:hover {
	transform: translateY(-1px);
}

.product-hero-btn.primary {
	background: #050505;
	color: #fff;
}

.product-hero-arrows {
	grid-column: 3;
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.product-hero-arrow {
	width: clamp(34px, 3.2vw, 42px);
	height: clamp(34px, 3.2vw, 42px);
	border: 0;
	border-radius: 8px;
	background: rgba(20, 20, 20, 0.06);
	color: #141414;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.product-hero-arrow:hover {
	background: rgba(20, 20, 20, 0.12);
}

.product-hero-arrow:disabled {
	opacity: 0.42;
	cursor: default;
}

/* ── Carousel chung (accessory-carousel/post-carousel/video-showcase) — copy
   nguyên từ <style> riêng index.html ── */
.carousel-track {
	display: flex;
	gap: 20px;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.carousel-wrap {
	overflow: hidden;
	padding-top: 12px;
	margin-top: -12px;
}

/* Tràn carousel accessories/news ra sát mép viewport, độc lập với cột nội
   dung căn giữa max-width 1200px */
#acc-wrap,
#news-wrap {
	margin-right: calc((100% - 100vw) / 2);
}

.nav-btn {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: rgba(29, 29, 29, 0.05);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s;
	border: none;
	flex-shrink: 0;
}

.nav-btn:hover {
	background: rgba(29, 29, 29, 0.1);
}

.nav-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.nav-btn svg {
	width: 16px;
	height: 16px;
}

.filter-pill {
	border: 1px solid #d4d4d4;
	border-radius: 40px;
	padding: 8px 16px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	background: transparent;
	color: #141414;
	line-height: 1.2;
}

.filter-pill.active {
	background: #141414;
	color: #f8f8f5;
	border-color: #141414;
}

.filter-pill:hover:not(.active) {
	background: rgba(20, 20, 20, 0.07);
}

.product-card {
	transition: transform 0.3s ease;
}

.product-card img {
	transition: transform 0.5s ease;
}

.product-card:hover img {
	transform: scale(1.04);
}

.news-card img {
	transition: transform 0.5s ease;
}

.news-card:hover img {
	transform: scale(1.04);
}

.news-card-item {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card-item:hover {
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}

.news-arrow-btn {
	width: 36px;
	height: 36px;
	background: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.carousel-wrap,
	#feat-wrap {
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		overscroll-behavior-inline: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		touch-action: pan-x;
	}

	#feat-wrap {
		scroll-padding-inline-start: 24px;
	}

	.carousel-wrap::-webkit-scrollbar,
	#feat-wrap::-webkit-scrollbar {
		display: none;
	}

	.carousel-track,
	#feat-track {
		width: max-content;
		transform: none !important;
		transition: none !important;
		will-change: auto;
	}

	.carousel-track > *,
	#feat-track > .feat-card {
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}
}

@media (max-width: 720px) {
	.product-hero-stage {
		align-items: center;
		padding-top: 84px;
		padding-bottom: 148px;
	}

	.product-hero-bike {
		width: 118vw;
		max-height: 56svh;
	}

	.product-hero-word {
		font-size: clamp(9rem, 58vw, 18rem);
	}

	.product-hero-ui {
		grid-template-columns: 1fr;
		justify-items: center;
		text-align: center;
	}

	.product-hero-actions {
		grid-column: 1;
		order: 1;
		justify-content: center;
	}

	.product-hero-arrows {
		grid-column: 1;
		order: 2;
		justify-content: center;
	}
}
