/*
 * SJ MUSIC SHOP — INTER HEADER
 * UI / UX RENEW v4
 *
 * SOLO CSS.
 * No modifica PHP, HTML, menú de WordPress ni JS.
 */

.inter-header-root {
	--sj-black: #151515;
	--sj-white: #fff;
	--sj-paper: #f7f7f6;
	--sj-text: #1b1b1b;
	--sj-muted: #777;
	--sj-line: #e5e3e0;
	--sj-red: #b52f3d;
	--sj-red-dark: #922331;

	--sj-max-width: 1375px;
	--sj-side: 26px;

	--sj-topbar-h: 29px;
	--sj-brand-h: 76px;
	--sj-nav-h: 51px;

	font-family: 'Work Sans', Arial, sans-serif;
	color: var(--sj-text);
}

.inter-header-root *,
.inter-header-root *::before,
.inter-header-root *::after {
	box-sizing: border-box;
}

.inter-header-root a {
	text-decoration: none;
}

/* =========================================================
   ANNOUNCEMENT
   ========================================================= */

.inter-header__announcement {
	height: var(--sj-topbar-h);
	background: var(--sj-black);
	color: #fff;
	overflow: hidden;
}

.inter-header__announcement-inner {
	width: min(100%, var(--sj-max-width));
	height: 100%;
	margin: 0 auto;
	padding: 0 var(--sj-side);

	display: flex;
	align-items: center;
	justify-content: space-between;
}

.inter-header__announcement-text {
	margin: 0;
	color: rgba(255,255,255,.92);
	font-size: 9px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .14em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* =========================================================
   HEADER
   ========================================================= */

.inter-header {
	position: sticky;
	top: 0;
	z-index: 990;

	background: rgba(255,255,255,.98);
	border-bottom: 1px solid var(--sj-line);

	transition: box-shadow 220ms ease, background 220ms ease;
}

.inter-header-root.is-scrolled .inter-header {
	box-shadow: 0 5px 20px rgba(0,0,0,.045);
}

/*
 * Desktop:
 *
 * 29px announcement
 * 76px logo area
 * 51px navigation
 *
 * Total header principal: 127px
 */

.inter-header__container {
	width: min(100%, var(--sj-max-width));
	min-height: calc(var(--sj-brand-h) + var(--sj-nav-h));
	margin: 0 auto;
	padding: 0 var(--sj-side);

	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: var(--sj-brand-h) var(--sj-nav-h);
	grid-template-areas:
		"logo logo"
		"nav actions";

	column-gap: 20px;
}

/* =========================================================
   LOGO
   ========================================================= */

.inter-header__logo {
	grid-area: logo;

	width: 100%;
	height: 100%;

	display: flex;
	align-items: center;
	justify-content: center;
}

.inter-header__logo .custom-logo-link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	width: auto;
}

.inter-header__logo img,
.inter-header__logo .custom-logo {
	display: block;
	width: auto;
	height: auto;

	max-width: 190px;
	max-height: 51px;

	object-fit: contain;
}

.inter-header__logo-text {
	margin: 0;

	color: var(--sj-text);
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .075em;
	text-transform: uppercase;
}

/* =========================================================
   NAV
   ========================================================= */

.inter-header__nav {
	grid-area: nav;
	min-width: 0;

	display: flex;
	align-items: stretch;

	border-top: 1px solid var(--sj-line);
}

.inter-header__menu {
	display: flex;
	align-items: stretch;

	width: 100%;
	height: 100%;

	margin: 0;
	padding: 0;

	list-style: none;
}

.inter-header__menu > li {
	position: relative;

	display: flex;
	align-items: stretch;

	margin: 0;
	padding: 0;
}

.inter-header__menu > li > a {
	position: relative;

	display: flex;
	align-items: center;

	min-height: var(--sj-nav-h);
	padding: 0 17px;

	background: transparent;
	color: #252525;

	font-size: 9.5px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .075em;
	text-transform: uppercase;
	white-space: nowrap;

	transition: color 170ms ease;
}

/* Active / hover: ONLY red underline */
.inter-header__menu > li > a::after {
	content: "";

	position: absolute;
	left: 17px;
	right: 17px;
	bottom: -1px;

	height: 2px;

	background: var(--sj-red);

	transform: scaleX(0);
	transform-origin: center;

	transition: transform 200ms ease;
}

.inter-header__menu > li > a:hover,
.inter-header__menu > li > a:focus-visible,
.inter-header__menu > li.current-menu-item > a,
.inter-header__menu > li.current-menu-ancestor > a {
	color: var(--sj-red);
	background: transparent;
}

