/* Header (Figma: Header 5:26, Menu 10:138) */

.gsm-header {
	position: relative;
	z-index: 100; /* ispod OceanWP Quick View prozora (999) */
	font-family: var(--gsm-font);
}

.gsm-header a {
	text-decoration: none;
}

/* Gornji red: logo, pretraga, akcije */
.gsm-header__top {
	background: var(--gsm-dark);
}

.gsm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 94px;
}

.gsm-logo {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 211px;
	height: 68px;
	overflow: hidden;
}

/* Logo PNG ima prazan prostor oko slova; isječak kao u Figmi. */
.gsm-logo img {
	position: absolute;
	top: -12.31%;
	left: -1.8%;
	width: 103.6%;
	max-width: none;
	height: 130.9%;
}

.gsm-search {
	display: flex;
	align-items: center;
	flex: 0 1 570px;
	height: 48px;
	margin: 0;
	padding: 4px 4px 4px 12px;
	border-radius: 12px;
	background: var(--gsm-search-bg);
	box-sizing: border-box;
}

.gsm-search .gsm-search__input {
	flex: 1;
	min-width: 0;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #17191d;
	font-family: var(--gsm-font);
	font-size: 14px;
}

.gsm-search .gsm-search__input::placeholder {
	color: #17191d;
	opacity: 1;
}

.gsm-search .gsm-search__input:focus {
	outline: none;
}

.gsm-search:focus-within {
	box-shadow: 0 0 0 2px var(--gsm-orange);
}

.gsm-search .gsm-search__button {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 46px;
	width: 46px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--gsm-orange);
	cursor: pointer;
	transition: background-color .2s;
}

.gsm-search .gsm-search__button:hover {
	background: var(--gsm-orange-dark);
}

.gsm-search__button img {
	width: 20px;
	height: 20px;
}

.gsm-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 24px;
	flex: 0 0 auto;
}

.gsm-header__wishlist,
.gsm-header__account {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--gsm-white);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}

.gsm-header__wishlist:hover,
.gsm-header__account:hover {
	color: var(--gsm-orange);
}

.gsm-header__account svg {
	flex: 0 0 24px;
}

.gsm-header__wishlist img,
.gsm-header__cart img {
	width: 24px;
	height: 24px;
}

.gsm-header__cart {
	position: relative;
	display: block;
	padding-top: 6px;
	padding-right: 4px;
}

.gsm-cart-count {
	position: absolute;
	top: 0;
	left: 12px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 100px;
	background: var(--gsm-orange);
	color: var(--gsm-white);
	font-size: 11px;
	font-weight: 500;
	line-height: 16px;
	text-align: center;
	box-sizing: border-box;
}

.gsm-cart-count.is-empty {
	display: none;
}

/* Traka kategorija */
.gsm-nav {
	background: var(--gsm-dark-2);
}

.gsm-nav__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
	height: 46px;
}

