/* ==========================================================================
   HEADER STYLES - SigmaDruk AI
   ========================================================================== */

/* Site Header (Main Menu)
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	width: 100%;
}

/* Topbar
   ========================================================================== */

.topbar-hero {
	font-family: var(--f-f-p);
	height: 30px;
	display: flex;
	align-items: center;
	background-color: var(--pure-white);
}

.topbar-hero-container {
	width: 100%;
	margin: 0 auto;
	background: var(--black);
	height: 30px;
}

.topbar-hero-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 150px;
}

/* Topbar - Left Menu */
.topbar-hero-nav {
	display: flex;
	align-items: center;
}

.topbar-hero-menu {
	display: flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.topbar-hero-menu li {
	position: relative;
	margin: 0;
	padding: 0 10px;
}

.topbar-hero-menu li:first-child {
	padding-left: 0;
}

/* Separator między elementami topbar menu */
.topbar-hero-menu li:not(:last-child)::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 2px;
	height: 10px;
	background: var(--navy);
}

.topbar-hero-menu a {
	font-size: 12px;
	font-weight: 400;
	color: var(--mid-grey);
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

.topbar-hero-menu a:hover {
	color: var(--pure-white);
}

/* Topbar - Right Side */
.topbar-hero-right {
	display: flex;
	align-items: center;
	gap: 30px;
}

/* Topbar - Working Hours */
.topbar-hero-hours {
	display: flex;
	align-items: center;
	gap: 6px;
}

.topbar-hero-hours-icon {
	width: 12px;
	height: 12px;
	fill: var(--mid-grey);
}

.topbar-hero-hours-text {
	font-size: 12px;
	font-weight: 400;
	color: var(--mid-grey);
}

/* Topbar - Social Media */
.topbar-hero-social {
	display: flex;
	align-items: center;
	gap: 10px;
}

.topbar-hero-social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.topbar-hero-social-link:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.topbar-hero-social-link svg {
	width: 15px;
	height: 15px;
	transition: all 0.2s ease;
}

.topbar-hero-social-link svg path {
	transition: fill 0.2s ease;
}

.topbar-hero-social-link:hover svg path {
	fill: var(--pure-white) !important;
}

/* Topbar - My Account */
.topbar-hero-account {
	font-size: 14px;
	font-weight: 500;
	color: var(--mid-grey);
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

.topbar-hero-account:hover {
	color: var(--pure-white);
}

/* Main Header
   ========================================================================== */

.header-hero-main {
	font-family: var(--f-f-p);
}

.header-hero-main-container {
	width: 100%;
	margin: 0 auto;
	background: var(--black);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	border-radius: 0 0 20px 20px;
	height: 60px;
	display: flex;
	align-items: center;
}

/* Hero pages - negative margin for content to slide under rounded header */
body.hero-page .site-main {
	margin-top: -20px;
}

.header-hero-main-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	width: 100%;
	padding: 0 150px;
}

/* Logo */
.header-hero-main-logo {
	flex-shrink: 0;
}

.header-hero-main-logo a {
	display: flex;
	align-items: center;
}

.header-hero-main-logo img {
	max-height: 50px;
	width: auto;
}

/* Navigation */
.header-hero-main-nav {
	flex-grow: 1;
	display: flex;
	justify-content: flex-start;
}

.header-menu {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.header-menu > li {
	position: relative;
	margin: 0;
}

/* Separator między elementami menu (oprócz pierwszego i ostatniego) */
.header-menu > li:not(:last-child):not(:first-child)::after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 2px;
	height: 10px;
	background: var(--deep-grey);
}

.header-menu > li > a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 3px 20px;
	font-size: 17px;
	font-weight: 500;
	color: var(--pure-white);
	text-decoration: none;
	position: relative;
	letter-spacing: -0.3px;
}

.header-menu > li > a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 20px;
	right: 20px;
	height: 2px;
	background: var(--red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}

.header-menu > li > a:hover::after,
.header-menu > li.current-menu-item > a::after {
	transform: scaleX(1);
}

