/* Header – mjere preuzete iz Elementor šablona 4810 (desktop > 1024, tablet 768–1024, mobitel < 768). */

.sw-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99;
	background-color: var(--e-global-color-66d8c73);
	border-bottom: 1px solid #e5e5e5;
}

.admin-bar .sw-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.sw-header-spacer {
	height: 86px;
}

.sw-header__bar {
	position: relative;
	display: flex;
	gap: 20px;
	max-width: var(--sw-container);
	margin-inline: auto;
	min-height: 85px;
}

.sw-header__left {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 10px;
	width: calc((100% - 20px) * 0.62);
	flex-shrink: 0;
}

.sw-header__right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
	padding: 10px;
	flex: 1 1 0;
	min-width: 0;
}

.sw-header__logo {
	display: inline-block;
	flex-shrink: 1;
	line-height: 0;
}

.sw-header__logo img {
	width: 200px;
	max-width: 100%;
	height: auto;
}

/* Mega meni */
.sw-mega {
	flex: 1 1 auto;
	min-width: 0;
}

.sw-mega__list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sw-mega__item {
	display: flex;
}

.sw-mega__title {
	display: flex;
	align-items: center;
	padding: 10px 12px 8px;
	border-bottom: 2px solid #fff;
	color: #1f2124;
	font-family: var(--e-global-typography-4aceb21-font-family), sans-serif;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
}

.sw-mega__item:hover > .sw-mega__title,
.sw-mega__item.is-open > .sw-mega__title {
	border-bottom-color: var(--e-global-color-accent);
}

.sw-mega__link {
	display: flex;
	align-items: center;
	gap: 5px;
	color: inherit;
	text-decoration: none;
}

.sw-mega__text {
	font-size: var(--e-global-typography-4aceb21-font-size);
	line-height: var(--e-global-typography-4aceb21-line-height);
}

.sw-mega__item--akcija .sw-mega__text {
	color: #f00;
}

.sw-mega__item--novo .sw-mega__text {
	color: #ffa500;
}

.sw-mega__toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 0 0 0 5px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

/* Bez pozadine globalnog "body button:hover" (kit) na strelici menija. */
.sw-header .sw-mega__toggle:hover,
.sw-header .sw-mega__toggle:focus {
	border: 0;
	background: none;
	color: inherit;
}

.sw-mega__caret {
	display: flex;
	width: 17px;
	height: 17px;
}

.sw-mega__caret svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

.sw-mega__caret--open,
.sw-mega__item.is-open .sw-mega__caret--closed {
	display: none;
}

.sw-mega__item.is-open .sw-mega__caret--open {
	display: flex;
}

.sw-mega__panel {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(50% + 21.05px);
	z-index: 2147483620;
	display: none;
	padding: 0 10px;
	background-color: var(--e-global-color-66d8c73);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	text-transform: none;
}

.sw-mega__item.is-open > .sw-mega__panel {
	display: block;
}

.sw-mega__cols {
	display: flex;
	gap: 20px;
	margin: 10px 0;
	padding: 10px;
}

.sw-mega__col {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 10px;
	width: calc((100% - var(--sw-cols) * 20px) / 4);
	flex-shrink: 0;
}

.sw-mega__spacer {
	flex: 1 1 0;
}

.sw-mega__heading {
	margin: 0;
	color: var(--e-global-color-primary);
	font-family: var(--e-global-typography-4aceb21-font-family), sans-serif;
	font-size: var(--e-global-typography-4aceb21-font-size);
	font-weight: 600;
	line-height: var(--e-global-typography-4aceb21-line-height);
	text-transform: uppercase;
}

.sw-mega__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sw-mega__links li {
	display: flex;
	align-items: center;
	padding-bottom: 5px;
}

.sw-mega__links li + li {
	margin-top: 5px;
}

.sw-mega__links li:last-child {
	padding-bottom: 0;
}

.sw-mega__links a {
	display: flex;
	align-items: center;
	color: var(--e-global-color-text);
	font-size: 16px;
	line-height: 19.2px;
	text-decoration: none;
}

.sw-mega__arrow {
	display: flex;
	width: 17.5px;
	height: 14px;
	justify-content: center;
}

.sw-mega__arrow svg {
	width: 14px;
	height: 14px;
	fill: var(--e-global-color-text);
}

.sw-mega__label {
	padding-left: 5px;
}

/* Pretraga */
.sw-header__search {
	flex: 1 1 auto;
	max-width: 360px;
}

.sw-search {
	position: relative;
	display: flex;
	align-items: center;
}

.sw-header .sw-search input.sw-search__input,
.sw-mobile .sw-search input.sw-search__input {
	width: 100%;
	height: 38px;
	padding: 10px 45px 10px 15px;
	border: 1px solid #ddd;
	border-radius: 25px;
	background: #fff;
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-size: 14px;
	line-height: 21px;
}

.sw-search__input::-webkit-search-cancel-button {
	display: none;
}

.sw-search__icon {
	position: absolute;
	right: 15px;
	top: 50%;
	display: flex;
	transform: translateY(-50%);
	pointer-events: none;
}

.sw-search__icon svg {
	width: 18px;
	height: 18px;
	fill: #cdcdcd;
}

