/**
 * Globální hlavička / menu — shortcode [ftp_header]
 *
 * Desktop: logo + odkazy vlevo, košík / Příprava / přihlášení vpravo.
 * Mobil (combo / priority+): Příprava a košík zůstanou v liště,
 * Přijímačky, Kontakty a účet jdou do listu pod lištou.
 *
 * Soubory na FTP:
 *   wp-content/ftp-html-pages/header.html
 *   wp-content/ftp-html-pages/header.css
 */

/* —— Oxygen obaly: full-width, sticky, bez 1280px boxu —— */

.ct-shortcode:has(> .ftp-header),
.oxy-header-container:has(.ftp-header),
.oxy-header-wrapper:has(.ftp-header),
.ct-section:has(.ftp-header) > .ct-section-inner-wrap {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: stretch;
  overflow: visible !important;
}

.oxy-header-wrapper:has(.ftp-header),
.oxy-header-container:has(.ftp-header),
.ct-section:has(.ftp-header) {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible !important;
  transition: transform 0.28s ease;
}

.oxy-header-wrapper:has(.ftp-header.is-scrolled-away),
.oxy-header-container:has(.ftp-header.is-scrolled-away),
.ct-section:has(.ftp-header.is-scrolled-away) {
  transform: translateY(-100%);
}

.ftp-header {
  --fh-pink: #ee3293;
  --fh-pink-dark: #bb2673;
  --fh-blue: #30a9e0;
  --fh-blue-dark: #1e7fb0;
  --fh-green: #68b340;
  --fh-ink: #09202c;
  --fh-muted: rgba(9, 32, 44, 0.08);
  --fh-line: rgba(9, 32, 44, 0.1);
  --fh-max: 1280px;
  --fh-bar-h: 64px;
  --fh-font: "Poppins", "Nunito", Verdana, sans-serif;

  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  font-family: var(--fh-font);
  color: var(--fh-ink);
  box-sizing: border-box;
  transition: transform 0.28s ease;
}

.ftp-header.is-scrolled-away {
  transform: translateY(-100%);
}

.ftp-header *,
.ftp-header *::before,
.ftp-header *::after {
  box-sizing: border-box;
}

.ftp-header__skip {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--fh-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.ftp-header__skip:focus {
  transform: translateY(0);
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ftp-header__bar {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--fh-line);
  backdrop-filter: blur(12px);
}

.ftp-header.is-stuck .ftp-header__bar,
.ftp-header.is-scrolled .ftp-header__bar {
  box-shadow: 0 8px 24px rgba(9, 32, 44, 0.08);
}

.ftp-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--fh-max);
  min-height: var(--fh-bar-h);
  margin: 0 auto;
  padding: 0 28px;
}

.ftp-header__logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  order: 0;
  width: 131px;
  text-decoration: none;
}

.ftp-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.ftp-header__panel {
  display: contents;
}

.ftp-header__nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  order: 1;
  min-width: 0;
  padding-right: 12px;
}

.ftp-header__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ftp-header__list > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ftp-header__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 4px 8px 2px;
  border: 0;
  border-radius: 0;
  background: none;
  color: #5a6b74;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.ftp-header__link:hover,
.ftp-header__link:focus-visible,
.ftp-header__dropdown.is-open .ftp-header__link {
  color: #3d4d55;
  text-decoration: none;
  outline: none;
}

.ftp-header__link:focus-visible {
  box-shadow: 0 2px 0 0 var(--fh-pink);
}

.ftp-header__dropdown {
  position: relative;
}

.ftp-header__chevron {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--fh-pink);
  transition: transform 0.22s ease;
}

.ftp-header__dropdown.is-open .ftp-header__chevron,
.ftp-header__dropdown-toggle[aria-expanded="true"] .ftp-header__chevron {
  transform: rotate(180deg);
}

.ftp-header__dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--fh-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(9, 32, 44, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  visibility: hidden;
}

.ftp-header__dropdown-panel > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ftp-header__dropdown.is-open .ftp-header__dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

@media (min-width: 992px) {
  .ftp-header__dropdown:focus-within .ftp-header__dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }
}

.ftp-header__drop-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--fh-ink);
  text-decoration: none;
}

.ftp-header__drop-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ftp-header__drop-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.ftp-header__drop-link:hover,
.ftp-header__drop-link:focus-visible {
  background-color: rgba(9, 32, 44, 0.04);
  text-decoration: none;
  outline: none;
}

.ftp-header__drop-link[aria-current="page"] {
  background-color: rgba(9, 32, 44, 0.05);
}

.ftp-header__drop-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.ftp-header__drop-hint {
  color: rgba(9, 32, 44, 0.62);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.ftp-header__drop-link--osp {
  color: var(--fh-pink);
}

.ftp-header__drop-link--zsv {
  color: var(--fh-blue);
}

.ftp-header__drop-link--tsp {
  color: var(--fh-green);
}

.ftp-header__drop-link--jine {
  color: var(--fh-ink);
}

.ftp-header__drop-link--jine .ftp-header__drop-title {
  font-weight: 600;
}

.ftp-header__actions,
.ftp-header__tools {
  display: contents;
}

.ftp-header__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  order: 2;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--fh-pink);
  line-height: 0;
}