.header-menu > li:first-child {
	margin-right: 15px;
}

/* Pierwszy element (Produkty) - bez underline, z backgroundem */
.header-menu > li:first-child > a::after {
	display: none;
}

.header-menu > li:first-child > a {
	padding: 6px 20px;
	border-radius: 8px;
	background-color: var(--red);
	color: var(--pure-white);
	transition: background-color 0.3s ease, color 0.3s ease, border-radius 0.3s ease;
}

.header-menu > li:first-child > a:hover {
	background-color: var(--pure-white);
	color: var(--mid-navy);
}

.header-menu > li:first-child.mega-menu-open > a {
	background-color: var(--pure-white);
	color: var(--mid-navy);
	border-radius: 8px 8px 0 0;
	font-weight: 600;
	position: relative;
	z-index: 99999;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Menu chevron icon */
.menu-chevron {
	display: inline-block;
	margin-left: 6px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
	transition: transform 0.2s ease;
}

.header-menu > li.mega-menu-open .menu-chevron {
	transform: rotate(180deg);
}

/* Dropdown menu */
.header-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background-color: var(--pure-white);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	border-radius: var(--r-15);
	padding: 8px 0;
	margin: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.2s ease;
	z-index: 2000;
}

.header-menu > li:hover .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.header-menu .sub-menu li {
	margin: 0;
}

.header-menu .sub-menu li a {
	display: block;
	padding: 10px 20px;
	font-size: 14px;
	color: var(--deep-grey);
	text-decoration: none;
	transition: all 0.2s ease;
}

.header-menu .sub-menu li a:hover {
	background-color: var(--ultra-lite-grey);
	color: var(--red);
}

/* Header Actions */
/* Header Actions */
.header-hero-main-actions {
	display: flex;
	align-items: center;
	gap: 20px;
}

.header-hero-search-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--pure-white);
	background: none;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease;
}

.header-hero-search-toggle:hover {
	background-color: rgba(255, 255, 255, 0.1);
	color: var(--red);
}

/* Cart with badge and total */
.header-hero-cart-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	border-radius: 8px;
	transition: background-color 0.2s ease;
	cursor: pointer;
}

.header-hero-cart-wrapper:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

.header-hero-cart {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--pure-white);
}

.header-hero-cart-count {
	position: absolute;
	top: 0;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background-color: var(--red);
	color: var(--pure-white);
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	border-radius: 50%;
}

.header-hero-cart-total {
	font-size: 14px;
	font-weight: 500;
	color: var(--pure-white);
	white-space: nowrap;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--pure-white);
	background: none;
	border: none;
	cursor: pointer;
}

/* Search Overlay
   ========================================================================== */

.header-search {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: var(--pure-white);
	padding: 20px 0;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	z-index: 2000;
}

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

.header-hero-search-container {
	width: calc(100% - 100px);
	margin: 0 auto;
	padding: 0 50px;
}

.header-hero-search-form {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-hero-search-input {
	flex-grow: 1;
	padding: 12px 16px;
	font-size: 16px;
	font-family: var(--f-f-p);
	border: 2px solid var(--lite-grey);
	border-radius: var(--r-15);
	transition: border-color 0.2s ease;
}

.header-hero-search-input:focus {
	outline: none;
	border-color: var(--red);
}

.header-hero-search-submit,
.header-hero-search-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--deep-grey);
	background: none;
	border: none;
	border-radius: var(--r-15);
	cursor: pointer;
	transition: all 0.2s ease;
}

.header-hero-search-submit:hover {
	background-color: var(--red);
	color: var(--pure-white);
}

.header-hero-search-close:hover {
	background-color: var(--ultra-lite-grey);
}

/* Mobile Menu — przeniesione do mobile-menu.css */

/* Mega Menu
   ========================================================================== */

.mega-menu {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10000;
	display: none;
}

.mega-menu[hidden] {
	display: none !important;
}

.mega-menu-container {
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin: 0;
}