.inter-header__menu > li > a:hover::after,
.inter-header__menu > li > a:focus-visible::after,
.inter-header__menu > li.current-menu-item > a::after,
.inter-header__menu > li.current-menu-ancestor > a::after {
	transform: scaleX(1);
}

/* =========================================================
   DROPDOWNS
   ========================================================= */

.inter-header__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;

	min-width: 235px;
	margin: 0;
	padding: 8px 0;

	list-style: none;

	background: #fff;
	border: 1px solid var(--sj-line);
	box-shadow: 0 18px 38px rgba(0,0,0,.075);

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transform: translateY(7px);

	transition:
		opacity 170ms ease,
		transform 210ms ease,
		visibility 170ms ease;

	z-index: 1100;
}

.inter-header__menu > li:hover > .sub-menu,
.inter-header__menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.inter-header__menu .sub-menu li {
	margin: 0;
	padding: 0;
}

.inter-header__menu .sub-menu li a {
	display: flex;
	align-items: center;

	min-height: 41px;
	padding: 10px 19px;

	color: #303030;

	font-size: 9px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .055em;
	text-transform: uppercase;

	transition:
		color 150ms ease,
		background 150ms ease,
		padding-left 170ms ease;
}

.inter-header__menu .sub-menu li a:hover,
.inter-header__menu .sub-menu li a:focus-visible {
	color: var(--sj-red);
	background: var(--sj-paper);
	padding-left: 24px;
}

.inter-header__menu .sub-menu .sub-menu {
	top: -9px;
	left: calc(100% + 1px);
	transform: translateX(7px);
}

.inter-header__menu .sub-menu li:hover > .sub-menu,
.inter-header__menu .sub-menu li:focus-within > .sub-menu {
	transform: translateX(0);
}

/* =========================================================
   ACTIONS
   ========================================================= */

.inter-header__actions {
	grid-area: actions;

	align-self: stretch;

	display: flex;
	align-items: center;
	justify-content: flex-end;

	border-top: 1px solid var(--sj-line);
}

.inter-header__actions::before {
	content: "";
	width: 1px;
	height: 22px;
	margin-right: 7px;
	background: var(--sj-line);
}

.inter-header__action {
	position: relative;

	width: 42px;
	height: 42px;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	padding: 0;
	border: 0;
	border-radius: 0;

	background: transparent;
	color: #202020;

	cursor: pointer;

	transition:
		color 160ms ease,
		background 160ms ease;
}

.inter-header__action svg {
	width: 17px;
	height: 17px;
	display: block;
}

.inter-header__action:hover,
.inter-header__action:focus-visible {
	color: var(--sj-red);
	background: var(--sj-paper);
}

.inter-header__action--whatsapp:hover,
.inter-header__action--whatsapp:focus-visible {
	color: #168b54;
	background: #f3f9f6;
}

/* =========================================================
   CART COUNT
   ========================================================= */

.inter-header__cart-count {
	position: absolute;
	top: 3px;
	right: 1px;

	min-width: 15px;
	height: 15px;

	display: flex;
	align-items: center;
	justify-content: center;

	padding: 0 3px;

	border-radius: 50%;
	background: var(--sj-red);
	color: #fff;

	font-size: 8px;
	font-weight: 700;
	line-height: 1;
}

/* =========================================================
   TOOLTIP
   ========================================================= */

.inter-header__action-tip {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;

	padding: 6px 9px;

	background: var(--sj-black);
	color: #fff;

	font-size: 8px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transform: translateY(-4px);

	transition:
		opacity 150ms ease,
		transform 170ms ease,
		visibility 150ms ease;
}

