/* Products */

.products__wrapper {
	display: flex;
    gap: 20px;
	margin: 15px 0 35px 0;
	width: 100%;
}

.section {
	position: relative;
}

.product__image--wrap {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 100%;
}

.product__image {
	margin: 0 auto;
	position: absolute;
	top: 10%;
	left: 5%;
	width: 90%;
	height: 90%;
	object-fit: contain;
}

.products {
	width: 100%;
	position: relative;
	row-gap: 12px;
	column-gap: 12px;
	height: fit-content;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr;
}

.product {
	position: relative;
	display: flex;
    flex-direction: column;
    align-items: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product__name {
	padding: 10px 10px 0 10px;;
	word-break: break-word;
	font-size: 13px;
	line-height: 1.3;
}

.product__stock {
	padding: 10px;
	width: 100%;
	margin-top: auto;
	font-size: 13px;
}

.product__stock dl {
	display: flex;
    justify-content: space-between;
	flex-wrap: wrap;
}

.product__price {
	/* padding: 10px 10px 0 10px;  */
	font-weight: 600;
	font-size: 13px;
}

.product__price span {
	font-weight: 400;
	font-size: .8rem;
}

.product__price .product__price-new,
.product__price .product__price-old {
	font-weight: 600;
}

.product__price-new {
	color: red;
}

.product__price-new ~ .product__price-old {
	text-decoration: line-through;
	margin-left: 5px;
}

.product__button {
	margin-top: auto;
	border: none;
	font-size: 15px;
}

.product__form {
	width: 100%;
}

.product__form input {
	width: 95%;
    border: 1px solid #dedede;
    height: 32px;
    text-align: center;
    margin: auto;
    display: block;
    margin-bottom: 6px;
}

.product__url {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
}

.products__sort {
    justify-content: flex-end;
	display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.products__sort select {
	width: 175px;
}

.products__list-wrapper p {
	text-align: end;
}

.products__list-wrapper {
	width: 100%;
}

/* Product groups */

.filters {
	min-width: 250px;
	max-width: 250px;
}

.groups__title {
	font-size: 1.5rem;
    line-height: 2;
    font-weight: 500;
}

.groups__open-menu {
	display: none;
}

.groups__wrapper {
	margin-top: 1rem;
}

.group__sub-menu {
	display: none;
	z-index: 1;
	background: var(--white);
}

.group__item a {
	display: block;
	padding: 10px;
	padding-right: 30px;
	font-size: 14px;
}

.group__item a.selected {
	font-weight: 600;
}

.group__item:hover > .group__sub-menu,
.group__item:focus > .group__sub-menu {
	display: block;
}

.group__item {
	position: relative;
	border-bottom: 1px solid grey;
	border-top: 1px solid transparent;
	background: #f8f8f8;
	transition: background .3s;
}

.group__item:hover {
	background: #f1f1f1;
}

.group__sub-menu {
	position: absolute;
    left: 100%;
    top: 0;
	min-width: 250px;
}

.group__sub-menu a {
	padding: 10px 15px;
}

.category__input {
	display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
	gap: 10px;
	position: relative;
	align-items: center;
}

.category__input input {
	width: auto;
	cursor: pointer;
}

.category__input label {
	cursor: pointer;
}

.with_sub {
		position: absolute;
		right: 0;
		padding: 9px 15px;
		top: 0px;
		height: 100%;
		cursor: pointer;
	}

.with_sub::after {
	content: '';
	border: solid black;
	border-width: 0 3px 3px 0;
	display: inline-block;
	padding: 3px;
	transform: rotate(-45deg);
	-webkit-transform: rotate(-45deg);
}

.breadcrumbs {
	display: flex;
	column-gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 30px;
}

.breadcrumb {
	font-size: 14px;
}

.breadcrumbs__divider {
	font-size: .7rem;
	padding-top: 4px;
	margin-left: 10px;
}

.page-headline.heading {
	background: #fff;
}

.page-headline.heading h2 {
	color: #000;
	font-size: 32px;
}

.page-headline.heading .container {
	padding: 25px 0;
}

@media (max-width: 500px) {
	.page-headline {
		margin: 20px 0;
	}
}

@media(max-width:1080px) {
	.products {
		grid-template-columns: 1fr 1fr 1fr 1fr;
	}
}

@media(max-width:920px) {
	.filters {
		min-width: 220px;
		max-width: 220px;
	}

	.product__button {
		font-size: 13px;
	}
}

@media(max-width:850px) {
	.products__wrapper {
		display: block;
	}

	.groups__open-menu {
		display: block;
		margin-bottom: 25px;
	}

	.filters {
		max-width: 100%;
		min-width: unset;
		width: 100%;
	}

	.group__item:hover>.group__sub-menu {
		display: none;
	}

	.groups__title {
		display: none;
	}

	.filters__wrapper {
		margin-bottom: 25px;
	}

	.group__item {
		position: relative;
		border: none;
	}

	.group__item a {
		border-bottom: 1px solid grey;
	}

	.with_sub.active::after {
		transform: rotate(45deg);
		-webkit-transform: rotate(45deg);
	}

	.with_sub.active ~ .group__sub-menu {
		display: block !important;
		position: unset;
	}

	.group__sub-menu a {
		padding-left: 20px;
	}

	.group__sub-menu .group__sub-menu a {
		padding-left: 35px;
	}

	.group__sub-menu {
		background: #efefef;
	}

	.group__sub-menu .group__sub-menu {
		background: #e5e5e5;
	}
}

@media(max-width:600px) {
	.products {
		grid-template-columns: 1fr 1fr;
	}
}

@media(max-width:500px) {
	.product__name {
		padding: 7.5px 7.5px 0 7.5px;
		line-height: normal;
	}

	/* .product__price {
		padding: 7.5px 7.5px 0 7.5px;
	} */

	.page-headline h2 {
		text-align: center;
	}
}

@media(min-width:850px) {
	.filters__wrapper {
		display: block !important;
	}
}

@media(min-width:1320px) {
	.products {
		grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
	}
}

/* General Skeleton Styles */
.skeleton {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 1px solid #e0e0e0;
    background: #f7f7f7;
}

.skeleton__image {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    margin-bottom: 16px;
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton__text {
    height: 16px;
    background: #e0e0e0;
    margin-bottom: 8px;
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton__name {
    width: 60%;
}

.skeleton__brand {
    width: 40%;
}

.skeleton__code {
    width: 50%;
}

.skeleton__price {
    width: 30%;
}

.skeleton__button {
    width: 100%;
    height: 32px;
    background: #e0e0e0;
    margin-top: 16px;
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton__stock .skeleton__label,
.skeleton__stock .skeleton__status {
    width: 30%;
    margin-bottom: 4px;
}

.sort__form {
	position: relative;
}

.sort__loader {
  	width: 20px;
	aspect-ratio: 1;
	border-radius: 50%;
	border: 3px solid;
	border-color: #000000 #fff0;
	animation: l1 1s infinite;
	position: absolute;
	top: 6px;
	left: 6px;
}

.filter__loader {
  	width: 16px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid;
    border-color: #000000 #fff0;
    animation: l1 1s infinite;
    position: absolute;
    top: 3px;
    left: 0px;
} 

@keyframes l1 {to{transform: rotate(.5turn)}}

/* Animation */
@keyframes pulse {
    0% {
        background-color: #f0f0f0;
    }
    50% {
        background-color: #e0e0e0;
    }
    100% {
        background-color: #f0f0f0;
    }
}

.scrollToTop {
	position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: #efefef;
    color: white;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    z-index: 98;
    width: 40px;
    height: 40px;
    border: 1px solid #8c8c8c;
	max-width: 40px;
    max-height: 40px;
}

.scrollToTop:hover {
  	background-color: #d7d7d7;
}

.scrollToTop svg {
	width: 18px;
	height: 18px;
}

.group__item:focus-within > .group__sub-menu,
.group__item[aria-expanded="true"] > .group__sub-menu {
    display: block;
}