/* ==========================================================================
   NOVÁ HLAVIČKA – načíta sa iba na šablóne "Home NEW" (viď inc/header-new.php)
   Farby a rozmery sa menia v premenných nižšie.
   ========================================================================== */

.hn-header {
	--hn-text: #161616;
	--hn-muted: #6b6b6b;
	--hn-line: #e2e2e2;
	--hn-soft: #f4f4f2;
	--hn-dark: #1c1c1c;
	--hn-dark-hover: #303030;
	--hn-accent: #e0a526;      /* pivná – odznak košíka, aktívna kategória */
	--hn-accent-text: #1c1c1c;
	--hn-radius: 10px;
	--hn-focus: 0 0 0 3px rgba(224, 165, 38, .55);

	position: relative;
	z-index: 100;
	font-family: "Montserrat", sans-serif;
	color: var(--hn-text);
	background: #fff;
}

.hn-header *,
.hn-header *::before,
.hn-header *::after {
	box-sizing: border-box;
}

.hn-header a {
	color: inherit;
	text-decoration: none;
}

.hn-header .hn-icon {
	display: block;
	width: 24px;
	height: 24px;
	flex: none;
}

/* rovnaký kontajner ako Storefront .col-full (obsah 1064 px) */
.hn-container {
	box-sizing: content-box !important;
	max-width: 66.4989378333em;
	margin: 0 auto;
	padding: 0 2.617924em;
}

@media (max-width: 66.4989378333em) {
	.hn-container {
		margin: 0 2.617924em;
		padding: 0;
	}
}

@media (max-width: 568px) {
	.hn-container {
		margin: 0 1.41575em;
	}
}

.hn-skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 200;
	padding: 10px 16px;
	background: var(--hn-dark, #1c1c1c);
	color: #fff !important;
}

.hn-skip-link:focus {
	left: 16px;
}

/* --- Horný riadok: logo | vyhľadávanie | účet + košík ---------------------- */

/* horný riadok nad pásom kategórií, aby ho vyhľadávanie a košík prekryli */
.hn-top {
	position: relative;
	z-index: 2;
	border-bottom: 1px solid var(--hn-line);
}

.hn-top__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	padding-top: 18px;
	padding-bottom: 18px;
}

.hn-header .hn-logo {
	display: block;
	flex: none;
}

.hn-header .hn-logo img {
	display: block;
	width: auto;
	max-width: 240px;
	max-height: 60px;
	height: auto;
}

/* --- Vyhľadávanie ----------------------------------------------------------- */

.hn-search {
	position: relative;
	flex: 1 1 auto;
	max-width: 440px;
	margin: 0 auto 0 0;
	display: flex;
	align-items: center;
}

.hn-search__icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--hn-muted);
	pointer-events: none;
}

.hn-search__icon .hn-icon {
	width: 20px;
	height: 20px;
}

.hn-header .hn-search__input {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 96px 0 44px;
	border: 1px solid var(--hn-line);
	border-radius: 999px;
	background: var(--hn-soft);
	box-shadow: none;
	color: var(--hn-text);
	font: 500 15px/1 "Montserrat", sans-serif;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.hn-header .hn-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.hn-header .hn-search__input::placeholder {
	color: var(--hn-muted);
	opacity: 1;
}

.hn-header .hn-search__input:focus {
	outline: none;
	border-color: var(--hn-dark);
	background: #fff;
	box-shadow: var(--hn-focus);
}

.hn-header .hn-search__submit {
	position: absolute;
	right: 4px;
	top: 4px;
	height: 36px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--hn-dark);
	color: #fff;
	font: 600 13px/36px "Montserrat", sans-serif;
	cursor: pointer;
	transition: background-color .2s;
}

.hn-header .hn-search__submit:hover {
	background: var(--hn-dark-hover);
}

.hn-header .hn-search__clear {
	position: absolute;
	right: 80px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	padding: 6px;
	margin: 0;
	border: 0;
	background: transparent;
	color: var(--hn-muted);
	cursor: pointer;
}

.hn-header .hn-search__clear[hidden] {
	display: none;
}

