/**
 * Header utility nav + footer redesign — Fazė 8C.
 * Global (visi frontend puslapiai).
 */

:root {
	--ps-hf-ink: #1f2937;
	--ps-hf-muted: #9ca3af;
	--ps-hf-border: #374151;
	--ps-hf-accent: #e83a17;
	--ps-hf-bg-dark: #1a1d23;
}

/* ================================================================
   1. SECONDARY NAV IN THE WHITE HEADER ROW
   The native Header Builder menu element lives in the general-header
   right column, before wishlist/cart. It is intentionally separate from
   the dark category navigation row.
   ================================================================ */

.whb-general-header .wd-header-secondary-nav ul.wd-nav-secondary {
	flex-wrap: nowrap;
	white-space: nowrap;
}

.whb-general-header .wd-header-secondary-nav .woodmart-nav-link {
	font-size: 13px;
	font-weight: 500;
	text-transform: none;
	padding: 0;
}

.whb-general-header .wd-header-secondary-nav li.current-menu-item .woodmart-nav-link {
	color: var(--ps-hf-accent);
}

/* ================================================================
   1B. TOP BAR — CONTACT / ACCOUNT / SOCIAL GROUPS
   AUDITAS (DOM realybė, ne spėjimas):
     .whb-top-bar-inner  → flex, justify-content:space-between
       .whb-col-left  (~564px at 1440px) → adresas+telefonas+email
         (Elementor e-con-inner, flex, gap:24px tarp 3 widget'ų)
       .whb-col-center → empty native builder column after the menu
         was moved to the white general-header row
       .whb-col-right → .wd-header-my-account (SAVARANKIŠKAS
         native WoodMart elementas, jau atskiras nuo <ul>, NE 4-as
         nav item DOM'e) + social icons (Elementor widget)
   Kontaktų vidinis gap padidintas iki 24px. Account grupė lieka
   vizualiai atskirta plona vertikalia linija.
   ================================================================ */

.whb-top-bar .whb-col-left .e-con-inner {
	gap: 24px;
}

.whb-top-bar .wd-header-my-account {
	border-left: 1px solid rgba(255, 255, 255, 0.18);
	padding-left: 20px;
	margin-right: 24px;
}

/* 1366px žemiau: pilnas spacing (30+20 ul padding + 20+24 account
   papildomas plotis = ~94px naujo ploto virš pirminio fix'o) realiai
   NEBETELPA — social ikonos pradėdavo persidengti/dingti už 1280px
   krašto (patikrinta: socialRect.right=1305 > viewport 1280).
   Sumažinam TIK papildomą spacing (ne bazinį 1-os eilutės sprendimą),
   laikantis prioriteto: utility nav + account + phone/email lieka
   pilnai matomi ir neperisdengia, tik su kuklesniu tarpu. */
@media (max-width: 1366px) {
	.whb-top-bar .wd-header-my-account {
		padding-left: 12px;
		margin-right: 10px;
	}
}

/* Desktop Header Builder placement: the complete secondary menu is in the
   white row, before the wishlist/cart tools. The mobile builder columns are
   untouched by this desktop-only styling. */
@media (min-width: 1025px) {
	.whb-top-bar .whb-col-center.whb-empty-column {
		display: none;
	}

	.whb-general-header .whb-col-right {
		flex: 0 0 auto;
	}

	.whb-general-header .wd-header-secondary-nav {
		flex: 0 0 auto;
		width: auto;
		margin-right: 8px;
		padding: 0;
	}

	.whb-general-header .wd-header-secondary-nav ul.wd-nav-secondary {
		column-gap: 24px;
	}
}

/* ================================================================
   2. HEADER CART EMPTY STATE
   Tuščias krepšelis: rodom TIK ikoną + "0" badge, paslepiam
   "0,00 €" subtotal tekstą, kad nebūtų dviejų beprasmių nulių.
   Kai krepšelyje yra prekių (.is-cart-empty pašalinama JS),
   subtotal grįžta — jokia reikšmė nehardcodinta, tik CSS display.
   ================================================================ */

.wd-header-cart.is-cart-empty .wd-cart-subtotal {
	display: none;
}

/* ŠAKNIS (patvirtinta): svetainės heading šriftas Michroma
   (--wd-header-el-font, taikomas visai header zonai per WoodMart
   Typography nustatymus) neturi tinkamo "€" glifo — vietoj jo
   parodo apvalią, "0"-panašią formą. Tai NE papildomas skaičius/
   tekstas DOM'e (patikrinta: innerText tik "1\n7,95 €"), o klaidingai
   parenkamas glifas. Taisom TIK cart kainos tekstą (siauras selector),
   NEKEIČIAME --wd-header-el-font globaliai (naudojamas kitur brand'ui). */
.wd-header-cart .wd-cart-subtotal {
	font-family: var(--wd-text-font, "Fira Sans", Arial, Helvetica, sans-serif);
}

/* ================================================================
	3. DESKTOP NATIVE STICKY HEADER
	WoodMart keeps the document placeholder and fixes only the rows marked
	with .whb-sticky-row. The utility bar is deliberately left scrolling;
	the logo/search row and the existing category bar stay together.
	Mobile header behaviour is untouched.
	================================================================ */

@media (min-width: 1025px) {
	.whb-header_111098.whb-sticky-real.whb-scroll-down .whb-main-header {
		transform: translateZ(0);
	}

	.whb-header_111098.whb-sticked .whb-main-header {
		z-index: 390;
		box-shadow: 0 2px 12px rgba(17, 22, 28, 0.14);
	}

	.whb-header_111098.whb-sticked .whb-header-bottom {
		position: relative;
		z-index: 2;
	}

	.whb-header_111098.whb-sticked .whb-header-bottom .ps-mega {
		z-index: 3;
	}
}
