/*
 * Responsive corrections for the public home and ad-detail pages.
 *
 * Keep these rules after style.css: the original stylesheet contains several
 * overlapping media queries and fixed-width declarations.
 */

html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

img,
iframe {
	max-width: 100%;
}

/* Shared header: reserve space for the logo and let the advert use the rest. */
.header-content {
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	align-items: center;
	column-gap: 24px;
	min-height: 110px;
}

.header-content .agile-its-header {
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
}

.header-content .logo,
.header-content .logo a,
.header-content .logo img {
	max-width: 100%;
}

.header-content .logo img {
	height: auto;
}

.header-content #stage {
	grid-column: 2;
	grid-row: 1;
	position: relative !important;
	right: auto !important;
	width: 100% !important;
	max-width: 100%;
	height: 100px;
	min-width: 0;
	padding: 5px 0;
}

.header-content #stage a {
	position: absolute;
	inset: 0;
	display: block;
}

.header-content #stage a:nth-of-type(n + 3) {
	display: none;
}

.header-content #stage img {
	float: none;
	display: block;
	width: 100%;
	height: 100%;
	padding: 5px 0;
	object-fit: contain;
	object-position: right center;
}

/* Navigation may wrap instead of increasing the document width. */
.w3ls-header-right ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* Search controls always total exactly the available form width. */
.agileits_search form {
	display: flex;
	float: none;
	min-width: 0;
}

.agileits_search #agileinfo_search {
	flex: 0 0 27%;
	width: 27%;
	min-width: 0;
}

.agileits_search input[type="text"] {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

.agileits_search .btn-default {
	flex: 0 0 40px;
}

/* Long category names and ad titles must not push past the viewport. */
.w3layouts-breadcrumbs,
.w3layouts-breadcrumbs .container-fluid,
.w3layouts-breadcrumbs .agile-breadcrumbs,
.product-view,
.product-view h2,
.product-details,
.tips,
.interested {
	min-width: 0;
	max-width: 100%;
}

.w3layouts-breadcrumbs .agile-breadcrumbs {
	display: block;
	line-height: 1.7;
	overflow-wrap: anywhere;
	word-break: normal;
}

.product-view h2,
.product-view p,
.product-details,
.tips,
.interested,
.interested a {
	overflow-wrap: anywhere;
}

.sharethis-inline-share-buttons {
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;
}

.product-view .flexslider,
.product-view .slides,
.product-view .slides img,
.product-details img,
.product-details iframe {
	max-width: 100%;
	height: auto;
}

@media (max-width: 991px) {
	.header-content {
		grid-template-columns: minmax(180px, 258px) minmax(0, 1fr);
		column-gap: 16px;
	}

	.product-details-grid {
		clear: both;
	}

	.item-price,
	.interested,
	.tips {
		margin-left: 0;
		margin-right: 0;
	}

	.item-price {
		margin-top: 20px;
	}

	.item-price::before {
		display: none;
	}
}

@media (max-width: 767px) {
	.header-content {
		display: flex;
		flex-direction: column;
		row-gap: 4px;
		padding-top: 8px;
		padding-bottom: 8px;
	}

	.header-content .agile-its-header {
		order: 1;
		width: 100%;
		padding: 0;
	}

	.header-content #stage {
		order: 2;
		height: clamp(58px, 16vw, 90px);
		padding: 0;
	}

	.header-content #stage img {
		padding: 0;
		object-position: center;
	}

	.header-content .logo img {
		width: min(258px, 78vw);
		margin: 0 auto;
	}

	.w3ls-header-right {
		float: none;
		width: 100%;
		margin-top: 0;
	}

	.w3ls-header-right ul {
		justify-content: center;
		row-gap: 6px;
		padding: 0 6px;
	}

	.w3ls-header-right ul li.dropdown {
		padding: 0 7px;
	}

	.w3ls-header-right ul li a {
		font-size: 12px;
		white-space: nowrap;
	}

	.search {
		padding-right: 5%;
	}

	.agileits_search {
		width: 100%;
	}

	.agileits_search #agileinfo_search {
		flex-basis: 34%;
		width: 34%;
		padding-left: 8px;
	}

	.w3layouts-breadcrumbs {
		padding: 9px 0;
	}

	.w3layouts-breadcrumbs .container-fluid {
		padding-left: 15px;
		padding-right: 15px;
	}

	.w3layouts-breadcrumbs .agile-breadcrumbs {
		font-size: 13px;
	}

	.single-page {
		padding: 20px 0;
	}

	.product-desc {
		margin-top: 0;
	}

	.product-view,
	.product-details-grid {
		padding-left: 0;
		padding-right: 0;
	}

	.product-view {
		padding: 15px;
	}

	.product-view h2 {
		font-size: 21px;
	}

	.item-price,
	.interested,
	.tips {
		width: 100%;
	}

	.interested,
	.tips {
		padding: 24px 15px;
	}
}

@media (max-width: 420px) {
	.w3ls-header {
		padding-left: 4px;
		padding-right: 4px;
	}

	.w3ls-header-right ul li.dropdown {
		padding: 0 5px;
	}

	.w3ls-header-right ul li a {
		font-size: 11px;
	}

	.agileits_search #agileinfo_search {
		flex-basis: 35%;
		width: 35%;
		font-size: 13px;
	}

	.agileits_search input[type="text"] {
		font-size: 13px;
		padding-left: 7px;
		padding-right: 7px;
	}

	p.p-price {
		width: 45%;
		margin-left: 0;
	}

	h3.rate {
		font-size: 24px;
	}
}
