/* SAPAMEFA V9.4 — canonical global shell system. */
.sapamefa-header {
  position: sticky;
  top: 0;
  z-index: var(--smf-z-header);
  color: var(--smf-color-white);
  background: var(--smf-surface-header);
  border-bottom: var(--smf-border-width-hairline) solid var(--smf-color-white-08);
  
  backdrop-filter: blur(14px);
}

/* The production topbar intentionally adopts the dimensions and colour of the former preview bar. */
.sapamefa-topbar {
  background: var(--smf-color-topbar);
  border-bottom: var(--smf-border-width-hairline) solid var(--smf-color-white-08);
  
}
.sapamefa-topbar__inner {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto minmax(112px, 1fr);
  align-items: center;
  width: 100%;
  min-height: var(--smf-height-topbar);
  margin: 0;
  padding: 6px 14px;
}
.sapamefa-topbar__contact {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 28px;
  min-width: 0;
  text-align: center;
}
.sapamefa-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: var(--smf-space-2);
  color: var(--smf-color-on-dark);
  font-size: var(--smf-type-meta-size);
  font-weight: var(--smf-font-weight-regular);
  line-height: var(--smf-type-meta-line);
  white-space: nowrap;
  transition: color var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-topbar__item .sapamefa-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--smf-color-bright);
}
.sapamefa-topbar__item:hover,
.sapamefa-topbar__item:focus-visible {
  color: var(--smf-color-bright);
  outline: none;
}
.sapamefa-preview-controls {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: var(--smf-space-2);
}
.sapamefa-preview-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  border: var(--smf-border-width-hairline) solid var(--smf-color-white-24);
  border-radius: var(--smf-radius-small);
  background: var(--smf-color-white-08);
  color: var(--smf-color-white-82);
  cursor: pointer;
  transition:background var(--smf-motion-fast) var(--smf-ease-standard), border-color var(--smf-motion-fast) var(--smf-ease-standard), color var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-preview-control:hover,
.sapamefa-preview-control:focus-visible {
  color: var(--smf-color-white);
  background: var(--smf-color-bright-18);
  border-color: var(--smf-color-bright-72);
  outline: var(--smf-border-width-strong) solid var(--smf-color-bright-50);
  outline-offset: 2px;
}
.sapamefa-preview-control[aria-pressed="true"] {
  color: var(--smf-color-dark);
  background: var(--smf-color-bright);
  border-color: var(--smf-color-bright);
  
}
.sapamefa-preview-control svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* Mobile and tablet: logo, menu toggle and language selector share one row. */
.sapamefa-header__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "logo toggle language";
  align-items: center;
  gap: 10px;
  width: min(var(--smf-container-shell), 100%);
  min-height: var(--smf-height-header-mobile);
  margin: auto;
  padding: 11px 18px;
}
.sapamefa-header__logo {
  grid-area: logo;
  justify-self: start;
  display: inline-flex;
  min-width: 0;
  line-height: 0;
}
.sapamefa-header__logo img {
  display: block;
  width: 138px;
  max-width: 43vw;
  height: auto;
  object-fit: contain;
}
.sapamefa-header__nav {
  display: none;
  grid-area: nav;
  align-items: center;
  min-width: 0;
}
.sapamefa-header__link,
.sapamefa-product-navigation__trigger {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--smf-color-white-82);
  font-size: var(--smf-font-size-sm);
  font-weight: var(--smf-font-weight-semibold);
  line-height: var(--smf-line-title);
  letter-spacing: var(--smf-tracking-control);
  white-space: nowrap;
  transition: color var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-header__link:hover,
