/* ==========================================================================
   Shop promo ticker
   Isolated: only applies when .layout-with-shop-ticker is present.
   Ticker is position:fixed (out of flow) so padding is counted once.
   ========================================================================== */

:root {
  --mm-ticker-h: 1.85rem;
  --mm-menu-w: 16.25rem;
}

.shop-ticker {
  position: fixed;
  top: 0;
  /* Align with content column — do not cover the sidebar */
  left: var(--mm-menu-w);
  right: 0;
  z-index: 1085;
  width: auto;
  display: flex;
  justify-content: center;
  background: var(--shop-ticker-bg, linear-gradient(90deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%));
  color: var(--shop-ticker-text, #fff);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

html.layout-menu-collapsed .shop-ticker {
  left: 5.25rem;
}

@media (max-width: 1199.98px) {
  .shop-ticker,
  html.layout-menu-collapsed .shop-ticker {
    left: 0;
  }
}

.shop-ticker__lane {
  width: 70%;
  max-width: 70%;
  flex: 0 0 70%;
  overflow: hidden;
}

.shop-ticker__track {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.shop-ticker__inner {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 1.85rem;
  padding: 0.3rem 0;
  will-change: transform;
  animation: shopTickerScrollRtl var(--shop-ticker-duration, 24s) linear infinite;
}

.shop-ticker__inner--scroll {
  animation: shopTickerScrollRtl var(--shop-ticker-duration, 24s) linear infinite;
}

.shop-ticker__segment,
.shop-ticker__content {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0 2.75rem;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.shop-ticker__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  flex-shrink: 0;
}

@keyframes shopTickerScrollRtl {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(calc(-1 * var(--shop-ticker-shift, 50%)), 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-ticker__inner,
  .shop-ticker__inner--scroll {
    animation: none;
  }
  .shop-ticker__segment--clone {
    display: none !important;
  }
}

/* ---- Layout offsets: ONLY when ticker is enabled ----
   Sidebar is NOT shifted — ticker starts after the menu. */
html.layout-navbar-fixed .layout-wrapper.layout-with-shop-ticker .layout-navbar {
  top: var(--mm-ticker-h) !important;
}

html.layout-navbar-fixed .layout-wrapper.layout-with-shop-ticker:not(.layout-without-menu) .layout-page {
  padding-top: calc(78px + var(--mm-ticker-h)) !important;
}

html.layout-navbar-fixed .layout-wrapper.layout-with-shop-ticker:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: calc(78px + var(--mm-ticker-h)) !important;
}

@media (max-width: 1199.98px) {
  html.layout-navbar-fixed .layout-wrapper.layout-with-shop-ticker:not(.layout-without-menu) .layout-page,
  html.layout-navbar-fixed .layout-wrapper.layout-with-shop-ticker:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
    padding-top: calc(64px + var(--mm-ticker-h)) !important;
  }
}
