/* Homepage and category bar. Layout follows the reference the client chose, dewanfurniture.net. */

.nf-home {
	padding: 20px 0 8px;
}

.nf-home__top {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 20px;
	align-items: stretch;
}

.nf-home__body {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 20px;
	margin-top: 20px;
	align-items: start;
}

.nf-home__side {
	grid-column: 1;
	grid-row: 1;
	display: grid;
	gap: 20px;
}

.nf-home__main {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	display: grid;
	gap: 20px;
}

/* Category panel */

.nf-cats {
	border: 1px solid #e6e2d8;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.nf-cats__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 13px 16px;
	background: var(--nf-gold);
	color: var(--nf-navy);
	font-size: 16px;
	font-weight: 700;
}

.nf-cats__title svg {
	width: 20px;
	height: 20px;
}

.nf-cats__list {
	margin: 0;
	padding: 4px 0;
	list-style: none;
}

.nf-cats__list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 16px;
	color: var(--nf-navy);
	font-size: 15px;
	text-decoration: none;
	border-bottom: 1px solid #f1eee6;
}

.nf-cats__list li:last-child a {
	border-bottom: 0;
}

.nf-cats__list a:hover,
.nf-cats__list a:focus-visible {
	background: var(--nf-cream);
	color: #8a6414;
	padding-left: 20px;
}

/* Slider */

.nf-slider {
	position: relative;
	min-width: 0;
	border-radius: 10px;
	overflow: hidden;
	background: var(--nf-navy);
	aspect-ratio: 1600 / 643;
	align-self: start;
}

.nf-slider__track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.nf-slider__track::-webkit-scrollbar {
	display: none;
}

.nf-slide {
	position: relative;
	flex: 0 0 100%;
	height: 100%;
	scroll-snap-align: start;
	color: #fff;
	text-decoration: none;
}

.nf-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nf-slide--text::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(11, 31, 51, .88) 0%, rgba(11, 31, 51, .6) 45%, rgba(11, 31, 51, .05) 100%);
}

.nf-slide__copy {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 10px;
	padding: 0 6%;
	max-width: 640px;
	color: #fff;
}

.nf-slide__eyebrow {
	color: var(--nf-gold-2);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.nf-slide__title {
	font-size: clamp(18px, 3.4vw, 40px);
	font-weight: 700;
	line-height: 1.25;
}

.nf-slide__text {
	font-size: clamp(13px, 1.4vw, 17px);
	line-height: 1.7;
}

.nf-slide__btn {
	margin-top: 6px;
	padding: 9px 18px;
	border-radius: 8px;
	background: var(--nf-gold);
	color: var(--nf-navy);
	font-weight: 600;
	font-size: 15px;
	transition: background-color .25s ease, transform .25s ease;
}

.nf-slide:hover .nf-slide__btn {
	background: var(--nf-gold-2);
	transform: translateY(-1px);
}

.nf-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.nf-slider__dots button {
	width: 9px;
	height: 9px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .55);
	cursor: pointer;
	transition: width .3s ease, background-color .3s ease;
}

.nf-slider__dots button.is-active {
	width: 26px;
	background: var(--nf-gold);
}

/* USP strip */

.nf-usp {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nf-usp li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border: 1px solid #e6e2d8;
	border-radius: 10px;
	background: #fff;
}

.nf-usp__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--nf-cream);
	color: #8a6414;
}

.nf-usp__icon svg {
	width: 20px;
	height: 20px;
}

.nf-usp strong {
	display: block;
	color: var(--nf-navy);
	font-size: 14px;
	line-height: 1.4;
}

.nf-usp small {
	display: block;
	color: #5b6470;
	font-size: 12.5px;
	line-height: 1.5;
}

/* Blocks */

.nf-block {
	padding: 16px;
	border: 1px solid #e6e2d8;
	border-radius: 10px;
	background: #fff;
	min-width: 0;
}

.nf-block__head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid #f1eee6;
}

.nf-block__head h2 {
	margin: 0;
	color: var(--nf-navy);
	font-size: 19px;
}

.nf-block__note {
	color: #8a6414;
	font-weight: 600;
	font-size: 14px;
}

.nf-block__head a {
	margin-left: auto;
	color: var(--nf-navy);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}

.nf-block__head a:hover {
	color: #8a6414;
}

.nf-block__more {
	margin: 16px 0 0;
	text-align: center;
}

.nf-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 6px;
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid #f1eee6;
}