.sapamefa-header__link:focus-visible,
.sapamefa-header__link.is-current,
.sapamefa-product-navigation__trigger:hover,
.sapamefa-product-navigation__trigger:focus-visible,
.sapamefa-product-navigation__trigger.is-current {
  color: var(--smf-color-bright);
}
.sapamefa-header__link.is-current,
.sapamefa-product-navigation__trigger.is-current {
  border-bottom: var(--smf-border-width-strong) solid var(--smf-color-bright);
}
.sapamefa-header__search {
  grid-area: search;
  display: none !important;
}
.sapamefa-header__toggle {
  grid-area: toggle;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--smf-color-white);
  border: var(--smf-border-width-hairline) solid var(--smf-color-white-14);
  border-radius: var(--smf-radius-control);
  background: var(--smf-color-white-08);
}
.sapamefa-language {
  grid-area: language;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: calc(var(--smf-touch-target) + 2px);
  padding: 1px 5px;
  border: var(--smf-border-width-hairline) solid var(--smf-color-white-08);
  border-radius: var(--smf-radius-pill);
  background: var(--smf-color-white-08);
  font-size: var(--smf-font-size-xs);
}
.sapamefa-language span {
  flex: 0 0 auto;
  color: var(--smf-color-white-24);
  line-height: 1;
}
.sapamefa-language button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--smf-touch-target);
  min-height: var(--smf-touch-target);
  padding: 0 var(--smf-space-2);
  border: 0;
  background: var(--smf-color-transparent);
  color: var(--smf-color-white-68);
}
.sapamefa-language button:hover,
.sapamefa-language button.is-active {
  color: var(--smf-color-bright);
  font-weight: var(--smf-font-weight-bold);
}
.sapamefa-header__mobile {
  border-top: var(--smf-border-width-hairline) solid var(--smf-color-white-08);
  background: var(--smf-color-deep);
}
.sapamefa-header__mobile-inner {
  display: flex;
  flex-direction: column;
  width: min(var(--smf-container-shell), 100%);
  margin: auto;
  padding: var(--smf-space-2) var(--smf-space-5) 18px;
}
.sapamefa-header__mobile-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 9px 0 9px var(--smf-space-3);
  border-bottom: var(--smf-border-width-hairline) solid var(--smf-color-white-08);
  border-left: var(--smf-border-width-strong) solid transparent;
  color: var(--smf-color-white-82);
  font-size: var(--smf-font-size-sm);
  font-weight: var(--smf-font-weight-semibold);
  line-height: var(--smf-line-title);
  letter-spacing: var(--smf-tracking-control);
}
.sapamefa-header__mobile-link.is-current {
  color: var(--smf-color-bright);
  font-weight: var(--smf-font-weight-bold);
  border-left-color: var(--smf-color-bright);
}

.sapamefa-menu-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 210px;
  height: var(--smf-height-topbar);
}
.sapamefa-menu-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.sapamefa-menu-search input {
  width: 100%;
  height: 100%;
  padding: 0 42px 0 14px;
  border: var(--smf-border-width-hairline) solid var(--smf-color-white-14);
  border-radius: var(--smf-radius-control);
  background: var(--smf-color-white-08);
  color: var(--smf-color-white);
  font-size: var(--smf-font-size-xs);
  outline: 0;
}
.sapamefa-menu-search input::placeholder { color: var(--smf-color-white-68); }
.sapamefa-menu-search input:focus {
  border-color: var(--smf-color-bright-72);
  outline: 0;
  box-shadow: none;
}
.sapamefa-menu-search button {
  position: absolute;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--smf-radius-small);
  background: var(--smf-color-transparent);
  color: var(--smf-color-bright);
}
.sapamefa-menu-search--mobile,
.sapamefa-header__mobile-search {
  width: 100%;
  min-width: 0;
  margin-top: var(--smf-space-3);
}

/* Component-only breakpoint: topbar controls need to tighten before the global tablet cutover. */
@media (max-width: 900px) {
  .sapamefa-topbar__inner {
    grid-template-columns: minmax(96px, 1fr) auto minmax(96px, 1fr);
    padding: 6px 10px;
  }
  .sapamefa-topbar__contact { gap: 5px 14px; }
  .sapamefa-topbar__item { font-size: var(--smf-font-size-2xs); }
  .sapamefa-preview-controls { gap: 6px; }
}