.ftp-header__icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.ftp-header__cart img {
  display: block;
  width: 25px;
  height: 25px;
}

.ftp-header__icon:hover,
.ftp-header__icon:focus-visible {
  background: rgba(238, 50, 147, 0.08);
  color: var(--fh-pink-dark);
  outline: none;
}

.ftp-header__cart:hover img,
.ftp-header__cart:focus-visible img {
  filter: brightness(0.7);
}

.ftp-header__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  order: 3;
  min-width: 44px;
  height: 38px;
  margin: 0;
  padding: 0 22px;
  background: var(--fh-blue);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 0 0 var(--fh-blue-dark);
  color: #fff;
  cursor: pointer;
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.7px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: filter 0.15s ease, transform 0.05s ease, box-shadow 0.05s ease;
  white-space: nowrap;
}

body.logged-in .ftp-header__cta,
.ftp-header.is-logged-in .ftp-header__cta {
  display: none;
}

.ftp-header__cta,
.ftp-header__cta:link,
.ftp-header__cta:visited {
  color: #fff;
}

.ftp-header__cta:hover,
.ftp-header__cta:focus-visible {
  background: var(--fh-blue);
  color: #fff;
  filter: brightness(1.06);
  text-decoration: none;
  outline: none;
}

.ftp-header__cta:focus-visible {
  box-shadow: 0 4px 0 0 var(--fh-blue-dark), 0 0 0 3px rgba(48, 169, 224, 0.35);
}

.ftp-header__cta:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 0 var(--fh-blue-dark);
}

.ftp-header__login {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  order: 4;
}

.ftp-header__login .ftp-dynamic-login {
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
}

.ftp-header__burger {
  display: none;
  order: 5;
}

.ftp-header__backdrop {
  display: none;
}

body.ftp-header-menu-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .ftp-header {
    --fh-bar-h: 58px;
  }

  .ftp-header__inner {
    position: relative;
    z-index: 2;
    gap: 8px;
    padding: 0 16px;
  }

  .ftp-header__logo {
    width: 118px;
  }

  .ftp-header__panel {
    display: flex;
    position: absolute;
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    z-index: 20;
    flex-direction: column;
    gap: 14px;
    max-height: min(78vh, 560px);
    padding: 10px 12px 16px;
    overflow: hidden auto;
    border: 1px solid var(--fh-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(9, 32, 44, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    visibility: hidden;
  }

  .ftp-header.is-mobile-open .ftp-header__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .ftp-header__nav,
  .ftp-header__list,
  .ftp-header__dropdown {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    padding-right: 0;
  }

  .ftp-header__list {
    gap: 2px;
  }

  /* Mobil: testy rovnou v seznamu, bez accordion řádku */
  .ftp-header__dropdown-toggle {
    display: none;
  }

  .ftp-header__dropdown-panel {
    position: static;
    left: auto;
    right: auto;
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .ftp-header__drop-link {
    min-height: 52px;
    padding: 10px 8px;
  }

  .ftp-header__drop-dot {
    margin-top: 7px;
  }

  .ftp-header__tools {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
  }

  .ftp-header__actions {
    display: flex;
    flex-direction: column;
    order: 3;
    gap: 10px;
    width: 100%;
    padding-top: 4px;
  }

  .ftp-header__cta,
  .ftp-header__login {
    width: 100%;
    margin: 0;
  }

  .ftp-header__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    font-size: 13px;
  }

  .ftp-header__login .ftp-dynamic-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    line-height: 44px;
  }

  .ftp-header__burger {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--fh-ink);
    cursor: pointer;
  }

  .ftp-header__burger:hover,
  .ftp-header__burger:focus-visible {
    background: rgba(238, 50, 147, 0.08);
    outline: none;
  }

  .ftp-header__burger-bars,
  .ftp-header__burger-bars::before,
  .ftp-header__burger-bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--fh-pink);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .ftp-header__burger-bars {
    position: relative;
  }

  .ftp-header__burger-bars::before,
  .ftp-header__burger-bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .ftp-header__burger-bars::before {
    transform: translateY(-6px);
  }

  .ftp-header__burger-bars::after {
    transform: translateY(6px);
  }

  .ftp-header.is-mobile-open .ftp-header__burger-bars {
    background: transparent;
  }

  .ftp-header.is-mobile-open .ftp-header__burger-bars::before {
    transform: rotate(45deg);
  }

  .ftp-header.is-mobile-open .ftp-header__burger-bars::after {
    transform: rotate(-45deg);
  }

  .ftp-header__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(9, 32, 44, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .ftp-header.is-mobile-open .ftp-header__backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 379px) {
  .ftp-header__logo {
    width: 104px;
  }

  .ftp-header__cta {
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ftp-header,
  .oxy-header-wrapper:has(.ftp-header),
  .oxy-header-container:has(.ftp-header),
  .ct-section:has(.ftp-header),
  .ftp-header__dropdown-panel,
  .ftp-header__chevron,
  .ftp-header__panel,
  .ftp-header__backdrop,
  .ftp-header__burger-bars,
  .ftp-header__burger-bars::before,
  .ftp-header__burger-bars::after {
    transition: none;
  }
}
