/* SGOR Header styles */

/* ===== SCREEN-READER HELPER ===== */
.sgor-sr {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ===== CSS VARIABLES ===== */
:root {
	--sgor-header-h: clamp(56px, 2.0833vw, 80px);
	--sgor-newsbar-fs: 0.6vw;
	--sgor-newsbar-h: calc(var(--sgor-newsbar-fs) * 1.2 + 0.6em);
	--sgor-inner-w: 95vw;
	--sgor-pad-x: 2.5vw;
	--sgor-adminbar-offset: 0px;
}

body.admin-bar {
	--sgor-adminbar-offset: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--sgor-adminbar-offset: 46px;
	}
}

/* ===== NEWS BAR ===== */
.sgor-newsbar {
	width: 100%;
	font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	font-weight: 400;
	font-size: var(--sgor-newsbar-fs);
	background: transparent;
	min-height: var(--sgor-newsbar-h);
	line-height: 1.2 !important;
	padding: 0 !important;
	box-sizing: border-box;
	overflow: visible !important;
	display: flex;
	align-items: stretch;
}

.sgor-newsbar__inner {
	width: 100%;
	margin: 0 auto;
	padding: 0.1em 0 !important;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: var(--sgor-newsbar-h);
}

.sgor-newsbar__text {
	display: block;
	text-align: center;
	line-height: 1.2;
	white-space: nowrap;
}

.sgor-newsbar__track {
	display: block;
	width: 100%;
	will-change: transform;
	transform: translate3d(0, 0, 0);
	transition: transform 450ms ease;
}

.sgor-newsbar__item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--sgor-newsbar-h);
	box-sizing: border-box;
	padding: 0.1em 0 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: var(--sgor-newsbar-fs);
	line-height: 1.2;
}

.sgor-newsbar__item a {
	color: inherit !important;
	text-decoration: underline;
}

/* ===== HEADER (BASE) ===== */
.sgor-header-wrap {
	width: 100%;
}

.sgor-header {
	position: sticky;
	top: 0;
	z-index: 9999;
	height: var(--sgor-header-h);
	background: transparent;
	color: inherit;
	transition: background 120ms linear, color 120ms linear;
}

.sgor-header__inner {
	height: 100%;
	width: 100%;
	margin: 0 auto;
	padding: 0 1.5vw !important;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* ===== LOGO ===== */
.sgor-logo {
	text-decoration: none;
	color: inherit;
	display: inline-flex;
	align-items: center;
}

.sgor-logo__box {
	position: relative;
	width: clamp(120px, 4vw, 220px);
	height: calc(clamp(120px, 4vw, 220px) / 3.5);
	display: block;
}

.sgor-logo__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: opacity 120ms linear;
}

/* ===== NAV / MENU ===== */
.sgor-nav {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sgor-nav__toggle {
	display: none !important;
}

.sgor-nav__panel {
	display: block !important;
	position: static !important;
	background: transparent !important;
	padding: 0 !important;
}

.sgor-nav__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 24px;
}

.sgor-nav__menu > li {
	position: relative;
}

.sgor-nav__menu a {
	color: inherit;
	text-decoration: none;
	font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	font-weight: 300;
	font-size: 1.10vw;
	letter-spacing: .03em;
	text-transform: uppercase;
}

/* Chevron: only on sub-menu items that have children (NOT top-level) */
.sgor-nav__menu > li.menu-item-has-children > a::after {
	content: none !important;
}

.sgor-nav__menu .sub-menu li.menu-item-has-children > a::after {
	content: ">";
	display: inline-block;
	margin-left: .45em;
	line-height: 1;
	transform: translateY(-0.02em);
	font-weight: 300;
}

/* Dropdowns */
.sgor-nav__menu li .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #fff;
	color: #000;
	list-style: none;
	margin: 0;
	padding: 5px 0;
	box-sizing: border-box;
	white-space: nowrap;
}

