/* ========================================
   POLARIS CHILD - MODERN HEADER
   Version: 3.1
   ======================================== */

:root {
	--polaris-surface: #2B1108;
	--polaris-surface-card: #632613;
	--polaris-border: #5A3828;
	--polaris-text: #FFFFFF;
	--polaris-text-secondary: #E8D5C4;
	--polaris-text-muted: #A89085;
	--polaris-accent: #EA580C;
	--polaris-accent-hover: #C2410C;
	
	--header-height-desktop: 80px;
	--header-height-mobile: 60px;
	--header-height-sticky-desktop: 70px;
	--header-height-sticky-mobile: 56px;
	
	--logo-height-desktop: 111px;
	--logo-height-tablet: 52px;
	--logo-height-mobile: 82px;
	--logo-height-sticky-desktop: 68px;
	--logo-height-sticky-mobile: 71px;
	
	--container-padding: 24px;
	--container-padding-mobile: 10px;
	--container-max-width: 1440px;
	
	--transition-fast: 0.2s ease;
	--transition-normal: 0.3s ease;
	--transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   TOPBAR
   ======================================== */
.polaris-topbar {
	background: var(--polaris-surface);
	border-bottom: 1px solid var(--polaris-border);
	padding: 8px 0;
	font-size: 12px;
	color: var(--polaris-text-secondary);
	transition: var(--transition-normal);
}

.polaris-topbar .container {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 var(--container-padding);
}

.polaris-topbar .topbar-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
}

.polaris-topbar .topbar-left,
.polaris-topbar .topbar-right {
	display: flex;
	gap: 20px;
	align-items: center;
}

.polaris-topbar .topbar-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--polaris-text-secondary);
	text-decoration: none;
	transition: var(--transition-fast);
}

.polaris-topbar .topbar-item:hover {
	color: var(--polaris-text);
}

.polaris-topbar .topbar-item i {
	font-size: 13px;
	opacity: 0.8;
}

body.header-scrolled .polaris-topbar {
	display: none;
}

/* ========================================
   MAIN HEADER
   ======================================== */
.polaris-modern-header.header {
	background: var(--polaris-surface) !important;
	border-bottom: 1px solid var(--polaris-border) !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: var(--transition-normal);
}

.polaris-modern-header .header-content {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	min-height: var(--header-height-desktop);
	padding: 12px 0;
}

/* ========================================
   LOGO
   ======================================== */
.polaris-modern-header .header-logo {
	flex-shrink: 0;
}

.polaris-modern-header .header-logo a {
	display: block;
	line-height: 0;
}

.polaris-modern-header .header-logo .logo-img {
	height: var(--logo-height-desktop);
	width: auto;
	max-width: 200px;
	transition: var(--transition-normal);
}

.polaris-modern-header .header-logo a:hover .logo-img {
	opacity: 0.85;
	transform: scale(0.98);
}

/* ========================================
   MOBILE MENU TOGGLE
   ======================================== */
.header-mobile-toggle {
	display: none;
}

.mobile-menu-btn {
	background: transparent;
	border: none;
	color: var(--polaris-text);
	font-size: 24px;
	padding: 8px;
	cursor: pointer;
	transition: var(--transition-fast);
	line-height: 1;
}

.mobile-menu-btn:hover {
	color: var(--polaris-accent);
}

/* ========================================
   HEADER ACTIONS
   ======================================== */
.polaris-modern-header .header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}

.header-action-btn {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 10px 14px;
	background: transparent;
	border: none;
	color: var(--polaris-text) !important;
	font-size: 20px;
	text-decoration: none !important;
	cursor: pointer;
	transition: var(--transition-fast);
	border-radius: 6px;
}

.header-action-btn:hover {
	background: rgba(255, 255, 255, 0.05);
	color: var(--polaris-accent) !important;
}

.header-action-btn i {
	font-size: 22px;
	line-height: 1;
}

.header-action-btn .action-label {
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--polaris-text-secondary);
	transition: var(--transition-fast);
}

.header-action-btn:hover .action-label {
	color: var(--polaris-accent);
}