/* U mobilnom meniju ikona je tamnija (custom CSS popupa 5083). */
.sw-mobile .sw-search__icon svg {
	fill: #666;
}

.sw-search__results {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	z-index: 999;
	max-height: 70vh;
	overflow: auto;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sw-search__result {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	color: var(--e-global-color-text);
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}

.sw-search__result img {
	width: 48px;
	height: 48px;
	object-fit: cover;
}

.sw-search__result-price {
	display: block;
	color: var(--e-global-color-primary);
	font-weight: 600;
}

.sw-search__more,
.sw-search__empty {
	display: block;
	padding: 10px;
	font-size: 14px;
	text-align: center;
}

/* Valuta (WOOCS) */
.sw-header__currency {
	position: relative;
	z-index: 0;
	padding-top: 8px;
}

/* Korpa */
.sw-header__cart {
	position: relative;
	z-index: 2;
}

.sw-cart {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px 0;
	color: var(--e-global-color-text);
	text-decoration: none;
}

.sw-cart__icon {
	position: relative;
	display: flex;
	width: 20px;
	height: 20px;
}

.sw-cart__icon svg {
	width: 20px;
	height: 20px;
	fill: var(--e-global-color-text);
}

.sw-cart__qty {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 16px;
	height: 16px;
	border-radius: 100%;
	background-color: #d9534f;
	color: #fff;
	font-family: var(--e-global-typography-accent-font-family), sans-serif;
	font-size: 10px;
	font-weight: 500;
	line-height: 15px;
	text-align: center;
}

/* Ikona menija (tablet i mobitel) */
.sw-header__toggle {
	display: none;
	padding: 0;
	border: 0;
	background: none;
	line-height: 0;
	cursor: pointer;
}

/* Hello reset boji dugmad na hover/focus – ikona menija ostaje bez pozadine. */
.sw-header .sw-header__toggle:hover,
.sw-header .sw-header__toggle:focus {
	background: none;
}

.sw-header__toggle svg {
	width: 40px;
	height: 40px;
	fill: var(--e-global-color-text);
}

/* Mobilni meni */
.sw-mobile[hidden] {
	display: none;
}

.sw-mobile {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.sw-mobile__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.8); /* #elementor-popup-modal-5083 */
	opacity: 0;
	transition: opacity 0.3s ease;
}

.sw-mobile__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	width: 80%;
	background: #fff;
	box-shadow: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
}

.sw-mobile.is-open .sw-mobile__overlay {
	opacity: 1;
}

.sw-mobile.is-open .sw-mobile__panel {
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.sw-mobile__overlay,
	.sw-mobile__panel {
		transition: none;
	}
}

/* Isto dugme kao u mini korpi (assets/css/mini-cart.css). */
.sw-mobile .sw-mobile__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 9999;
	display: flex;
	padding: 6px;
	border: 0;
	background: none;
	line-height: 0;
	cursor: pointer;
}

.sw-mobile .sw-mobile__close:hover,
.sw-mobile .sw-mobile__close:focus {
	border: 0;
	background: none;
}

.sw-mobile__close svg {
	width: 16px;
	height: 16px;
	fill: var(--e-global-color-text);
}

.sw-mobile__content {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	padding: 10px;
}

.sw-mobile .sw-mobile__content .sw-search input.sw-search__input {
	height: 39px;
}

.sw-mobile__nav {
	margin-top: 10px;
}

.sw-mobile__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sw-mobile__list .sw-mobile__list {
	display: none;
}

.sw-mobile__item.is-open > .sw-mobile__list {
	display: block;
}

.sw-mobile__link {
	display: flex;
	align-items: center;
	padding: 15px 20px;
	color: var(--e-global-color-text);
	font-family: var(--e-global-typography-4aceb21-font-family), sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: -0.1px;
	text-transform: uppercase;
	text-decoration: none;
}

/* Podkategorije nisu boldirane (glavne stavke ostaju 600). */
.sw-mobile__list--1 .sw-mobile__link {
	padding-left: 40px;
	font-weight: 400;
}

.sw-mobile__list--2 .sw-mobile__link {
	padding-left: 60px;
	font-weight: 400;
}

.sw-mobile__item.akcija > .sw-mobile__link {
	color: #f00;
}

.sw-mobile__item.novo > .sw-mobile__link {
	color: #ffa500;
}

.sw-mobile__arrow {
	display: flex;
	align-items: center;
	margin: -10px 0;
	padding: 10px 0 10px 10px;
}

.sw-mobile__arrow svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

body.sw-menu-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.sw-header__left {
		width: calc((100% - 20px) * 0.3);
	}

	.sw-mega,
	.sw-header__search {
		display: none;
	}

	.sw-header__toggle {
		display: block;
	}
}

@media (max-width: 767px) {
	.sw-header-spacer {
		height: 70.2px; /* tačna visina headera (69.2 + border), kao Elementor sticky spacer */
	}

	.sw-header__bar {
		gap: 0;
		min-height: 69px;
	}

	.sw-header__left {
		width: 34%;
	}

	.sw-header__logo img {
		width: 100%;
	}

	.sw-header__toggle {
		padding-top: 4px;
	}

	.sw-header__toggle svg {
		width: 35px;
		height: 35px;
	}
}
