/* ApiNature »Nakupujte glede na vaš cilj« */
.apn-gs {
	--apn-gs-cols: 5;
	--apn-gs-gap: 28px;
	--apn-gs-radius: 10px;
	--apn-gs-card-bg: #f9f9f9;
	--apn-gs-heading: #6f9710;
	font-family: 'Manrope', sans-serif;
	text-align: center;
}

.apn-gs__heading {
	margin: 0 0 16px;
	color: var(--apn-gs-heading);
	font-size: 40px;
	font-weight: 700;
	line-height: 1.2;
}

.apn-gs__description {
	max-width: 838px;
	margin: 0 auto 40px;
	font-size: 20px;
	line-height: 26px;
}

.apn-gs__viewport {
	position: relative;
	padding: 0 48px;
}

.apn-gs__track {
	display: flex;
	gap: var(--apn-gs-gap);
	/*
	 * overflow-x: auto poreže tudi navpično (dvig in senca ob hoverju),
	 * zato ima trak notranji odmik, ki ga negativni rob izravna.
	 */
	margin: -8px 0 -20px;
	padding: 8px 0 20px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.apn-gs__track::-webkit-scrollbar {
	display: none;
}

.apn-gs__item {
	flex: 0 0 calc((100% - (var(--apn-gs-cols) - 1) * var(--apn-gs-gap)) / var(--apn-gs-cols));
	margin: 0;
	scroll-snap-align: start;
	container-type: inline-size;
}

.apn-gs__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 16px 8px;
	background: var(--apn-gs-card-bg);
	/* 0,25 px #707070 iz dizajna: brskalnik ga zaokroži na 1 px, zato svetlejša barva. */
	border: 1px solid #e2e2e2;
	border-radius: var(--apn-gs-radius);
	color: #000;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.apn-gs__card:hover,
a.apn-gs__card:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
	color: #000;
}

.apn-gs__circle {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 79px;
	height: 79px;
	background: var(--apn-gs-circle, #6f9710);
	border-radius: 50%;
}

.apn-gs__circle img {
	max-width: 55%;
	max-height: 55%;
	object-fit: contain;
}

.apn-gs__label {
	font-size: 20px;
	line-height: 23px;
	text-wrap: balance;
}

/* Ožje ploščice (npr. vsebnik 1140 px): manjša pisava, da naziv ostane v dveh vrsticah. */
@container (max-width: 200px) {
	.apn-gs__label {
		font-size: 17px;
		line-height: 21px;
	}
}

.apn-gs__nav {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 31px;
	height: 31px;
	margin-top: -15px;
	padding: 0;
	background: #b5b5b5;
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

/* Enake puščice kot v mreži izdelkov (product-grid.css). */
.apn-gs__nav svg {
	width: 16px;
	height: 16px;
}

.apn-gs__nav:hover:not(:disabled) {
	background: #6f9710;
}

.apn-gs__nav:focus-visible {
	background: #6f9710;
	outline: 2px solid #6f9710;
	outline-offset: 2px;
}

.apn-gs__nav:disabled {
	opacity: 0.4;
	cursor: default;
}

.apn-gs__nav--prev {
	left: 0;
}

.apn-gs__nav--next {
	right: 0;
}

@media (max-width: 1024px) {
	.apn-gs { --apn-gs-cols: 3; }
	.apn-gs__heading { font-size: 32px; }
}

@media (max-width: 767px) {
	.apn-gs { --apn-gs-cols: 2; --apn-gs-gap: 14px; }
	.apn-gs__heading { font-size: 26px; }
	.apn-gs__description { margin-bottom: 24px; font-size: 16px; line-height: 22px; }
	.apn-gs__circle { width: 64px; height: 64px; }
	.apn-gs__label { font-size: 16px; line-height: 19px; }

	/*
	 * Na mobilnem sta puščici skupaj pod ploščicami, poravnani desno, v
	 * normalnem toku – enako kot v mreži izdelkov (product-grid.css).
	 */
	.apn-gs__viewport {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 10px 8px;
		padding: 0;
	}

	.apn-gs__track {
		flex: 0 0 100%;
		order: -1;
	}

	/* Na telefonu puščice nadomesti indikator položaja (pikice). */
	.apn-gs__nav {
		display: none;
	}

	.apn-gs .apn-gs__dots {
		display: flex;
		flex: 0 0 100%;
		order: 0;
		justify-content: center;
		gap: 8px;
	}
}

.apn-gs__dots {
	display: none;
}

.apn-gs__dot {
	width: 8px;
	height: 8px;
	min-height: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: #d0d0d0;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.apn-gs__dot.is-active {
	background-color: #6f9710;
	transform: scale(1.25);
}
