/* =========================================================
   AVIJESHOP MOBILE HEADER + BOTTOM NAV
   OpenCart 2.3.0.2 / Porto
   ========================================================= */

@media (min-width: 768px) {

	#avije-mobile-header,
	#avije-mobile-bottom-nav,
	#avije-mobile-search-results {
		display: none !important;
	}

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {


	/* -------------------------------------------------------
	   Header
	   ------------------------------------------------------- */

	#avije-mobile-header {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		width: 100%;
		height: 54px;
		background: #fff;
		z-index: 99990;
		box-shadow: 0 1px 5px rgba(0,0,0,.10);
	}

	.avije-mobile-header-inner {
		width: 100%;
		height: 54px;
		display: flex;
		align-items: center;
		padding: 5px 7px;
		direction: ltr;
		box-sizing: border-box;
	}


	/* -------------------------------------------------------
	   Old mobile menu button
	   ------------------------------------------------------- */

	.avije-mobile-menu-button {
		flex: 0 0 38px;
		width: 38px;
		height: 42px;

		padding: 0;
		margin: 0;

		border: 0;
		background: transparent;

		color: #333;
		font-size: 20px;

		cursor: pointer;

		order: 1;
	}


	/* -------------------------------------------------------
	   Logo + Search container
	   ------------------------------------------------------- */

	.avije-mobile-search-box {
		flex: 1;
		height: 42px;

		display: flex;
		align-items: center;

		direction: rtl;

		background: #fff;

		border: 1px solid #e1e1e1;
		border-radius: 7px;

		overflow: hidden;

		order: 2;

		box-sizing: border-box;
	}


	/* -------------------------------------------------------
	   Logo
	   ------------------------------------------------------- */

	.avije-mobile-logo {
		flex: 0 0 108px;

		width: 108px;
		height: 40px;

		display: flex;
		align-items: center;
		justify-content: center;

		padding: 3px 7px;

		text-decoration: none !important;

		box-sizing: border-box;
	}

	.avije-mobile-logo img {
		display: block;

		max-width: 100%;
		max-height: 34px;

		width: auto;
		height: auto;
	}


	/* -------------------------------------------------------
	   Search form
	   ------------------------------------------------------- */

	.avije-mobile-search-form {
		flex: 1;

		height: 40px;

		display: flex;
		align-items: center;

		direction: rtl;

		margin: 0;
		padding: 0;

		border: 0;

		background: transparent;

		box-sizing: border-box;
	}

	.avije-mobile-search-form input {
		flex: 1;

		min-width: 0;

		width: auto;
		height: 40px;

		margin: 0;
		padding: 0 8px;

		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;

		background: transparent !important;

		color: #333;

		font-size: 12px;
		line-height: 40px;

		text-align: right;

		box-sizing: border-box;
	}

	.avije-mobile-search-form input::placeholder {
		color: #999;
		opacity: 1;
	}

	.avije-mobile-search-form button {
		flex: 0 0 38px;

		width: 38px;
		height: 40px;

		margin: 0;
		padding: 0;

		border: 0;

		background: transparent;

		color: #777;

		font-size: 16px;

		cursor: pointer;
	}


	/* =====================================================
	   AJAX SEARCH RESULTS
	   ===================================================== */

	#avije-mobile-search-results {
		display: none;

		position: fixed;

		top: 59px;
		left: 7px;
		right: 7px;

		width: auto;

		background: #fff;

		border: 1px solid #e5e5e5;
		border-radius: 7px;

		box-shadow: 0 5px 18px rgba(0,0,0,.12);

		z-index: 99989;

		max-height: calc(100vh - 120px);

		overflow-y: auto;

		direction: rtl;

		box-sizing: border-box;
	}


	.avije-search-result {
		display: flex;
		align-items: center;

		width: 100%;

		min-height: 68px;

		padding: 7px 9px;

		border-bottom: 1px solid #eee;

		background: #fff;

		color: #333 !important;

		text-decoration: none !important;

		direction: rtl;

		box-sizing: border-box;
	}

	.avije-search-result:last-child {
		border-bottom: 0;
	}

	.avije-search-result:active,
	.avije-search-result:hover {
		background: #fafafa;
	}


	.avije-search-result-image {
		flex: 0 0 55px;

		width: 55px;
		height: 55px;

		margin-left: 10px;

		display: flex;
		align-items: center;
		justify-content: center;
	}

	.avije-search-result-image img {
		display: block;

		max-width: 55px;
		max-height: 55px;

		width: auto;
		height: auto;
	}


	.avije-search-result-info {
		flex: 1;

		min-width: 0;

		text-align: right;
	}


	.avije-search-result-name {
		display: -webkit-box;

		overflow: hidden;

		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;

		font-size: 12px;
		line-height: 19px;

		color: #333;
	}


	.avije-search-result-price {
		display: block;

		margin-top: 3px;

		font-size: 11px;

		color: #777;
	}

	.avije-search-result-price del {
		color: #aaa;
		margin-left: 4px;
	}

	.avije-search-result-special {
		color: #d00000;
		font-weight: 700;
	}


	.avije-search-loading {
		padding: 18px;

		text-align: center;

		color: #888;

		font-size: 12px;
	}


	.avije-search-empty {
		padding: 20px;

		text-align: center;

		color: #888;

		font-size: 12px;
	}


	/* =====================================================
	   BOTTOM NAV
	   ===================================================== */

	#avije-mobile-bottom-nav {
		position: fixed;

		left: 0;
		right: 0;
		bottom: 0;

		width: 100%;
		height: 52px;

		display: flex;

		background: #fff;

		border-top: 1px solid #e5e5e5;

		z-index: 99990;

		box-shadow: 0 -1px 5px rgba(0,0,0,.08);

		direction: rtl;
	}

	.avije-bottom-item {
		flex: 1;

		height: 52px;

		display: flex;
		flex-direction: column;

		align-items: center;
		justify-content: center;

		padding: 0;
		margin: 0;

		color: #666;

		text-decoration: none !important;

		font-size: 10px;

		box-sizing: border-box;
	}

	.avije-bottom-item i {
		display: block;

		margin-bottom: 3px;

		font-size: 17px;

		line-height: 17px;
	}

	.avije-bottom-item span {
		display: block;

		font-size: 10px;
		line-height: 12px;

		white-space: nowrap;
	}

	.avije-bottom-item:hover,
	.avije-bottom-item:focus,
	.avije-bottom-item:active {
		color: #333;
		text-decoration: none !important;
	}


	/* -------------------------------------------------------
	   Page spacing
	   ------------------------------------------------------- */

	body {
		padding-top: 54px;
		padding-bottom: 52px;
	}


	/* جلوگیری از اینکه بعضی عناصر Porto هدر موبایل
	   خودمان را روی آن بیندازند */

	#avije-mobile-header *,
	#avije-mobile-bottom-nav * {
		box-sizing: border-box;
	}

}


/* =========================================================
   Very small screens
   ========================================================= */

@media (max-width: 380px) {

	.avije-mobile-logo {
		flex-basis: 92px;
		width: 92px;

		padding-left: 4px;
		padding-right: 4px;
	}

	.avije-mobile-logo img {
		max-height: 30px;
	}

	.avije-mobile-search-form input {
		font-size: 11px;
	}

	.avije-mobile-menu-button {
		flex-basis: 35px;
		width: 35px;
	}

	.avije-bottom-item span {
		font-size: 9px;
	}

}	