/* Top-level menu items with children: hover only, not clickable */
.sgor-nav__menu > li.menu-item-has-children > a {
	pointer-events: none;
	cursor: default;
}

/* Top level: open only on hover */
.sgor-nav__menu > li:hover > .sub-menu {
	display: block;
}

/* Deeper levels: keep hover/focus-within */
.sgor-nav__menu .sub-menu li:hover > .sub-menu,
.sgor-nav__menu .sub-menu li:focus-within > .sub-menu {
	display: block;
}

.sgor-nav__menu li .sub-menu a {
	display: block;
	padding: 4px 14px;
	font-weight: 300;
	color: #000;
	font-size: 1.10vw;
	text-transform: uppercase;
	white-space: nowrap;
}

.sgor-nav__menu li .sub-menu a:hover {
	color: #d71d24 !important;
}

/* Level-3 dropdowns */
.sgor-nav__menu li .sub-menu .sub-menu {
	top: 0;
	left: 100%;
	min-width: 260px;
}

/* ===== ICON BUTTONS ===== */
.sgor-header__right {
	display: flex;
	align-items: center;
	gap: 14px;
}

.sgor-iconbtn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	background: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	color: inherit !important;
	cursor: pointer;
	text-decoration: none !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

.sgor-iconbtn:hover,
.sgor-iconbtn:active,
.sgor-iconbtn:focus,
.sgor-iconbtn:focus-visible {
	background: transparent !important;
	background-image: none !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: none !important;
}

.sgor-cartcount {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 16px;
	height: 16px;
	line-height: 16px;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
	border-radius: 0;
	background: #d71d24;
	color: #fff;
}

/* ===== SEARCH OVERLAY ===== */
.sgor-search {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 10000;
}

.sgor-search.is-open {
	display: block;
}

.sgor-search__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .35);
}