.hn-header .hn-search__clear .hn-icon {
	width: 18px;
	height: 18px;
}

.hn-search__results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 50;
	max-height: 70vh;
	overflow-y: auto;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--hn-line);
	border-radius: var(--hn-radius);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
}

.hn-search__results[hidden] {
	display: none;
}

.hn-header .hn-result {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 8px 10px;
	border-radius: 8px;
}

.hn-header .hn-result:hover,
.hn-header .hn-result.is-active {
	background: var(--hn-soft);
}

.hn-result__img {
	width: 52px;
	height: 52px;
	flex: none;
	object-fit: cover;
	border-radius: 6px;
	background: var(--hn-soft);
}

.hn-result__body {
	min-width: 0;
}

.hn-result__title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.hn-result__price {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	color: var(--hn-muted);
}

.hn-result__price del {
	opacity: .6;
	margin-right: 4px;
}

.hn-result__price ins {
	text-decoration: none;
	font-weight: 600;
	color: var(--hn-text);
}

.hn-search__msg {
	margin: 0;
	padding: 14px 12px;
	font-size: 14px;
	color: var(--hn-muted);
}

.hn-header .hn-search__all {
	display: block;
	margin-top: 6px;
	padding: 12px;
	border-top: 1px solid var(--hn-line);
	text-align: center;
	font-size: 14px;
	font-weight: 600;
}

.hn-header .hn-search__all:hover,
.hn-header .hn-search__all.is-active {
	text-decoration: underline;
}

/* --- Účet + minikošík ------------------------------------------------------- */

.hn-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

.hn-header .hn-account {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	transition: background-color .2s;
}

.hn-header .hn-account:hover {
	background: var(--hn-soft);
}

.hn-minicart {
	position: relative;
}

.hn-header .hn-minicart__toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 52px;
	padding: 0 18px 0 12px;
	border: 1px solid var(--hn-line);
	border-radius: 999px;
	transition: border-color .2s, background-color .2s;
}

.hn-header .hn-minicart__toggle:hover,
.hn-minicart.is-open .hn-minicart__toggle {
	border-color: var(--hn-dark);
}

.hn-minicart__icon {
	position: relative;
	display: flex;
}

.hn-header .hn-cart-count {
	position: absolute;
	top: -7px;
	right: -9px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--hn-accent);
	color: var(--hn-accent-text);
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}

.hn-header .hn-cart-count.is-empty {
	background: var(--hn-line);
	color: var(--hn-muted);
}

.hn-minicart__label {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.hn-minicart__title {
	font-size: 12px;
	color: var(--hn-muted);
}

.hn-cart-total {
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.hn-minicart__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 50;
	width: 380px;
	max-width: calc(100vw - 32px);
	padding: 18px 20px 20px;
	background: #fff;
	border: 1px solid var(--hn-line);
	border-radius: var(--hn-radius);
	box-shadow: 0 18px 40px rgba(0, 0, 0, .14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .2s;
}

/* mostík, aby panel nezmizol pri prechode myšou */
.hn-minicart__panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -12px;
	height: 12px;
}

.hn-minicart.is-open .hn-minicart__panel {
	opacity: 1;
	visibility: visible;
	transform: none;
}

@media (hover: hover) and (min-width: 768px) {
	.hn-minicart:hover .hn-minicart__panel,
	.hn-minicart:focus-within .hn-minicart__panel {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
}

.hn-minicart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 16px;
}

.hn-header .hn-minicart__close {
	display: flex;
	padding: 4px;
	margin: 0;
	border: 0;
	background: transparent;
	color: var(--hn-muted);
	cursor: pointer;
}

.hn-header .hn-minicart__close .hn-icon {
	width: 20px;
	height: 20px;
}

/* obsah WooCommerce minikošíka */
.hn-header .widget_shopping_cart_content .woocommerce-mini-cart {
	max-height: 50vh;
	overflow-y: auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hn-header .widget_shopping_cart_content .woocommerce-mini-cart-item {
	position: relative;
	min-height: 76px;
	margin: 0;
	padding: 12px 30px 12px 68px;
	border-bottom: 1px solid var(--hn-line);
	font-size: 14px;
	line-height: 1.35;
	list-style: none;
}

.hn-header .widget_shopping_cart_content .woocommerce-mini-cart-item a:not(.remove) {
	display: block;
	font-weight: 600;
}

.hn-header .widget_shopping_cart_content .woocommerce-mini-cart-item img {
	position: absolute;
	left: 0;
	top: 12px;
	float: none;
	width: 54px !important;
	max-width: none;
	height: 54px;
	margin: 0;
	object-fit: cover;
	border-radius: 6px;
}

.hn-header .widget_shopping_cart_content .remove {
	position: absolute;
	right: 0;
	top: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	color: var(--hn-muted) !important;
}

.hn-header .widget_shopping_cart_content .remove:hover {
	background: var(--hn-soft);
	color: #c0392b !important;
}

.hn-header .widget_shopping_cart_content .quantity {
	display: block;
	margin-top: 4px;
	color: var(--hn-muted);
}

.hn-header .widget_shopping_cart_content dl.variation {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--hn-muted);
}

.hn-header .widget_shopping_cart_content dl.variation dt,
.hn-header .widget_shopping_cart_content dl.variation dd,
.hn-header .widget_shopping_cart_content dl.variation p {
	display: inline;
	margin: 0;
	font-weight: 400;
}

.hn-header .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	margin: 0;
	padding: 14px 0;
	font-size: 15px;
}