.cart-count {
	position: absolute;
	top: 6px;
	right: 8px;
	background: var(--polaris-accent);
	color: var(--polaris-text);
	font-size: 10px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	padding: 0 4px;
	line-height: 1;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   SEARCH
   ======================================== */
.header-search-expanded {
	display: none;
	background: var(--polaris-surface-card);
	border-top: 1px solid var(--polaris-border);
	padding: 20px 0;
	animation: slideDown 0.3s ease;
}

.header-search-expanded.active {
	display: block;
}

.header-search-expanded.active .container {
	height: 40px;
	min-height: 40px;
}

.search-form-wrapper {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
}

.search-form-wrapper form {
	display: flex;
	gap: 8px;
	align-items: center;
}

.search-form-wrapper input[type="search"],
.search-form-wrapper input[type="text"] {
	flex: 1;
	background: var(--polaris-text) !important;
	border: none !important;
	border-radius: 24px !important;
	padding: 14px 24px !important;
	font-size: 15px !important;
	color: #000000 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.search-form-wrapper input[type="search"]:focus,
.search-form-wrapper input[type="text"]:focus {
	outline: none !important;
	box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2) !important;
}

.search-form-wrapper button[type="submit"],
.search-form-wrapper input[type="submit"] {
	background: var(--polaris-accent) !important;
	color: var(--polaris-text) !important;
	border: none !important;
	border-radius: 24px !important;
	padding: 14px 32px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: var(--transition-fast);
	white-space: nowrap;
}

.search-form-wrapper button[type="submit"]:hover,
.search-form-wrapper input[type="submit"]:hover {
	background: var(--polaris-accent-hover) !important;
	transform: translateY(-1px);
}

.search-close {
	position: absolute;
	top: 50%;
	right: -50px;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: var(--polaris-text-muted);
	font-size: 24px;
	padding: 8px;
	cursor: pointer;
	transition: var(--transition-fast);
}

.search-close:hover {
	color: var(--polaris-text);
	transform: translateY(-50%) scale(1.1);
}

/* ========================================
   STICKY HEADER
   ======================================== */
.polaris-modern-header.is-sticky {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	animation: slideDownSticky 0.3s ease;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.polaris-modern-header.is-sticky .header-content {
	min-height: var(--header-height-sticky-desktop);
}

.polaris-modern-header.is-sticky .logo-img {
	height: var(--logo-height-sticky-desktop);
}

@keyframes slideDownSticky {
	from {
		transform: translateY(-100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */
@media (min-width: 768px) and (max-width: 1024px) {
	.polaris-modern-header .header-logo .logo-img {
		height: var(--logo-height-tablet);
	}
	
	.polaris-modern-header.is-sticky .logo-img {
		height: calc(var(--logo-height-tablet) * 0.9);
	}
	
	.polaris-topbar .container {
		padding: 0 20px;
	}
	
	.polaris-modern-header .header-content {
		gap: 20px;
	}
	
	.header-action-btn {
		padding: 8px 12px;
	}
	
	.header-action-btn .action-label {
		font-size: 9px;
	}
}

/* ========================================
   MOBILE (max-width: 767px)
   ======================================== */
@media (max-width: 767px) {
	/* TOPBAR */
	.polaris-topbar .container {
		padding-left: var(--container-padding-mobile);
		padding-right: var(--container-padding-mobile);
		width: 100%;
	}
	
	.polaris-topbar .topbar-content {
		flex-direction: column;
		gap: 12px;
		padding: 10px 0;
	}
	
	.polaris-topbar .topbar-left {
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: center;
		gap: 15px;
		width: 100%;
	}
	
	.polaris-topbar .topbar-left .topbar-item {
		font-size: 13px;
		white-space: nowrap;
	}
	
	.polaris-topbar .topbar-right {
		width: 100%;
		display: block;
	}
	
	.polaris-topbar .topbar-right .topbar-address {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 48px;
		padding: 12px 15px;
		background-color: #333333;
		color: var(--polaris-text);
		border-radius: 6px;
		text-decoration: none;
		font-weight: 600;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}
	
	.polaris-topbar .topbar-right .topbar-address i {
		margin-right: 8px;
		font-size: 16px;
	}
	
	.polaris-topbar .topbar-right .topbar-address::before {
		content: "Nawiguj: ";
		margin-right: 5px;
		font-weight: 400;
		opacity: 0.9;
	}
	
	/* HEADER */
	.polaris-modern-header .header-content {
		min-height: var(--header-height-mobile) !important;
		gap: 16px;
		padding: 12px;
	}
	
	.polaris-modern-header .header .container {
		width: 100%;
		height: var(--header-height-mobile);
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}
	
	.polaris-modern-header .header-logo .logo-img {
		height: var(--logo-height-mobile);
	}
	
	.header-mobile-toggle {
		display: block;
		order: 3;
		margin-left: auto;
	}
	
	.polaris-modern-header .header-actions {
		order: 2;
		gap: 2px;
	}
	
	.header-action-btn {
		padding: 8px 10px;
		font-size: 18px;
	}
	
	.header-action-btn i {
		font-size: 20px;
	}
	
	.header-action-btn .action-label {
		display: none;
	}
	
	.cart-count {
		top: 4px;
		right: 6px;
		font-size: 9px;
		min-width: 16px;
		height: 16px;
	}
	
	/* SEARCH */
	.header-search-expanded .container {
		height: auto !important;
		min-height: 60px !important;
		padding-top: 10px;
		padding-bottom: 10px;
	}
	
	.search-form-wrapper {
		padding: 0 10px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 8px;
	}
	
	.search-form-wrapper form {
		display: flex !important;
		flex-direction: row !important;
		flex: 1 !important;
		align-items: center !important;
		gap: 8px;
		margin: 0 !important;
	}
	
	.search-form-wrapper input[type="search"],
	.search-form-wrapper input[type="text"] {
		flex-grow: 1 !important;
		width: auto !important;
		height: 44px !important;
		margin: 0 !important;
		padding: 0 15px !important;
		font-size: 16px !important;
	}
	
	.search-form-wrapper button[type="submit"],
	.search-form-wrapper input[type="submit"] {
		font-size: 0 !important;
		width: 44px !important;
		height: 44px !important;
		padding: 0 !important;
		border-radius: 8px !important;
		min-width: 44px !important;
		background-color: var(--polaris-accent) !important;
		background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
		background-repeat: no-repeat !important;
		background-position: center !important;
		background-size: 20px !important;
	}
	
	.search-close {
		position: static !important;
		transform: none !important;
		margin: 0 !important;
		width: 40px !important;
		height: 40px !important;
		display: flex !important;
		align-items: center;
		justify-content: center;
		background: transparent !important;
		color: var(--polaris-text-muted) !important;
	}
	
	.search-close:hover {
		transform: scale(1.1);
	}
	
	.search-close i {
		font-size: 24px !important;
	}
	
	/* STICKY HEADER */
	.affix-wrapper .affix-data .header .container {
		height: 85px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
	}
	
	.affix-wrapper {
		height: auto !important;
		min-height: 60px;
	}
	
	.polaris-modern-header.is-sticky .header-content {
		height: 100% !important;
		min-height: 0 !important;
		display: flex !important;
		align-items: center !important;
		margin: 0 !important;
		padding: 0 12px !important;
	}
	
	.polaris-modern-header.is-sticky .logo-img {
		height: var(--logo-height-sticky-mobile);
	}
	
	.polaris-modern-header.is-sticky {
		transition: var(--transition-smooth);
	}
	
	/* SMART TOPBAR */
	body.header-scrolled .polaris-topbar {
		display: block !important;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: 10001;
		transform: translateY(-100%);
		transition: var(--transition-smooth);
		background: var(--polaris-surface);
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}
	
	body.scroll-up .polaris-topbar {
		transform: translateY(0);
	}
	
	body.scroll-down .polaris-topbar {
		transform: translateY(-100%);
	}
	
	body.scroll-up .polaris-modern-header.is-sticky {
		top: 48px !important;
	}
	
	body.scroll-down .polaris-modern-header.is-sticky {
		top: 0 !important;
	}
	
	/* MENU */
	.container-fluid.menu {
		display: none;
	}
}

/* ========================================
   RETINA DISPLAY
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
	.logo-img {
		image-rendering: -webkit-optimize-contrast;
		image-rendering: crisp-edges;
	}
}

/* ========================================
   FIX COPYRIGHT POSITION
   Naprawa pływającej stopki
   ======================================== */
.copyright {
	/* 1. Przywracamy element do normalnego przepływu */
	position: relative !important; 
	
	/* 2. Resetujemy pozycjonowanie absolutne */
	bottom: auto !important;
	
	/* 3. Zabezpieczenie przed elementami pływającymi (float) powyżej */
	clear: both;
	
	/* 4. Opcjonalnie: upewniamy się, że jest blokiem */
	display: block;
	width: 100%;
	z-index: 10;
}

/* ========================================
   DESKTOP CTA: ZADAJ PYTANIE
   ======================================== */

.header-ask-btn {
	padding: 8px 18px !important;
	background: transparent;
	border: 1px solid rgba(234, 88, 12, 0.6) !important;
	border-radius: 8px;
	color: #EA580C !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
}

.header-ask-btn:hover {
	background: #EA580C !important;
	color: #fff !important;
	border-color: #EA580C !important;
}

.header-ask-btn .action-label {
	display: none;
}

@media (max-width: 767px) {
	.header-ask-btn {
		display: none !important;
	}
}