/* Меню категорій (Catalog_Menu) — кнопка «Каталог», випадне меню, меню поруч зі слайдшоу, мобільна шторка */
.cm, .cm-drop, .cm-m {
	--cm-accent: var(--ds-primary-color, #2abd13);
	--cm-text: #1f2937;
	--cm-muted: #6b7280;
	--cm-line: #eef0f3;
	--cm-hover: #f3f5f7;
	--cm-bg: #fff;
	--cm-radius: 16px;
}
.cm-stub, .cm-sprite { display: none !important; }
.cm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Кнопка ---------- */
.cm { display: flex; align-items: center; }
.cm-button {
	display: none; align-items: center; gap: 10px; height: 44px; margin-left: 20px; padding: 0 20px;
	border: 0; border-radius: 10px; background: var(--cm-accent); color: #fff;
	font: inherit; font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
	transition: filter .15s, box-shadow .15s;
}
.cm-button:hover { filter: brightness(.95); }
.cm-button:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(0, 0, 0, .12); }
.hs-header .cm-button { height: 50px; margin-left: 24px; border-radius: 8px; font-size: 16px; }
@media (min-width: 1200px) {
	.cm-button { display: inline-flex; }
}
.cm-burger { position: relative; width: 18px; height: 14px; flex: 0 0 18px; }
.cm-burger i { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s, top .2s; }
.cm-burger i:nth-child(1) { top: 0; }
.cm-burger i:nth-child(2) { top: 6px; }
.cm-burger i:nth-child(3) { top: 12px; }
.cm-open .cm-burger i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.cm-open .cm-burger i:nth-child(2) { opacity: 0; }
.cm-open .cm-burger i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ---------- Спільне: іконки, позначки ---------- */
.cm-ico { display: block; width: 22px; height: 22px; flex: 0 0 22px; object-fit: contain; color: #4b5563; }
.cm-ico-sm { width: 18px; height: 18px; flex-basis: 18px; color: currentColor; }
.cm-ico-xs { width: 16px; height: 16px; flex-basis: 16px; color: var(--cm-muted); }
.cm-badge {
	display: inline-flex; align-items: center; height: 18px; margin-left: 8px; padding: 0 7px; border-radius: 9px;
	background: #10b981; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .01em; white-space: nowrap; flex: none;
	vertical-align: 2px;
}
.cm-badge-hit { background: #f97316; }
.cm-badge-sale { background: #ef4444; }
.cm-count { margin-left: 6px; color: #9ca3af; font-size: 12px; font-weight: 500; flex: none; }

/* ---------- Випадне меню (комп'ютер) ---------- */
.cm-overlay {
	position: fixed; left: 0; right: 0; bottom: 0; top: var(--cm-top, 0); z-index: 14020;
	background: rgba(17, 24, 39, .32); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.cm-open .cm-overlay, .cm-overlay.cm-on { opacity: 1; visibility: visible; }
.cm-drop {
	position: fixed; z-index: 14030; top: var(--cm-top, 80px); left: var(--cm-left, 12px); width: var(--cm-width, calc(100% - 24px));
	max-height: calc(100vh - var(--cm-top, 80px) - 16px); display: none; grid-template-columns: 320px minmax(0, 1fr);
	background: var(--cm-bg); border-radius: 0 0 var(--cm-radius) var(--cm-radius); box-shadow: 0 24px 48px rgba(15, 23, 42, .16);
	overflow: hidden; color: var(--cm-text); text-align: left;
}
.cm-drop.cm-on { display: grid; animation: cm-in .16s ease-out; }
@keyframes cm-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cm-drop a { text-decoration: none; }
.cm-list { margin: 0; padding: 12px; list-style: none; overflow-y: auto; border-right: 1px solid var(--cm-line); overscroll-behavior: contain; }
.cm-l1-link {
	display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border-radius: 10px;
	color: var(--cm-text) !important; font-size: 15px; font-weight: 500; line-height: 1.3; transition: background .12s, color .12s;
}
.cm-l1-link .cm-name { min-width: 0; overflow-wrap: anywhere; }
.cm-l1-link:hover, .cm-l1.is-active > .cm-l1-link { background: var(--cm-hover); }
.cm-l1.is-active > .cm-l1-link, .cm-l1.is-active > .cm-l1-link .cm-ico { color: var(--cm-accent) !important; }
.cm-l1.is-active > .cm-l1-link { font-weight: 600; }
.cm-chev { margin-left: auto; width: 7px; height: 7px; flex: 0 0 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); opacity: .4; }
.cm-l1.is-active .cm-chev { opacity: 1; }
.cm-panels { position: relative; overflow-y: auto; overscroll-behavior: contain; }
.cm-panel { display: none; padding: 22px 28px 28px; }
.cm-panel.is-active { display: block; }
.cm-panel-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 18px; }
.cm-panel-title { color: var(--cm-text) !important; font-size: 22px; font-weight: 700; line-height: 1.2; }
.cm-panel-title:hover { color: var(--cm-accent) !important; }
.cm-panel-all { display: inline-flex; align-items: center; gap: 6px; color: var(--cm-accent) !important; font-size: 14px; font-weight: 600; }
.cm-panel-all::after, .cm-more::after { content: ''; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); }
.cm-panel-all:hover { text-decoration: underline; }
.cm-panel-body { display: flex; align-items: flex-start; gap: 28px; }
.cm-cols { flex: 1 1 auto; min-width: 0; columns: 210px 4; column-gap: 32px; }
.cm-group { display: block; margin-bottom: 24px; break-inside: avoid; page-break-inside: avoid; }
/* Підкатегорія без підпунктів — щільніше, щоб колонки не тягнулись донизу */
.cm-group-bare { margin-bottom: 12px; }
.cm-group-bare .cm-l2 { margin-bottom: 0; }
/* Нижче ще є пункти — м'яке затемнення внизу панелі (зникає, коли догорнули) */
.cm-panels::after { content: ''; position: sticky; bottom: 0; display: block; height: 40px; margin-top: -40px; background: linear-gradient(transparent, var(--cm-bg)); opacity: 0; pointer-events: none; transition: opacity .2s; }
.cm-more-below .cm-panels::after { opacity: 1; }
.cm-panels { scrollbar-width: thin; scrollbar-color: #cfd5dc transparent; }
.cm-panels::-webkit-scrollbar { width: 6px; }
.cm-panels::-webkit-scrollbar-thumb { background: #cfd5dc; border-radius: 3px; }
.cm-l2 { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--cm-accent) !important; font-size: 16px; font-weight: 700; line-height: 1.3; }
.cm-l2:hover .cm-name { text-decoration: underline; }
.cm-l3s { margin: 0; padding: 0; list-style: none; }
.cm-l3 { display: inline-flex; align-items: center; gap: 8px; padding: 3px 0; color: #374151 !important; font-size: 14px; line-height: 1.45; transition: color .12s; }
.cm-l3:hover { color: var(--cm-accent) !important; }
.cm-l3 .cm-badge { margin-left: 2px; }
.cm-x { display: none; }
.cm-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--cm-text) !important; font-size: 14px; font-weight: 700; }
.cm-more:hover { color: var(--cm-accent) !important; }
.cm-current, .cm-current .cm-name { color: var(--cm-accent) !important; font-weight: 600; }
.cm-banner { position: sticky; top: 0; display: block; flex: 0 0 260px; overflow: hidden; border-radius: 14px; background: var(--cm-hover); }
.cm-banner img { display: block; width: 100%; height: auto; transition: transform .3s; }
.cm-banner:hover img { transform: scale(1.03); }
.cm-banner-title { display: block; padding: 10px 14px 12px; color: var(--cm-text); font-size: 14px; font-weight: 600; line-height: 1.35; }

/* «Найкращі пропозиції» — замість банера; довантажуються при першому відкритті панелі */
.cm-offers { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; flex: 0 0 300px; min-width: 0; }
.cm-offers-title { margin-bottom: 6px; color: var(--cm-text); font-size: 18px; font-weight: 700; line-height: 1.25; }
.cm-offer { display: flex; align-items: center; gap: 14px; padding: 8px; margin: 0 -8px; border-radius: 12px; color: var(--cm-text) !important; text-decoration: none !important; transition: background .15s; }
.cm-offer:hover { background: var(--cm-hover); }
.cm-offer-img { flex: 0 0 72px; width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; overflow: hidden; }
.cm-offer-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cm-offer-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cm-offer-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.35; }
.cm-offer:hover .cm-offer-name { color: var(--cm-accent); }
.cm-offer-rating { display: flex; align-items: center; gap: 6px; color: var(--cm-muted); font-size: 12px; }
.cm-stars { --cm-p: calc(var(--cm-r) / 5 * 100%); display: inline-block; width: 70px; height: 13px; background: linear-gradient(90deg, #ffb400 var(--cm-p), #d9dde3 var(--cm-p)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 13'%3E%3Cpath d='M7 0l2.1 4.3 4.7.7-3.4 3.3.8 4.7L7 10.8 2.8 13l.8-4.7L.2 5l4.7-.7z'/%3E%3C/svg%3E") 0 0 / 14px 13px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 13'%3E%3Cpath d='M7 0l2.1 4.3 4.7.7-3.4 3.3.8 4.7L7 10.8 2.8 13l.8-4.7L.2 5l4.7-.7z'/%3E%3C/svg%3E") 0 0 / 14px 13px repeat-x; }
.cm-offer-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.cm-offer-price b { font-size: 17px; font-weight: 700; color: var(--cm-text); white-space: nowrap; }
.cm-offer-price b.cm-offer-special { color: #e53935; }
.cm-offer-price s { color: var(--cm-muted); font-size: 13px; white-space: nowrap; }
.cm-offer-sk .cm-offer-img, .cm-offer-sk i { background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%); background-size: 400% 100%; animation: cm-shimmer 1.4s ease infinite; }
.cm-offer-sk .cm-offer-info { flex: 1; }
.cm-offer-sk i { display: block; height: 11px; border-radius: 6px; }
.cm-offer-sk i:nth-child(1) { width: 90%; } .cm-offer-sk i:nth-child(2) { width: 60%; } .cm-offer-sk i:nth-child(3) { width: 40%; height: 15px; }
@keyframes cm-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .cm-offer-sk .cm-offer-img, .cm-offer-sk i { animation: none; } }
@media (max-width: 1399.98px) {
	.cm-drop { grid-template-columns: 290px minmax(0, 1fr); }
	.cm-banner { flex-basis: 220px; }
	.cm-offers { flex-basis: 260px; }
	.cm-cols { column-gap: 24px; }
}

/* ---------- Поруч зі слайдшоу на головній ---------- */
.ds-slideshow.cm-dock-host, [data-cm-dock].cm-dock-host { min-height: var(--cm-dock-h) !important; }
[data-cm-dock] { position: relative; }
.cm-drop.cm-docked {
	position: absolute; z-index: 6; top: 0; left: 0; width: 100%; height: 100%; max-height: none; display: block;
	background: none; box-shadow: none; border-radius: 0; overflow: visible; pointer-events: none; animation: none;
}
.cm-docked .cm-list {
	position: absolute; top: 0; left: 0; width: 25%; height: var(--cm-dock-h, 100%); padding: 10px; pointer-events: auto;
	background: var(--cm-bg); border: 1px solid var(--cm-line); border-radius: var(--cm-radius); box-shadow: 0 2px 14px rgba(37, 38, 39, .03);
}
.cm-docked .cm-l1-link { min-height: 38px; padding: 7px 12px; font-size: 14px; }
.cm-docked .cm-panels {
	position: absolute; top: -1px; left: calc(25% + 15px); right: -1px;
	/* Рівно у висоту списку розділів; вміст, що не влазить, переноситься в додаткові колонки (скрипт fitPanel) */
	height: var(--cm-dock-ph, calc(var(--cm-dock-h, 100%) + 2px));
	display: none; pointer-events: auto; background: var(--cm-bg); border-radius: 12px; box-shadow: 0 20px 48px rgba(15, 23, 42, .16);
}
.cm-docked.cm-show-panel .cm-panels { display: block; animation: cm-in .14s ease-out; }
/* Підгонка панелі під висоту меню: більше колонок, щільніше; за потреби без правої колонки */
.cm-fit-tight .cm-cols { column-gap: 20px; }
.cm-fit-tight .cm-group { margin-bottom: 16px; }
.cm-fit-tight .cm-group-bare { margin-bottom: 8px; }
.cm-fit-tight .cm-l2 { font-size: 15px; }
.cm-fit-tight .cm-l3 { padding: 2px 0; font-size: 13.5px; }
.cm-fit-tight .cm-panel-head { margin-bottom: 12px; }
.cm-fit-noside .cm-offers, .cm-fit-noside .cm-banner { display: none; }

/* ---------- Мобільна шторка ---------- */
.cm-m { position: fixed; inset: 0; z-index: 14100; visibility: hidden; pointer-events: none; }
.cm-m.cm-on { visibility: visible; pointer-events: auto; }
.cm-m-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); opacity: 0; transition: opacity .25s; }
.cm-m.cm-on .cm-m-backdrop { opacity: 1; }
.cm-m-sheet {
	position: absolute; top: 0; bottom: 0; left: 0; width: min(420px, 100%); display: flex; flex-direction: column;
	background: var(--cm-bg); color: var(--cm-text); transform: translateX(-100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
	box-shadow: 8px 0 32px rgba(15, 23, 42, .18);
}
.cm-m.cm-on .cm-m-sheet { transform: none; }
.cm-m-head { display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--cm-line); flex: none; }
.cm-m-head.cm-deep { padding-left: 6px; }
.cm-m-title { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: 18px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.cm-m-back, .cm-m-close {
	display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none;
	border: 0; border-radius: 12px; background: transparent; color: var(--cm-text); cursor: pointer;
}
.cm-m-close { background: var(--cm-hover); }
.cm-m-back[hidden] { display: none; }
.cm-m-back svg, .cm-m-close svg { width: 22px; height: 22px; }
.cm-m-screens { position: relative; flex: 1 1 auto; overflow: hidden; }
.cm-m-screen {
	position: absolute; inset: 0; overflow-y: auto; padding: 8px 0 calc(24px + env(safe-area-inset-bottom)); background: var(--cm-bg);
	transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.cm-m-screen.is-active { transform: none; }
.cm-m-screen.is-behind { transform: translateX(-28%); }
.cm-m-row {
	display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 10px 18px; border: 0; background: none;
	color: var(--cm-text) !important; font: inherit; font-size: 16px; font-weight: 500; line-height: 1.3; text-align: left; text-decoration: none !important; cursor: pointer;
}
.cm-m-row:active { background: var(--cm-hover); }
.cm-m-row .cm-name { flex: 1 1 auto; min-width: 0; }
.cm-m-row .cm-ico { width: 24px; height: 24px; flex-basis: 24px; }
.cm-m-row .cm-chev { margin-left: 4px; }
.cm-m-row .cm-badge { margin-left: 0; }
.cm-m-all { color: var(--cm-accent) !important; font-weight: 700; }
.cm-m-all::after { content: ''; width: 7px; height: 7px; flex: 0 0 7px; margin-left: auto; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); }
.cm-m-sep { height: 1px; margin: 6px 18px; background: var(--cm-line); }
.cm-m-banner { display: block; margin: 12px 18px 0; overflow: hidden; border-radius: 14px; }
.cm-m-banner img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; object-position: top; }
html.cm-lock, html.cm-lock body { overflow: hidden !important; }

/* ---------- Темна тема oct_deals ---------- */
.dark-theme .cm-drop, .dark-theme .cm-m {
	--cm-text: #f1f3f5; --cm-muted: #9aa1a9; --cm-line: #262626; --cm-hover: #232323; --cm-bg: #161616;
}
.dark-theme .cm-ico { color: #c4c8cd; }
.dark-theme .cm-l3 { color: #d1d5db !important; }