.hn-header .woocommerce-mini-cart__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0;
}

.hn-header .woocommerce-mini-cart__buttons .button {
	display: block;
	margin: 0;
	padding: 13px 10px;
	border: 1px solid var(--hn-dark);
	border-radius: 999px;
	background: #fff;
	color: var(--hn-dark) !important;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none !important;
}

.hn-header .woocommerce-mini-cart__buttons .button.checkout {
	background: var(--hn-dark);
	color: #fff !important;
}

.hn-header .woocommerce-mini-cart__buttons .button:hover {
	background: var(--hn-dark-hover);
	border-color: var(--hn-dark-hover);
	color: #fff !important;
}

.hn-header .woocommerce-mini-cart__empty-message {
	margin: 0;
	padding: 18px 0 6px;
	color: var(--hn-muted);
	font-size: 14px;
	text-align: center;
}

/* --- Pás s kategóriami ------------------------------------------------------ */

.hn-cats {
	position: relative;
	z-index: 1;
	background: var(--hn-dark);
	color: #fff;
}

.hn-header .hn-cats__list {
	display: flex;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* položky sa natiahnu na celú šírku kontajnera */
.hn-cats__item {
	position: relative;
	flex: 1 1 0;
	margin: 0;
	list-style: none;
}

.hn-header .hn-cats__item > a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 100%;
	padding: 15px 12px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .2px;
	white-space: nowrap;
	transition: background-color .2s;
}

.hn-header .hn-cats__item > a:hover {
	background: var(--hn-dark-hover);
}

.hn-header .hn-cats__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

.hn-header .hn-cats .hn-icon {
	width: 26px;
	height: 26px;
	transition: color .2s;
}

.hn-header .hn-cats__item > a:hover .hn-icon,
.hn-header .hn-cats__item.is-active > a .hn-icon {
	color: var(--hn-accent);
}

/* šípka a tlačidlo Menu sú iba pre mobil */
.hn-header .hn-cats__arrow,
.hn-header .hn-menu-toggle {
	display: none;
}

/* --- Focus pre klávesnicu --------------------------------------------------- */

.hn-header a:focus-visible,
.hn-header button:focus-visible {
	outline: none;
	box-shadow: var(--hn-focus) !important;
}

/* --- Tablet ----------------------------------------------------------------- */

@media (max-width: 991px) {
	.hn-top__inner {
		gap: 20px;
	}

	.hn-minicart__label {
		display: none;
	}

	.hn-header .hn-minicart__toggle {
		width: 48px;
		height: 48px;
		padding: 0;
		justify-content: center;
	}

	.hn-header .hn-cats__item > a {
		flex-direction: column;
		gap: 6px;
		padding: 12px 6px;
		font-size: 13px;
	}
}