.nf-tabs__nav button {
	min-height: 0;
	padding: 6px 14px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: none;
	color: #5b6470;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.nf-tabs__nav button:hover {
	color: var(--nf-navy);
}

.nf-tabs__nav button.is-active {
	background: var(--nf-navy);
	color: #fff;
}

.nf-tabs__panel {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .35s ease, transform .35s ease;
}

.nf-tabs__panel.is-active {
	opacity: 1;
	transform: none;
}

.nf-tabs__panel .woocommerce,
.nf-tabs__panel ul.products {
	margin: 0;
}

/* Side-by-side product card */

.nf-rowgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.nf-rowcard {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border: 1px solid #ece8de;
	border-radius: 10px;
	background: #fff;
	color: var(--nf-navy);
	text-decoration: none;
	min-width: 0;
}

.nf-rowcard:hover,
.nf-rowcard:focus-visible {
	border-color: var(--nf-gold);
	box-shadow: 0 8px 20px rgba(11, 31, 51, .09);
	transform: translateY(-2px);
	color: var(--nf-navy);
}

.nf-rowcard__media {
	position: relative;
	flex: 0 0 42%;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--nf-cream);
}

.nf-rowcard__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.nf-rowcard:hover .nf-rowcard__media img {
	transform: scale(1.05);
}

.nf-rowcard__badge {
	position: absolute;
	top: 6px;
	left: 6px;
	padding: 2px 7px;
	border-radius: 6px;
	background: #a67c1e;
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
}

.nf-rowcard__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.nf-rowcard__name {
	font-weight: 600;
	font-size: 14.5px;
	line-height: 1.4;
}

.nf-rowcard__sku {
	color: #5b6470;
	font-size: 12.5px;
}

.nf-rowcard__price {
	margin-top: 2px;
	color: #8a6414;
	font-weight: 700;
	font-size: 15px;
}

.nf-rowcard__price del {
	margin-right: 6px;
	color: #7a828c;
	font-weight: 400;
	font-size: 13px;
}

.nf-rowcard__price ins {
	text-decoration: none;
}

/* Sidebar */

.nf-emi {
	padding: 18px 14px 0;
	border-radius: 10px;
	background: var(--nf-navy);
	color: #fff;
	text-align: center;
	overflow: hidden;
}

.nf-emi p {
	margin: 0;
}

.nf-emi .nf-emi__label {
	margin-bottom: 8px;
	color: var(--nf-gold-2);
	font-size: 17px;
	font-weight: 600;
}

.nf-emi > a {
	display: block;
	color: #fff;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
}

.nf-emi > a:hover {
	color: var(--nf-gold-2);
}

.nf-emi > a.nf-emi__wa {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	padding: 6px 14px;
	border-radius: 999px;
	background: #1fa855;
	font-size: 14px;
}

.nf-emi > a.nf-emi__wa:hover {
	background: #178a45;
	color: #fff;
}

.nf-emi__wa svg {
	width: 18px;
	height: 18px;
}

.nf-emi .nf-emi__big {
	margin: 14px -14px 0;
	padding: 6px 0 0;
	background: var(--nf-gold);
	color: var(--nf-navy);
	font-size: 52px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: .04em;
}

.nf-emi .nf-emi__note {
	margin: 0 -14px;
	padding: 0 0 10px;
	background: var(--nf-gold);
	color: var(--nf-navy);
	font-size: 14px;
	font-weight: 600;
}

.nf-sidebox {
	display: grid;
	gap: 10px;
	padding: 14px;
	border: 1px solid #e6e2d8;
	border-radius: 10px;
	background: #fff;
}

.nf-sidebox h2 {
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #f1eee6;
	color: var(--nf-navy);
	font-size: 17px;
}

.nf-sidebox .nf-rowcard {
	padding: 8px;
}

.nf-sidebox .nf-rowcard__media {
	flex-basis: 38%;
	aspect-ratio: 1 / 1;
}

.nf-sidebox .nf-rowcard__name {
	font-size: 13.5px;
}

/* "Shop By Categories" as the first item of the desktop menu */

.sv-header .sv-nav__list > li.nf-allcats > a {
	gap: 8px;
	margin-right: 8px;
	padding: 10px 16px;
	background: var(--nf-gold);
	color: var(--nf-navy);
	font-weight: 700;
}

.sv-header .sv-nav__list > li.nf-allcats > a:hover {
	background: var(--nf-gold-2);
	color: var(--nf-navy);
}