.gsm-cats__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	flex: 0 0 auto;
	width: 200px;
	height: 46px;
	margin: 0;
	padding: 10px;
	border: 0;
	border-radius: 8px 8px 0 0;
	background: var(--gsm-orange);
	color: var(--gsm-white);
	font-family: var(--gsm-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.gsm-cats__toggle:hover,
.gsm-cats__toggle:focus {
	background: var(--gsm-orange);
	color: var(--gsm-white);
}

.gsm-cats__toggle img {
	width: 16px;
	height: 16px;
}

.gsm-cats__toggle .gsm-cats__chevron {
	width: 12px;
	height: 12px;
	transform: rotate(90deg);
	transition: transform .2s;
}

.gsm-cats__toggle[aria-expanded="true"] .gsm-cats__chevron {
	transform: rotate(-90deg);
}

/* Omotač trake linkova: strelice + preliv kad sve kategorije ne stanu (manji laptopi) */
.gsm-nav__scroller {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
}

.gsm-nav__links {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 14px;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.gsm-nav .gsm-nav__arrow {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	width: 56px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: var(--gsm-white);
	cursor: pointer;
}

.gsm-nav .gsm-nav__arrow[hidden] {
	display: none;
}

.gsm-nav .gsm-nav__arrow--next {
	right: 0;
	justify-content: flex-end;
	background: linear-gradient(to right, transparent, var(--gsm-dark-2) 55%);
}

.gsm-nav .gsm-nav__arrow--prev {
	left: 0;
	justify-content: flex-start;
	background: linear-gradient(to left, transparent, var(--gsm-dark-2) 55%);
}

.gsm-nav .gsm-nav__arrow:hover {
	color: var(--gsm-orange);
}

.gsm-nav__links::-webkit-scrollbar {
	display: none;
}

.gsm-nav__links li {
	flex: 0 0 auto;
	margin: 0;
}

.gsm-nav__links a {
	display: block;
	padding: 10px;
	color: var(--gsm-white);
	font-size: 12px;
	font-weight: 500;
	line-height: 15px;
	white-space: nowrap;
	transition: color .2s;
}

.gsm-nav__links a:hover {
	color: var(--gsm-orange);
}

/* Akcije: dugme u headeru, ispred naloga/liste želja/korpe */
.gsm-header__sale {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid var(--gsm-orange);
	border-radius: 50px;
	color: var(--gsm-orange);
	font-size: 13px;
	font-weight: 700;
	line-height: 16px;
	white-space: nowrap;
	transition: color .2s, background-color .2s;
}

.gsm-header__sale:hover,
.gsm-header__sale.is-active {
	background: var(--gsm-orange);
	color: var(--gsm-white);
}

.gsm-sale-icon {
	flex: 0 0 auto;
}

/* Akcije u mega meniju – samo na mobilnom (desktop ih ima u traci) */
.gsm-mm__sale {
	display: none;
}

/* Aktivna kategorija (i kad smo u njenoj podkategoriji): narandžasto + podvučeno */
.gsm-nav__links .current-menu-item > a,
.gsm-nav__links .current-product_cat-ancestor > a {
	color: var(--gsm-orange);
	box-shadow: inset 0 -2px 0 var(--gsm-orange);
}

/* Panel "Sve kategorije" – mega meni: lijevo krovne kategorije, desno podkategorije izabrane (kao muziker.com) */
.gsm-cats__panel {
	position: absolute;
	top: 100%;
	left: var(--gsm-gutter);
	width: min(980px, calc(100% - 2 * var(--gsm-gutter)));
	border-radius: 0 12px 12px 12px;
	background: var(--gsm-white);
	box-shadow: 0 16px 40px rgba(9, 16, 23, .18);
	overflow: hidden;
}

.gsm-cats__panel[hidden] {
	display: none;
}

.gsm-mm {
	display: grid;
	grid-template-columns: 320px 1fr;
	height: min(720px, calc(100vh - 170px));
}

.gsm-mm__main,
.gsm-mm__sub {
	padding: 24px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.gsm-mm__main {
	display: flex;
	flex-direction: column;
	border-right: 1px solid #eceef1;
}

.gsm-mm__sub {
	display: none;
	padding-left: 32px;
	padding-right: 32px;
}

.gsm-mm__sub.is-active {
	display: block;
}

.gsm-mm__title {
	margin: 0 0 12px;
	padding: 0 10px;
	color: var(--gsm-orange);
	font-family: var(--gsm-font-heading);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.gsm-mm__list,
.gsm-mm__children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.gsm-mm__list li,
.gsm-mm__children li {
	margin: 0;
}

/* button i a izgledaju isto; OceanWP stilizuje button (uppercase, pozadina, padding), pa jači selektor. */
.gsm-cats__panel .gsm-mm__item,
.gsm-cats__panel button.gsm-mm__item {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 3px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--gsm-text);
	font-family: var(--gsm-font);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}

.gsm-cats__panel .gsm-mm__item:hover,
.gsm-cats__panel button.gsm-mm__item:hover,
.gsm-cats__panel button.gsm-mm__item.is-active {
	background: #fff1e6;
	color: var(--gsm-orange-dark);
}

/* Dok je miš nad nekom stavkom lijeve kolone (kategorija ili "Pogledaj cijelu prodavnicu"),
   istaknuta je samo ta stavka – inače bi i ranije aktivna kategorija ostala istaknuta. */
@media (hover: hover) {
	.gsm-cats__panel .gsm-mm__main:has(.gsm-mm__item:hover, .gsm-mm__shop:hover) button.gsm-mm__item.is-active:not(:hover) {
		background: transparent;
		color: var(--gsm-text);
	}

	.gsm-mm__main:has(.gsm-mm__item:hover, .gsm-mm__shop:hover) .gsm-mm__item.is-active:not(:hover) .gsm-mm__arrow {
		color: #b8bcc3;
		transform: none;
	}
}

.gsm-cats__panel .gsm-mm__item:focus-visible,
.gsm-mm__child:focus-visible,
.gsm-mm__all:focus-visible,
.gsm-cats__panel button.gsm-mm__back:focus-visible {
	outline: 2px solid var(--gsm-orange);
	outline-offset: -2px;
}

.gsm-mm__name {
	flex: 1;
	min-width: 0;
}

.gsm-mm__img {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.gsm-mm__img--empty {
	border-radius: 8px;
	background: var(--gsm-light);
}

.gsm-mm__arrow {
	flex: 0 0 auto;
	color: #b8bcc3;
	transition: color .15s, transform .15s;
}

.gsm-mm__item:hover .gsm-mm__arrow,
.gsm-mm__item.is-active .gsm-mm__arrow {
	color: var(--gsm-orange);
	transform: translateX(2px);
}

.gsm-mm__shop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding: 16px 10px 0;
	border-top: 1px solid #eceef1;
	color: var(--gsm-orange-dark);
	font-family: var(--gsm-font-heading);
	font-size: 14px;
	font-weight: 700;
}

.gsm-mm__list + .gsm-mm__shop {
	margin-top: 16px;
}

.gsm-mm__shop .gsm-mm__arrow {
	color: currentColor;
}

.gsm-mm__shop:hover {
	color: var(--gsm-orange);
}

.gsm-mm__shop:hover .gsm-mm__arrow {
	transform: translateX(4px);
}

.gsm-mm__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 16px;
}

.gsm-mm__head .gsm-mm__title {
	margin: 0;
	padding: 0;
}

.gsm-mm__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 16px 0 18px;
	border: 1px solid var(--gsm-orange);
	border-radius: 100px;
	color: var(--gsm-orange-dark);
	font-size: 14px;
	font-weight: 500;
	transition: background-color .15s, color .15s;
}

.gsm-mm__all:hover {
	background: var(--gsm-orange);
	color: var(--gsm-white);
}

/* Podkategorije u dvije kolone da i Gitare (20+) stanu bez skrolovanja. */
.gsm-mm__children {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2px 24px;
}

.gsm-mm__child {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 48px;
	padding: 4px 10px;
	border-radius: 8px;
	color: var(--gsm-text);
	font-size: 14px;
	line-height: 1.3;
	transition: background-color .15s, color .15s;
}

.gsm-mm__child:hover {
	background: var(--gsm-light);
	color: var(--gsm-orange-dark);
}

/* Scrollbar u meniju: tanak, zaobljen, narandžast na hover.
   Chrome/Safari: ::-webkit-scrollbar (dozvoljava zaobljenje i razmak od ivice).
   Chrome 121+ ignoriše ::-webkit-scrollbar čim postoji scrollbar-color, pa standardna svojstva samo za Firefox. */
.gsm-mm__main::-webkit-scrollbar,
.gsm-mm__sub::-webkit-scrollbar,
.gsm-mm::-webkit-scrollbar {
	width: 12px;
}

.gsm-mm__main::-webkit-scrollbar-track,
.gsm-mm__sub::-webkit-scrollbar-track,
.gsm-mm::-webkit-scrollbar-track {
	margin: 12px 0;
	background: transparent;
}

.gsm-mm__main::-webkit-scrollbar-thumb,
.gsm-mm__sub::-webkit-scrollbar-thumb,
.gsm-mm::-webkit-scrollbar-thumb {
	border: 4px solid transparent; /* providna ivica + background-clip = tanji palac odmaknut od ivice */
	border-radius: 100px;
	background: #d3d6db padding-box;
}

.gsm-mm__main::-webkit-scrollbar-thumb:hover,
.gsm-mm__sub::-webkit-scrollbar-thumb:hover,
.gsm-mm::-webkit-scrollbar-thumb:hover {
	background-color: var(--gsm-orange);
}

@supports not selector(::-webkit-scrollbar) {
	.gsm-mm__main,
	.gsm-mm__sub,
	.gsm-mm {
		scrollbar-width: thin;
		scrollbar-color: #d3d6db transparent;
	}
}

/* Traka sa ✕ postoji samo na mobilnom (panel preko cijelog ekrana). */
.gsm-mm__bar {
	display: none;
}

/* "Nazad" postoji samo na mobilnom (drill-down). */
.gsm-cats__panel button.gsm-mm__back {
	display: none;
}

/* Tablet */
@media (max-width: 1100px) {
	.gsm-logo {
		width: 160px;
		height: 52px;
	}

	.gsm-header__wishlist-label,
	.gsm-header__account-label {
		display: none;
	}
}

/* Mobilni: pretraga ide u drugi red, linkovi kategorija se kriju */
@media (max-width: 767px) {
	.gsm-header__inner {
		flex-wrap: wrap;
		gap: 12px 16px;
		min-height: 0;
		padding-top: 10px;
		padding-bottom: 12px;
	}

	.gsm-logo {
		width: 130px;
		height: 42px;
	}

	.gsm-search {
		order: 3;
		flex: 1 0 100%;
		height: 44px;
	}

	.gsm-search .gsm-search__input,
	.gsm-search .gsm-search__button {
		height: 36px;
	}

	.gsm-nav__inner {
		padding: 0;
	}

	.gsm-cats {
		width: 100%;
	}

	.gsm-cats__toggle {
		justify-content: space-between;
		width: 100%;
		padding: 10px var(--gsm-gutter);
		border-radius: 0;
	}

	.gsm-cats__toggle span {
		flex: 1;
		text-align: left;
	}

	.gsm-nav__scroller,
	.gsm-header__sale {
		display: none; /* Akcije su prva stavka u „Sve kategorije“ */
	}

	.gsm-cats__panel .gsm-mm__sale {
		display: flex;
		align-items: center;
		gap: 10px;
		margin: 0 0 16px;
		padding: 12px 14px;
		border-radius: 8px;
		background: var(--gsm-orange);
		color: var(--gsm-white);
		font-family: var(--gsm-font-heading);
		font-size: 15px;
		font-weight: 700;
	}

	.gsm-mm__sale span {
		flex: 1;
	}

	.gsm-mm__sale .gsm-mm__arrow {
		color: currentColor;
	}

	/* Mobilni mega meni: preko cijelog ekrana, jedna kolona, klik na kategoriju zamjenjuje listu podkategorijama */
	.gsm-cats__panel {
		position: fixed;
		inset: 0;
		z-index: 1000;
		display: flex;
		flex-direction: column;
		width: auto;
		height: 100%; /* 100dvh ispod, da adresna traka telefona ne odsiječe dno */
		height: 100dvh;
		border-radius: 0;
		box-shadow: none;
	}

	/* Prijavljen korisnik: ne ići ispod WP admin trake. */
	.admin-bar .gsm-cats__panel {
		top: 46px;
		height: calc(100dvh - 46px);
	}

	html.gsm-mm-open,
	html.gsm-mm-open body {
		overflow: hidden;
	}

	/* OceanWP dugme "na vrh" je van headera i inače bi virilo preko panela. */
	html.gsm-mm-open #scroll-top {
		display: none !important;
	}

	.gsm-mm__bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex: 0 0 auto;
		height: 56px;
		padding: 0 6px 0 var(--gsm-gutter);
		background: var(--gsm-dark);
		color: var(--gsm-white);
		font-family: var(--gsm-font-heading);
		font-size: 16px;
		font-weight: 700;
	}

	.gsm-cats__panel button.gsm-mm__close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 8px;
		background: transparent;
		color: var(--gsm-white);
	}

	.gsm-cats__panel button.gsm-mm__close:hover {
		color: var(--gsm-orange);
	}

	.gsm-mm {
		display: block;
		flex: 1;
		height: auto;
		min-height: 0;
		overflow-y: auto;
	}

	.gsm-mm__main,
	.gsm-mm__sub {
		padding: 16px var(--gsm-gutter) 20px;
		overflow: visible;
	}

	.gsm-mm__main {
		border-right: 0;
	}

	.gsm-mm__sub.is-active {
		display: none;
	}

	.gsm-cats__panel.is-drilled .gsm-mm__main {
		display: none;
	}

	.gsm-cats__panel.is-drilled .gsm-mm__sub.is-active {
		display: block;
	}

	.gsm-cats__panel button.gsm-mm__back {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		margin: 0 0 14px;
		padding: 6px 0;
		border: 0;
		background: transparent;
		color: #4a4f57;
		font-family: var(--gsm-font);
		font-size: 14px;
		font-weight: 500;
		letter-spacing: 0;
		text-transform: none;
	}

	.gsm-mm__back .gsm-mm__arrow {
		color: currentColor;
		transform: rotate(180deg);
	}

	.gsm-mm__children {
		grid-template-columns: 1fr;
	}
}