.inter-header__action:hover .inter-header__action-tip,
.inter-header__action:focus-visible .inter-header__action-tip {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* =========================================================
   SEARCH
   ========================================================= */

.inter-header__search-panel {
	max-height: 0;
	overflow: hidden;

	background: #fff;
	border-top: 0 solid var(--sj-line);

	transition:
		max-height 260ms ease,
		border-width 180ms ease;
}

.inter-header__search-panel.is-open {
	max-height: 105px;
	border-top-width: 1px;
}

.inter-header__search-form {
	width: min(100%, 700px);
	margin: 0 auto;
	padding: 16px 22px;

	display: flex;
	align-items: center;
	gap: 12px;
}

.inter-header__search-input {
	flex: 1;

	min-height: 40px;
	padding: 4px 1px;

	border: 0;
	border-bottom: 1px solid #d7d5d2;
	border-radius: 0;
	outline: none;

	background: transparent;
	color: var(--sj-text);

	font-size: 14px;
}

.inter-header__search-input::placeholder {
	color: #999;
}

.inter-header__search-input:focus {
	border-bottom-color: var(--sj-red);
}

.inter-header__search-submit {
	width: 40px;
	height: 40px;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	padding: 0;
	border: 0;

	background: transparent;
	color: var(--sj-text);
	cursor: pointer;
}

.inter-header__search-submit:hover,
.inter-header__search-submit:focus-visible {
	color: var(--sj-red);
	background: var(--sj-paper);
}

.inter-header__search-submit svg {
	width: 18px;
	height: 18px;
}

/* =========================================================
   MOBILE
   ========================================================= */

.inter-header__hamburger {
	display: none;
}

.inter-header__overlay {
	position: fixed;
	inset: 0;

	background: rgba(0,0,0,.42);

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	z-index: 1300;

	transition: opacity 240ms ease, visibility 240ms ease;
}

.inter-header__overlay.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.inter-header__mobile-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;

	width: min(88vw, 390px);

	display: flex;
	flex-direction: column;

	padding-top: env(safe-area-inset-top);
	padding-bottom: env(safe-area-inset-bottom);

	background: #fff;

	z-index: 1400;

	transform: translateX(-101%);

	transition: transform 300ms cubic-bezier(.22,.61,.36,1);

	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.inter-header__mobile-drawer.is-open {
	transform: translateX(0);
}

.inter-header__mobile-top {
	min-height: 68px;

	padding: 0 20px;

	display: flex;
	align-items: center;
	justify-content: space-between;

	border-bottom: 1px solid var(--sj-line);
}

.inter-header__mobile-eyebrow {
	color: var(--sj-red);

	font-size: 9px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.inter-header__mobile-close {
	width: 42px;
	height: 42px;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	margin-right: -8px;

	padding: 0;
	border: 0;

	background: transparent;
	color: var(--sj-text);

	cursor: pointer;
}

.inter-header__mobile-close:hover,
.inter-header__mobile-close:focus-visible {
	color: var(--sj-red);
	background: var(--sj-paper);
}

.inter-header__mobile-close svg {
	width: 18px;
	height: 18px;
}

.inter-header__mobile-nav {
	padding: 5px 0 25px;
}

.inter-header__mobile-menu {
	margin: 0;
	padding: 0 20px;
	list-style: none;
}

.inter-header__mobile-menu li {
	margin: 0;
	border-bottom: 1px solid var(--sj-line);
}

.inter-header__mobile-menu a {
	display: flex;
	align-items: center;

	min-height: 58px;
	padding: 14px 3px;

	color: var(--sj-text);

	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: .055em;
	text-transform: uppercase;

	transition:
		color 150ms ease,
		padding-left 170ms ease;
}

.inter-header__mobile-menu > li > a:hover,
.inter-header__mobile-menu > li > a:focus-visible,
.inter-header__mobile-menu > li.current-menu-item > a,
.inter-header__mobile-menu > li.current-menu-ancestor > a {
	color: var(--sj-red);
}

.inter-header__mobile-menu > li > a:hover,
.inter-header__mobile-menu > li > a:focus-visible {
	padding-left: 9px;
}

.inter-header__mobile-menu .sub-menu {
	max-height: 0;
	overflow: hidden;

	margin: 0;
	padding: 0 0 0 12px;

	list-style: none;

	transition:
		max-height 280ms ease,
		padding-bottom 280ms ease;
}

.inter-header__mobile-menu .sub-menu.is-open {
	max-height: 900px;
	padding-bottom: 8px;
}

.inter-header__mobile-menu .sub-menu a {
	min-height: 44px;
	padding: 10px 4px;

	color: var(--sj-muted);

	font-size: 11px;
	font-weight: 500;
	letter-spacing: .035em;
	text-transform: none;
}

.inter-header__mobile-menu .sub-menu a:hover,
.inter-header__mobile-menu .sub-menu a:focus-visible {
	color: var(--sj-red);
}

.inter-header__mobile-toggle-row {
	display: flex;
	align-items: stretch;
}

.inter-header__mobile-toggle-row > a {
	flex: 1;
}

.inter-header__mobile-submenu-toggle {
	width: 48px;

	display: flex;
	align-items: center;
	justify-content: center;

	padding: 0;
	border: 0;

	background: transparent;
	color: var(--sj-muted);

	cursor: pointer;
}

.inter-header__mobile-submenu-toggle:hover,
.inter-header__mobile-submenu-toggle:focus-visible {
	color: var(--sj-red);
}

.inter-header__mobile-submenu-toggle svg {
	width: 14px;
	height: 14px;
	transition: transform 200ms ease;
}

.inter-header__mobile-submenu-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.inter-header__mobile-actions {
	margin-top: auto;
	padding: 18px 20px 24px;
	border-top: 1px solid var(--sj-line);
}

.inter-header__mobile-cta {
	width: 100%;
	min-height: 50px;

	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;

	padding: 14px 18px;

	background: #168b54;
	color: #fff;

	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.inter-header__mobile-cta:hover,
.inter-header__mobile-cta:focus-visible {
	background: #107443;
	color: #fff;
}

.inter-header-lock {
	overflow: hidden;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

	.inter-header-root {
		--sj-side: 18px;
		--sj-mobile-h: 60px;
	}

	.inter-header__container {
		min-height: var(--sj-mobile-h);

		grid-template-columns: 44px 1fr auto;
		grid-template-rows: var(--sj-mobile-h);
		grid-template-areas: "hamburger logo actions";

		column-gap: 8px;
	}

	.inter-header__hamburger {
		grid-area: hamburger;

		width: 44px;
		height: 44px;

		display: inline-flex;
		align-items: center;
		justify-content: center;

		padding: 0;
		border: 0;

		background: transparent;
		color: var(--sj-text);

		cursor: pointer;
	}

	.inter-header__hamburger-box {
		position: relative;
		width: 20px;
		height: 14px;
	}

	.inter-header__hamburger-line {
		position: absolute;
		left: 0;

		width: 20px;
		height: 1.5px;

		background: currentColor;

		transition:
			top 200ms ease,
			transform 200ms ease,
			opacity 150ms ease;
	}

	.inter-header__hamburger-line:nth-child(1) { top: 0; }
	.inter-header__hamburger-line:nth-child(2) { top: 6px; }
	.inter-header__hamburger-line:nth-child(3) { top: 12px; }

	.inter-header__hamburger[aria-expanded="true"] .inter-header__hamburger-line:nth-child(1) {
		top: 6px;
		transform: rotate(45deg);
	}

	.inter-header__hamburger[aria-expanded="true"] .inter-header__hamburger-line:nth-child(2) {
		opacity: 0;
	}

	.inter-header__hamburger[aria-expanded="true"] .inter-header__hamburger-line:nth-child(3) {
		top: 6px;
		transform: rotate(-45deg);
	}

	.inter-header__logo {
		grid-area: logo;
		justify-self: center;
	}

	.inter-header__logo img,
	.inter-header__logo .custom-logo {
		max-width: 155px;
		max-height: 36px;
	}

	.inter-header__nav {
		display: none;
	}

	.inter-header__actions {
		grid-area: actions;
		border-top: 0;
	}

	.inter-header__actions::before {
		display: none;
	}

	.inter-header__action {
		width: 42px;
		height: 42px;
	}
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

	.inter-header-root {
		--sj-side: 9px;
		--sj-topbar-h: 28px;
		--sj-mobile-h: 59px;
	}

	.inter-header__announcement-inner {
		padding: 0 12px;
	}

	.inter-header__announcement-text {
		font-size: 8px;
		letter-spacing: .095em;
	}

	.inter-header__topbar-right {
		display: none;
	}

	.inter-header__logo img,
	.inter-header__logo .custom-logo {
		max-width: 145px;
		max-height: 32px;
	}

	.inter-header__action {
		width: 39px;
		height: 39px;
	}

	.inter-header__action--account,
	.inter-header__action--cart {
		display: none;
	}

	.inter-header__action-tip {
		display: none;
	}

	.inter-header__search-panel.is-open {
		max-height: 112px;
	}

	.inter-header__search-form {
		padding: 14px 16px;
	}

	.inter-header__mobile-drawer {
		width: min(89vw, 390px);
	}
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 414px) {

	.inter-header-root {
		--sj-side: 6px;
	}

	.inter-header__logo img,
	.inter-header__logo .custom-logo {
		max-width: 132px;
		max-height: 29px;
	}

	.inter-header__hamburger,
	.inter-header__action {
		width: 38px;
		height: 38px;
	}

	.inter-header__mobile-drawer {
		width: min(91vw, 360px);
	}
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.inter-header-root a:focus-visible,
.inter-header-root button:focus-visible,
.inter-header-root input:focus-visible {
	outline: 2px solid rgba(181,47,61,.32);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.inter-header-root *,
	.inter-header-root *::before,
	.inter-header-root *::after {
		transition-duration: .001ms !important;
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
	}
}
