@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;600&family=Montserrat:wght@300;500;700&display=swap');

* {
	margin: 0;
	padding: 0;
	outline: 0;
	-webkit-box-sizing: border-box !important;
	    box-sizing: border-box !important;
	-webkit-touch-callout: none; /* iOS Safari */
		-webkit-user-select: none; /* Safari */
			-khtml-user-select: none; /* Konqueror HTML */
				-moz-user-select: none; /* Firefox */
					-ms-user-select: none; /* Internet Explorer/Edge */
						user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}

.clearfix:after {
	clear:both;
	content:".";
	display:block;
	height:0;
	line-height:0;
	visibility:hidden;
}

.hidden {
	display:none;
}

img {
	display:block;
	max-width:100%;
	max-height:100%;
	margin:auto;
}

html, body {
	height:100%;
	color: black;
	font-family: 'Montserrat', sans-serif;
	font-weight: 500;
	font-size: 14px;
}

@media (max-width: 1023px) {

	html, body {
		font-size: 12px;
	}

}

#container_webgl, #content, #config_3d, canvas {
	width: 100%;
	height: 100%;
	overflow: hidden;
	position: relative;
}

#container_webgl {
	background-color: #eee;
	transition: background 1.5s ease;
}

#content {
	position:absolute;
	transition: all 1s ease;
	top:0;
	left:0;
}

#config_3d {
	width:100vw;
	height: 100vh;
	position:absolute;
	top:50%;
	left:50%;
	transform: translate(-50%,-50%);
	cursor: grab;
}

@media (max-width: 1023px) {

	.configuring #content {
		height: 60%;
		top: 0%;
	}

}
@media (min-width: 1024px) {

	.configuring #content {
		width: 67%;
		left:33%;
	}

}

#AR_DOM_overlay {
	display: none;
	position: fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	z-index: 99;
}

h1,h2,h3 {
	display:block;
	font-family: 'Montserrat', sans-serif;
	font-weight:600;
	margin:0 0 0.5em;
}

h1 {
	font-size: 28px;
	font-weight:600;
}

h2 {
	font-size: 21px;
}

h3 {
	font-size: 17.5px;
	text-transform: uppercase;
	margin: 1em 0;
}

a, .link {
	color: inherit;
	display:inline-block;
	cursor: pointer;
	text-decoration: underline;
}

.btn {
	cursor: pointer;
	text-transform: uppercase;
	display: inline-block;
	padding: 0.5em 1em;
	margin: 0.2em;
	border: solid 2px currentcolor;
	transition: all 0.5s ease;
	text-transform: uppercase;
	text-decoration: none;
}

.btn:hover {
	display: inline-block;
	padding: 0.5em 1em;
	border: solid 2px currentcolor;
	background-color: rgba(127,127,127,0.2);
}

#logo_kastel {
	position:absolute;
	top:20px;
	left:20px;
	width:60px;
	height:60px;
	z-index: 2;
}

#titolo {
	position:absolute;
	top:20px;
	right:50%;
	z-index: 2;
	transform: translateX(50%);
	text-align: center;
	transition: all 0.5s ease;
}

@media (max-width: 1023px) {

	#titolo {
		right:20px;
		transform: translate(0,0);
		text-align: right;
	}

}

#credits {
	position:absolute;
	bottom:20px;
	right:20px;
	z-index: 2;
	text-align: right;
	font-size: 12px;
	opacity:0.5;
	transition: all 0.5s ease;
}

#credits:hover {
	opacity:1;
}

@media (max-width: 767px) {

	#credits {
		display:none;
	}

}

#intro_text {
	position:absolute;
	top:50%;
	left:50%;
	width:80%;
	max-width: 1200px;
	z-index: 5;
	transform: translate(-50%,-50%);
	text-align: center;
	font-size: 4vh;
	line-height: 1em;
	font-weight: bold;
}

#intro_text .link {
	text-transform: uppercase;
	margin-top:0.5em;
}

#debug_panel {
	position:absolute;
	left:0;
	bottom:0;
	background: white;
	padding:1em;
}

#share_panel, #download_panel {
	display:none;
	position:absolute;
	top:50%;
	left:50%;
	padding:20px;
	transform: translate(-50%,-50%);
	z-index: 4;
	text-align: center;
	background-color: white;
	color: black;
}

#share_panel.open, #download_panel.open {
	display:block;
}

/*
@media (max-width: 991px) {
	#logo_kastel {
		width:60px;
		height:60px;
		padding:10px;
	}
}
*/