/* --- Mobil: logo + tlačidlo Menu (vyhľadávanie, košík a účet sú v spodnej lište Storefrontu) --- */

@media (max-width: 767px) {
	.hn-top__inner {
		justify-content: space-between;
		gap: 12px;
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.hn-search,
	.hn-actions {
		display: none;
	}

	.hn-header .hn-logo img {
		max-width: 180px;
		max-height: 44px;
	}

	/* tlačidlo Menu */
	.hn-header .hn-menu-toggle {
		display: flex;
		align-items: center;
		gap: 10px;
		height: 44px;
		margin: 0;
		padding: 0 16px 0 14px;
		border: 1px solid var(--hn-line);
		border-radius: 999px;
		background: #fff;
		color: var(--hn-text);
		font: 600 14px/1 "Montserrat", sans-serif;
		cursor: pointer;
		transition: background-color .2s, border-color .2s, color .2s;
	}

	.hn-header .hn-menu-toggle[aria-expanded="true"] {
		background: var(--hn-dark);
		border-color: var(--hn-dark);
		color: #fff;
	}

	.hn-menu-toggle__bars {
		position: relative;
		width: 18px;
		height: 12px;
	}

	.hn-menu-toggle__bars span {
		position: absolute;
		left: 0;
		width: 100%;
		height: 2px;
		border-radius: 2px;
		background: currentColor;
		transition: transform .25s, opacity .2s, top .25s;
	}

	.hn-menu-toggle__bars span:nth-child(1) { top: 0; }
	.hn-menu-toggle__bars span:nth-child(2) { top: 5px; }
	.hn-menu-toggle__bars span:nth-child(3) { top: 10px; }

	.hn-menu-toggle[aria-expanded="true"] .hn-menu-toggle__bars span:nth-child(1) {
		top: 5px;
		transform: rotate(45deg);
	}

	.hn-menu-toggle[aria-expanded="true"] .hn-menu-toggle__bars span:nth-child(2) {
		opacity: 0;
	}

	.hn-menu-toggle[aria-expanded="true"] .hn-menu-toggle__bars span:nth-child(3) {
		top: 5px;
		transform: rotate(-45deg);
	}

	/* panel s kategóriami */
	.hn-cats {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: calc(100vh - 69px);
		overflow-y: auto;
		background: #fff;
		color: var(--hn-text);
		border-top: 1px solid var(--hn-line);
		box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); /* stmavenie stránky pod panelom */
	}

	.hn-header.is-menu-open .hn-cats {
		display: block;
		animation: hn-menu-in .2s ease-out;
	}

	.hn-header .hn-cats__list {
		flex-direction: column;
		padding: 8px 0 12px;
	}

	.hn-cats__item {
		flex: none;
	}

	.hn-header .hn-cats__item > a {
		flex-direction: row;
		justify-content: flex-start;
		gap: 14px;
		padding: 10px 0;
		border-bottom: 1px solid var(--hn-line);
		color: var(--hn-text);
		font-size: 16px;
	}

	.hn-header .hn-cats__item:last-child > a {
		border-bottom: 0;
	}

	.hn-header .hn-cats__item > a:hover {
		background: transparent;
	}

	.hn-header .hn-cats__icon {
		width: 46px;
		height: 46px;
		border-radius: 12px;
		background: var(--hn-soft);
		color: var(--hn-dark);
	}

	.hn-header .hn-cats__item > a:hover .hn-icon {
		color: var(--hn-dark);
	}

	.hn-header .hn-cats__item.is-active .hn-cats__icon {
		background: var(--hn-accent);
	}

	.hn-header .hn-cats__item.is-active > a .hn-icon {
		color: var(--hn-accent-text);
	}

	.hn-header .hn-cats__arrow {
		display: flex;
		margin-left: auto;
		color: var(--hn-muted);
	}

	.hn-header .hn-cats__arrow .hn-icon {
		width: 18px;
		height: 18px;
	}
}

@keyframes hn-menu-in {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: none; }
}


@media (prefers-reduced-motion: reduce) {
	.hn-header *,
	.hn-header *::before,
	.hn-header *::after {
		transition: none !important;
	}
}
