:root {
    --product-item-background: #eeeeee;
    --product-item-background-hover: #cecece;
}

.product-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.product-overview h2 {
    grid-column: 1 / -1;
    margin: 48px 0 8px 0;
}

.product-overview a {
	color: var(--text);
}

.product-item {
    position: relative;
    background: var(--product-item-background);
    text-align: center;
    aspect-ratio: 1;
}

.product-item:hover {
    background: var(--product-item-background-hover);
}

.product-item::before {
	content: "";
	display: block;
	width: 100%;
	height: 0;
	padding-bottom: 100%;
}

.item-content {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding-bottom: 12px;
}

.image-container {
	position: relative;
	width: 90%;
	flex-grow: 1;
}

.image-container picture, .image-container img {
	max-width: 100%;
	max-height: 95%;
	position: absolute;
	margin: auto;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
}

@media screen and (min-width: 700px) {
	.product-overview {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media screen and (min-width: 1000px) {
	.product-overview {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media screen and (prefers-color-scheme: dark) {
    :root {
        --product-item-background: #202020;
        --product-item-background-hover: #141414;
    }
}