/* Nissan main menu — replaces UberMenu (same look as before). */

.nm-menu {
	position: relative;
	display: table;
	margin: 0 auto; /* centered, like the old UberMenu */
	float: none;
	z-index: 100;
	font-family: "Open Sans", sans-serif;
	-webkit-font-smoothing: antialiased;
}
.nm-nav,
.nm-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nm-nav li {
	list-style: none;
}
.nm-menu a {
	text-decoration: none;
}
.nm-nav::after {
	content: "";
	display: table;
	clear: both;
}

/* ---------- top level ---------- */
.nm-item {
	float: left;
	position: relative;
	margin: 0 10px;
}
.nm-link {
	display: block;
	position: relative;
	padding: 9px 20px 10px;
	font-size: 12px;
	font-weight: 700;
	line-height: 20.8px;
	text-transform: uppercase;
	color: #000;
	cursor: pointer;
	white-space: nowrap;
}
.nm-has-sub > .nm-link {
	padding-right: 31px;
}
.nm-link:hover,
.nm-link:focus,
.nm-item.nm-open > .nm-link,
.nm-item.nm-current > .nm-link {
	color: #c3002f;
}
/* red chevron */
.nm-has-sub > .nm-link::after {
	content: "";
	position: absolute;
	right: 12px;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -5px;
	border-right: 2px solid #c3002f;
	border-bottom: 2px solid #c3002f;
	transform: rotate(45deg);
}
.nm-item.nm-open > .nm-link::after {
	transform: rotate(-135deg);
	margin-top: -1px;
}

/* ---------- dark flyout ---------- */
.nm-nav .nm-flyout {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	width: 220px;
	margin-top: 1px;
	padding-top: 14px; /* room for the arrow */
	z-index: 104;
}
.nm-flyout::before { /* little arrow pointing at the parent item */
	content: "";
	position: absolute;
	top: 0;
	right: 42px;
	border-left: 15px solid transparent;
	border-right: 15px solid transparent;
	border-bottom: 14px solid #343434;
}
/* First item ("Gama Nissan") opens to the right so it never runs off-screen */
.nm-nav > .nm-item:first-child > .nm-flyout {
	right: auto;
	left: 0;
}
.nm-nav > .nm-item:first-child > .nm-flyout::before {
	right: auto;
	left: 42px;
}
.nm-item.nm-open > .nm-flyout {
	display: block;
}
.nm-sub-item {
	position: relative;
	background: #343434;
	border-bottom: 1px solid #4c4c4c;
}
.nm-sub-item:last-child {
	border-bottom: 0;
}
.nm-flyout > .nm-sub-item {
	box-shadow: 0 0 20px rgba(0, 0, 0, .15);
}
.nm-sub-link {
	display: block;
	position: relative;
	padding: 15px 30px 15px 20px;
	font-size: 12px;
	font-weight: 700;
	line-height: 20.8px;
	text-transform: uppercase;
	color: #fff;
}
.nm-sub-link:hover,
.nm-sub-link:focus,
.nm-sub-item.nm-open > .nm-sub-link,
.nm-sub-item.nm-current > .nm-sub-link {
	color: #fff;
	background: #000;
}
.nm-has-panel > .nm-sub-link::after { /* red ">" */
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -4px;
	border-right: 2px solid #c3002f;
	border-top: 2px solid #c3002f;
	transform: rotate(45deg);
}

/* ---------- white mega panel (car models) ---------- */
.nm-panel {
	display: none;
	position: absolute;
	left: 100%;
	top: 0;
	width: 520px;
	padding: 5px 0 10px;
	background: #fff;
	border: 1px solid #000;
	box-shadow: 0 0 20px rgba(0, 0, 0, .15);
	z-index: 104;
}
.nm-has-panel:hover > .nm-panel,
.nm-has-panel.nm-open > .nm-panel {
	display: block;
}
.nm-nav .nm-row {
	margin: 0 0 10px;
}
.nm-row::after {
	content: "";
	display: table;
	clear: both;
}
.nm-tile {
	float: left;
	width: 182px;
	margin: 5px;
	padding: 5px;
}
.nm-tile a {
	display: block;
	padding: 5px;
	border: 1px solid #fff;
	transition: border-color .15s;
}
.nm-tile a:hover,
.nm-tile a:focus,
.nm-tile.nm-current a {
	border-color: #e0e0e0;
}
.nm-tile-img {
	display: block;
	width: 160px;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}
.nm-tile-title {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 400;
	line-height: 17px;
	text-align: center;
	text-transform: uppercase;
	color: #000;
}
.nm-panel-footer {
	padding: 0 10px;
	overflow: hidden;
}
.nm-divider {
	margin: 0 0 12px;
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, .1);
}
.nm-more {
	float: right;
	position: relative;
	margin: 0 15px 5px 0;
	padding-right: 16px;
	font-size: 12px;
	font-weight: 700;
	line-height: 20.8px;
	text-transform: uppercase;
	color: #000;
}
.nm-more::after {
	content: "";
	position: absolute;
	right: 2px;
	top: 50%;
	width: 6px;
	height: 6px;
	margin-top: -4px;
	border-right: 2px solid #c3002f;
	border-top: 2px solid #c3002f;
	transform: rotate(45deg);
}
.nm-more:hover {
	color: #c3002f;
}

/* Smaller laptops: keep the panel on screen */
@media only screen and (max-width: 1084px) {
	.nm-panel {
		width: 400px;
	}
	.nm-tile {
		width: 50%;
		margin: 0;
	}
}

/* Phones: the theme's own slide-out menu takes over (same as with UberMenu). */
@media only screen and (max-width: 640px) {
	.nm-menu {
		display: none;
	}
}
