@import '../components/cart.css';

header .nav-links a:nth-child(3){
    position:relative;
    width:fit-content;
}

header .nav-links a:nth-child(3)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background-color: var(--color-main);
}

header .nav-links a:nth-child(3):hover::after {
    background-color: var(--color-second);
}

/*BLOCS FILTRES ----------------------*/
/*------------------------------------*/

.bloc-filter{
	display:flex;
	gap:var(--spacing-small-w);
	text-transform:uppercase;
}


.bloc-filter .filter{
	display:flex;
	gap:calc(var(--spacing-small-w) / 1.5);
    margin-bottom:var(--spacing-small-h);
}

.bloc-filter #filteredition{
	width: calc((100% - 2 * var(--spacing-small-w)) / 3);
}

.bloc-filter #filtertype{
	width: calc((100% - 2 * var(--spacing-small-w)) / 1.5);
}

.filter a:hover:not(.active) {
  color:var(--color-second);
}

.filter a.active{
	position:relative;
}

.filter a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background-color: var(--color-main);
}

.filter a.active:hover::after {
    background-color: var(--color-second);
}


/*BLOCS PRODUITS ---------------------*/
/*------------------------------------*/

.bloc-produits{
	display:flex;
	flex-direction:row;
	flex-wrap:wrap;
	justify-content: flex-start;
	gap:var(--spacing-small-w);
}

.bloc-produits a{
	width: calc((100% - 2 * var(--spacing-small-w)) / 3);
}

.bloc-produit{
	display:flex;
	flex-direction:column;
	margin-bottom:var(--spacing-small-h);
}

.bloc-produit .element:nth-child(1){
	height:38.75vw;
	width:100%;
}

.bloc-produit .element img{
    width: 100%;
    height: 100%;
	object-fit: cover;
}

.bloc-produit .element:nth-child(2){
	display:flex;
	flex-direction:row;
	margin-top:var(--spacing-small-h);
}

.bloc-produit .element p{
	margin-right:var(--spacing-small-w);
	text-transform:uppercase;
}

.out-of-stock {
  opacity: 0.5;
  cursor: default;
}



@media screen and (max-width: 1080px) {

    .content {
        height: auto;
        min-height: calc(var(--real-vh, 1vh) * 100);
    }

    .bloc-filter{
		display:flex;
		flex-direction: column;
		gap:0;
		text-transform:uppercase;		
	}

	.bloc-filter .filter{
		display:flex;
		gap:var(--spacing-small-w);
	    flex-wrap: wrap;
	}

	.bloc-filter #filteredition{
		width: 100%;
	}

	.bloc-filter #filtertype{
		width: 100%;
	}

	.bloc-filter .filter a{
	    text-align: left;
	   	white-space: pre;

	}

}


@media screen and (max-width: 768px) {

	header .nav-links a:nth-child(3)::after {
        height: 0px;
	}

	header .nav-links a:nth-child(3) {
	    color:var(--color-second);
	}

	.bloc-produits{
		flex-direction:column;
		margin-bottom:var(--spacing-big-h);
	}

	.bloc-produit .element:nth-child(1){
		width:calc(100vw - 5vw);
		height:calc(125vw - 5vw);
	}

	.bloc-produit .element:nth-child(2){
		justify-content: space-between;
		width:calc(100vw - 5vw);
	}

	.bloc-produit .element p{
		margin-right:var(--spacing-small-w);
		text-transform:uppercase;
	}

	.filter a.active::after {
	    bottom: 0px;
	}
}

@media (min-width: 769px) and (max-width: 1080px) {

	.bloc-produits a{
		width: calc((100% - 2 * var(--spacing-small-w)) / 2);
	}

	.bloc-produit .element:nth-child(1){
		height:60vw;
		width:100%;
	}

}