@media (max-width: 639px) {
  .sapamefa-topbar__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    min-height: var(--smf-height-topbar);
    padding: 6px var(--smf-space-2);
  }
  .sapamefa-topbar__contact { gap: var(--smf-space-1) 10px; }
  .sapamefa-topbar__item { font-size: var(--smf-font-size-2xs); }
  .sapamefa-topbar__item:nth-child(3) { display: none; }
  .sapamefa-preview-control { width: 30px; height: 27px; }
  .sapamefa-preview-control svg { width: 17px; height: 17px; }
  .sapamefa-header__inner { padding: 10px 14px; }
  .sapamefa-header__logo img { width: 132px; max-width: 40vw; }
  .sapamefa-language { padding-inline: var(--smf-space-1); font-size: var(--smf-font-size-2xs); }
}

@media (min-width: 768px) {
  .sapamefa-header__inner {
    min-height: var(--smf-height-header-tablet);
    padding: var(--smf-space-3) var(--smf-space-6);
  }
  .sapamefa-header__logo img { width: 174px; max-width: 34vw; }
  .sapamefa-header__toggle { width: 42px; height: 42px; }
}

/* The complete desktop navigation starts only when all items fit on one line. */
@media (min-width: 1180px) {
  .sapamefa-header__inner {
    grid-template-columns: auto minmax(0, 1fr) minmax(210px, 224px) auto;
    grid-template-areas: "logo nav search language";
    column-gap: 18px;
    min-height: var(--smf-height-header-desktop);
    padding: 14px var(--smf-space-6);
  }
  .sapamefa-header__logo { align-self: center; }
  .sapamefa-header__logo img { width: 176px; max-width: 18vw; }
  .sapamefa-header__nav {
    display: flex;
    justify-content: center;
    justify-self: stretch;
    gap: clamp(14px, 1.55vw, 25px);
  }
  .sapamefa-header__search {
    display: flex !important;
    justify-self: end;
    width: 100%;
  }
  .sapamefa-header__toggle { display: none; }
  .sapamefa-language { justify-self: end; }
  .sapamefa-header__mobile { display: none !important; }
}

@media (min-width: 1320px) {
  .sapamefa-header__inner { column-gap: 22px; }
  .sapamefa-header__logo img { width: 190px; }
  .sapamefa-header__nav { gap: 28px; }
}

/* ---------- V9.4 canonical shell accessibility and state ---------- */
.sapamefa-skip-link {
  position: fixed;
  inset: var(--smf-space-2) auto auto var(--smf-space-2);
  z-index: calc(var(--smf-z-header) + 20);
  padding: var(--smf-space-3) var(--smf-space-4);
  border-radius: var(--smf-radius-control);
  background: var(--smf-color-white);
  color: var(--smf-color-deep);
  font-size: var(--smf-font-size-xs);
  font-weight: var(--smf-font-weight-bold);
  line-height: var(--smf-line-title);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--smf-space-4)));
  transition: transform var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-skip-link:focus { transform: translateY(0); }
html.sapamefa-menu-open,
html.sapamefa-menu-open body { overflow: hidden; }
.sapamefa-header__mobile-nav { display: flex; flex-direction: column; }
.sapamefa-header__toggle:focus-visible,
.sapamefa-language button:focus-visible,
.sapamefa-menu-search button:focus-visible {
  outline: var(--smf-focus-ring-soft);
  outline-offset: var(--smf-focus-offset);
}
.sapamefa-menu-search input:focus-visible {
  border-color: var(--smf-color-bright-72);
  outline: 0;
  outline-offset: 0;
  box-shadow: none;
}
.sapamefa-header__mobile[hidden] { display: none; }
.sapamefa-header__mobile:not([hidden]) { max-height: calc(100dvh - var(--smf-height-header-mobile)); overflow-y: auto; overscroll-behavior: contain; }

