/* Termékrács fő konténer Flexbox beállítása */
.product-grid-container {
	display: flex;
	flex-wrap: wrap;
	padding: 0;
	list-style: none;
}

.product-grid-container::before,
.product-grid-container::after {
	display: none; /* Inaktiváljuk a régi float clearfix-et */
}

/* Oszlopok (4 oszlop nagy képernyőn, 2 tableten, 1 mobilon) */
.product-grid-container .product-card-col {
	padding-left: 15px;
	padding-right: 15px;
	margin-bottom: 60px;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
}

/* Desktop: 4 oszlop (25%) */
@media screen and (min-width: 1024px) {
	.product-grid-container .product-card-col {
		flex: 0 0 25%;
		max-width: 25%;
	}
}

/* Tablet: 3 oszlop (33%) */
@media screen and (min-width: 800px) and (max-width: 1023px) {
	.product-grid-container .product-card-col {
		flex: 0 0 33%;
		max-width: 33%;
	}
}

/* Tablet: 2 oszlop (50%) */
@media screen and (min-width: 640px) and (max-width: 799px) {
	.product-grid-container .product-card-col {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

@media screen and (max-width: 639px) {
	.product-grid-container {
		justify-content: center;
		.product-card-col {
			flex: 0 0 50%;
			max-width: 50%;
			padding-left: 10px;
			padding-right: 10px;
			margin-bottom: 15px;
			.product-image-wrapper {
				height: clamp(185px, 55vw, 240px);
			}
		}
	}
}

/* Kártya belső felépítése */
.product-card {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin: 0 auto;
}

/* Képméretek osztályok alapján */
.product-card.size-small .product-image-wrapper img {
	height: 250px !important;
	@media screen and (max-width: 639px) {
		height: 78% !important;
	}
}

.product-card.size-medium .product-image-wrapper img {
	height: 280px !important;
	@media screen and (max-width: 639px) {
		height: 82% !important;
	}
}

.product-card.size-large .product-image-wrapper img {
	height: 320px !important;
	@media screen and (max-width: 639px) {
		height: 100% !important;
	}
}

/* Képkonténer - Fix 320px magasság, hogy a könyvek alsó széle egy vonalban legyen */
.product-image-wrapper {
	display: flex;
	align-items: flex-end; /* Könyvek alulra igazítása */
	justify-content: center;
	height: 320px;
	width: 100%;
	margin-bottom: 15px;
}

.product-image-wrapper img {
	object-fit: contain;
	max-width: 100%;
	height: auto;
	display: block;
}

.product-image-wrapper img:not(.mockup) {
	border: 1px solid #000;
	box-sizing: border-box;
}

.product-image-wrapper img.mockup {
	border: none;
	object-fit: cover;
}

/* Tipográfia formázás */
.product-author {
	font-family: 'Buttler', serif;
	font-weight: bold;
	font-size: 22px;
	line-height: 26px;
	color: #D50027;
	margin-bottom: 6px;
	@media screen and (max-width: 639px) {
		font-size: 16px;
	}
}

.product-title {
	font-family: 'Open Sans', sans-serif;
	font-size: 26px;
	line-height: 30px;
	color: #000;
	margin: 0 0 6px 0;
	hyphens: auto;
	@media screen and (max-width: 639px) {
		font-size: 20px;
	}
}

.product-title a {
	color: #000;
	text-decoration: none;
	font-weight: 700 !important;
	&:visited {
		color: #000;
	}
	&:hover {
		color: #777;
	}
}

.product-subtitle {
	font-family: 'Open Sans', sans-serif;
	font-style: italic;
	font-size: 20px;
	line-height: 30px;
	color: #000;
	@media screen and (max-width: 639px) {
		font-size: 15px;
	}
}

/* 8. elem utáni Banner megtöri a sort és 100% széles lesz */
.product-grid-container .full-width-banner {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
	clear: both;
}