.sgor-search__panel {
	position: absolute;
	top: calc(var(--sgor-newsbar-h) + var(--sgor-header-h));
	left: 50%;
	transform: translateX(-50%);
	width: min(1000px, calc(100vw - 2 * var(--sgor-pad-x)));
	background: #fff;
	color: #000;
	box-sizing: border-box;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sgor-search__top {
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.sgor-search__box {
	flex: 1 1 auto;
	display: flex;
	align-items: stretch;
	gap: 10px;
}

.sgor-search__close {
	position: static;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	font-size: 22px;
	cursor: pointer;
	color: #000;
	padding: 0;
	line-height: 1;
}

.sgor-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	border: 1px solid rgba(0, 0, 0, .25);
	border-radius: 0;
	padding: 0 12px;
	font-family: inherit;
	font-size: 16px;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: textfield;
}

.sgor-search__input[type="search"]::-webkit-search-cancel-button,
.sgor-search__input[type="search"]::-webkit-search-decoration,
.sgor-search__input[type="search"]::-webkit-search-results-button,
.sgor-search__input[type="search"]::-webkit-search-results-decoration,
.sgor-search__input::-webkit-search-cancel-button,
.sgor-search__input::-webkit-search-decoration,
.sgor-search__input::-webkit-search-results-button,
.sgor-search__input::-webkit-search-results-decoration,
.sgor-search__input::-ms-clear,
.sgor-search__input::-ms-reveal {
	-webkit-appearance: none;
	appearance: none;
	display: none;
	width: 0;
	height: 0;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.sgor-search__submit {
	flex: 0 0 auto;
	height: 44px;
	padding: 0 18px;
	border: 1px solid #000;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .03em;
	cursor: pointer;
	box-sizing: border-box;
}

.sgor-search__submit:hover,
.sgor-search__submit:focus {
	background: #d71d24;
	border-color: #d71d24;
	outline: none;
}

.sgor-search__hint {
	margin-top: 0;
	color: #666;
	font-size: 12px;
}

.sgor-search__results {
	margin-top: 2px;
	max-height: 50vh;
	overflow: auto;
}

.sgor-search__item {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 5px 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
	text-decoration: none;
	color: #000;
}

.sgor-search__thumb {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .08);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.sgor-search__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.sgor-search__meta {
	flex: 1 1 auto;
	gap: 8px;
}

.sgor-search__name {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
}

.sgor-search__price {
	margin-left: 10px;
	white-space: nowrap;
}

/* ===== VARIANTS ===== */

/* Default (non-home pages): fixed + always solid white */
.sgor-header--default {
	padding-top: calc(var(--sgor-newsbar-h) + var(--sgor-header-h));
}

.sgor-header--default .sgor-newsbar {
	position: fixed !important;
	top: var(--sgor-adminbar-offset) !important;
	left: 0;
	right: 0;
	z-index: 9998;
	color: #000;
}

.sgor-header--default .sgor-header {
	position: fixed !important;
	top: calc(var(--sgor-adminbar-offset) + var(--sgor-newsbar-h)) !important;
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	color: #000;
}

/* home_test: fixed, transparent over hero */
.sgor-header--home-test .sgor-newsbar {
	position: fixed !important;
	top: 0 !important;
	left: 0;
	right: 0;
	z-index: 9999;
	color: #fff;
}

.sgor-header--home-test .sgor-header {
	position: fixed !important;
	top: var(--sgor-newsbar-h) !important;
	left: 0;
	right: 0;
	z-index: 9999;
	background: transparent !important;
	color: #fff !important;
}

.sgor-header--home-test .sgor-header:hover,
.sgor-header--home-test .sgor-header.is-solid {
	background: #fff !important;
	color: #000 !important;
}

/* Logo swap (white ↔ dark) */
.sgor-logo__img--white {
	opacity: 0;
}

.sgor-logo__img--dark {
	opacity: 1;
}

.sgor-header--home-test .sgor-logo__img--white {
	opacity: 1;
}

.sgor-header--home-test .sgor-logo__img--dark {
	opacity: 0;
}

.sgor-header--home-test .sgor-header:hover .sgor-logo__img--white,
.sgor-header--home-test .sgor-header.is-solid .sgor-logo__img--white {
	opacity: 0;
}

.sgor-header--home-test .sgor-header:hover .sgor-logo__img--dark,
.sgor-header--home-test .sgor-header.is-solid .sgor-logo__img--dark {
	opacity: 1;
}

/* ===== HOME-TEST PAGE: COLOR OVERRIDES ===== */

/* Base: white text/icons */
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header a,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header button,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header svg {
	color: #fff !important;
}

/* Solid / hover: black text/icons */
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header.is-solid,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header.is-solid a,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header.is-solid button,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header.is-solid svg,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header:hover,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header:hover a,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header:hover button,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header:hover svg {
	color: #000 !important;
}

/* Icon hover: red (beats header:hover black) */
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header .sgor-iconbtn:hover,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header .sgor-iconbtn:hover svg {
	color: #d71d24 !important;
}

/* Menu link hover: red (beats header:hover black in all states) */
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header .sgor-nav__menu a:hover,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header:hover .sgor-nav__menu a:hover,
body.page-template-page-home-test-php .sgor-header-wrap.sgor-header--home-test .sgor-header.is-solid .sgor-nav__menu a:hover {
	color: #d71d24 !important;
}

/* Menu link hover: red (non-scoped, for other pages) */
body.page-template-page-home-test-php .sgor-header-wrap .sgor-nav__menu a:hover {
	color: #d71d24 !important;
}

/* All SVG icons: unified size */
body.page-template-page-home-test-php .sgor-header-wrap .sgor-ico {
	width: 24px !important;
	height: 24px !important;
	display: block !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
	.sgor-search__top {
		flex-direction: column;
	}

	.sgor-search__box {
		flex-direction: column;
	}

	.sgor-search__close {
		width: 100%;
		flex: 0 0 44px;
	}

	.sgor-search__submit {
		width: 100%;
	}
}

@media (max-width: 980px) {
	.sgor-nav {
		justify-content: center;
	}

	.sgor-nav__menu {
		flex-wrap: wrap;
		gap: 16px;
	}
}

/* ==== ICON SIZE CLAMP ==== */
.sgor-iconbtn .sgor-ico {
	width: 24px !important;
	height: 24px !important;
	display: block !important;
}

/* ===== FORCE HEADER ACCENT COLOR OVERRIDE OVER ELEMENTOR RESET ===== */

/* Main menu links: color ONLY on interaction */
.sgor-header-wrap .sgor-nav__menu a:hover,
.sgor-header-wrap .sgor-nav__menu a:focus,
.sgor-header-wrap .sgor-nav__menu a:active {
	color: #d71d24 !important;
}

/* Submenu links: color ONLY on interaction */
.sgor-header-wrap .sgor-nav__menu .sub-menu a:hover,
.sgor-header-wrap .sgor-nav__menu .sub-menu a:focus,
.sgor-header-wrap .sgor-nav__menu .sub-menu a:active {
	color: #d71d24 !important;
}

/* Current-path items must NOT stay highlighted */
.sgor-header-wrap .sgor-nav__menu li.current-menu-item > a,
.sgor-header-wrap .sgor-nav__menu li.current-menu-ancestor > a,
.sgor-header-wrap .sgor-nav__menu li.current-menu-parent > a,
.sgor-header-wrap .sgor-nav__menu li.current_page_item > a,
.sgor-header-wrap .sgor-nav__menu li.current_page_ancestor > a,
.sgor-header-wrap .sgor-nav__menu .sub-menu li.current-menu-item > a,
.sgor-header-wrap .sgor-nav__menu .sub-menu li.current-menu-ancestor > a,
.sgor-header-wrap .sgor-nav__menu .sub-menu li.current-menu-parent > a,
.sgor-header-wrap .sgor-nav__menu .sub-menu li.current_page_item > a,
.sgor-header-wrap .sgor-nav__menu .sub-menu li.current_page_ancestor > a {
	color: inherit !important;
}

/* Header icon buttons and SVGs */
.sgor-header-wrap .sgor-iconbtn:hover,
.sgor-header-wrap .sgor-iconbtn:focus,
.sgor-header-wrap .sgor-iconbtn:active,
.sgor-header-wrap .sgor-iconbtn:hover svg,
.sgor-header-wrap .sgor-iconbtn:focus svg,
.sgor-header-wrap .sgor-iconbtn:active svg,
.sgor-header-wrap .sgor-iconbtn:hover .sgor-ico,
.sgor-header-wrap .sgor-iconbtn:focus .sgor-ico,
.sgor-header-wrap .sgor-iconbtn:active .sgor-ico {
	color: #d71d24 !important;
}

/* Search popup links/buttons if Elementor touches them too */
.sgor-search a:hover,
.sgor-search a:focus,
.sgor-search a:active,
.sgor-search button:hover,
.sgor-search button:focus,
.sgor-search button:active {
	color: #d71d24 !important;
}

/* Search submit stays red on hover/focus */
.sgor-search .sgor-search__submit:hover,
.sgor-search .sgor-search__submit:focus,
.sgor-search .sgor-search__submit:active {
	background: #d71d24 !important;
	border-color: #d71d24 !important;
	color: #fff !important;
}

/* Search close button hover */
.sgor-search__close:hover,
.sgor-search__close:focus,
.sgor-search__close:active {
	background: #d71d24 !important;
	color: #ffffff !important;
}

/* Remove internal border in search box */
.sgor-search__input:focus,
.sgor-search__input:focus-visible,
.sgor-search__input:active {
	outline: none !important;
	box-shadow: none !important;
	border-color: rgba(0, 0, 0, .25) !important;
}

/* Hide search price */
span.sgor-search__price {
	display: none !important;
}
