/*
HEADER BOTTOM
================================================ */
/* pagewrap */
#pagewrap {
	padding-top: 0 !important;
}

/* header bottom header */
#headerwrap,
body.fixed-header.page-loaded #headerwrap {
	position: fixed;
	bottom: 0;
	top: auto;
	border-bottom: none;
	border-top: 1px solid rgba(0,0,0,.05);
}
#headerwrap.fixed-header #header,
#header {
	text-align: inherit;
	padding: 1em 0;
}
.header-bar {
	float: left;
}

/* header bottom site logo */
#site-logo {
	margin: 5px 10px 0 0;
	display: inline-block;
	vertical-align: middle;
}
/* header bottom site description */
#site-description {
	margin: 5px 1.5em 5px 0;
	font-size: .8em;
	display: inline-block;
	vertical-align: middle;
}
.mobile_menu_active #site-description {
	margin: 0;
}

/* header bottom social widget */
#header .social-widget {
	float: left;
	margin: 5px 3px 0 0;
	transition: all 0.2s ease-in-out;
}

/* social widget */
.social-widget .widget {
	margin: 0;
}
.social-widget .social-links.horizontal li {
	margin: 0;
	padding: 0;
}

/* header bottom searchform */
.search-button {
	margin: 2px 0 0;
	float: left;
}

#searchform-wrap {
	margin: 8px 0 0;
	float: left;
	transition: all 0.2s ease-in-out;
}
#headerwrap #searchform #s {
	height: 28px;
	vertical-align: top;
	padding: 2px 14px;
	position: absolute;
	right: 0;
	margin-top: -3px;
}
#headerwrap #searchform .icon-search:before {
	font-size: 13px;
	padding: 5px;
	line-height: 100%;
	width: 13px;
	height: 13px;
	margin: 0;
	right: 2px;
	left: auto;
	transform: none;
}

/* cart icon */
.cart-icon {
	margin-top: 5px;
	pointer-events: all;
}
.mobile_menu_active .cart-icon {
	margin-top: 0;
}

/* header bottom main nav */
body:not(.slide-cart):not(.mobile_menu_active) #main-nav-wrap {
	display: -ms-flexbox;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	position: relative;
}
body:not(.slide-cart):not(.mobile_menu_active) #main-nav {
	position: static;
}
#main-nav {
	float: right;	
	transition: all 0.2s ease-in-out;
	margin: 0;
	pointer-events: all;
}
#main-nav a {
	padding: 0.3em 0.6em;
}
#main-nav li:not(.themify-widget-menu) > ul {
	left: auto;
	right: 0;
}
#main-nav li:not(.themify-widget-menu) > ul ul {
	right: 100%;
	left: auto;
	top: auto;
	bottom: 0;
	transform-origin: right;
	transform: scale(0,1);
}

#main-nav .has-mega-column > .sub-menu,
#main-nav .has-mega-sub-menu .mega-sub-menu {
	margin: auto;
	left: auto;
	right: 0;
}
#main-nav .has-mega-column > .sub-menu {
	padding: 32px 39px 39px;
}
#main-nav .has-mega-column .sub-menu li {
	margin-bottom: 0;
}
#main-nav .has-mega-sub-menu .mega-sub-menu,
#main-nav .has-mega-column>.sub-menu,
#main-nav li.menu-item-object-tbuilder_layout_part>.sub-menu,
#main-nav li:not(.themify-widget-menu) > ul {
	top: auto;
	bottom: 100%;
	transform-origin: bottom;
}

/* header bottom cart wrap */
body:not(.mobile_menu_active) #main-nav-wrap {
	position: relative;
	pointer-events: none;
}
.slide-cart #main-nav {
	position: static;
}

/* header bottom header widget */
.header-widget {
	display: none;
	text-align:  center;
}
.header-widget .header-widget-inner {
	height: 100%;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/* header horizontal fixed-header */
.fixed-header #header {
	min-height: inherit;
}
#headerwrap.fixed-header #searchform-wrap,
#headerwrap.fixed-header .header-bar,
#headerwrap.fixed-header .social-widget,
#headerwrap.fixed-header .search-button {
	display: block;
}
#headerwrap.fixed-header #site-description {
	display: inline-block;
}

/* header bottom footer */
#footerwrap {
	position: fixed;
	top: 0;
	bottom: auto;
	left: 0;
	width: 100%;
	transition: transform .35s cubic-bezier(0.6, -0.1, 0.4, 0.05);
	transform: translateY(-100%);
	z-index: 4;
}
#footerwrap.expanded {
	transform: translateY(0);
	box-shadow: 0 3px 20px 3px rgba(0,0,0,.15);
}
.admin-bar #footerwrap {
	margin-top: 32px;
}
#footerwrap .footer-tab {
	box-sizing: border-box;
	background-color: #ed1e24;
	color: #fff;
	font-size: 19px;
	line-height: 1em;
	text-decoration: none !important;
	position: fixed;
	top: 100%;
	left: 50%;
	width: 60px;
	height: 35px;
	padding: 5px;
	transition: .35s;
	transform: translateX(-50%);
	display: -ms-flexbox;
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing:border-box;
	box-shadow: 0 1px 1px rgba(0,0,0,.15);
}
#footerwrap .footer-tab:focus {
	outline: none;
}
#footerwrap .footer-tab:before {
	content: "\e801";
	font-family: 'themify_theme_icon';
}
#footerwrap.expanded .footer-tab:before {
	content: "\e800";
}
.mobile-menu-visible #pagewrap .back-top,
.back-top.back-top-float.back-top-hide {
	opacity: 0;
	visibility: hidden;
	transform: scale(0);
}
#pagewrap .back-top {
	position: fixed;
	top: auto;
	bottom: 90px;
	right: 10px;
	left: auto;
	width: auto;
	height: auto;
	z-index: 9999;
	transition: .35s;
}
#pagewrap .back-top a {
	padding: 0;
	text-decoration: none;
	border-radius: 50%;
	line-height: normal;
	width: auto;
	height: auto;
	display: inline-block;
}
#pagewrap .back-top.back-top-float {
	bottom: 90px;
}

/* MEDIA QUERIES */
@media screen and (max-width: 800px) {
	.footer-tab {
		width: 50px;
		height: 30px;
		font-size: 22px;
	}
	#pagewrap .back-top a:before {
		font-size: 1.4em;
	}
}

/* header bottom footer height */
@media screen and (max-height:900px) {
	#footerwrap #footer {
		overflow: auto; /* prevent overflowing the page */
		-webkit-overflow-scrolling: touch;
		max-height: 60vh;
		font-size: .9em;
	}
}