/**
 * Mobile VNT 39 child-theme components.
 *
 * Sections are deliberately scoped so similarly named Flatsome/plugin classes
 * do not affect unrelated blocks.
 */

:root {
	--vnt39-accent: #c92b20;
	--vnt39-success: #318a00;
	--vnt39-border: #e5e7eb;
	--vnt39-muted: #6b7280;
	--vnt39-radius: 16px;
}

/* Accessibility helpers. */
.vnt39-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Product savings badge. */
.sale-badge {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	max-width: 100%;
}

.sale-badge__title,
.sale-badge .title {
	font-size: 0.75rem;
	line-height: 1.2;
}

.sale-badge__price,
.sale-badge .sale-price {
	font-weight: 700;
}

/* Category title shortcode. */
.hdevvn-show-cats {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0 12px;
	padding: 0;
	list-style: none;
}

.hdevvn-show-cats a {
	font-size: 0.875rem;
}

/* Special category widget. */
.special-category-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.special-category-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 5px 0;
}

.special-category-list__name {
	display: inline-flex;
	align-items: center;
	min-width: 0;
}

.special-category-list__arrow {
	margin-right: 6px;
	color: var(--vnt39-accent);
	font-size: 0.75em;
}

.special-category-list__item.is-parent a {
	font-weight: 700;
}

.special-category-list__count {
	flex: 0 0 auto;
	color: var(--vnt39-muted);
}

/* Product description expand/collapse. */
.single-product #tab-description {
	position: relative;
	overflow: hidden;
	padding-bottom: 48px;
}

.single-product #tab-description.is-collapsed {
	max-height: 800px;
}

.vnt39-read-more {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 10;
	padding-top: 38px;
	border: 0;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 42%);
	color: var(--vnt39-success);
	font: inherit;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
}

.vnt39-read-more::after {
	display: inline-block;
	margin-left: 6px;
	border-top: 6px solid currentColor;
	border-right: 6px solid transparent;
	border-left: 6px solid transparent;
	content: '';
	vertical-align: middle;
}

.vnt39-read-more.is-expanded {
	position: static;
	display: block;
	width: 100%;
	padding-top: 12px;
	background: none;
}

.vnt39-read-more.is-expanded::after {
	border-top: 0;
	border-bottom: 6px solid currentColor;
}

/* Product specifications. */
.product-specs {
	border: 1px solid var(--vnt39-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.product-specs h2 {
	margin: 0;
	padding: 14px 16px;
	background: #f8fafc;
	font-size: 1.125rem;
}

.spec-row {
	display: grid;
	grid-template-columns: minmax(110px, 38%) 1fr;
	border-top: 1px solid var(--vnt39-border);
}

.spec-label,
.spec-value {
	padding: 10px 12px;
}

.spec-label {
	background: #f8fafc;
	font-weight: 600;
}

.product-specs__empty {
	margin: 0;
	padding: 16px;
	color: var(--vnt39-muted);
}

/* Shop banner and brand carousel. */
#fptLiteBlock {
	--fpt-border: #b90113;
	margin: 20px;
	padding: 0;
}

#fptLiteBlock .fpt-slider {
	position: relative;
	max-width: 1200px;
	margin: auto;
	border-radius: var(--vnt39-radius);
	overflow: hidden;
}

#fptLiteBlock .fpt-slide {
	display: none;
	min-width: 100%;
}

#fptLiteBlock .fpt-slide.active {
	display: block;
}

#fptLiteBlock .fpt-slide img {
	display: block;
	width: 100%;
	height: auto !important;
	aspect-ratio: 6 / 1;
	border-radius: var(--vnt39-radius);
	object-fit: cover;
}

#fptLiteBlock .fpt-nav,
#fptLiteBlock .fpt-brand-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

#fptLiteBlock .fpt-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.9);
	opacity: 0;
	transform: translateY(-50%);
}

#fptLiteBlock .fpt-slider:hover .fpt-nav,
#fptLiteBlock .fpt-nav:focus-visible {
	opacity: 1;
}

#fptLiteBlock .fpt-nav.prev { left: 12px; }
#fptLiteBlock .fpt-nav.next { right: 12px; }

#fptLiteBlock .fpt-brands-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
}

#fptLiteBlock .fpt-brand-nav {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	background: #f3f4f6;
	font-size: 1.5rem;
}

#fptLiteBlock .fpt-brands {
	display: grid;
	flex: 1;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

#fptLiteBlock .fpt-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 67px;
	padding: 10px;
	border: 1px solid var(--fpt-border);
	border-radius: 12px;
	background: #fff;
}

#fptLiteBlock .fpt-brand img {
	max-width: 100%;
	max-height: 70px;
	object-fit: contain;
}

/* User status in wp-admin. */
.vnt39-status--active { color: #15803d; }
.vnt39-status--pending { color: #b91c1c; }

@media (max-width: 849px) {
	.hdevvn-show-cats { display: none; }

	.product-specs { margin-top: 20px; }

	.spec-row { grid-template-columns: minmax(100px, 40%) 1fr; }

	#fptLiteBlock { margin: 12px 0; }

	#fptLiteBlock .fpt-slide img { aspect-ratio: 16 / 7; }

	#fptLiteBlock .fpt-nav,
	#fptLiteBlock .fpt-brand-nav { display: none; }

	#fptLiteBlock .fpt-brands {
		display: flex;
		gap: 8px;
		padding-bottom: 10px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	#fptLiteBlock .fpt-brands::-webkit-scrollbar { display: none; }

	#fptLiteBlock .fpt-brand {
		flex: 0 0 140px;
		min-height: 62px;
		scroll-snap-align: start;
	}

	/* Keep the contact plugin collapsed so it does not cover product content. */
	#button-contact-vr {
		top: auto !important;
		bottom: 76px !important;
		height: 72px !important;
	}

	#button-contact-vr #gom-all-in-one {
		display: none;
	}

	#button-contact-vr .phone-bar {
		display: none !important;
	}
}