.mega-menu-inner {
	background: var(--pure-white);
	border-radius: 20px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	width: calc(100vw - 100px);
	max-width: none;
	min-width: 1000px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* Tab Navigation */
.mega-menu-tabs {
	display: flex;
	gap: 10px;
	padding: 50px 100px 40px 100px;
	background: transparent;
	flex-wrap: nowrap;
	border-bottom: none;
}

.mega-menu-tab {
	padding: 8px 15px;
	font-family: var(--f-f-p);
	font-size: 15px;
	font-weight: 500;
	color: var(--black);
	background: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
	letter-spacing: -0.3px;
}

.mega-menu-tab:hover {
	color: var(--black);
	background: #E5E5E5;
}

.mega-menu-tab[aria-selected="true"] {
	background: var(--black);
	color: var(--pure-white);
	font-weight: 600;
}

/* Content Area */
.mega-menu-content {
	padding: 0 100px 50px 100px;
	max-height: calc(100vh - 200px);
	overflow-y: auto;
}

/* Scroll Indicator Gradients - on mega-menu container */
.mega-menu::before,
.mega-menu::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 60px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 100;
}

/* Top gradient - positioned below tabs */
.mega-menu::before {
	top: 130px;
	background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

/* Bottom gradient - positioned at bottom */
.mega-menu::after {
	bottom: 0;
	background: linear-gradient(0deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
	width: calc(100% - 60px);
	margin: 0 auto;
}

/* Show gradients when scrolling */
.mega-menu.has-scroll-top::before {
	opacity: 1;
}

.mega-menu.has-scroll-bottom::after {
	opacity: 1;
}

.mega-menu-main {
	width: 100%;
}

/* Tab Panels */
.mega-menu-panel {
	display: block;
}

.mega-menu-panel[hidden] {
	display: none;
}

/* Body: listing + sidebar */
.mega-menu-body {
	display: flex;
	gap: 40px;
}

.mega-menu-listing {
	flex: 1;
	min-width: 0;
}

.mega-menu-sidebar {
	width: 300px;
	display: flex;
	flex-direction: column;
	gap: 30px;
	align-self: stretch;
}

.mega-menu-cta {
	flex: 1;
	background: var(--ultra-lite-grey);
	border-radius: var(--r-20);
	padding: 30px 25px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mega-menu-cta__title {
	font-size: var(--h-s);
	font-weight: 600;
	color: var(--black);
	margin: 0;
	line-height: 1.3;
}

.mega-menu-cta__desc {
	font-size: var(--b-m);
	line-height: var(--b-m-lh);
	color: var(--grey);
	margin: 0;
}

.mega-menu-cta .btn {
	margin-top: 8px;
	width: 100%;
	justify-content: center;
}

.mega-menu-all-btn {
	width: 100%;
	justify-content: center;
	background: var(--black);
	color: var(--pure-white);
	border-color: var(--black);
}

.mega-menu-all-btn:hover {
	background: var(--deep-grey);
	border-color: var(--deep-grey);
	color: var(--pure-white);
}

/* Alphabetical Index - ukryte na starcie */
.mega-menu-alphabet {
	display: none;
}

/* Products List - letterSign container */
.letterSign {
	columns: 4;
	column-gap: 50px;
	margin: 0;
	padding: 0;
	padding-left: 35px;
	list-style: none;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.letterSign.letters-loaded {
	opacity: 1;
}

.letterSign li {
	position: relative;
	margin: 0;
	padding-left: 0;
	break-inside: avoid;
	transition: padding-left 0.4s ease;
}

.letterSign li a {
	display: block;
	padding: 0;
	font-size: var(--b-15);
	line-height: var(--b-m-lh);
	letter-spacing: var(--letter-spacing);
	color: var(--black);
	text-decoration: none;
	transition: color 0.2s ease;
}

.letterSign li a:hover {
	color: var(--black);
}

/* Tekst w nawiasach (span) */
.txtMidGrey {
	color: var(--mid-grey) !important;
}

.font12 {
	font-size: 12px !important;
	text-transform: none;
}

/* Hover kreseczka (animowana z lewej) */
.letterSign li::after {
	content: '';
	position: absolute;
	left: 0;
	top: 12px;
	transform: translateY(-50%);
	width: 0;
	height: 2px;
	background: var(--red);
	transition: width 0.4s ease, opacity 0.4s ease;
	opacity: 0;
}

.letterSign li:hover {
	padding-left: 15px;
}

.letterSign li:hover a {
	font-weight: 600;
}

.letterSign li:hover::after {
	width: 10px;
	opacity: 1;
}

/* Alphabetical badge (literka) */
.letterSign li.has-letter-badge:not(:first-child) {
	margin-top: 20px;
}

.sigma-letter-badge {
	position: absolute;
	left: -35px;
	top: 3px;
	font-size: 16px;
	font-weight: 700;
	color: var(--deep-grey);
	width: 25px;
	text-align: left;
	line-height: 1.2;
	line-height: 1.2;
}

/* Kropeczka/kwadracik pod literką */
.letterSign li.has-letter-badge::before {
	content: '';
	position: absolute;
	left: -34px;
	top: 23px;
	transform: translateY(-50%);
	width: 3px;
	height: 3px;
	background: var(--red);
}

/* Custom Scrollbar */
.mega-menu-content::-webkit-scrollbar {
	width: 8px;
}

.mega-menu-content::-webkit-scrollbar-track {
	background-color: #f5f5f5;
	border-radius: 4px;
}

.mega-menu-content::-webkit-scrollbar-thumb {
	background-color: #e0e0e0;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.mega-menu-content::-webkit-scrollbar-thumb:hover {
	background-color: var(--red);
}

/* Firefox scrollbar */
.mega-menu-content {
	scrollbar-width: thin;
	scrollbar-color: #e0e0e0 #f5f5f5;
}

/* Mega Menu Responsive */
@media (max-width: 1536px) {
	.topbar-hero-inner {
		padding: 3px 50px 0;
	}

	.header-hero-main-inner {
		padding: 0 50px;
	}

	.mega-menu-tabs {
		padding: 50px 50px 10px 50px;
	}

	.mega-menu-content {
		padding: 40px 50px;
		max-height: 500px;
	}

	.mega-menu::before {
		top: 100px;
	}

	.letterSign {
		column-gap: 40px;
	}

	.sigma-letter-badge {
		left: -25px;
		font-size: 15px;
	}

	.letterSign li a {
		font-size: var(--b-m);
		line-height: var(--b-s-lh);
	}

	.letterSign li.has-letter-badge::before {
		left: -25px;
	}
}

@media (max-width: 1366px) {
	.mega-menu-tabs {
		gap: 20px;
	}

	.letterSign {
		columns: 3;
	}

	.sigma-letter-badge {
		font-size: 14px;
	}

	.letterSign li.has-letter-badge::before {
		top: 20px;
	}

	.mega-menu-tabs {
		padding: 50px 30px 10px 30px;
	}

	.mega-menu-content {
		padding: 40px 30px;
		max-height: 500px;
	}

	.mega-menu-body {
		gap: 30px;
	}

	.mega-menu-sidebar {
		width: 280px;
		gap: 30px;
		height: 390px;
	}
}

@media (max-width: 1024px) {
	.mega-menu {
		display: none !important;
	}

	.letterSign {
		columns: 2;
	}
}

/* Mobile Menu — przeniesione do mobile-menu.css
   ========================================================================== */

@media (max-width: 1024px) {
	.header-hero-main-nav {
		display: none;
	}
}

@media (max-width: 768px) {
	.topbar-hero-hours,
	.topbar-hero-social {
		display: none;
	}

	.topbar-hero-inner {
		padding: 3px 20px 0;
	}

	.header-hero-main-inner {
		padding: 0 20px;
		gap: var(--spacing-sm);
	}

	.header-hero-main-logo img {
		max-height: 40px;
	}
}

@media (max-width: 480px) {
	.header-hero-main-actions {
		gap: 0px;
	}

	.header-hero-cart-wrapper {
		gap: 5px;
	}

	.header-hero-search-toggle {
		display: none;
	}
}
