/*
 * Nirioci shop header. Pure theme code (no Elementor). Rendered on every
 * WooCommerce/shop page by template-parts/shop-header.php. Uses the shop design
 * tokens defined in style.css (:root --nirioci-*).
 */

.nirioci-shop-body {
	--nirioci-shophead-h: 76px;
}

/* Announcement bar ------------------------------------------------------- */
.nirioci-shopbar {
	background: var(--nirioci-peach, #facdb2);
	color: var(--nirioci-pink, #ff1b8d);
}
.nirioci-shopbar__inner {
	max-width: var(--nirioci-max, 1200px);
	margin: 0 auto;
	padding: 8px 24px;
	text-align: center;
	font-family: 'Urbanist', system-ui, sans-serif;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .02em;
}

/* Header shell ----------------------------------------------------------- */
.nirioci-shophead {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	border-bottom: 2px solid var(--nirioci-line, #ff1b8d);
}
.nirioci-shophead__inner {
	max-width: var(--nirioci-max, 1200px);
	margin: 0 auto;
	padding: 10px 24px;
	display: flex;
	align-items: center;
	gap: 24px;
}

.nirioci-shophead__logo {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
}
.nirioci-shophead__logo img {
	height: 62px;
	width: auto;
	display: block;
}

/* Navigation ------------------------------------------------------------- */
/* Nav list sits next to the logo on the left; search + cart go to the right. */
.nirioci-shopnav {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	margin-left: 16px;
	font-family: 'Urbanist', system-ui, sans-serif;
}
.nirioci-shopnav__list {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nirioci-shopnav__item {
	position: relative;
	display: flex;
	align-items: center;
}
.nirioci-shopnav__link {
	display: inline-block;
	padding: 8px 0;
	color: var(--nirioci-ink, #1a1a1a);
	font-weight: 700;
	font-size: 17px;
	text-transform: uppercase;
	letter-spacing: .03em;
	text-decoration: none;
	white-space: nowrap;
	transition: color .15s ease;
}
.nirioci-shopnav__link:hover,
.nirioci-shopnav__item--has-sub:hover > .nirioci-shopnav__link {
	color: var(--nirioci-pink, #ff1b8d);
}

/* Dropdown caret */
.nirioci-shopnav__caret {
	appearance: none;
	background: none;
	border: 0;
	margin: 0 0 0 4px;
	padding: 6px;
	cursor: pointer;
	color: inherit;
	line-height: 0;
}
.nirioci-shopnav__caret::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .15s ease;
	color: var(--nirioci-pink, #ff1b8d);
}

/* Submenu */
.nirioci-shopnav__sub {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	border: 2px solid var(--nirioci-pink, #ff1b8d);
	border-radius: var(--nirioci-radius, 2px);
	box-shadow: 0 10px 24px rgba(255, 27, 141, .18);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
	z-index: 60;
}
.nirioci-shopnav__item--has-sub:hover > .nirioci-shopnav__sub,
.nirioci-shopnav__item.is-open > .nirioci-shopnav__sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.nirioci-shopnav__sub a {
	display: block;
	padding: 9px 20px;
	color: var(--nirioci-ink, #1a1a1a);
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	white-space: nowrap;
}
.nirioci-shopnav__sub a:hover {
	color: var(--nirioci-pink, #ff1b8d);
	background: var(--nirioci-peach-soft, #fde3d4);
}

/* Search ----------------------------------------------------------------- */
.nirioci-shophead__search {
	display: flex;
	align-items: center;
	background: var(--nirioci-peach-soft, #fde3d4);
	border-radius: 999px;
	padding: 4px 4px 4px 16px;
}
.nirioci-shophead__search input[type="search"] {
	border: 0;
	background: transparent;
	outline: none;
	font-size: 15px;
	color: var(--nirioci-ink, #1a1a1a);
	width: 150px;
}
.nirioci-shophead__search input[type="search"]::placeholder {
	color: var(--nirioci-muted, #6b6b6b);
}
.nirioci-shophead__search button {
	appearance: none;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	background: var(--nirioci-pink, #ff1b8d);
	color: #fff;
}
.nirioci-shophead__search button:hover {
	background: var(--nirioci-pink-dark, #d1006e);
}

/* Cart ------------------------------------------------------------------- */
.nirioci-shophead__cart {
	flex: 0 0 auto;
	position: relative;
	display: inline-flex;
	align-items: center;
	color: var(--nirioci-ink, #1a1a1a);
	text-decoration: none;
}
.nirioci-shophead__cart:hover {
	color: var(--nirioci-pink, #ff1b8d);
}
.nirioci-shophead__cart-count {
	position: absolute;
	top: -8px;
	right: -10px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--nirioci-pink, #ff1b8d);
	color: #fff;
	font-family: 'Urbanist', system-ui, sans-serif;
	font-weight: 700;
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

/* Mobile toggle (hidden on desktop) -------------------------------------- */
.nirioci-shophead__toggle {
	display: none;
	flex: 0 0 auto;
	margin-left: auto;
	width: 44px;
	height: 44px;
	appearance: none;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 10px;
}
.nirioci-shophead__toggle span {
	display: block;
	height: 2px;
	background: var(--nirioci-ink, #1a1a1a);
	border-radius: 2px;
	transition: transform .2s ease, opacity .2s ease;
}
.nirioci-shophead__toggle span + span {
	margin-top: 5px;
}

/* -------------------------------------------------------- responsive --- */
@media (max-width: 900px) {
	.nirioci-shophead__toggle {
		display: block;
	}
	.nirioci-shophead__inner {
		flex-wrap: wrap;
		gap: 16px;
	}
	.nirioci-shophead__logo {
		margin-right: auto;
	}
	/* Cart sits next to the toggle on mobile. */
	.nirioci-shophead__cart {
		order: 2;
	}
	.nirioci-shophead__toggle {
		order: 3;
		margin-left: 0;
	}
	.nirioci-shopnav {
		order: 4;
		flex: 1 1 100%;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-top: 8px;
	}
	.nirioci-shopnav.is-open {
		display: flex;
	}
	.nirioci-shopnav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}
	.nirioci-shopnav__item {
		flex-wrap: wrap;
		border-top: 1px solid var(--nirioci-peach, #facdb2);
	}
	.nirioci-shopnav__link {
		flex: 1 1 auto;
		padding: 14px 4px;
	}
	.nirioci-shopnav__caret {
		padding: 14px;
	}
	.nirioci-shopnav__caret::before {
		transition: transform .15s ease;
	}
	.nirioci-shopnav__item.is-open > .nirioci-shopnav__caret::before {
		transform: rotate(225deg);
	}
	/* Submenu becomes an inline accordion panel on mobile. */
	.nirioci-shopnav__sub {
		position: static;
		width: 100%;
		flex: 1 1 100%;
		min-width: 0;
		border: 0;
		box-shadow: none;
		border-radius: 0;
		padding: 0 0 8px;
		background: var(--nirioci-peach-soft, #fde3d4);
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.nirioci-shopnav__item.is-open > .nirioci-shopnav__sub {
		display: block;
	}
	.nirioci-shopnav__item--has-sub:hover > .nirioci-shopnav__sub {
		/* No hover on touch; open is driven by .is-open only. */
		display: none;
	}
	.nirioci-shopnav__item.is-open.nirioci-shopnav__item--has-sub:hover > .nirioci-shopnav__sub {
		display: block;
	}
	.nirioci-shophead__search {
		order: 5;
		width: 100%;
		margin-top: 8px;
	}
	.nirioci-shophead__search input[type="search"] {
		width: 100%;
		flex: 1 1 auto;
	}
}