#loader {
	display: none;
	position: fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background-color: rgba(127,127,127,0.5);
	z-index: 100;
}

.loading #loader {
	display:block;
}

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
    }
}

#loader:after {
	content:'';
	display:block;
	position: absolute;
	top:calc(50% - 40px);
	left:calc(50% - 40px);
	background-image: url(images/sprite_loading.png);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	width:80px;
	height:80px;
    animation-name: rotate;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

#config_buttons {
	position:absolute;
	bottom:20px;
	left:50%;
	transform: translateX(-50%);
	z-index: 2;
	text-align: center;
	width:100%;
	display:none;
}

.configuring #panel {
	display:none;
}

#config_buttons #codice_prodotto {
	text-align: center;
	margin-bottom:15px;
}

#config_panel {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: white;
	color: black;
	text-align: left;
	transition: all 1s ease;
	z-index: 3;
	overflow: hidden;
	opacity: 0;
}

.configuring #config_panel {
	transform: none;
	opacity: 1;
}

@media (max-width: 1023px) {

	#config_panel {
		transform: translateY(100%);
		height: 40%;
	}

}
@media (min-width: 1024px) {

	#config_panel {
		transform: translateX(-100%);
		width: 33%;
	}

}

.closex {
	position:absolute;
	top:15px;
	right:15px;
	font-size:20px;
	line-height: 20px;
	width:20px;
	height:20px;
	text-align: center;
	vertical-align: middle;
	cursor: pointer;
}

#config_panel .scroll {
	overflow-y: auto;
	height:100%;
/* 	margin-right:-17px; */
}

#config_panel .panel {
	padding:1.5em 30px;
	border-bottom: solid 2px #eee;
}

/*
#config_panel .panel:nth-child(even) {
	background-color: #f5f5f5;
}
*/

/*
#config_panel div:first-child {
	padding-top:30px;
}

#config_panel div:last-child {
	padding-bottom:30px;
}
*/

#config_panel .panel p {
	display: block;
	margin:0 15px 5px 0;
	cursor: pointer;
	vertical-align: top;
}

/*
#config_panel #panel_rivestimento p, #config_panel #panel_base p {
	display: inline-block;
	width: calc(33% - 20px);
}
*/

#config_panel .panel p span {
	display: inline-block;
	vertical-align: middle;
	margin-right:5px;
	width:1em;
	height:1em;
	background-color: white;
	transition: all 0.25s ease;
	border:solid 2px black;
	border-radius: 50%;
	text-align: center;
}

#config_panel #panel_base p,
#config_panel #panel_rivestimento p {
	display: inline-block;
	text-align: center;
	width:100px;
}

#config_panel #panel_base p span {
	display:block;
	margin:2px auto;
	width:80px;
	height:80px;
	border:none;
	background-position: center center;
	background-size: contain;
}

#config_panel #panel_rivestimento p span {
	display:block;
	margin:2px auto;
	width:80px;
	height:80px;
	border:none;
	background-position: center center;
	background-size: cover;
	background-blend-mode: multiply;
}

@media (max-width: 1023px) {

	#config_panel #panel_base p span,
	#config_panel #panel_rivestimento p span {
		width:60px;
		height:60px;
	}

}

#config_panel .panel p:hover span{
	transform: scale(1.1);
}

#config_panel .panel p.selected span {
	background-color: black;
}

#config_panel #panel_base p span,
#config_panel #panel_rivestimento p span {
	border:solid 2px white;
}

#config_panel #panel_base p.selected span,
#config_panel #panel_rivestimento p.selected span {
	border:solid 2px black;
}


.title_basi{
	display: none;
}

/* eccezione Fabric 3d  */
[config="rivestimento.fabbric.A3BE"] span,
[config="rivestimento.fabbric.A3GR"] span,
[config="rivestimento.fabbric.A3BL"] span,
[config="rivestimento.fabbric.A3NE"] span{
	/*background-size: auto !important;*/
	background-image: url("textures/A3_r.png") !important;

}
[config="rivestimento.fabbric.A3BE"] span{
	background-color: #c2a377 !important;
}
[config="rivestimento.fabbric.A3GR"] span{
	background-color: #a29fa5 !important;
}
[config="rivestimento.fabbric.A3BL"] span{
	background-color:#4270a8 !important;
}
[config="rivestimento.fabbric.A3NE"] span{
	background-color: #555555 !important;
}