/* ============================================================
   2026 Smart Header Menu — v1.0.0
   ============================================================ */

/* ---- Reset ---- */
.shm-wrap *,
.shm-wrap *::before,
.shm-wrap *::after { box-sizing: border-box; }
.shm-wrap ul { list-style: none; margin: 0; padding: 0; }
.shm-wrap a { text-decoration: none; }
.shm-wrap button { font-family: inherit; }

/* ---- Wrapper ---- */
.shm-wrap { position: relative; width: 100%; }

/* ================================================================
   HEADER
   ================================================================ */
.shm-header {
	position: relative;
	width: 100%;
	z-index: 999;
	background-color: rgba(255, 255, 255, 0.97);
	transition: background-color 0.35s ease, box-shadow 0.35s ease, transform 0.3s ease;
}

/* Glassmorphism */
.shm-header.shm-glass {
	background-color: rgba(255, 255, 255, 0.65) !important;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

/* Border bottom */
.shm-header.shm-has-border {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Transparent (before scroll) */
.shm-header.shm-transparent-init {
	background-color: transparent !important;
	box-shadow: none !important;
}

/* Sticky — JS adds/removes */
.shm-header.shm-is-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1050;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Hide on scroll down */
.shm-header.shm-is-hidden {
	transform: translateY(-100%);
}

/* ----------------------------------------------------------------
   Inner Row — 3-column flex
   ---------------------------------------------------------------- */
.shm-inner {
	display: flex;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 24px;
}

/* Columns
   LEFT  = logo, grows to fill all spare space → pushes nav + actions to right edge
   CENTER = nav links, natural width, no extra space after last link
   RIGHT  = cart + CTA + hamburger, natural width, flush to right edge           */
.shm-col {
	display: flex;
	align-items: center;
}

.shm-col-left {
	flex: 1 1 0;
	justify-content: flex-start;
	min-width: 0;
}

.shm-col-center {
	flex: 0 0 auto;
	justify-content: flex-end;
}

.shm-col-right {
	flex: 0 0 auto;
	justify-content: flex-end;
}

/* ================================================================
   LOGO
   ================================================================ */
.shm-logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}

.shm-logo-img {
	display: block;
	width: 140px;
	height: auto;
}

.shm-logo-text {
	font-size: 22px;
	font-weight: 800;
	color: #1a1a1a;
	white-space: nowrap;
	letter-spacing: -0.03em;
	line-height: 1;
}

/* ================================================================
   DESKTOP NAV
   ================================================================ */
.shm-nav {
	flex: 1 1 0;
	display: flex;
	justify-content: center;
}

.shm-nav-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 2px;
}

.shm-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 14px;
	color: #333333;
	font-size: 14px;
	font-weight: 500;
	border-radius: 50px;
	white-space: nowrap;
	transition: color 0.2s ease, background-color 0.2s ease;
	text-decoration: none;
}

.shm-nav-link:hover {
	color: #E91E8C;
	background-color: rgba(233, 30, 140, 0.06);
}

/* ---- Badge ---- */
.shm-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 7px;
	background-color: #E91E8C;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 50px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	line-height: 1.4;
	white-space: nowrap;
}

/* ================================================================
   RIGHT ACTIONS
   ================================================================ */
.shm-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Base icon button */
.shm-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: none;
	cursor: pointer;
	background: transparent;
	padding: 0;
	line-height: 1;
	transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
	-webkit-appearance: none;
}

/* ---- Search Button ---- */
.shm-search-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #f5f5f5;
	color: #333333;
	font-size: 18px;
}
.shm-search-btn:hover {
	background-color: #ebebeb;
	color: #E91E8C;
}

/* ---- Cart Button ---- */
.shm-cart-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 40px;
	padding: 0 14px;
	border-radius: 50px;
	background-color: #f5f5f5;
	color: #333333;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.shm-cart-btn:hover {
	background-color: #ebebeb;
	color: #E91E8C;
}
.shm-cart-btn svg {
	font-size: 18px;
	flex-shrink: 0;
}

/* Cart count badge */
.shm-cart-count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background-color: #E91E8C;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	pointer-events: none;
}

/* Hide when count is 0 */
.shm-cart-count[data-count="0"] { display: none; }

/* ---- CTA Button ---- */
.shm-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	background-color: #E91E8C;
	color: #ffffff;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}
.shm-cta-btn:hover {
	background-color: #c0186e;
	color: #ffffff;
	transform: translateY(-1px);
}

/* ---- Hamburger ---- */
.shm-hamburger {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	flex-direction: column;
	gap: 5px;
	display: none; /* hidden desktop */
}
.shm-hamburger:hover { background-color: #f5f5f5; }

.shm-bar {
	display: block;
	width: 22px;
	height: 2px;
	background-color: #333333;
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animated X state */
.shm-hamburger[aria-expanded="true"] .shm-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.shm-hamburger[aria-expanded="true"] .shm-bar:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}
.shm-hamburger[aria-expanded="true"] .shm-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ================================================================
   OVERLAY
   ================================================================ */
.shm-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1099;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}
.shm-overlay.shm-is-open {
	opacity: 1;
	pointer-events: auto;
}

/* ================================================================
   OFF-CANVAS PANEL
   ================================================================ */
.shm-oc {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 320px;
	max-width: 92vw;
	background-color: #ffffff;
	z-index: 1100;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
	transition: transform 0.36s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	-webkit-overflow-scrolling: touch;
}

/* Right (default) */
.shm-oc.shm-oc--right {
	right: 0;
	transform: translateX(100%);
}
.shm-oc.shm-oc--right.shm-is-open { transform: translateX(0); }