/* Category bar above the page: phones and tablets only */

.nf-catstrip {
	display: none;
}

@media (max-width: 991px) {
	.nf-catstrip {
		display: block;
		background: #fff;
		border-bottom: 1px solid #e6e2d8;
	}

	.nf-catstrip__list {
		display: flex;
		gap: 8px;
		margin: 0;
		padding: 10px 12px;
		list-style: none;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.nf-catstrip__list::-webkit-scrollbar {
		display: none;
	}

	.nf-catstrip__list li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	.nf-catstrip__list a {
		display: block;
		padding: 8px 14px;
		border: 1px solid #d9d3c4;
		border-radius: 999px;
		background: #fff;
		color: var(--nf-navy);
		font-size: 14px;
		font-weight: 600;
		line-height: 1.3;
		white-space: nowrap;
		text-decoration: none;
	}

	.nf-catstrip__list a:active,
	.nf-catstrip__list a.is-current {
		background: var(--nf-navy);
		border-color: var(--nf-navy);
		color: var(--nf-gold-2);
	}

	.nf-home {
		padding-top: 12px;
	}

	.nf-home__top,
	.nf-home__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.nf-cats {
		display: none;
	}

	.nf-home__main,
	.nf-home__side {
		grid-column: 1;
		grid-row: auto;
	}

	.nf-usp {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nf-rowgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nf-slide__text {
		display: none;
	}

	.nf-slide__btn {
		padding: 6px 12px;
		font-size: 13px;
	}
}

@media (max-width: 640px) {
	.nf-rowgrid {
		grid-template-columns: minmax(0, 1fr);
	}

	.nf-slide__eyebrow {
		font-size: 10.5px;
	}

	.nf-slide__copy {
		gap: 4px;
	}

	.nf-block {
		padding: 12px;
	}

	.nf-usp li {
		padding: 10px;
	}

	/* The logo is a wide lockup; on a 360px phone it pushed the cart icon off the screen. */
	.sv-header__brand img,
	.sv-header .custom-logo {
		width: auto;
		max-width: 46vw;
		max-height: 44px;
		height: auto;
	}

	.sv-header__row {
		gap: 8px;
	}
}

/* ----------------------------------------------------- Pass 3 additions */

.nf-home__hero {
	display: grid;
	gap: 14px;
	min-width: 0;
	align-content: start;
}

.nf-cats__list a {
	padding-top: 7px;
	padding-bottom: 7px;
}

.nf-cardgrid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.nf-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px;
	border: 1px solid #ece8de;
	border-radius: 10px;
	background: #fff;
	min-width: 0;
	transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.nf-card:hover {
	border-color: var(--nf-gold);
	box-shadow: 0 8px 20px rgba(11, 31, 51, .09);
	transform: translateY(-2px);
}

.nf-card__media {
	position: relative;
	display: block;
	margin-bottom: 6px;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--nf-cream);
}

.nf-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.nf-card:hover .nf-card__media img {
	transform: scale(1.05);
}

.nf-card__name {
	color: var(--nf-navy);
	font-weight: 600;
	font-size: 14.5px;
	line-height: 1.4;
	text-decoration: none;
}

.nf-card__name:hover {
	color: #8a6414;
}

.nf-card__btn {
	margin-top: auto;
	padding: 9px 10px;
	border-radius: 8px;
	background: var(--nf-navy);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	text-align: center;
	text-decoration: none;
}

.nf-card .nf-rowcard__price {
	margin-bottom: 8px;
}

.nf-card__btn:hover,
.nf-card__btn:focus-visible {
	background: var(--nf-gold);
	color: var(--nf-navy);
}

@media (max-width: 1100px) {
	.nf-cardgrid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.nf-tabs__nav {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.nf-tabs__nav::-webkit-scrollbar {
		display: none;
	}

	.nf-tabs__nav button {
		flex: 0 0 auto;
		font-size: 14px;
		padding: 6px 12px;
	}
}

@media (max-width: 640px) {
	.nf-cardgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.nf-card {
		padding: 8px;
	}

	.nf-usp {
		gap: 8px;
	}

	.nf-usp li {
		gap: 8px;
		padding: 8px;
	}

	.nf-usp__icon {
		width: 32px;
		height: 32px;
	}

	.nf-usp strong {
		font-size: 13px;
	}

	.nf-usp small {
		display: none;
	}
}
