/*
 * Header icons and the content of the Previously Viewed, Account and Bag drawers.
 * Selectors carry a container class so they outrank the Elementor kit's global
 * button, link, heading and form-field styles.
 */

/* ---- Header icons ---- */
.njf-hd {
	--njf-hd-icon: 22px;

	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	color: var(--njf-fg, currentcolor);
}

.njf-hd .njf-hd__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--njf-hd-icon) + 16px);
	height: calc(var(--njf-hd-icon) + 16px);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
}

.njf-hd .njf-hd__btn:hover,
.njf-hd .njf-hd__btn:focus {
	background: color-mix(in srgb, currentcolor 12%, transparent);
	color: inherit;
}

.njf-hd .njf-hd__btn svg {
	width: var(--njf-hd-icon);
	height: var(--njf-hd-icon);
}

.njf-hd .njf-hd__count,
.njf-hd .njf-cart-count {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 16px;
	height: 16px;
	padding: 0 3px;
	border-radius: 9999px;
	background: var(--njf-accent, currentcolor);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
	pointer-events: none;
}

.njf-hd .njf-hd__count[hidden],
.njf-hd .njf-cart-count[hidden] {
	display: none;
}

/* ---- Previously Viewed ---- */
.njf-drawer .njf-pv__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 14px;
}

.njf-drawer .njf-pv__grid[hidden],
.njf-drawer .njf-pv__empty[hidden] {
	display: none;
}

