/* S&C Header */
.sc-header { background: #fff; z-index: 50; }

.sc-header__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 24px;
	min-height: 64px;
	border-bottom: 1px solid var(--sc-c-border);
}

.sc-header__logo { display: inline-flex; justify-self: start; }
.sc-header__logo img { width: 92px; height: auto; }

.sc-header__menu {
	--sc-menu-line: var(--sc-c-primary);
	display: flex;
	align-items: center;
	gap: clamp(20px, 2.6vw, 38px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.sc-header__menu > li { position: relative; }
.sc-header__menu > li > a {
	position: relative;
	display: inline-block;
	padding: 8px 0;
	font-size: 11px;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--sc-c-text);
}
.sc-header__menu > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--sc-menu-line);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.sc-header__menu > li > a:hover::after,
.sc-header__menu > li.current-menu-item > a::after,
.sc-header__menu > li.current-menu-ancestor > a::after,
.sc-header__menu > li.current_page_parent > a::after { transform: scaleX(1); }

/* Submenú */
.sc-header__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 200px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--sc-c-border);
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .06);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.sc-header__menu li:hover > .sub-menu,
.sc-header__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sc-header__menu .sub-menu a { display: block; padding: 8px 16px; font-size: 11px; text-transform: uppercase; }

.sc-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 18px;
}
.sc-header__icon {
	--sc-icon-size: 17px;
	display: inline-grid;
	place-items: center;
	padding: 4px;
	border: 0;
	background: none;
	color: var(--sc-c-text);
	line-height: 0;
}
.sc-header__icon svg, .sc-header__icon i { width: var(--sc-icon-size); height: var(--sc-icon-size); font-size: var(--sc-icon-size); }
.sc-header__cart {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding-block: 8px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: var(--sc-c-text);
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}
.sc-header__cart .sc-flower { --sc-icon-size: 15px; }
.sc-header__cart.is-active { border-color: var(--sc-c-primary); }
.sc-header__count { white-space: pre; }
.sc-header__burger { display: none; }

/* Búsqueda */
.sc-header__search { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--sc-c-border); padding-block: 16px; box-shadow: 0 16px 30px rgba(0, 0, 0, .05); }
.sc-header__search-form { display: flex; gap: 10px; }
.sc-header__search-form .sc-btn { min-width: 52px; padding: 0 16px; }
.sc-header__search-form .sc-icon { width: 16px; height: 16px; }

/* Panel móvil */
.sc-header__drawer { position: fixed; inset: 0; z-index: 9999; }
.sc-header__drawer-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .35); opacity: 0; transition: opacity .3s ease; }
.sc-header__drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: min(86vw, 380px);
	padding: 20px 24px 32px;
	padding-top: max(20px, env(safe-area-inset-top));
	background: #fff;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.sc-header__drawer.is-open .sc-header__drawer-backdrop { opacity: 1; }
.sc-header__drawer.is-open .sc-header__drawer-panel { transform: none; }
.sc-header__drawer-head { display: flex; align-items: center; justify-content: space-between; }
.sc-header__drawer-title { font-family: var(--sc-f-serif); font-style: italic; font-size: 22px; }
.sc-header__drawer-menu { margin: 0; padding: 0; list-style: none; }
.sc-header__drawer-menu li { border-bottom: 1px solid var(--sc-c-border); }
.sc-header__drawer-menu a { display: block; padding: 16px 0; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.sc-header__drawer-menu .current-menu-item > a { color: var(--sc-c-primary-dark); }
.sc-header__drawer-menu .sub-menu { list-style: none; padding: 0 0 10px 14px; }
.sc-header__drawer-menu .sub-menu li { border: 0; }
.sc-header__drawer-menu .sub-menu a { padding: 8px 0; font-size: 13px; }
.sc-header__drawer-account { margin-top: auto; }
body.sc-lock { overflow: hidden; }

/* Breakpoints del menú hamburguesa */
@media (max-width: 1024px) {
	.sc-header--bp-tablet .sc-header__bar { grid-template-columns: auto 1fr; }
	.sc-header--bp-tablet .sc-header__nav,
	.sc-header--bp-tablet .sc-header__account { display: none; }
	.sc-header--bp-tablet .sc-header__burger { display: inline-grid; }
}
@media (max-width: 767px) {
	.sc-header__bar { min-height: 56px; gap: 12px; }
	.sc-header__logo img { width: 74px; }
	.sc-header__actions { gap: 12px; }
	.sc-header--bp-mobile .sc-header__bar { grid-template-columns: auto 1fr; }
	.sc-header--bp-mobile .sc-header__nav,
	.sc-header--bp-mobile .sc-header__account { display: none; }
	.sc-header--bp-mobile .sc-header__burger { display: inline-grid; }
}
@media (max-width: 360px) {
	.sc-header__cart > span:not(.sc-header__count) { display: none; }
}
