
/* ==========================================================================================
   himeros.sk — moderné mobilné menu (13.9.2026)
   Popover API (top layer, light-dismiss, ESC) · @starting-style + transition-behavior
   (animácia display/overlay) · :has() (hamburger → X, zámok scrollu) · <details name>
   (exkluzívny akordeón) · ::details-content + interpolate-size (animovaná výška) ·
   100dvh + env(safe-area-inset) · overscroll-behavior · color-mix(). Bez JS okrem záložného
   správania pre prehliadače bez Popover API (hm-mm.js).
   ========================================================================================== */
:root {
	--mm-bg: #16101A;
	--mm-bg2: #221826;
	--mm-fg: #F0E9E4;
	--mm-muted: #9A8B98;
	--mm-accent: #C98B6B;
	--mm-line: rgba(240, 233, 228, .13);
	--mm-radius: 10px;
	--mm-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mm-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--mm-w: min(88vw, 400px);
	--mm-on-accent: #16101A;
}

/* --- tlačidlo hamburger (len mobil/tablet) --- */
.hm-mm-btn { display: none; }
@media (max-width: 767px) {
	.hm-mm-btn {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; padding: 0; margin: 0 0 0 .4rem; flex: 0 0 auto;
		border: 1px solid var(--mm-btn-line, var(--mm-line)); border-radius: 12px;
		background: var(--mm-btn-bg, transparent); color: var(--mm-btn-fg, var(--mm-fg));
		cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
		transition: background .2s ease, border-color .2s ease;
	}
	.hm-mm-btn:hover, .hm-mm-btn:focus-visible { border-color: var(--mm-accent); }
	.hm-mm-btn:focus-visible { outline: 2px solid var(--mm-accent); outline-offset: 2px; }
}
.hm-mm-btn__i { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.hm-mm-btn__i i {
	display: block; height: 2px; border-radius: 2px; background: currentColor;
	transition: translate .3s ease, rotate .3s ease, opacity .2s ease;
}
/* hamburger → X, keď je panel otvorený – čisté CSS cez :has(), bez JS */
body:has(#hm-mm:popover-open) .hm-mm-btn__i i:nth-child(1), body.hm-mm-open .hm-mm-btn__i i:nth-child(1) { translate: 0 6px; rotate: 45deg; }
body:has(#hm-mm:popover-open) .hm-mm-btn__i i:nth-child(2), body.hm-mm-open .hm-mm-btn__i i:nth-child(2) { opacity: 0; }
body:has(#hm-mm:popover-open) .hm-mm-btn__i i:nth-child(3), body.hm-mm-open .hm-mm-btn__i i:nth-child(3) { translate: 0 -6px; rotate: -45deg; }
/* zámok scrollu stránky pod otvoreným panelom */
body:has(#hm-mm:popover-open), body.hm-mm-open { overflow: hidden; }

/* --- panel --- */
.hm-mm {
	display: none;
	position: fixed; inset: 0 0 0 auto; width: var(--mm-w); height: 100dvh; max-height: none;
	margin: 0; padding: 0 0 max(1rem, env(safe-area-inset-bottom)); border: 0; box-sizing: border-box;
	background: var(--mm-bg); color: var(--mm-fg); font-family: var(--mm-font);
	box-shadow: -24px 0 70px rgba(0, 0, 0, .35);
	overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
	z-index: 100000;
	translate: 100% 0; opacity: .5;
	transition: translate .4s cubic-bezier(.2, .8, .2, 1), opacity .3s ease,
		display .4s allow-discrete, overlay .4s allow-discrete;
}
.hm-mm:popover-open, .hm-mm.is-open { display: block; translate: 0 0; opacity: 1; }
@starting-style { .hm-mm:popover-open { translate: 100% 0; opacity: .5; } }
.hm-mm::backdrop {
	background: rgba(8, 6, 10, .5);
	-webkit-backdrop-filter: blur(6px) saturate(.9); backdrop-filter: blur(6px) saturate(.9);
	opacity: 0;
	transition: opacity .35s ease, display .35s allow-discrete, overlay .35s allow-discrete;
}
.hm-mm:popover-open::backdrop { opacity: 1; }
@starting-style { .hm-mm:popover-open::backdrop { opacity: 0; } }
/* záloha bez Popover API: vlastný overlay */
.hm-mm-shade { display: none; position: fixed; inset: 0; z-index: 99999; background: rgba(8, 6, 10, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.hm-mm-open .hm-mm-shade { display: block; }
@media (min-width: 768px) { .hm-mm, .hm-mm:popover-open, .hm-mm.is-open, .hm-mm-shade { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .hm-mm, .hm-mm::backdrop, .hm-mm-btn__i i { transition: none; } }

/* hlavička panelu */
.hm-mm__head {
	position: sticky; top: 0; z-index: 2;
	display: flex; align-items: center; justify-content: space-between; gap: .8rem;
	padding: calc(.9rem + env(safe-area-inset-top)) 1.1rem .8rem 1.25rem;
	background: color-mix(in srgb, var(--mm-bg) 88%, transparent);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--mm-line);
}
.hm-mm__brand { font-family: var(--mm-display); font-size: 1.25rem; letter-spacing: .06em; color: var(--mm-fg); text-decoration: none; }
.hm-mm__brand strong { color: var(--mm-accent); font-weight: inherit; }
.hm-mm__close {
	width: 40px; height: 40px; padding: 0; border: 1px solid var(--mm-line); border-radius: 50%;
	background: var(--mm-bg2); color: var(--mm-fg); font-size: 1.35rem; line-height: 1; cursor: pointer;
}
.hm-mm__close:hover { border-color: var(--mm-accent); color: var(--mm-accent); }

/* vyhľadávanie */
.hm-mm__search { display: flex; align-items: center; gap: .4rem; margin: 1rem 1.1rem .4rem; padding: .3rem .3rem .3rem .9rem; border: 1px solid var(--mm-line); border-radius: 999px; background: var(--mm-bg2); }
.hm-mm__search svg { flex: 0 0 auto; color: var(--mm-muted); }
.hm-mm__search input[type="search"] { flex: 1 1 auto; min-width: 0; margin: 0; padding: .5rem .2rem; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--mm-fg) !important; font-size: 1rem !important; font-family: inherit; }
.hm-mm__search input[type="search"]::placeholder { color: var(--mm-muted); }
.hm-mm__search input[type="search"]:focus { outline: none; }
.hm-mm__search button { flex: 0 0 auto; margin: 0; padding: .55rem 1rem; border: 0; border-radius: 999px; background: var(--mm-accent); color: var(--mm-on-accent, #16101A); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }

/* rýchle akcie */
.hm-mm__quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 1.1rem 1rem; }
.hm-mm__quick a {
	display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .7rem .3rem .6rem;
	border: 1px solid var(--mm-line); border-radius: var(--mm-radius); background: var(--mm-bg2);
	color: var(--mm-fg); text-decoration: none; font-size: .74rem; letter-spacing: .02em; text-align: center;
	transition: border-color .2s ease, background .2s ease;
}
.hm-mm__quick a:hover, .hm-mm__quick a:focus-visible { border-color: var(--mm-accent); }
.hm-mm__quick svg { color: var(--mm-accent); }
.hm-mm__quick .hm-mm__badge { position: absolute; }
.hm-mm__quick a { position: relative; }
.hm-mm__badge { top: .45rem; right: .55rem; min-width: 1.35em; height: 1.35em; padding: 0 .35em; border-radius: 999px; background: var(--mm-accent); color: var(--mm-on-accent, #16101A); font-size: .66rem; font-weight: 700; line-height: 1.35em; text-align: center; }

/* nadpis sekcie */
.hm-mm__h { display: block; margin: 1.1rem 1.25rem .45rem; font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; color: var(--mm-muted); }

/* kategórie – riadky s náhľadom scény */
.hm-mm__cats { list-style: none; margin: 0 1.1rem; padding: 0; display: grid; gap: .45rem; }
.hm-mm__cats a {
	display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: .8rem;
	padding: .4rem .7rem .4rem .4rem; border: 1px solid var(--mm-line); border-radius: var(--mm-radius);
	background: var(--mm-bg2); color: var(--mm-fg); text-decoration: none; overflow: hidden;
	transition: border-color .2s ease, transform .2s ease;
}
.hm-mm__cats a:hover, .hm-mm__cats a:focus-visible { border-color: var(--mm-accent); }
.hm-mm__cats a:active { transform: scale(.985); }
.hm-mm__cats img { width: 56px; height: 56px; object-fit: cover; border-radius: calc(var(--mm-radius) - 2px); background: var(--mm-line); }
.hm-mm__cats .hm-mm__ico { width: 56px; height: 56px; display: grid; place-items: center; border-radius: calc(var(--mm-radius) - 2px); background: color-mix(in srgb, var(--mm-accent) 14%, transparent); color: var(--mm-accent); }
.hm-mm__cn { display: block; font-family: var(--mm-display); font-size: 1.08rem; line-height: 1.15; }
.hm-mm__cc { display: block; margin-top: .15rem; font-size: .72rem; color: var(--mm-muted); }
.hm-mm__chev { color: var(--mm-muted); }
.hm-mm__all { display: block; margin: .6rem 1.25rem 0; color: var(--mm-accent); font-size: .9rem; text-decoration: underline; text-underline-offset: .25em; }

/* akordeóny – <details name="…"> = otvorený vždy len jeden */
.hm-mm__acc { margin: .5rem 1.1rem 0; border: 1px solid var(--mm-line); border-radius: var(--mm-radius); background: var(--mm-bg2); }
.hm-mm__acc summary {
	list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
	padding: .8rem .9rem; font-family: var(--mm-display); font-size: 1.05rem; color: var(--mm-fg);
}
.hm-mm__acc summary::-webkit-details-marker { display: none; }
.hm-mm__acc summary::after { content: ""; width: 9px; height: 9px; border-right: 1.6px solid var(--mm-muted); border-bottom: 1.6px solid var(--mm-muted); rotate: 45deg; transition: rotate .3s ease; margin-right: .2rem; }
.hm-mm__acc[open] summary::after { rotate: -135deg; }
@supports (interpolate-size: allow-keywords) {
	.hm-mm__acc { interpolate-size: allow-keywords; }
	.hm-mm__acc::details-content { height: 0; overflow: hidden; transition: height .32s ease, content-visibility .32s allow-discrete; }
	.hm-mm__acc[open]::details-content { height: auto; }
}
.hm-mm__chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .9rem .9rem; }
.hm-mm__chips a { padding: .42rem .8rem; border: 1px solid var(--mm-line); border-radius: 999px; background: var(--mm-bg); color: var(--mm-fg); font-size: .8rem; text-decoration: none; }
.hm-mm__chips a:hover { border-color: var(--mm-accent); color: var(--mm-accent); }
.hm-mm__links { list-style: none; margin: 0; padding: 0 .3rem .5rem; }
.hm-mm__links a { display: block; padding: .6rem .6rem; color: var(--mm-fg); text-decoration: none; font-size: .95rem; border-radius: 8px; }
.hm-mm__links a:hover { background: color-mix(in srgb, var(--mm-accent) 12%, transparent); }

/* pätka panelu */
.hm-mm__foot { margin: 1.2rem 1.25rem 0; padding-top: 1rem; border-top: 1px solid var(--mm-line); font-size: .82rem; color: var(--mm-muted); line-height: 1.7; }
.hm-mm__foot a { color: var(--mm-fg); text-decoration: none; }
.hm-mm__foot a:hover { color: var(--mm-accent); }

/* --- himeros.sk: umiestnenie tlačidla v hlavičke --- */
@media (max-width: 767px) {
	/* namiesto Storefront „Menu“ (rozbaľovací zoznam pod hlavičkou) náš panel; košík je v spodnej lište */
	body:not(.home) .site-header { position: relative; }
	.site-header .storefront-primary-navigation, .site-header .menu-toggle { display: none !important; }
	.hm-mm-btn { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; --mm-btn-line: rgba(240,233,228,.22); }
	body.home .site-header { padding-bottom: 0; }
}
