/**
 * PetroAr — Product Galería Justificada
 *
 * Justified gallery row with horizontal scroll arrows.
 * Desktop: 4 thumbnails visible. Mobile (≤1024px): 2 visible.
 */

.petroar-gallery-justified {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 0;
	overflow: hidden;
}

.petroar-gallery-track {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-snap-type: x mandatory;
}

.petroar-gallery-track::-webkit-scrollbar {
	display: none;
}

.petroar-gallery-item {
	display: flex;
	flex: 0 0 auto;
	width: auto;
	height: 100px;
	scroll-snap-align: start;
}

.petroar-gallery-item a {
	display: inline-flex;
	flex: 0 0 auto;
	width: auto;
	height: 100%;
}

.petroar-gallery-item img,
.petroar-product-gallery-item img {
	flex: 0 0 auto;
	width: auto;
	max-width: none;
	height: 100%;
	display: block;
}

/* ----------------------------------------
   Arrows
   ---------------------------------------- */

.petroar-gallery-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-top: -14px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(25, 89, 65, 0.85);
	color: #ffffff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition:
		opacity 0.25s ease,
		background 0.2s ease;
}

.petroar-gallery-arrow i {
	display: block;
	line-height: 1;
}

.petroar-gallery-arrow svg {
	display: block;
}

.petroar-gallery-justified:hover .petroar-gallery-arrow,
.petroar-gallery-justified:focus-within .petroar-gallery-arrow {
	opacity: 1;
}

.petroar-gallery-arrow:hover,
.petroar-gallery-arrow:focus {
	background: rgba(25, 89, 65, 0.95);
	outline: none;
}

.petroar-gallery-arrow[aria-hidden="true"] {
	opacity: 0;
	pointer-events: none;
	padding: 1rem;
}

.petroar-gallery-arrow--left {
	left: 0;
}

.petroar-gallery-arrow--right {
	right: 0;
}

@media (max-width: 1024px) {
	.petroar-gallery-item {
		height: 85px;
	}
}

@media (max-width: 640px) {
	.petroar-gallery-item {
		height: 80px;
	}
}