/* ---------- V9.4 canonical product navigation ---------- */
.sapamefa-product-navigation {
  position: static;
  display: flex;
  align-items: center;
  align-self: stretch;
  padding-block: 10px 14px;
  margin-block: -10px -14px;
}
.sapamefa-product-navigation__trigger { gap: .35rem; }
.sapamefa-product-navigation__icon {
  font-size: var(--smf-font-size-2xs);
  transition: transform var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-product-navigation:hover .sapamefa-product-navigation__icon,
.sapamefa-product-navigation:focus-within .sapamefa-product-navigation__icon,
.sapamefa-product-navigation.is-open .sapamefa-product-navigation__icon { transform: rotate(180deg); }
.sapamefa-mega-menu {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  z-index: calc(var(--smf-z-header) + 1);
  display: none;
  width: min(1080px, calc(100vw - var(--smf-gutter)));
  padding: 18px 22px;
  border: var(--smf-border-width-hairline) solid var(--smf-color-white-24);
  border-radius: var(--smf-radius-card);
  background: var(--smf-gradient-brand-down);
  transform: translateX(-50%);
  isolation: isolate;
}
.sapamefa-mega-menu::before { content: ""; position: absolute; inset: -24px 0 auto; height: 24px; }
.sapamefa-product-navigation:hover .sapamefa-mega-menu,
.sapamefa-product-navigation:focus-within .sapamefa-mega-menu,
.sapamefa-product-navigation.is-open .sapamefa-mega-menu { display: block; }
.sapamefa-mega-menu__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--smf-space-6) 34px; }
.sapamefa-mega-menu__card { display: flex; flex-direction: column; min-width: 0; padding: var(--smf-space-1) 2px var(--smf-space-2); }
.sapamefa-mega-menu__title {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  min-height: 34px;
  color: var(--smf-color-white);
  font-size: var(--smf-type-sm);
  font-weight: var(--smf-font-weight-semibold);
  line-height: var(--smf-line-title);
  letter-spacing: var(--smf-tracking-control);
  text-transform: uppercase;
  transition: color var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-mega-menu__title > span:first-child {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.sapamefa-mega-menu__title-arrow {
  flex: 0 0 auto;
  color: currentColor;
  transition: transform var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-mega-menu__title:hover,
.sapamefa-mega-menu__title:focus-visible {
  color: var(--smf-color-accent-on-dark);
}
.sapamefa-mega-menu__title:hover .sapamefa-mega-menu__title-arrow,
.sapamefa-mega-menu__title:focus-visible .sapamefa-mega-menu__title-arrow {
  transform: translateX(3px);
}
.sapamefa-mega-menu__links { display: grid; margin-top: 7px; }
.sapamefa-mega-menu__link {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 0;
  color: var(--smf-color-on-dark);
  font-size: var(--smf-type-sm);
  font-weight: var(--smf-font-weight-medium);
  letter-spacing: var(--smf-tracking-control);
  line-height: var(--smf-line-title);
  transition: color var(--smf-motion-fast) var(--smf-ease-standard), padding-left var(--smf-motion-fast) var(--smf-ease-standard), background var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-mega-menu__link + .sapamefa-mega-menu__link { border-top: var(--smf-border-width-hairline) solid var(--smf-color-bright-18); }
.sapamefa-mega-menu__link:last-child { border-bottom: var(--smf-border-width-hairline) solid var(--smf-color-bright-18); }
.sapamefa-mega-menu__link:hover,
.sapamefa-mega-menu__link:focus-visible {
  padding-left: 6px;
  color: var(--smf-color-accent-on-dark);
  background: var(--smf-color-white-08);
}
.sapamefa-mobile-products { border-bottom: var(--smf-border-width-hairline) solid var(--smf-color-white-08); }
.sapamefa-mobile-products__trigger,
.sapamefa-mobile-product-group__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 9px 0;
  border: 0;
  background: var(--smf-color-transparent);
  color: var(--smf-color-white-82);
  font-size: var(--smf-font-size-sm);
  font-weight: var(--smf-font-weight-semibold);
  line-height: var(--smf-line-title);
  letter-spacing: var(--smf-tracking-control);
  text-align: left;
}
.sapamefa-mobile-products__trigger.is-current,
.sapamefa-mobile-products__trigger:hover,
.sapamefa-mobile-products__trigger:focus-visible,
.sapamefa-mobile-product-group__trigger:hover,
.sapamefa-mobile-product-group__trigger:focus-visible,
.sapamefa-mobile-product-group__trigger[aria-expanded="true"] { color: var(--smf-color-bright); }
.sapamefa-mobile-products__trigger > i,
.sapamefa-mobile-product-group__icon {
  font-size: var(--smf-font-size-2xs);
  transition: transform var(--smf-motion-fast) var(--smf-ease-standard);
}
.sapamefa-mobile-products__trigger[aria-expanded="true"] > i,
.sapamefa-mobile-product-group__trigger[aria-expanded="true"] .sapamefa-mobile-product-group__icon { transform: rotate(180deg); }
.sapamefa-mobile-products__shell { margin: 0 0 var(--smf-space-2); padding: var(--smf-space-1) var(--smf-space-2); background: var(--smf-color-white-08); }
.sapamefa-mobile-product-group + .sapamefa-mobile-product-group { border-top: var(--smf-border-width-hairline) solid var(--smf-color-white-08); }
.sapamefa-mobile-product-group__panel { padding: 0 var(--smf-space-2) 10px 14px; }
.sapamefa-mobile-product-child,
.sapamefa-mobile-product-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 7px 10px;
  color: var(--smf-color-white-68);
  font-size: var(--smf-type-sm);
  line-height: var(--smf-line-title);
}
.sapamefa-mobile-product-child:hover,
.sapamefa-mobile-product-child:focus-visible { color: var(--smf-color-white); background: var(--smf-color-teal-10); }
.sapamefa-mobile-product-all { color: var(--smf-color-bright); font-size: var(--smf-type-sm); font-weight: var(--smf-font-weight-semibold); text-transform: uppercase; }
@media (max-width: 1179px) {
  .sapamefa-product-navigation,
  .sapamefa-mega-menu { display: none; }
}
@media (min-width: 1180px) {
  .sapamefa-mobile-products { display: none; }
}

/* SAPAMEFA V10.6 — Canonical form-control focus filter.
   Form controls lose the external outline/glow. Links, menu buttons and
   carousel controls keep their keyboard accessibility indicator. */
html body :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="hidden"]),
  select,
  textarea
):is(:focus, :focus-visible) {
  border-color: var(--smf-color-teal);
  outline: 0;
  outline-offset: 0;
  box-shadow: none;
}

html body .sapamefa-search-form:focus-within {
  outline: 0;
  outline-offset: 0;
  box-shadow: none;
}


/* SAPAMEFA_V3.43 — global back-to-top control */
.sapamefa-back-to-top {
  position: fixed;
  right: var(--smf-space-6);
  bottom: var(--smf-space-6);
  z-index: 60;
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--smf-radius-control);
  background: var(--smf-color-aqua);
  color: var(--smf-color-white);
  font: inherit;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(40px);
  visibility: hidden;
  transition:
    opacity var(--smf-motion-control) var(--smf-ease-standard),
    transform var(--smf-motion-control) var(--smf-ease-standard),
    background-color var(--smf-motion-control) var(--smf-ease-standard),
    visibility 0s linear var(--smf-motion-control);
}
.sapamefa-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
}
.sapamefa-back-to-top:hover { background: var(--smf-color-teal); }
.sapamefa-back-to-top i { pointer-events: none; }
@media (max-width: 767px) {
  .sapamefa-back-to-top {
    right: var(--smf-space-4);
    bottom: var(--smf-space-4);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sapamefa-back-to-top { transition-duration: 0.01ms; }
}
