/****************************************

	MercatinoTicino - stile della pagina annuncio (single.php, dopo styleDEV.css)

	@copyright: IPELWEB
	@author: Ilario Pellandini
	@updated: 2026-10-25

	la finestra contatta (.iw_dialog) e in styleDEV.css, serve anche ai preferiti

****************************************/

/* cuore pieno: annuncio gia nei preferiti */

.iw_single_actions .iw_fav_on,
#iw_menu_single .iw_fav_on {
	color: var(--iw-pink);
}

.iw_fav_on .iw_icon {
	fill: currentColor;
}

/* titolo dell'annuncio (sotto le foto) */

.iw_page_single #iw_page h1 {
	margin: 0 0 14px;
	font: 700 34px/1.2 var(--iw-font-title);
	letter-spacing: -.3px;
	color: var(--iw-text);
}

@media ( max-width: 767.98px ) {
	.iw_page_single #iw_page h1 {
		font-size: 25px;
	}
}

/* categoria sotto il titolo: etichetta con icona */

.iw_single_cat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 30px;
	padding: 5px 14px 5px 6px;
	font: 400 15px var(--iw-font);
	text-decoration: none;
	color: var(--iw-text);
	background: var(--iw-light);
	border: 1px solid var(--iw-border);
	border-radius: 30px;
}

.iw_single_cat:hover {
	border-color: #bbb;
}

.iw_single_cat .iw_icon {
	width: 22px;
	height: 22px;
	padding: 3px;
	color: #fff;
	background: var(--iw-blue);
	border-radius: 50%;
	stroke-width: 2;
}

/* foto: sopra, larghe quanto la pagina, intere su sfondo sfocato della stessa foto */

.iw_single_gallery {
	margin-bottom: 60px;
	overflow: hidden;
	background: #222;
}

.iw_single_gallery .iw_carousel > a {
	position: relative;
	display: block;
	width: 100%;
	height: 450px;
	overflow: hidden;
}

.iw_single_gallery .iw_carousel > a::before {
	content: "";
	position: absolute;
	inset: -20px;
	background: var(--iw-img) center / cover;
	filter: blur(18px);
	opacity: .6;
}

.iw_single_gallery img {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.iw_single_gallery .iw_carousel_prev {
	left: 20px;
}

.iw_single_gallery .iw_carousel_next {
	right: 20px;
}

@media ( max-width: 767.98px ) {
	.iw_single_gallery {
		margin-bottom: 25px;
	}
	.iw_single_gallery .iw_carousel > a {
		height: 280px;
	}
	.iw_single_gallery .iw_carousel_prev {
		left: 10px;
	}
	.iw_single_gallery .iw_carousel_next {
		right: 10px;
	}
}

.iw_page_single #iw_page h4 {
	margin: 2.5rem 0 1rem;
	font: 700 21px/1.3 var(--iw-font-title);
}

/* tabella dettagli */

.iw_table {
	width: 100%;
	border-collapse: collapse;
	font: 300 17px var(--iw-font);
}

.iw_table th,
.iw_table td {
	padding: 12px 0;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--iw-border);
}

/* ultima riga senza bordo: anche th (l'etichetta a sinistra), non solo td */

.iw_table tr:last-child th,
.iw_table tr:last-child td {
	border-bottom: 0;
}

.iw_table th {
	width: 40%;
	font-weight: 300;
	color: var(--iw-muted);
}

.iw_table td {
	font-weight: 600;
}

/* sidebar: scheda con prezzo e contatta (resta ferma mentre si scorre) */

.iw_card {
	padding: 1.75rem;
	background: #fff;
	border: 1px solid var(--iw-border);
	border-radius: var(--iw-radius);
	box-shadow: var(--iw-shadow);
	font: 300 17px/1.6 var(--iw-font);
}

/* prezzo a sinistra, visite a destra (se non c'e spazio le visite vanno sotto, sempre a destra) */

.iw_card_price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 10px;
	margin-bottom: .5rem;
	font: 700 28px var(--iw-font-title);
	white-space: nowrap; /* "CHF 1'800.-" mai spezzato */
	color: var(--iw-blue);
}

.iw_card_price span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	font: 300 15px var(--iw-font);
	color: var(--iw-muted);
}

/* telefono: sotto contatta, solo bordo */

.iw_btn_phone {
	margin-top: 10px;
	color: var(--iw-blue);
	border: 1px solid var(--iw-blue);
}

.iw_btn_phone:hover {
	color: #fff;
	background: var(--iw-blue);
}

/* solo telefono: pieno come il bottone contatta */

.iw_btn_phone.btn-primary {
	margin-top: 0;
	color: #fff;
}

.iw_single_actions {
	display: flex;
	gap: 10px;
	margin: 12px 0 18px;
}

.iw_single_actions .btn {
	flex: 1;
	padding: .6rem;
	font-size: 20px;
	color: #333;
	background: #eee;
}

.iw_single_actions .btn:hover {
	background: #e2e2e2;
}

.iw_link {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 15px;
	text-decoration: none;
	color: var(--iw-muted);
}

.iw_link:hover {
	text-decoration: underline;
	color: var(--iw-text);
}

@media ( min-width: 992px ) {
	.iw_card {
		position: sticky;
		top: calc( var(--iw-menu-h) + 90px ); /* sotto menu e barra cerca */
	}
}

/* annunci simili */

#iw_related {
	padding: 45px 0 0px;
	border-top: 1px solid var(--iw-border);
}

/* barra in basso (solo mobile): indietro, preferiti, condividi, contatta */

#iw_menu_single {
	display: none;
}

@media ( max-width: 767.98px ) {
	#iw_menu_single {
		display: block;
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 250;
		padding: 10px 0;
		background: #fff;
		border-top: 1px solid #ccc;
		box-shadow: 0 -2px 8px rgba(0, 0, 0, .08);
	}
	#iw_menu_single .container {
		display: flex;
		gap: 8px;
	}
	#iw_menu_single .btn {
		padding: .55rem .9rem;
		font-size: 20px;
		color: #333;
		background: #eee;
	}
	#iw_menu_single .btn-primary {
		flex: 1;
		font-size: 17px;
		color: #fff;
		background: var(--iw-blue);
	}
	.iw_single {
		padding-bottom: 66px; /* il footer non finisce sotto la barra */
	}
	.iw_single #iw_backtop {
		bottom: 82px;
	}
}

/* annunci simili: 3 / 2 / 1 per riga come quelli in vetrina */

#iw_related_carousel {
	margin: 0 calc( var(--iw-gutter) / -2 ) 2rem;
}

#iw_related_carousel > * {
	width: 33.333333%;
	padding: 0 calc( var(--iw-gutter) / 2 );
}

@media ( max-width: 991.98px ) {
	#iw_related_carousel > * {
		width: 50%;
	}
}

@media ( max-width: 575.98px ) {
	#iw_related_carousel > * {
		width: 88%;
	}
}
