/* =====================================================================
   Magyarpolc.hu – Black Friday 2026
   ===================================================================== */

:root {
  --bf-black: #0a0a0a;
  --bf-yellow: #fee006;
  --bf-red: #fb010b;
  --bf-white: #fff;
  --bf-font: "Poppins", Arial, Helvetica, sans-serif;
  /* žluto-černé výstražné pruhy jako nahoře a dole na banneru */
  --bf-stripes: repeating-linear-gradient(-45deg, var(--bf-yellow) 0 8px, var(--bf-black) 8px 16px);
}

/* ---------- 1) Běžící proužek v horní liště ---------- */
.bf-topbar {
  position: relative;
  z-index: 3;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
  height: 44px;
  padding-bottom: 5px;
  background: var(--bf-stripes) left bottom / 100% 5px no-repeat, var(--bf-black);
  color: var(--bf-white);
  text-decoration: none;
}
.bf-topbar:hover,
.bf-topbar:focus,
.bf-topbar:visited { color: var(--bf-white); text-decoration: none; }
.bf-topbar:focus-visible { outline: 2px solid var(--bf-yellow); outline-offset: -4px; }

.bf-topbar__track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: bf-topbar-run var(--bf-speed, 60s) linear infinite;
}
.bf-topbar:hover .bf-topbar__track,
.bf-topbar:focus-visible .bf-topbar__track { animation-play-state: paused; }

.bf-topbar__set {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 100%;
}

.bf-topbar__item {
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  font-family: var(--bf-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* oddělovač – malý žlutý čtvereček (žlutá z banneru) */
.bf-topbar__item::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 44px;
  background: var(--bf-yellow);
}

/* „BLACK“ bíle, „FRIDAY“ žlutě – jako nadpis banneru */
.bf-topbar__item--title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}
.bf-topbar__accent { color: var(--bf-yellow); font-weight: 700; }

/* kód jako červený šikmý štítek „KÓD BF10“ na banneru */
.bf-topbar__code {
  display: inline-block;
  margin-left: 10px;
  padding: 5px 9px;
  border-radius: 3px;
  background: var(--bf-red);
  color: var(--bf-white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  transform: rotate(-3deg);
}

@keyframes bf-topbar-run {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* Bez animace (uživatel má v systému omezený pohyb): jedna statická sada na střed */
@media (prefers-reduced-motion: reduce) {
  .bf-topbar__track { width: 100%; justify-content: center; animation: none; }
  .bf-topbar__set + .bf-topbar__set,
  .bf-topbar__set .bf-topbar__item:nth-child(n + 5) { display: none; }
  .bf-topbar__set .bf-topbar__item:nth-child(4)::after { display: none; }
}

@media (max-width: 767px) {
  /* na mobilu bez výstražných pruhů dole */
  .bf-topbar { height: 34px; padding-bottom: 0; background: var(--bf-black); }
  /* odstup lišty od bannerů na HP – stejná mezera jako mezi bannery (12px) */
  .in-index #content > .banners-row:first-child { padding-top: 12px; }
  .bf-topbar__item { padding: 0 14px; font-size: 12px; }
  .bf-topbar__item::after { margin-left: 28px; width: 5px; height: 5px; }
  .bf-topbar__item--title { font-size: 13px; }
  .bf-topbar__code { padding: 4px 6px; font-size: 12px; }
}

/* ---------- 2) Informační štítek vlevo dole (Shoptet .site-msg) ---------- */
/* Třídu .bf-msg přidá bf.js, jen když text hlášky mluví o Black Friday / obsahuje kód. */
.site-msg.bf-msg { border-left: 4px solid var(--bf-red); }
.site-msg.bf-msg .bf-msg__link,
.site-msg.bf-msg .bf-msg__link:hover,
.site-msg.bf-msg .bf-msg__link:visited { color: inherit; text-decoration: none; }
.site-msg.bf-msg .bf-msg__code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bf-red);
  color: var(--bf-white);
  font-family: var(--bf-font);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.2;
  white-space: nowrap;
}