/* Dynova 4.9.0 Side Panel: arrow tab on the left edge opens a floating panel */
.side-panel{
	--sp-w:304px;--sp-gap:16px;--sp-ease:cubic-bezier(.22,1,.36,1);
	--sp-grad:linear-gradient(135deg,color-mix(in srgb,var(--primary) 62%,#7c1fe0),var(--primary));
	--sp-left:var(--sp-gap);position:fixed;z-index:90;left:var(--sp-left);width:var(--sp-w);
	top:calc(var(--wp-admin--admin-bar--height,0px) + var(--sp-gap));
	bottom:var(--sp-gap);
	transform:translateX(calc(-100% - var(--sp-left)));
	transition:transform .55s var(--sp-ease);
	pointer-events:none;
	font-family:inherit;
}
.side-panel.is-open{transform:none;z-index:100002}
.side-panel>*{pointer-events:auto}
.sp-ico{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}

/* Arrow tab: sits on the right edge of the panel, so it stays visible on the screen edge when closed */
.sp-tab{
	position:absolute;left:100%;top:50%;margin:-30px 0 0;width:34px;height:60px;padding:0;
	display:grid;place-items:center;border:0;border-radius:0 18px 18px 0;cursor:pointer;
	background:var(--sp-grad);color:#fff;box-shadow:4px 6px 18px rgba(16,23,48,.28);
	transition:transform .3s var(--sp-ease),box-shadow .3s,border-radius .3s;
	animation:sp-nudge 2.6s ease-in-out 1.2s 3;
	-webkit-tap-highlight-color:transparent;
}
.sp-tab:hover{transform:translateX(3px);box-shadow:6px 8px 22px rgba(16,23,48,.34)}
.sp-tab:focus-visible,.sp-close:focus-visible,.sp-mode:focus-visible,.sp-promo-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sp-tab .sp-ico{width:22px;height:22px;stroke-width:2.4;transition:transform .5s var(--sp-ease)}
.side-panel.is-open .sp-tab{opacity:0;pointer-events:none;transform:translateX(-12px)}
@keyframes sp-nudge{0%,100%{transform:translateX(0)}50%{transform:translateX(6px)}}

.sp-overlay{position:fixed;inset:0;z-index:100001;background:rgba(10,14,32,.45);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;visibility:hidden;transition:opacity .4s,visibility .4s}
body.sp-open .sp-overlay{opacity:1;visibility:visible}
body.sp-open{overflow:hidden}

/* Card */
.sp-card{
	height:100%;display:flex;flex-direction:column;min-height:0;overflow:hidden;
	border-radius:28px;padding:16px;gap:12px;
	background:linear-gradient(180deg,#fff 0,#f3f2ff 100%);color:#101730;
	box-shadow:0 24px 60px rgba(16,23,48,.30),0 0 0 1px rgba(124,58,237,.08);
	visibility:hidden;transition:visibility 0s linear .55s;
}
.side-panel.is-open .sp-card{visibility:visible;transition-delay:0s}
.sp-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:14px;margin:0 -6px;padding:2px 6px;scrollbar-width:thin}
.sp-foot{flex:none;display:flex;flex-direction:column;gap:10px}

/* Staggered entrance */
.sp-card [data-sp-item]{opacity:0;transform:translateX(-18px);transition:opacity .35s ease,transform .5s var(--sp-ease)}
.side-panel.is-open .sp-card [data-sp-item]{opacity:1;transform:none;transition-delay:calc(.12s + var(--i,0)*.05s)}

/* Head */
.sp-head{display:flex;align-items:center;gap:12px}
.sp-logo{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:color-mix(in srgb,var(--primary) 14%,#fff);color:var(--primary);flex:none;overflow:hidden}
.sp-logo img{width:100%;height:100%;object-fit:cover;display:block}
.sp-title{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.sp-title b{font-size:16px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-title small{font-size:12px;color:#667089;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-close{flex:none;width:40px;height:40px;display:grid;place-items:center;border:0;border-radius:14px;background:color-mix(in srgb,var(--primary) 12%,#fff);color:var(--primary);cursor:pointer;transition:transform .3s var(--sp-ease),background .2s}
.sp-close:hover{transform:translateX(-3px);background:color-mix(in srgb,var(--primary) 20%,#fff)}

/* Search */
.sp-search{display:flex;align-items:center;gap:8px;padding:0 6px 0 14px;height:48px;border-radius:16px;background:#fff;border:1px solid #e6e9f2;box-shadow:0 4px 14px rgba(16,23,48,.06);color:#667089}
.sp-search:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 18%,transparent)}
.sp-search input[type=search]{flex:1;min-width:0;height:100%;border:0;background:transparent;font:inherit;font-size:14px;color:#101730;outline:0;padding:0;-webkit-appearance:none;appearance:none}
.sp-mode{flex:none;width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:12px;background:transparent;color:#667089;cursor:pointer}
.sp-mode:hover{background:#f0f1f8;color:var(--primary)}

/* Menu */
.sp-list,.sp-cats{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.sp-list a{display:flex;align-items:center;gap:14px;min-height:48px;padding:0 14px;border-radius:14px;color:#2a3354;font-weight:600;font-size:15px;transition:background .2s,color .2s,transform .25s var(--sp-ease)}
.sp-mi{display:grid;place-items:center;flex:none}
.sp-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-list a:hover{background:color-mix(in srgb,var(--primary) 9%,#fff);color:var(--primary);transform:translateX(3px)}
.sp-list .current-menu-item>a,.sp-list .current_page_item>a{background:var(--sp-grad);color:#fff;box-shadow:0 8px 20px color-mix(in srgb,var(--primary) 38%,transparent)}
.sp-list .current-menu-item>a:hover{transform:none;color:#fff}

/* Categories */
.sp-heading{display:flex;align-items:center;gap:10px;margin:2px 0 8px;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--primary)}
.sp-heading::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,color-mix(in srgb,var(--primary) 35%,transparent),transparent)}
.sp-cats a{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 14px;border-radius:14px;background:#fff;color:#2a3354;font-weight:600;font-size:14px;box-shadow:0 3px 10px rgba(16,23,48,.06);transition:transform .25s var(--sp-ease),box-shadow .2s}
.sp-cats a:hover{transform:translateX(3px);box-shadow:0 6px 16px rgba(16,23,48,.12);color:var(--primary)}
.sp-cats .sp-ico{width:16px;height:16px;color:#8d96b2}
.sp-dot{flex:none;width:8px;height:8px;border-radius:50%;background:#f59e0b}
.sp-dot-1{background:#22c55e}.sp-dot-2{background:#e11d48}.sp-dot-3{background:#3b82f6}.sp-dot-4{background:#a855f7}

/* Offer card */
.sp-promo{display:flex;align-items:center;gap:10px;padding:10px;border-radius:18px;background:#fff;box-shadow:0 4px 14px rgba(16,23,48,.08)}
.sp-promo-ico{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--sp-grad);color:#fff}
.sp-promo-ico .sp-ico{width:20px;height:20px}
.sp-promo-txt{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.sp-promo-txt b{font-size:14px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-promo-txt small{font-size:11.5px;color:#667089;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-promo-btn{flex:none;padding:9px 14px;border-radius:12px;background:var(--sp-grad);color:#fff!important;font-weight:700;font-size:12.5px;line-height:1.2;box-shadow:0 6px 14px color-mix(in srgb,var(--primary) 35%,transparent)}
.sp-promo-btn:hover{filter:brightness(1.08)}

/* Profile */
.sp-profile{display:flex;align-items:center;gap:12px;padding:6px 8px;border-radius:16px;color:#101730;transition:background .2s}
.sp-profile:hover{background:color-mix(in srgb,var(--primary) 8%,#fff)}
.sp-avatar{position:relative;flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:color-mix(in srgb,var(--primary) 16%,#fff);color:var(--primary);font-weight:800;font-size:13px}
.sp-online{position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:#22c55e;border:2px solid #fff}
.sp-who{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.sp-who b{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-who small{font-size:12px;color:#667089;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-profile>.sp-ico{color:#8d96b2}

/* Dark mode: the card turns dark, so text is light here */
html[data-mode=dark] .sp-card{background:linear-gradient(180deg,#171f3a 0,#10162b 100%);color:#e8ebf7;box-shadow:0 24px 60px rgba(0,0,0,.6),0 0 0 1px rgba(255,255,255,.06)}
html[data-mode=dark] .sp-logo,html[data-mode=dark] .sp-close,html[data-mode=dark] .sp-avatar{background:rgba(255,255,255,.1);color:#c8d3ff}
html[data-mode=dark] .sp-title small,html[data-mode=dark] .sp-who small,html[data-mode=dark] .sp-promo-txt small{color:#a3acc6}
html[data-mode=dark] .sp-search,html[data-mode=dark] .sp-promo,html[data-mode=dark] .sp-cats a{background:#1b2444;border-color:#2a3454;color:#e8ebf7;box-shadow:none}
html[data-mode=dark] .sp-search input[type=search]{color:#e8ebf7}
html[data-mode=dark] .sp-mode:hover{background:rgba(255,255,255,.1);color:#fff}
html[data-mode=dark] .sp-list a,html[data-mode=dark] .sp-profile{color:#e8ebf7}
html[data-mode=dark] .sp-list a:hover,html[data-mode=dark] .sp-profile:hover{background:rgba(255,255,255,.08);color:#fff}
html[data-mode=dark] .sp-list .current-menu-item>a{color:#fff}
html[data-mode=dark] .sp-cats a{color:#e8ebf7}
html[data-mode=dark] .sp-heading{color:#9db1ff}
html[data-mode=dark] .sp-online{border-color:#171f3a}
html[data-mode=dark] .sp-title b,html[data-mode=dark] .sp-who b,html[data-mode=dark] .sp-promo-txt b{color:#e8ebf7}
html[data-mode=dark] .side-panel a{color:inherit}
html[data-mode=dark] .side-panel .sp-promo-btn,html[data-mode=dark] .side-panel .sp-list .current-menu-item>a{color:#fff}

/* Tablet */
@media (max-width:991px){
	.side-panel{--sp-w:min(320px,88vw)}
}

/* Phone: nearly full height, safe areas, bigger touch targets, tab clear of the bottom bar */
@media (max-width:600px){
	.side-panel{
		--sp-w:min(86vw,340px);--sp-gap:10px;--sp-left:max(10px,env(safe-area-inset-left));
		top:calc(var(--wp-admin--admin-bar--height,0px) + max(10px,env(safe-area-inset-top)));
		bottom:max(10px,env(safe-area-inset-bottom));
	}
	.sp-tab{top:42%;width:30px;height:54px;margin-top:-27px;border-radius:0 16px 16px 0}
	.sp-card{border-radius:24px;padding:14px;gap:10px}
	.sp-search{height:50px}
	.sp-list a{min-height:50px}
	.sp-search input[type=search]{font-size:16px} /* stops iPhone zoom on focus */
}
@media (max-width:360px){
	.sp-promo{flex-wrap:wrap}
	.sp-promo-btn{flex:1 1 100%;text-align:center}
}
/* Short screens (landscape phones): promo hides first so the menu keeps its room */
@media (max-height:560px){
	.sp-promo{display:none}
	.sp-list a{min-height:42px}
}
/* Other layers (menu drawer, category drawer, search) cover the panel; the cart/checkout bars stay clear */
body.nav-open .side-panel:not(.is-open),body.cat-open .side-panel:not(.is-open),body.search-lock .side-panel:not(.is-open){visibility:hidden}

@media (prefers-reduced-motion:reduce){
	.side-panel,.sp-card [data-sp-item],.sp-overlay{transition-duration:.01s!important;transition-delay:0s!important}
	.sp-tab{animation:none}
}

/* ---------- Icon bar for computer screens (992px and wider) ---------- */
.sp-rail{display:none}
@media (min-width:992px){
	body.sp-rail-on{padding-left:104px}
	body.sp-rail-on .sp-tab{display:none}
	body.sp-rail-on .sp-rail{
		display:block;position:fixed;z-index:89;left:16px;width:72px;
		top:calc(var(--wp-admin--admin-bar--height,0px) + 16px);bottom:16px;
	}
	.sp-rail-card{
		height:100%;display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 0;
		border-radius:36px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;
		background:linear-gradient(180deg,#fff 0,#f3f2ff 100%);
		box-shadow:0 16px 40px rgba(16,23,48,.18),0 0 0 1px rgba(124,58,237,.08);
	}
	.sp-rail-card::-webkit-scrollbar{display:none}
	.sp-rail-card .sp-logo{width:42px;height:42px;margin-bottom:6px}
	.sp-rail-btn{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:14px;background:transparent;color:#2a3354;cursor:pointer;transition:background .2s,color .2s,transform .25s var(--sp-ease,ease)}
	.sp-rail-btn:hover{background:color-mix(in srgb,var(--primary) 10%,#fff);color:var(--primary);transform:scale(1.08)}
	.sp-rail-btn.is-current{background:color-mix(in srgb,var(--primary) 14%,#fff);color:var(--primary)}
	.sp-rail-promo{margin-top:auto;background:#fff8e1;color:#f59e0b}
	.sp-rail-promo:hover{background:#ffefb8;color:#d97706}
	.sp-rail-avatar{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:color-mix(in srgb,var(--primary) 16%,#fff);color:var(--primary);font-weight:800;font-size:12px}
	.sp-rail-avatar .sp-ico{width:18px;height:18px}
	.sp-rail-btn:focus-visible,.sp-rail-avatar:focus-visible,.sp-rail-open:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
	/* Small arrow beside the bar: opens the full panel */
	.sp-rail-open{
		position:absolute;left:calc(100% + 6px);top:20px;width:30px;height:30px;padding:0;
		display:grid;place-items:center;border:0;border-radius:50%;cursor:pointer;
		background:#fff;color:#2a3354;box-shadow:0 4px 12px rgba(16,23,48,.2);
		transition:transform .3s var(--sp-ease,ease),background .2s,color .2s;
	}
	.sp-rail-open .sp-ico{width:16px;height:16px;stroke-width:2.4}
	.sp-rail-open:hover{background:var(--primary);color:#fff;transform:translateX(3px)}
	html[data-mode=dark] .sp-rail-card{background:linear-gradient(180deg,#171f3a 0,#10162b 100%);box-shadow:0 16px 40px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.06)}
	html[data-mode=dark] .sp-rail-card .sp-logo,html[data-mode=dark] .sp-rail-avatar{background:rgba(255,255,255,.1);color:#c8d3ff}
	html[data-mode=dark] .sp-rail-btn{color:#e8ebf7}
	html[data-mode=dark] .sp-rail-btn:hover,html[data-mode=dark] .sp-rail-btn.is-current{background:rgba(255,255,255,.1);color:#fff}
	html[data-mode=dark] .sp-rail-promo{background:rgba(245,158,11,.15);color:#fbbf24}
	html[data-mode=dark] .sp-rail-open{background:#1b2444;color:#e8ebf7}
	html[data-mode=dark] .sp-rail a{color:inherit}
	body.nav-open .sp-rail,body.cat-open .sp-rail,body.search-lock .sp-rail{visibility:hidden}
}
@media (min-width:992px) and (max-height:520px){
	.sp-rail-card{gap:6px;padding:10px 0}
	.sp-rail-btn{width:40px;height:40px}
}