/* Left */
.shm-oc.shm-oc--left {
	left: 0;
	transform: translateX(-100%);
}
.shm-oc.shm-oc--left.shm-is-open { transform: translateX(0); }

/* ---- Panel Header ---- */
.shm-oc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
	flex-shrink: 0;
}

.shm-oc-logo {
	display: inline-flex;
	align-items: center;
	font-size: 20px;
	font-weight: 800;
	color: #1a1a1a;
	text-decoration: none;
	letter-spacing: -0.03em;
	line-height: 1;
}
.shm-oc-logo img { width: 120px; height: auto; display: block; }

/* ---- Close Button ---- */
.shm-close {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #f5f5f5;
	color: #333333;
	font-size: 18px;
	flex-shrink: 0;
}
.shm-close:hover { background-color: #ebebeb; color: #E91E8C; }

/* ---- Panel Nav ---- */
.shm-oc-nav { flex: 1 0 auto; padding: 8px 0; }

.shm-oc-list {
	display: flex;
	flex-direction: column;
}

.shm-oc-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 24px;
	color: #333333;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	min-height: 52px;
	transition: color 0.2s ease, background-color 0.2s ease;
	border-left: 3px solid transparent;
}
.shm-oc-link:hover {
	color: #E91E8C;
	background-color: rgba(233, 30, 140, 0.04);
	border-left-color: #E91E8C;
}

/* ---- Panel Actions (CTA + Cart) ---- */
.shm-oc-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid rgba(0, 0, 0, 0.07);
	flex-shrink: 0;
}

.shm-oc-cta { text-align: center; width: 100%; }

.shm-oc-cart {
	width: 100%;
	justify-content: center;
	height: 44px;
	border-radius: 50px;
	position: relative;
	/* Reposition the count badge for in-panel cart */
}
.shm-oc-cart .shm-cart-count {
	position: static;
	margin-left: 4px;
}

/* ---- Panel Social ---- */
.shm-oc-social {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	padding: 12px 24px;
	flex-shrink: 0;
}

.shm-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background-color: #f5f5f5;
	color: #333333;
	font-size: 16px;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.shm-social-link:hover { background-color: #E91E8C; color: #ffffff; }
.shm-social-link svg { display: block; }

/* ---- Panel Footer ---- */
.shm-oc-footer {
	padding: 16px 24px;
	font-size: 12px;
	color: #999999;
	line-height: 1.6;
	border-top: 1px solid rgba(0, 0, 0, 0.07);
	flex-shrink: 0;
}

/* ================================================================
   BODY SCROLL LOCK
   ================================================================ */
body.shm-scroll-locked {
	overflow: hidden;
	/* prevent shifting on scrollbar disappear */
	padding-right: var(--shm-scrollbar-width, 0px);
}

/* ================================================================
   STICKY PLACEHOLDER
   ================================================================ */
.shm-sticky-placeholder {
	display: none;
}
.shm-header.shm-is-sticky ~ .shm-sticky-placeholder,
.shm-wrap.shm-sticky-active .shm-sticky-placeholder {
	display: block;
}

/* ================================================================
   RESPONSIVE — CSS fallback at default 1024px breakpoint
   ================================================================ */

/* Tablet ≤1024px:
   Hide center col entirely (don't just hide nav inside it —
   an empty flex child can still collapse unpredictably in some contexts).
   Push right col to far right with margin-left: auto. */
@media (max-width: 1024px) {
	.shm-col-center            { display: none; }
	.shm-col-right             { flex: none; margin-left: auto; }
	.shm-hamburger             { display: inline-flex; }
}

/* ≤768px — hide desktop CTA, icon-only cart */
@media (max-width: 768px) {
	.shm-cta-btn:not(.shm-oc-cta) { display: none; }

	.shm-cart-label { display: none; }
	.shm-cart-btn:not(.shm-oc-cart) {
		width: 40px;
		padding: 0;
		justify-content: center;
	}

	.shm-inner { padding: 14px 16px; }
}

/* ≤480px */
@media (max-width: 480px) {
	.shm-actions { gap: 6px; }
	.shm-inner   { padding: 12px 14px; }
	.shm-logo-img  { width: 110px; }
	.shm-logo-text { font-size: 18px; }
	.shm-oc        { width: 300px; }
}

/* ================================================================
   JS-CONTROLLED BREAKPOINT OVERRIDE
   JS adds .shm-is-mobile or .shm-is-desktop to .shm-wrap
   based on the "Hamburger Visible Below" setting in Elementor.
   ================================================================ */

/* Mobile mode — collapse center col, push right col right */
.shm-is-mobile .shm-col-center { display: none !important; }
.shm-is-mobile .shm-col-right  { flex: none !important; margin-left: auto !important; }
.shm-is-mobile .shm-hamburger  { display: inline-flex !important; }
.shm-is-mobile .shm-nav        { display: none !important; }

/* Desktop mode — restore 3-col layout */
.shm-is-desktop .shm-col-center { display: flex !important; }
.shm-is-desktop .shm-col-right  { flex: 0 0 auto !important; margin-left: 0 !important; }
.shm-is-desktop .shm-hamburger  { display: none !important; }
.shm-is-desktop .shm-nav        { display: flex !important; }

/* ================================================================
   ELEMENTOR EDITOR: prevent off-canvas from showing
   ================================================================ */
.elementor-editor-active .shm-oc,
.elementor-editor-active .shm-overlay {
	display: none !important;
}
