.source-bottom-nav {
  position: relative;
  z-index: 30;
  display: flex;
  flex: 0 0 96px;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  height: 96px;
  margin-top: -96px;
  padding: 0 12px max(12px, env(safe-area-inset-bottom));
  pointer-events: none;
  transition: transform 300ms ease-out, opacity 200ms ease-out, visibility 0s;
}
.source-bottom-nav__nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
  height: 56px;
  padding: 0 6px;
  border-radius: 40px;
  background: rgb(255 255 255 / 80%);
  box-shadow: 0 8px 32px rgb(0 0 0 / 12%), 0 0 0 1px rgb(0 0 0 / 5%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
}
.source-bottom-nav__item,
.source-bottom-nav__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 40px;
  background: transparent;
  color: var(--color-muted);
  font: 700 13px/20px EcommerceManrope, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}
.source-bottom-nav__item svg,
.source-bottom-nav__cart svg { flex-shrink: 0; }
.source-bottom-nav__item span { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-bottom-nav__item.is-active {
  flex-shrink: 0;
  padding-inline: 14px;
  /* стандарт «Виділення»: світла — відтінок + колір закладу; темна — колір закладу 40% на #1c1c1e, текст білий */
  background: var(--color-accent-tint, var(--primary-background-color));
  color: var(--color-accent-strong, var(--primary-color));
}
.source-bottom-nav__item.is-active span { display: inline; }
.source-bottom-nav__item.is-active .source-bottom-nav__primary-labels { display: grid; }
.source-bottom-nav__primary-labels > span { grid-area: 1 / 1; transition: opacity 140ms ease, transform 140ms ease; }
.source-bottom-nav__primary-labels > .is-inactive { opacity: 0; transform: translateY(3px); }
.source-bottom-nav__primary-icon { transition: transform 140ms ease; }
.source-bottom-nav__item.is-scroll-top .source-bottom-nav__primary-icon { transform: rotate(-90deg); }
.source-bottom-nav__cart {
  flex: 0 1 auto;
  max-width: 48%;
  height: 56px;
  padding-inline: 14px;
  gap: 8px;
  background: var(--primary-color);
  color: var(--color-on-accent, #fff);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 32px rgb(0 0 0 / 12%);
}
.source-bottom-nav__cart span { overflow-wrap: anywhere; }
.source-bottom-nav__cart { transition: transform 200ms ease-out, opacity 200ms ease-out; }
.source-cart-reveal-enter-active, .source-cart-reveal-leave-active { transition: transform 200ms ease-out, opacity 200ms ease-out; }
.source-cart-reveal-enter-from, .source-cart-reveal-leave-to { transform: translateY(16px); opacity: 0; }
.source-bottom-nav__cart.is-pulsing { animation: source-cart-pulse 500ms ease-out; }
@keyframes source-cart-pulse { 50% { transform: scale(1.04); } }
.source-bottom-nav :is(button, a):focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
@media (max-width: 429.98px) { .source-bottom-nav.has-cart .source-bottom-nav__item.is-active span { display: none; } .source-bottom-nav.has-cart .source-bottom-nav__item:not(.is-active) { padding-inline: 6px; } }
@media (max-width: 359.98px) { .source-bottom-nav.has-cart .source-bottom-nav__item:not(.is-active) { padding-inline: 5px; } .source-bottom-nav__cart { max-width: 43%; padding-inline: 10px; } }
@media (min-width: 768px) { .source-bottom-nav__nav { display: none; } }
@media (min-width: 1024px) { .source-bottom-nav { display: none; } }
@media (prefers-reduced-motion: reduce) { .source-bottom-nav, .source-bottom-nav * { transition: none !important; animation: none !important; } }
[data-theme="dark"] .source-bottom-nav__nav { background: rgb(41 41 45 / 85%); box-shadow: 0 8px 32px rgb(0 0 0 / 30%), 0 0 0 1px var(--color-border); }
[data-theme="dark"] .source-bottom-nav__item.is-active { background: color-mix(in oklab, var(--primary-color) 40%, #1c1c1e); color: #fff; }
/* Нижня панель — скло, як кнопки шапки й iOS: прозоріше тло, сильне розмиття, світлий відблиск зверху й тонка світла обвідка */
.source-bottom-nav__nav { background: linear-gradient(180deg, rgb(255 255 255 / 72%), rgb(255 255 255 / 55%)) !important; -webkit-backdrop-filter: blur(24px) saturate(200%); backdrop-filter: blur(24px) saturate(200%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%), inset 0 0 0 1px rgb(22 21 26 / 8%), 0 8px 32px rgb(22 21 26 / 16%) !important; }
[data-theme="dark"] .source-bottom-nav__nav { background: linear-gradient(180deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 4%)), rgb(28 28 30 / 55%) !important; box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), inset 0 0 0 1px rgb(255 255 255 / 12%), 0 8px 32px rgb(0 0 0 / 40%) !important; }
/* Кнопка кошика — колір закладу лишається, обвідка як скло: світлий відблиск зверху, тонкий світлий край, легкий світлий градієнт поверх кольору */
.source-bottom-nav__cart { background-image: linear-gradient(180deg, rgb(255 255 255 / 18%), rgb(255 255 255 / 0%) 60%) !important; box-shadow: inset 0 1px 0 rgb(255 255 255 / 35%), inset 0 0 0 1px rgb(255 255 255 / 20%), 0 8px 24px rgb(22 21 26 / 22%) !important; }
[data-theme="dark"] .source-bottom-nav__cart { box-shadow: inset 0 1px 0 rgb(255 255 255 / 32%), inset 0 0 0 1px rgb(255 255 255 / 18%), 0 8px 28px rgb(0 0 0 / 45%) !important; }
/* Додали перший товар: кошик плавно виростає справа, панель меню плавно звужується (замість стрибка), підпис «Меню» плавно ховається */
.source-cart-reveal-enter-active, .source-cart-reveal-leave-active { overflow: hidden; transition: max-width 360ms cubic-bezier(.2, .8, .2, 1), padding 360ms cubic-bezier(.2, .8, .2, 1), opacity 240ms ease-out, transform 360ms cubic-bezier(.34, 1.4, .64, 1) !important; }
.source-cart-reveal-enter-from, .source-cart-reveal-leave-to { max-width: 0 !important; padding-inline: 0 !important; opacity: 0; transform: scale(.7) !important; }
.source-bottom-nav__cart span { white-space: nowrap; }
.source-bottom-nav__item.is-active { transition: gap 360ms ease, padding 360ms ease; }
.source-bottom-nav__item.is-active .source-bottom-nav__primary-labels { max-width: 120px; overflow: hidden; transition: max-width 360ms cubic-bezier(.2, .8, .2, 1), opacity 200ms ease; }
@media (max-width: 429.98px) {
  .source-bottom-nav.has-cart .source-bottom-nav__item.is-active { gap: 0; }
  .source-bottom-nav.has-cart .source-bottom-nav__item.is-active .source-bottom-nav__primary-labels { display: grid; max-width: 0; opacity: 0; }
  .source-bottom-nav.has-cart .source-bottom-nav__item.is-active .source-bottom-nav__primary-labels span { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .source-bottom-nav :is(.source-cart-reveal-enter-active, .source-cart-reveal-leave-active, .source-bottom-nav__item, .source-bottom-nav__primary-labels) { transition: none !important; } }

/* сума кошика чекає на сервер після «− N +» — лоадер на її місці, ширина кнопки та сама (нижня панель і кнопка кошика в шапці) */
.source-cart-sum { position: relative; display: inline-grid; place-items: center; }
.source-cart-sum.is-syncing > span:first-child { visibility: hidden; }
.source-cart-sum__spinner { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; box-sizing: border-box; animation: source-cart-spin .7s linear infinite; }
@keyframes source-cart-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .source-cart-sum__spinner { animation-duration: 1.6s; } }

/* Телефон: гортається вся сторінка (services/pageScroll.js) — нижнє меню з кошиком липне до низу екрана, а не стоїть у кінці каталогу (Сергій 16.11) */
@media (max-width: 1023.98px) {
  .source-bottom-nav:not(.ec-server-bottom-nav) { position: sticky !important; bottom: 0; }
}
/* лічильник обраного на серці — як у шапці (кружок 18, колір закладу) */
.source-bottom-nav__item { position: relative; }
.source-bottom-nav__count { position: absolute; top: 2px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; display: grid; place-items: center; border-radius: 9px; background: var(--primary-color); color: var(--secondary-color, #fff); font: 700 11px/1 'EcommerceManrope', sans-serif; font-style: normal; pointer-events: none; }
