.contenedor{
    width: 98%;
    max-width: 1000px;
    margin: auto;
}

/*-------------------Header--------------*/

header form{
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

header .barra-busqueda{
    width: 70%;
    height: 40px;
    line-height: 40px;
    background-color: #FFF;
    padding: 0 20px;
    border-radius: 100px;
    border: 1px solid gray;
    text-align: center;
    font-size: 16px;

}

header .categorias{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

header .categorias a{
    color: #9b9b9b;
    margin: 10px 20px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;

}

header .categorias a.activo{
    color: #000000;
}

/*-------- GRID -------------- */

.grid{
    position: relative;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s linear 1s;

}

.grid.imagenes-cargadas{
    opacity: 1;
}



.grid .item{
    position: absolute;
    display: block;
    padding: 0;
    margin: 10px;
    width: calc(33.3333% - 20px);
}

.grid .item-contenido{
    position: relative;
}

.grid .item img{
    width: 100%;
    cursor: pointer;
    vertical-align: top;
}

/*--------------Overlay -------------------*/

.overlay {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0,0,0,.9);
	width: 100%;
    height: 100vh;
    z-index: 3000;
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

.overlay.activo {
	display: flex;
}

.overlay img {
	max-width: 100%;
}

.overlay .descripcion {
	display: block;
	background: #000000;
	padding: 20px;
	text-align: center;
	margin-top: 5px;
	border-radius: 10px;
	max-width: 50%;
}

.contenedor-img {
	position: relative;
}

.overlay #btn-cerrar-popup {
	background: none;
	font-size: 20px;
	color: #fff;
	border: none;
	cursor: pointer;
	position: absolute;
	right: -20px;
	top: -20px;
}