.njf-drawer .njf-pv__card {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.njf-drawer .njf-pv__card:hover {
	color: inherit;
}

.njf-drawer .njf-pv__media {
	display: block;
	aspect-ratio: 1;
	margin-bottom: 10px;
	overflow: hidden;
	background: var(--njf-surface, #f5f5f5);
}

.njf-drawer .njf-pv__media img,
.njf-drawer .njf-acc__img img,
.njf-drawer .njf-kit__img img,
.njf-drawer .njf-cart__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.njf-drawer .njf-pv__media img {
	transition: transform 0.4s ease;
}

.njf-drawer .njf-pv__card:hover .njf-pv__media img {
	transform: scale(1.04);
}

.njf-drawer .njf-pv__title {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
}

.njf-drawer .njf-pv__meta {
	color: var(--njf-d-muted);
	font-size: 12px;
	line-height: 1.4;
}

.njf-drawer .njf-pv__price {
	margin-top: 6px;
	font-size: 13px;
}

.njf-drawer .njf-pv__empty {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: 30px;
	font-size: 14px;
	text-align: center;
}

.njf-drawer .njf-pv__empty p {
	margin: 0;
}

/* ---- Account drawer ---- */
dialog.njf-drawer--account {
	width: min(450px, 100vw);
}

.njf-drawer .njf-acc__logo {
	display: flex;
	align-items: center;
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

.njf-drawer .njf-acc__logo img {
	width: auto;
	height: 32px;
}

.njf-drawer .njf-acc-body {
	padding: 0;
}

.njf-drawer .njf-acc {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 28px 24px;
	background: color-mix(in srgb, var(--njf-d-fg) 5%, transparent);
}

.njf-drawer .njf-acc__title {
	margin: 0 0 8px;
	color: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.njf-drawer .njf-acc__panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.njf-drawer [data-njf-acc-panel][hidden] {
	display: none;
}

.njf-drawer .njf-acc__text {
	margin: 0;
	color: var(--njf-d-muted);
	font-size: 14px;
	line-height: 1.5;
}

.njf-drawer .njf-acc__foryou {
	padding: 24px;
}

.njf-drawer .njf-acc__row {
	margin-bottom: 24px;
}

.njf-drawer .njf-acc__row[hidden] {
	display: none;
}

.njf-drawer .njf-acc__row-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.njf-drawer .njf-acc__row-title {
	margin: 0;
	color: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.njf-drawer .njf-acc__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: inherit;
	font-size: 12px;
	text-decoration: none;
}

.njf-drawer .njf-acc__item:hover {
	color: inherit;
}

.njf-drawer .njf-acc__img {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--njf-surface, #f5f5f5);
}

.njf-drawer .njf-acc__name {
	display: -webkit-box;
	overflow: hidden;
	font-weight: 600;
	line-height: 1.3;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.njf-drawer .njf-acc__fav {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 16px;
	border: 1px solid var(--njf-d-line);
	color: inherit;
	font-size: 13px;
	text-decoration: none;
}

.njf-drawer .njf-acc__fav:hover {
	border-color: currentcolor;
	color: inherit;
}

.njf-drawer .njf-acc__fav svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
}

.njf-drawer .njf-acc__fit {
	position: relative;
	display: grid;
	grid-template-columns: 96px 1fr 24px;
	gap: 14px;
	align-items: center;
	padding: 12px;
	border: 1px solid var(--njf-d-line);
	color: inherit;
	text-decoration: none;
}

.njf-drawer .njf-acc__fit:hover {
	border-color: currentcolor;
	color: inherit;
}

.njf-drawer .njf-acc__fit-img {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--njf-surface, #f5f5f5);
}

.njf-drawer .njf-acc__fit-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.njf-drawer .njf-acc__fit-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.njf-drawer .njf-acc__fit-title {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.njf-drawer .njf-acc__fit-text {
	color: var(--njf-d-muted);
	font-size: 13px;
}

.njf-drawer .njf-acc__fit svg {
	width: 20px;
	height: 20px;
}

.njf-drawer .njf-acc__tabs {
	display: grid;
	flex-shrink: 0;
	grid-template-columns: repeat(3, 1fr);
	border-top: 1px solid var(--njf-d-line);
}

.njf-drawer .njf-acc__tab {
	min-height: 56px;
	margin: 0;
	padding: 8px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--njf-d-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}

.njf-drawer .njf-acc__tab:hover,
.njf-drawer .njf-acc__tab:focus {
	background: transparent;
	color: var(--njf-d-fg);
}

.njf-drawer .njf-acc__tab.is-active {
	box-shadow: inset 0 2px 0 var(--njf-accent, currentcolor);
	color: var(--njf-d-fg);
}

/* ---- Bag drawer ---- */
.njf-drawer .njf-drawer__body--cart {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
}

.njf-drawer .njf-cart-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	transition: opacity 0.2s ease;
}

.njf-drawer .njf-cart-content.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

.njf-drawer .njf-ship {
	flex-shrink: 0;
	padding: 14px 20px;
	border-bottom: 1px solid var(--njf-d-line);
	text-align: center;
}

.njf-drawer .njf-ship__msg {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.4;
}

.njf-drawer .njf-ship__bar {
	height: 4px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--njf-d-line);
}

.njf-drawer .njf-ship__bar span {
	display: block;
	height: 100%;
	background: var(--njf-accent, currentcolor);
	transition: width 0.4s ease;
}

.njf-drawer .njf-ship.is-done .njf-ship__bar span {
	background: var(--njf-success, #2e7d32);
}

.njf-drawer .njf-cart__items {
	flex: 1;
	min-height: 0;
	margin: 0;
	padding: 0 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
}

.njf-drawer .njf-cart__item {
	display: grid;
	grid-template-columns: 88px 1fr;
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid var(--njf-d-line);
}

.njf-drawer .njf-cart__item[aria-busy="true"] {
	opacity: 0.5;
}

.njf-drawer .njf-cart__img {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--njf-surface, #f5f5f5);
}

.njf-drawer .njf-cart__info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.njf-drawer .njf-cart__top {
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.njf-drawer .njf-cart__name {
	color: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.njf-drawer .njf-cart__name:hover {
	color: var(--njf-accent-light, inherit);
}

.njf-drawer .njf-cart__price {
	flex-shrink: 0;
	font-size: 14px;
	white-space: nowrap;
}

.njf-drawer .njf-cart__price del,
.njf-drawer .njf-kit__price del {
	opacity: 0.6;
}

.njf-drawer .njf-cart__meta {
	color: var(--njf-d-muted);
	font-size: 12px;
	line-height: 1.4;
}

.njf-drawer .njf-cart__meta dl.variation {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0 6px;
	margin: 0;
}

.njf-drawer .njf-cart__meta dt,
.njf-drawer .njf-cart__meta dd,
.njf-drawer .njf-cart__meta p {
	margin: 0;
	font-weight: 400;
}

.njf-drawer .njf-cart__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.njf-drawer .njf-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--njf-d-line);
}

.njf-drawer .njf-qty .njf-qty__btn {
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.njf-drawer .njf-qty .njf-qty__btn:hover,
.njf-drawer .njf-qty .njf-qty__btn:focus {
	background: var(--njf-d-line);
	color: inherit;
}

.njf-drawer .njf-qty .njf-qty__btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.njf-drawer .njf-qty .njf-qty__input[type] {
	width: 40px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-size: 14px;
	text-align: center;
	appearance: textfield;
}

.njf-drawer .njf-qty .njf-qty__input[type]:focus {
	outline: 2px solid var(--njf-accent, currentcolor);
	outline-offset: -2px;
	background: transparent;
	box-shadow: none;
}

.njf-drawer .njf-qty__input::-webkit-inner-spin-button,
.njf-drawer .njf-qty__input::-webkit-outer-spin-button {
	margin: 0;
	appearance: none;
}

.njf-drawer .njf-cart__qty-fixed {
	font-size: 13px;
}

.njf-drawer .njf-cart__remove {
	margin: 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--njf-d-muted);
	font-size: 12px;
	letter-spacing: normal;
	text-decoration: underline;
	text-transform: none;
	text-underline-offset: 3px;
	cursor: pointer;
}

.njf-drawer .njf-cart__remove:hover,
.njf-drawer .njf-cart__remove:focus {
	background: transparent;
	color: var(--njf-d-fg);
}

.njf-drawer .njf-cart__foot {
	display: flex;
	flex-shrink: 0;
	flex-direction: column;
	gap: 10px;
	padding: 16px 20px 20px;
	border-top: 1px solid var(--njf-d-line);
}

.njf-drawer .njf-cart__subtotal {
	display: flex;
	justify-content: space-between;
	font-size: 15px;
	font-weight: 700;
}

.njf-drawer .njf-cart__discount {
	font-size: 13px;
	font-weight: 400;
}

.njf-drawer .njf-cart__note {
	margin: 0;
	color: var(--njf-d-muted);
	font-size: 12px;
}

.njf-drawer .njf-cart__view {
	color: inherit;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-align: center;
	text-decoration: underline;
	text-transform: uppercase;
	text-underline-offset: 3px;
}

/* ---- Empty bag ---- */
.njf-drawer .njf-bag-empty {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 18px;
	min-height: 0;
	padding: 32px 20px 24px;
	overflow-y: auto;
}

.njf-drawer .njf-bag-empty__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}

.njf-drawer .njf-bag-empty__buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.njf-drawer .njf-bag-empty__perks {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.njf-drawer .njf-bag-empty__perks li {
	padding: 12px;
	border: 1px solid var(--njf-d-line);
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}

.njf-drawer .njf-kit {
	margin-top: 8px;
}

.njf-drawer .njf-kit__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.njf-drawer .njf-kit__title {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.njf-drawer .njf-kit__arrows {
	display: flex;
	gap: 4px;
}

.njf-drawer .njf-kit__rail {
	grid-auto-columns: minmax(280px, 88%);
}

.njf-drawer .njf-kit__card {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--njf-d-line);
}

.njf-drawer .njf-kit__img {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--njf-surface, #f5f5f5);
}

.njf-drawer .njf-kit__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.njf-drawer .njf-kit__top {
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

.njf-drawer .njf-kit__name {
	display: block;
	color: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.njf-drawer .njf-kit__type {
	display: block;
	color: var(--njf-d-muted);
	font-size: 12px;
}

.njf-drawer .njf-kit__price {
	flex-shrink: 0;
	font-size: 13px;
	white-space: nowrap;
}

.njf-drawer .njf-kit__actions {
	display: flex;
	gap: 8px;
}

.njf-drawer .njf-kit__actions .njf-kit__select {
	flex: 1;
	min-width: 0;
	height: 36px;
	margin: 0;
	padding: 0 8px;
	border: 1px solid var(--njf-d-line);
	border-radius: 0;
	background: var(--njf-d-bg);
	color: inherit;
	font-size: 12px;
}

.njf-drawer .njf-kit__actions .njf-kit__add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	height: 36px;
	margin: 0 0 0 auto;
	padding: 0 14px;
	border: 1px solid var(--njf-d-fg);
	border-radius: 0;
	background: var(--njf-d-fg);
	color: var(--njf-d-bg);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.njf-drawer .njf-kit__actions .njf-kit__add:hover,
.njf-drawer .njf-kit__actions .njf-kit__add:focus {
	border-color: var(--njf-accent, var(--njf-d-fg));
	background: var(--njf-accent, var(--njf-d-fg));
	color: #fff;
}

.njf-drawer .njf-kit__actions .njf-kit__add:disabled {
	opacity: 0.5;
}
