﻿/* ================================================================
   KFD Menu – clean standalone styles
   Version: 2026-03-24 clean-5
   No dependency on megamenu.css / fix17.css / cache.css
   ================================================================ */

/* ── Reset all old megamenu classes to neutral ─────────── */

.ets_mm_megamenu,
.ets_mm_megamenu_content,
.ets_mm_megamenu_content_content,
.ets_mm_megamenu .container {
  all: unset !important;
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: Montserrat, Manrope, Arial, sans-serif !important;
  font-size: 14px !important;
  color: #24231e !important;
  line-height: 1.4 !important;
}

.ets_mm_megamenu *,
.ets_mm_megamenu *::before,
.ets_mm_megamenu *::after {
  box-sizing: border-box;
}

/* Kill any ::before / ::after overlays from old CSS */
.ets_mm_megamenu::before,
.ets_mm_megamenu::after {
  display: none !important;
  content: none !important;
}

/* Hide old toggle/close elements */
.ets_mm_megamenu .ybc-menu-toggle,
.ets_mm_megamenu .close_menu {
  display: none !important;
}

/* Hard kill of legacy mobile-menu remnants inside the KFD header.
   Some checkout/cart views can still receive old ETS markup, so keep these
   selectors explicit and high-signal. */
#header .kfd-header__menu .ets_mm_megamenu .ybc-menu-toggle,
#header .kfd-header__menu .ets_mm_megamenu .close_menu {
  display: none !important;
}

/* Hide ALL old arrow spans globally — we use ::after pseudo-elements instead */
.ets_mm_megamenu span.arrow,
.ets_mm_megamenu .mm_arrow {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Reset list styles */
.ets_mm_megamenu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Overlay ──────────────────────────────── */

body.kfd-mobile-menu-open {
  overflow: hidden;
}

.kfd-menu-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 165;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

body.kfd-desktop-menu-open .kfd-menu-overlay,
body.kfd-mobile-menu-open .kfd-menu-overlay {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ── Menu wrapper (inside header) ─────────── */

#header .kfd-header__menu {
  position: relative;
  z-index: 210;
}

/* ── Megamenu structure inside header ──── */

#header .kfd-header__menu .ets_mm_megamenu {
  position: static;
  margin: 0;
  padding: 0;
  background: transparent !important;
  width: auto;
  max-width: 100%;
}

#header .kfd-header__menu .ets_mm_megamenu_content,
#header .kfd-header__menu .ets_mm_megamenu_content > .container,
#header .kfd-header__menu .ets_mm_megamenu_content_content {
  background: transparent !important;
  border: 0 !important;
}

#header .kfd-header__menu .ets_mm_megamenu_content > .container {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

#header .kfd-header__menu .ets_mm_megamenu_content_content {
  display: flex;
  align-items: center;
  min-height: 0;
  width: auto;
}

/* ── Nav item ordering & visibility ──── */

#header .kfd-header__menu .mm_menus_ul > li.menu-item-categories { order: 1; }
#header .kfd-header__menu .mm_menus_ul > li.menu-item-producers { order: 2; }
#header .kfd-header__menu .mm_menus_ul > li.menu-item-okfd { order: 3; }
#header .kfd-header__menu .mm_menus_ul > li.menu-item-delivery { order: 4; }

@media (min-width: 768px) {
  body#cart #header .kfd-header__menu .ets_mm_megamenu .ybc-menu-toggle,
  body#cart #header .kfd-header__menu .ets_mm_megamenu .close_menu,
  body#checkout #header .kfd-header__menu .ets_mm_megamenu .ybc-menu-toggle,
  body#checkout #header .kfd-header__menu .ets_mm_megamenu .close_menu,
  body.page-cart #header .kfd-header__menu .ets_mm_megamenu .ybc-menu-toggle,
  body.page-cart #header .kfd-header__menu .ets_mm_megamenu .close_menu,
  body.page-checkout #header .kfd-header__menu .ets_mm_megamenu .ybc-menu-toggle,
  body.page-checkout #header .kfd-header__menu .ets_mm_megamenu .close_menu,
  body.page-order #header .kfd-header__menu .ets_mm_megamenu .ybc-menu-toggle,
  body.page-order #header .kfd-header__menu .ets_mm_megamenu .close_menu {
    display: none !important;
  }

}


/* ================================================================
   DESKTOP  (min-width: 768px)
   ================================================================ */

@media (min-width: 768px) {

  /* ── Horizontal nav bar ───────────────── */

  .mm_menus_ul {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
  }

  .mm_menus_li {
    position: relative;
    margin: 0;
    padding: 0;
  }

  /* Hide mobile arrow spans on desktop */
  .mm_menus_li > span.arrow {
    display: none !important;
  }

  /* ── Top-level nav links ──────────────── */

  .mm_menus_li > a {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 8px 12px !important;
    border: 0 !important;
    border-radius: 6px;
    background: transparent !important;
    color: #011638 !important;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap;
    transition: background 0.15s ease;
  }

  .mm_menus_li:not(.mm_has_sub) > a:hover,
  .mm_menus_li.menu_hover > a {
    background: rgba(31, 55, 113, 0.06) !important;
    color: #1f3771 !important;
  }

  /* Hide FontAwesome icons in nav links */
  .mm_menus_li > a i {
    display: none !important;
  }

  .mm_menu_content_title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  /* Desktop dropdown arrow via ::after on the title text */
  .mm_menus_li.mm_has_sub > a .mm_menu_content_title::after {
    content: "" !important;
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
    vertical-align: middle;
  }

  .mm_menus_li.mm_has_sub.menu_hover > a .mm_menu_content_title::after {
    transform: rotate(45deg) translateY(-3px);
  }

  /* ── Dropdown panels (generic) ────────── */

  .mm_menus_li.mm_has_sub > .mm_columns_ul {
    position: absolute !important;
    top: 100%;
    min-height: 420px;
    width: min(1400px, calc(100vw - 30px)) !important;
    max-width: min(1400px, calc(100vw - 30px)) !important;
    /* left handled by JS */
    /* transform handled by JS */
    display: none !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    /* transform handled by JS */
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: #fff !important;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 210;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
  }

  .mm_menus_li.mm_has_sub.menu_hover > .mm_columns_ul {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    /* transform handled by JS */
  }

  /* ── Categories tab panel ─────────────── */

  .mm_menus_li.mm_menus_li_tab {
    position: static !important;
  }

  .mm_menus_li.mm_menus_li_tab > .mm_columns_ul {
    /* left handled by JS */
    right: auto !important;
    width: min(1240px, calc(100vw - 30px)) !important;
    min-height: 320px;
    /* transform handled by JS */
    background: linear-gradient(
      90deg,
      #f8f9fb 0, #f8f9fb 280px,
      #e5e7eb 280px, #e5e7eb 281px,
      #fff 281px, #fff 100%
    ) !important;
  }

  .mm_menus_li.mm_menus_li_tab.menu_hover > .mm_columns_ul {
    /* transform handled by JS */
  }

  /* ── Tab sidebar ──────────────────────── */

  .mm_tabs_li {
    position: static;
    width: 280px;
    margin: 0;
    padding: 0;
  }

  .mm_tab_li_content {
    position: relative;
    z-index: 2;
    display: block !important;
    width: auto !important;
    margin: 12px 12px 4px;
    padding: 12px 14px;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .mm_tab_li_content:hover {
    background: rgba(255, 255, 255, 0.7) !important;
  }

  .mm_tabs_li.open .mm_tab_li_content {
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  /* Hide old tab arrows/pseudo */
  .mm_tab_li_content > span.arrow,
  .mm_tab_li_content > .arrow,
  .mm_tab_li_content::after,
  .mm_tab_li_content::before,
  .mm_tab_name::before,
  .mm_tab_name::after,
  .mm_tab_has_child::before,
  .mm_tab_has_child::after {
    display: none !important;
    content: none !important;
  }

  .mm_tab_toggle_title {
    display: block;
  }

  .mm_tab_toggle_title a {
    display: block !important;
    color: #24231e !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.25;
    letter-spacing: 0.03em;
    text-transform: none !important;
    text-decoration: none !important;
    white-space: normal !important;
  }

  .mm_tabs_li.open .mm_tab_toggle_title a {
    font-weight: 700 !important;
  }

  /* ── Tab content panels ───────────────── */

  .mm_tabs_li > .mm_columns_contents_ul {
    display: none !important;
    position: absolute !important;
    top: 0;
    left: 280px !important;
    right: auto !important;
    width: calc(100% - 280px) !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 16px 20px 20px !important;
    background: #fff !important;
    float: none !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 16px;
    align-content: start !important;
  }

  .mm_tabs_li.open > .mm_columns_contents_ul {
    display: grid !important;
  }

  /* Make columns transparent to grid */
  .mm_tabs_li > .mm_columns_contents_ul > .mm_columns_li {
    display: contents !important;
  }

  .mm_tabs_li > .mm_columns_contents_ul > .mm_columns_li > .mm_blocks_ul {
    display: contents !important;
  }

  /* ── Category blocks ──────────────────── */

  .mm_blocks_li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .mm_blocks_li .ets_mm_block {
    display: block;
    padding: 0;
    overflow: visible;
  }

  .mm_blocks_li .ets_mm_block .clearfix {
    display: none;
  }

  /* Block heading */
  .mm_blocks_li .ets_mm_block > .h4 {
    display: block !important;
    margin: 0 0 10px !important;
    padding: 0 0 8px !important;
    border-bottom: 2px solid #dbe2f1;
    font-size: inherit;
  }

  .mm_blocks_li .ets_mm_block > .h4 a {
    display: block !important;
    color: #011638 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.15;
    text-transform: uppercase !important;
    text-decoration: none !important;
    white-space: normal !important;
  }

  /* Category link lists */
  .mm_blocks_li .ets_mm_block_content,
  .mm_blocks_li .ets_mm_categories {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  /* Hide intermediate parent link + arrow (desktop shows children) */
  .mm_blocks_li .ets_mm_categories > li.has-sub > a,
  .mm_blocks_li .ets_mm_categories > li.has-sub > .arrow {
    display: none !important;
  }

  .mm_blocks_li .ets_mm_categories > li.has-sub > .ets_mm_categories {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  /* Individual subcategory links */
  .mm_blocks_li .ets_mm_categories > li.has-sub > .ets_mm_categories > li {
    margin: 0;
    padding: 0;
  }

  .mm_blocks_li .ets_mm_categories > li.has-sub > .ets_mm_categories > li > a {
    position: relative;
    display: block !important;
    padding: 5px 0 5px 14px !important;
    color: #24231e !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35;
    text-decoration: none !important;
    text-transform: none !important;
    border-radius: 4px;
    transition: color 0.12s ease, background 0.12s ease;
    white-space: normal !important;
  }

  .mm_blocks_li .ets_mm_categories > li.has-sub > .ets_mm_categories > li > a::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #24231e;
    transform: translateY(-50%);
    transition: background 0.12s ease;
  }

  .mm_blocks_li .ets_mm_categories > li.has-sub > .ets_mm_categories > li > a:hover {
    color: #1f3771 !important;
    background: rgba(31, 55, 113, 0.04);
  }

  .mm_blocks_li .ets_mm_categories > li.has-sub > .ets_mm_categories > li > a:hover::before {
    background: #1f3771;
  }

  /* ── Manufacturers dropdown ───────────── */

  .mm_menus_li:not(.mm_menus_li_tab).mm_has_sub > .mm_columns_ul {
    /* left handled by JS */
    right: auto !important;
    width: min(1240px, calc(100vw - 30px)) !important;
    padding: 24px 28px 28px !important;
    /* transform handled by JS */
  }

  .mm_menus_li:not(.mm_menus_li_tab).mm_has_sub.menu_hover > .mm_columns_ul {
    /* transform handled by JS */
  }

  .mm_menus_li:not(.mm_menus_li_tab) > .mm_columns_ul {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0 18px !important;
  }

  .mm_menus_li:not(.mm_menus_li_tab) > .mm_columns_ul > .mm_columns_li {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .mm_menus_li:not(.mm_menus_li_tab) .mm_blocks_ul {
    display: contents !important;
  }

  .mm_menus_li:not(.mm_menus_li_tab) .ets_mm_block > .h4 {
    display: none !important;
  }

  .mm_menus_li:not(.mm_menus_li_tab) .ets_mm_block_content a {
    position: relative;
    display: block !important;
    padding: 5px 0 5px 14px !important;
    color: #24231e !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35;
    text-decoration: none !important;
    text-transform: none !important;
    border-radius: 4px;
    transition: color 0.12s ease, background 0.12s ease;
  }

  .mm_menus_li:not(.mm_menus_li_tab) .ets_mm_block_content a::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #24231e;
    transform: translateY(-50%);
  }

  .mm_menus_li:not(.mm_menus_li_tab) .ets_mm_block_content a:hover {
    color: #1f3771 !important;
    background: rgba(31, 55, 113, 0.04);
  }

  .mm_menus_li:not(.mm_menus_li_tab) .ets_mm_block_content a:hover::before {
    background: #1f3771;
  }
}

/* ── Desktop narrow ───────────────────────── */

@media (max-width: 1199px) and (min-width: 768px) {
  .mm_menus_ul {
    gap: 10px !important;
  }
  .mm_menus_li > a {
    padding: 7px 9px !important;
    font-size: 11px !important;
  }
  .mm_menus_li.mm_menus_li_tab > .mm_columns_ul {
    width: min(1120px, calc(100vw - 24px)) !important;
  }
}


/* ================================================================
   MOBILE  (max-width: 767px)
   ================================================================ */

@media (max-width: 767px) {

  /* ── Mobile drawer ────────────────────── */

  #header .kfd-header__menu {
    position: fixed;
    top: var(--kfd-mobile-header-bottom, 100px);
    left: 0;
    bottom: 0;
    height: var(--kfd-mobile-panel-height, calc(100dvh - 100px));
    max-height: var(--kfd-mobile-panel-height, calc(100dvh - 100px));
    width: min(320px, 80vw);
    max-width: 80vw;
    margin: 0;
    padding: 0 16px 24px;
    background: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
    z-index: 185;
  }

  #header .kfd-header__menu .ets_mm_megamenu,
  #header .kfd-header__menu .ets_mm_megamenu_content,
  #header .kfd-header__menu .ets_mm_megamenu_content > .container,
  #header .kfd-header__menu .ets_mm_megamenu_content_content {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    border: 0 !important;
  }

  #header.is-open .kfd-header__menu {
    transform: translateX(0);
    box-shadow: none;
  }

  /* ── Menu list — force visible inside drawer ── */

  .mm_menus_ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
    transition: none !important;
  }

  /* ── Menu items ───────────────────────── */

  .mm_menus_li {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    float: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .mm_menus_li > a {
    position: relative;
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 32px 12px 8px !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: transparent !important;
    color: #011638 !important;
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    text-transform: uppercase !important;
  }

  .mm_menus_li > a i,
  .mm_menus_li > a .mm_arrow {
    display: none !important;
  }

  /* ── Mobile arrow chevrons (via ::after on the <a> link) ── */

  .mm_menus_li.mm_has_sub > a::after {
    content: "" !important;
    position: absolute;
    right: 8px;
    top: 50%;
    display: block !important;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 4.75L12.25 10L7 15.25' stroke='%23011638' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    transition: transform 0.25s ease;
  }

  .mm_menus_li.mm_has_sub.opened > a::after {
    transform: rotate(90deg);
  }

  /* ── Mobile accordion panels ──────────── */

  .mm_menus_li > .mm_columns_ul {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    float: none !important;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }

  .mm_menus_li > .mm_columns_ul.active {
    max-height: 2400px !important;
    padding: 8px 0 4px !important;
  }

  /* ── Mobile tab items ─────────────────── */

  .mm_tabs_li {
    width: 100% !important;
    float: none !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .mm_tab_li_content {
    position: relative !important;
    display: flex !important;
    align-items: center;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 32px 12px 12px !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: transparent !important;
    cursor: pointer;
  }

  .mm_tab_li_content > span.arrow,
  .mm_tab_li_content > .arrow {
    display: none !important;
  }

  .mm_tab_li_content::after {
    content: "" !important;
    position: absolute;
    right: 4px;
    top: 50%;
    display: block !important;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 4.75L12.25 10L7 15.25' stroke='%23011638' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
    transition: transform 0.25s ease;
  }

  .mm_tab_li_content.opened::after {
    transform: rotate(90deg);
  }

  .mm_tab_toggle_title {
    display: block;
    flex: 1 1 auto;
  }

  .mm_tab_toggle_title a {
    display: block !important;
    color: #24231e !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.2;
    text-decoration: none !important;
    text-transform: none !important;
  }

  /* ── Mobile tab content ───────────────── */

  .mm_columns_contents_ul {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 12px !important;
    overflow: hidden !important;
    background: transparent !important;
    float: none !important;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }

  .mm_columns_contents_ul.active {
    max-height: 2400px !important;
    padding: 8px 0 8px 12px !important;
  }

  .mm_columns_contents_ul > .mm_columns_li {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .mm_columns_contents_ul > .mm_columns_li > .mm_blocks_ul {
    display: block !important;
    margin: 0;
    padding: 0;
  }

  /* ── Mobile blocks ────────────────────── */

  .mm_blocks_li {
    margin: 0 !important;
    padding: 0 !important;
  }

  .mm_blocks_li .ets_mm_block {
    display: block !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .mm_blocks_li .ets_mm_block .clearfix {
    display: none !important;
  }

  .mm_blocks_li .ets_mm_block > .h4 {
    display: none !important;
  }

  .mm_blocks_li .ets_mm_block_content,
  .mm_blocks_li .ets_mm_categories {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  /* Subcategory parent row */
  .ets_mm_block_content > .ets_mm_categories > li.has-sub {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .ets_mm_block_content > .ets_mm_categories > li.has-sub > a {
    position: relative;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 12px 32px 12px 12px !important;
    color: #24231e !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.2;
    text-decoration: none !important;
    text-transform: none !important;
  }

  /* Subcategory chevron via ::after on the <a> link */
  .ets_mm_block_content > .ets_mm_categories > li.has-sub > a::after {
    content: "" !important;
    position: absolute;
    right: 8px;
    top: 50%;
    display: block !important;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 4.75L12.25 10L7 15.25' stroke='%23011638' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    transition: transform 0.25s ease;
  }

  .ets_mm_block_content > .ets_mm_categories > li.has-sub.opened > a::after {
    transform: rotate(90deg);
  }

  /* Subcategory children */
  .ets_mm_block_content > .ets_mm_categories > li.has-sub > .ets_mm_categories {
    display: block !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 24px !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .ets_mm_block_content > .ets_mm_categories > li.has-sub > .ets_mm_categories.active {
    max-height: 1200px !important;
    padding: 8px 0 8px 24px !important;
  }

  .ets_mm_block_content > .ets_mm_categories > li.has-sub > .ets_mm_categories > li {
    margin: 0;
    padding: 0;
  }

  .ets_mm_block_content > .ets_mm_categories > li.has-sub > .ets_mm_categories > li > a {
    position: relative;
    display: block !important;
    padding: 10px 0 10px 14px !important;
    color: #24231e !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.3;
    text-decoration: none !important;
    text-transform: none !important;
  }

  .ets_mm_block_content > .ets_mm_categories > li.has-sub > .ets_mm_categories > li > a::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #24231e;
    transform: translateY(-50%);
  }

  /* ── Mobile manufacturer list bullets ──── */

  .mm_block_type_mnft .ets_mm_block_content > ul > li > a {
    position: relative;
    display: block !important;
    padding: 10px 0 10px 16px !important;
    color: #24231e !important;
    font-size: 14px !important;
    line-height: 1.3;
    text-decoration: none !important;
  }

  .mm_block_type_mnft .ets_mm_block_content > ul > li > a::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #24231e;
    transform: translateY(-50%);
  }
}

/* ── Reduced motion ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .ets_mm_megamenu,
  .ets_mm_megamenu *,
  .kfd-menu-overlay,
  #header .kfd-header__menu {
    transition-duration: 0.01ms !important;
  }
}




/* ================================================================
   KFD Nutrition promo card (Producenci dropdown) — Figma-faithful
   ================================================================ */

.kfd-promo-card-wrapper {
  display: block !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.kfd-promo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  min-height: 480px;
  padding: 20px 15px;
  border-radius: 10px;
  border: 1px solid #EDEEF0;
  background: linear-gradient(180deg, #011638 0%, #3D52D5 100%);
  background-image: url('/img/kfd-card-bg.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}

.kfd-promo-card__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kfd-promo-card__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.kfd-promo-card__title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 4px;
}

.kfd-promo-card__title strong {
  display: block;
  font-size: 44px;
  font-weight: 900;
}

.kfd-promo-card__logo {
  display: inline-flex;
  width: auto;
  max-width: 128px;
  height: 28px;
  margin: 12px 0 8px;
  color: #fff;
  line-height: 0;
  align-self: flex-start;
  flex-shrink: 0;
}

.kfd-promo-card__logo svg {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
}

.kfd-promo-card__logo-img {
  display: none !important;
}

.kfd-promo-card__desc {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
  opacity: 0.85;
}

.kfd-promo-card__btn {
  display: block;
  margin-top: 16px;
  padding: 11px 20px;
  border: none;
  border-radius: 4px;
  background: #fff;
  color: #011638 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none !important;
  text-transform: uppercase;
  text-align: center;
  transition: background 0.15s, opacity 0.15s;
}

.kfd-promo-card__btn:hover {
  background: #fff;
  opacity: 0.9;
}

.kfd-promo-card__footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
}

.kfd-promo-card__footer span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

.kfd-promo-card__pattern {
  display: none;
}

/* Adjust manufacturers grid: promo card + 3 columns — DESKTOP ONLY */
@media (min-width: 768px) {
  .manufacturers.mm_has_sub > .mm_columns_ul {
    display: grid !important;
    grid-template-columns: 280px repeat(3, 1fr) !important;
    gap: 0 24px !important;
    align-items: start;
    padding: 20px 24px 24px !important;
  }

  .manufacturers.mm_has_sub > .mm_columns_ul > .mm_columns_li {
    float: none !important;
    width: auto !important;
  }

  .manufacturers.mm_has_sub.menu_hover > .mm_columns_ul {
    display: grid !important;
  }
}

/* Hide promo card on mobile */
@media (max-width: 767px) {
  .kfd-promo-card-wrapper {
    display: none !important;
  }
}

/* ── Mobile fixes for manufacturers ─────── */
@media (max-width: 767px) {
  .manufacturers.mm_has_sub > .mm_columns_ul {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }

  .manufacturers.mm_has_sub > .mm_columns_ul > .mm_columns_li {
    float: none !important;
    width: 100% !important;
  }

  /* Reduce top gap above first item in expanded sections */
  .mm_columns_contents_ul.active {
    padding-top: 4px !important;
  }

  /* Remove excessive min-height on mobile panels */
  .mm_menus_li.mm_has_sub > .mm_columns_ul {
    min-height: 0 !important;
  }
}


/* ================================================================
   O KFD dropdown — 4 info cards
   ================================================================ */

@media (min-width: 768px) {
  .okfd-dropdown > .mm_columns_ul.okfd-panel {
    display: none !important;
    padding: 20px !important;

  }

  .okfd-dropdown.is-open > .mm_columns_ul.okfd-panel,
  .okfd-dropdown.menu_hover > .mm_columns_ul.okfd-panel {
    display: grid !important;
    grid-template-columns: 280px repeat(3, 1fr) !important;
    grid-auto-rows: 1fr !important;
    gap: 16px !important;
    align-items: stretch !important;
  }

  .okfd-card {
    display: block !important;
    float: none !important;
    width: auto !important;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  .okfd-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 255px;
    padding: 24px 20px;
    border: 1px solid #EDEEF0;
    border-radius: 10px;
    background: #fff;
    color: #24231e;
    text-decoration: none !important;
    transition: border-color 0.15s, box-shadow 0.15s;
  }

  a.okfd-card__inner:hover {
    border-color: #c8cdd6;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  }

  .okfd-card__inner--dark {
    background: linear-gradient(180deg, #011638 0%, #3D52D5 100%);
    background-image: url('/img/kfd-card-bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border-color: transparent;
    color: #fff;
    justify-content: flex-start;
  }

  .okfd-card__label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.6;
  }

  .okfd-card__inner--dark .okfd-card__label {
    color: #fff;
  }

  .okfd-card__logo {
    display: inline-flex;
    width: auto;
    max-width: 128px;
    height: 28px;
    margin: 12px 0 8px;
    align-self: flex-start;
    color: #fff;
    line-height: 0;
    flex-shrink: 0;
  }

  .okfd-card__logo svg {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
  }

  .okfd-card__desc {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
  }

  .okfd-card__inner--dark .okfd-card__desc {
    flex: 1;
  }

  .okfd-card__badge {
    margin-top: auto;
    padding-top: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
  }

  .okfd-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #f4f5f7;
    color: #24231e;
  }

  .okfd-card__sublabel {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #607089;
    margin-bottom: 4px;
  }

  .okfd-card__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #011638;
  }

  .okfd-card__text {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: #607089;
    flex: 1;
  }

  .okfd-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #011638;
    transition: color 0.15s;
  }

  a.okfd-card__inner:hover .okfd-card__link {
    color: #3D52D5;
  }

  .okfd-card__link svg {
    flex-shrink: 0;
  }
}

/* Mobile: O KFD shows simple link list */
@media (max-width: 767px) {
  .okfd-dropdown .okfd-panel .okfd-card {
    display: none !important;
  }
  .okfd-dropdown .okfd-panel .okfd-mobile-links {
    display: block !important;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .okfd-mobile-links a {
    display: block;
    padding: 12px 12px 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #24231e;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
  }
  .okfd-mobile-links a::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #24231e;
    transform: translateY(-50%);
  }
  .okfd-mobile-links a:hover {
    color: #1f3771;
  }
}

/* Desktop: hide mobile links */
@media (min-width: 768px) {
  .okfd-mobile-links {
    display: none !important;
  }
}

/* Mobile drawer full width fix */
@media (max-width: 767px) {
  #header .kfd-header__menu {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}

/* Mobile: O KFD shows simple link list */
@media (max-width: 767px) {
  .okfd-dropdown .okfd-panel .okfd-card {
    display: none !important;
  }
  .okfd-dropdown .okfd-panel .okfd-mobile-links {
    display: block !important;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .okfd-mobile-links a {
    display: block;
    padding: 12px 12px 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #24231e;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
  }
  .okfd-mobile-links a::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #24231e;
    transform: translateY(-50%);
  }
  .okfd-mobile-links a:hover {
    color: #1f3771;
  }
}

/* Desktop: hide mobile links */
@media (min-width: 768px) {
  .okfd-mobile-links {
    display: none !important;
  }
}
/* O KFD panel: compact height */
@media (min-width: 768px) {
  .okfd-dropdown > .mm_columns_ul.okfd-panel {
    min-height: 0 !important;
  }
  .okfd-card__inner {
    height: auto;
  }
}



/* ── Panel positioning — unified via static ancestor chain ─── */
@media (min-width: 768px) {
  /* Make header layout the positioning context */
  #header .kfd-header__layout {
    position: relative !important;
  }

  /* Make everything between layout and panels position:static */
  #header .kfd-header__menu,
  #header .kfd-header__menu .ets_mm_megamenu,
  #header .kfd-header__menu .ets_mm_megamenu_content,
  #header .kfd-header__menu .ets_mm_megamenu_content .container,
  #header .kfd-header__menu .ets_mm_megamenu_content_content,
  #header .kfd-header__menu .mm_menus_ul,
  #header .kfd-header__menu .mm_menus_li {
    position: static !important;
  }

  /* All dropdown panels: stretch to fill header layout width */
  .mm_menus_li.mm_has_sub > .mm_columns_ul {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
  }
}

/* Mobile logo: handled by PrestaShop .kfd-header__mobile-logo */


/* Desktop: header alignment */
@media (min-width: 768px) {
  #header .kfd-header__layout {
    grid-template-columns: max-content minmax(0, 1fr) auto !important;
    column-gap: 8px !important;
  }
  #header .kfd-header__menu {
    justify-content: flex-start !important;
    margin-left: 8px !important;
  }
  #header .kfd-header__menu .mm_menus_li {
    margin: 0 !important;
  }
  #header .kfd-header__menu .mm_menus_ul {
    justify-content: flex-start !important;
    gap: 0 !important;
  }
  #header .kfd-header__menu .mm_menus_ul > li > a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  #header .kfd-header__menu .mm_menus_li.mm_has_sub > a .mm_menu_content_title::after {
    margin-left: 4px !important;
  }
  #header .kfd-header__utilities {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    max-width: none !important;
    width: max-content !important;
    justify-content: flex-end !important;
    justify-self: end !important;
  }
  #header .kfd-header__search {
    display: block !important;
    flex: 0 0 312px !important;
    width: 312px !important;
    max-width: 312px !important;
    min-width: 312px !important;
  }
  #header .kfd-header__search #topsearchelastic_widget {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
  }
  #header .kfd-header__search #topsearchelastic_widget form {
    display: block !important;
    width: 100% !important;
  }
  #header .kfd-header__search #topsearchelastic_input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
  }
  #header .kfd-header__search #topsearchelastic_widget form input[type=text] {
    width: 100% !important;
  }
}

/* ── Mobile search bar ────────────────── */
@media (max-width: 1023px) {




}

/* ── Mobile search bar (own element in kfd-header__mobile) ─── */
@media (max-width: 1023px) {
  /* Force mobile header to wrap so search goes to new row */
  #header .kfd-header__mobile {
    flex-wrap: wrap !important;
  }

  
  .kfd-mobile-search-input {
    width: 100%;
    height: 40px;
    padding: 0 44px 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #f8f9fb;
    color: #011638;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    -webkit-appearance: none;
  }
  .kfd-mobile-search-input::placeholder {
    color: #9ca3af;
  }
  .kfd-mobile-search-input:focus {
    background: #fff;
    border-color: #1f3771;
    box-shadow: 0 0 0 3px rgba(31, 55, 113, 0.1);
  }
  .kfd-mobile-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #011638;
    cursor: pointer;
    padding: 0;
  }
  /* Mobile search: elastic widget moved here by JS */
  
  
  
  
  
  
  
  /* Results dropdown on mobile */
  

  /* Logo near hamburger with gap */
  #header .kfd-header__mobile .kfd-header__mobile-logo {
    margin-right: auto !important;
    flex: 0 0 auto !important;
    padding-left: 12px !important;
    margin-left: 0 !important;
  }
  #header .kfd-header__mobile .kfd-header__mobile-logo a {
    justify-content: flex-start !important;
  }

}


/* ── Mobile header fixes ─────────────── */
@media (max-width: 1023px) {
  /* Logo left-aligned near hamburger */
  #header .kfd-header__mobile .kfd-header__mobile-logo {
    margin-right: auto !important;
    flex: 0 0 auto !important;
  }


}

/* ── Desktop search results styling ────── */
@media (min-width: 1024px) {
  #topsearchelastic_result {
    border-radius: 0 0 12px 12px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    margin-top: 8px !important;
    overflow: hidden;
  }
  #topsearchelastic_result #category_results,
  #topsearchelastic_result #suggestion_results {
    font-family: var(--kfd-font, Montserrat, sans-serif) !important;
  }
  #topsearchelastic_result #category_results .title,
  #topsearchelastic_result #suggestion_results .title {
    background: #011638 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    padding: 10px 16px !important;
  }
}

/* ── Mobile search: show desktop ES widget below header ─── */
@media (max-width: 1023px) {
  /* Mobile: flex column so we can reorder search below header row */
  #header .kfd-header__layout {
    display: flex !important;
    flex-direction: column !important;
  }
  /* Mobile header row first */
  #header .kfd-header__mobile {
    order: 1 !important;
    width: 100%;
  }
  /* Search second */
  #header .kfd-header__utilities.hidden-sm-down {
    display: block !important;
    order: 2 !important;
    padding: 0 0 6px !important;
    width: 100% !important;
  }
  /* Prevent ES from hiding input on mobile focus */
  #header .kfd-header__utilities.hidden-sm-down #topsearchelastic_widget {
    position: relative !important;
    z-index: 300 !important;
  }
  #header .kfd-header__utilities.hidden-sm-down #topsearchelastic_input {
    position: relative !important;
    z-index: 301 !important;
  }

  #header .kfd-header__search {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }
  /* Hide icons in utilities (already in mobile header) */
  #header .kfd-header__utilities .kfd-header__actions {
    display: none !important;
  }
  /* Keep desktop logo and menu hidden */
  #header .kfd-header__logo.hidden-sm-down {
    display: none !important;
  }
  /* ES widget full width */
  #header .kfd-header__search {
    width: 100% !important;
    max-width: none !important;
  }
  #header .kfd-header__search {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  #header .kfd-header__utilities.hidden-sm-down #topsearchelastic_widget,
  #header .kfd-header__utilities.hidden-sm-down #topsearchelastic_widget form {
    width: 100% !important;
    max-width: 100% !important;
  }
  #header .kfd-header__utilities.hidden-sm-down #topsearchelastic_input {
    width: 100% !important;
    min-width: 0 !important;
  }
  #header .kfd-header__search #topsearchelastic_widget {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
  }
  #header .kfd-header__search #topsearchelastic_widget form {
    width: 100% !important;
    position: relative !important;
  }
  #header .kfd-header__search #topsearchelastic_input {
    width: 100% !important;
    height: 40px !important;
    border-radius: 20px !important;
    background: #f8f9fb !important;
    border: 1px solid #e5e7eb !important;
    padding: 0 48px 0 16px !important;
    font-size: 14px !important;
    color: #011638 !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }
  #header .kfd-header__search #topsearchelastic_input::placeholder {
    color: #9ca3af !important;
  }
  #header .kfd-header__search #topsearchelastic_input:focus {
    background: #fff !important;
    border-color: #1f3771 !important;
    box-shadow: 0 0 0 3px rgba(31, 55, 113, 0.1) !important;
  }
  #header .kfd-header__search #topsearchelastic_widget form button[type=submit] {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }
  /* Results dropdown */
  #header #topsearchelastic_result {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
  }
  /* Mobile search container - hidden, using utilities instead */
  #kfd-mobile-search-container {
    display: none !important;
  }
}

/* ── Mobile instant search results (modern UI) ───── */
@media (max-width: 1023px) {
  #topsearchelastic_result {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-top: 2px !important;
    background: #fff !important;
    border: none !important;
    border-top: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12) !important;
    z-index: 9999 !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  /* Section headers */
  #topsearchelastic_result .title {
    background: #f8f9fb !important;
    color: #011638 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  /* Products: 2-column grid like sklep.kfd.pl */
  #topsearchelastic_result #product_results {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    padding: 8px !important;
  }
  #topsearchelastic_result .topsearchelastic_item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 12px 8px !important;
    border-bottom: none !important;
    text-decoration: none !important;
    text-align: center !important;
  }
  #topsearchelastic_result .topsearchelastic_item img {
    width: 100% !important;
    max-width: 140px !important;
    height: auto !important;
    object-fit: contain !important;
    margin-bottom: 8px !important;
  }
  #topsearchelastic_result .topsearchelastic_item .product_name {
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    color: #2e3445 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  #topsearchelastic_result .topsearchelastic_item .product_price {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #011638 !important;
    margin-top: 4px !important;
  }
  /* Categories + suggestions */
  #topsearchelastic_result #category_results ul,
  #topsearchelastic_result #suggestion_results ul {
    padding: 4px 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }
  #topsearchelastic_result #category_results li,
  #topsearchelastic_result #suggestion_results li {
    padding: 0 !important;
    margin: 0 !important;
  }
  #topsearchelastic_result #category_results li a,
  #topsearchelastic_result #suggestion_results li a {
    display: block !important;
    padding: 10px 16px !important;
    color: #24231e !important;
    text-decoration: none !important;
    font-size: 14px !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  #topsearchelastic_result #category_results li:last-child a,
  #topsearchelastic_result #suggestion_results li:last-child a {
    border-bottom: none !important;
  }
}

/* Mobile: header padding */
@media (max-width: 1023px) {
  /* Remove container side padding */
  #header .kfd-header > .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #header .kfd-header__layout {
    padding: 10px 16px 4px !important;
  }
  #header .kfd-header__mobile {
    padding: 2px 0 !important;
  }
  /* Smaller logo - 20% reduction */
  #header .kfd-header__mobile .kfd-header__mobile-logo img {
    max-height: 18px !important;
    width: auto !important;
  }
  /* Search: full width */
  #header .kfd-header__utilities.hidden-sm-down {
    padding: 4px 0 8px !important;
  }
  #header .kfd-header__search #topsearchelastic_input {
    height: 44px !important;
    font-size: 14px !important;
    border-radius: 22px !important;
  }
}

/* ── Mobile search bar (own element in kfd-header__mobile) ─── */
@media (max-width: 1023px) {
  .kfd-header__mobile-search {
    width: 100%;
    padding: 4px 0 0;
  }
  .kfd-header__mobile-search form {
    display: flex;
    align-items: center;
    position: relative;
  }
  .kfd-mobile-search-input {
    width: 100%;
    height: 40px;
    padding: 0 44px 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #f8f9fb;
    color: #011638;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    -webkit-appearance: none;
  }
  .kfd-mobile-search-input::placeholder {
    color: #9ca3af;
  }
  .kfd-mobile-search-input:focus {
    background: #fff;
    border-color: #1f3771;
    box-shadow: 0 0 0 3px rgba(31, 55, 113, 0.1);
  }
  .kfd-mobile-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #011638;
    cursor: pointer;
    padding: 0;
  }
}
@media (min-width: 1024px) {
  .kfd-header__mobile-search {
    display: none !important;
  }
}

/* Final mobile header/menu override */
@media (max-width: 767px) {
  #header {
    position: sticky !important;
    top: 0 !important;
    z-index: 210 !important;
  }

  #header .kfd-header {
    background: #fff !important;
  }

  #header .kfd-header__layout {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 10px 16px 8px !important;
  }

  #header .kfd-header__mobile {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    position: relative !important;
    width: 100% !important;
    padding: 2px 0 0 !important;
  }

  #header .kfd-header__mobile .kfd-header__mobile-logo {
    display: flex !important;
    justify-content: flex-start !important;
    flex: 0 0 auto !important;
    width: auto !important;
    padding-left: 0 !important;
  }

  #header .kfd-header__mobile-actions {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  #header .kfd-header__utilities.hidden-sm-down {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    order: 2 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 8px 0 8px !important;
    margin: 6px 0 0 !important;
  }

  #header .kfd-header__utilities.hidden-sm-down .kfd-header__actions {
    display: none !important;
  }

  #header .kfd-header__utilities.hidden-sm-down > .kfd-header__mobile-toggle.hidden-md-up {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #000 !important;
  }

  #header .kfd-header__search {
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #header .kfd-header__search #topsearchelastic_widget,
  #header .kfd-header__search #topsearchelastic_widget form,
  #header .kfd-header__search #topsearchelastic_input {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  #header .kfd-header__menu {
    top: 100px !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: min(320px, 80vw) !important;
    max-width: 80vw !important;
    padding: 0 16px 24px !important;
  }

  #header.is-open .kfd-header__menu {
    transform: translateX(0) !important;
    box-shadow: none !important;
  }
}

html.kfd-force-desktop-header #header .kfd-header__layout {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  row-gap: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

html.kfd-force-desktop-header #header .kfd-header__logo.hidden-sm-down {
  display: flex !important;
  align-items: center !important;
}

html.kfd-force-desktop-header #header .kfd-header__mobile,
html.kfd-force-desktop-header #header .kfd-header__mobile-search {
  display: none !important;
}

html.kfd-force-desktop-header #header .kfd-header__utilities.hidden-sm-down {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  order: initial !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.kfd-force-desktop-header #header .kfd-header__utilities.hidden-sm-down .kfd-header__actions {
  display: flex !important;
}

html.kfd-force-desktop-header #header .kfd-header__utilities.hidden-sm-down > .kfd-header__mobile-toggle.hidden-md-up {
  display: none !important;
}

html.kfd-force-desktop-header #header .kfd-header__search {
  display: block !important;
  flex: 0 0 312px !important;
  width: 312px !important;
  max-width: 312px !important;
  min-width: 312px !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.kfd-force-desktop-header #header .kfd-header__search #topsearchelastic_widget,
html.kfd-force-desktop-header #header .kfd-header__search #topsearchelastic_widget form {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

html.kfd-force-desktop-header #header .kfd-header__menu {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 0 8px !important;
  padding: 0 !important;
  transform: none !important;
  box-shadow: none !important;
  justify-content: flex-start !important;
  overflow: visible !important;
  background: transparent !important;
}

html.kfd-force-desktop-header #header.is-open .kfd-header__menu {
  transform: none !important;
  box-shadow: none !important;
}

html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_ul {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  position: static !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_ul > li,
html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_li {
  display: block !important;
  width: auto !important;
  flex: 0 0 auto !important;
}

html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_li > a {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-height: auto !important;
  padding: 8px 12px !important;
  border-bottom: 0 !important;
}

/* ================================================================
   KFD Menu case + spacing polish 2026-03-27
   ================================================================ */

@media (min-width: 768px) {
  .mm_menus_ul,
  html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_ul {
    gap: 0 !important;
  }

  .mm_menus_ul > li,
  html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_ul > li {
    margin-right: 15px !important;
  }

  .mm_menus_ul > li:last-child,
  html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_ul > li:last-child {
    margin-right: 0 !important;
  }

  .mm_menus_li > a,
  html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_li > a {
    text-transform: none !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .mm_menus_li > a .mm_menu_content_title,
  html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_li > a .mm_menu_content_title {
    text-transform: none !important;
  }
}

@media (max-width: 1199px) and (min-width: 768px) {
  .mm_menus_ul > li,
  html.kfd-force-desktop-header #header .kfd-header__menu .mm_menus_ul > li {
    margin-right: 15px !important;
  }
}

@media (max-width: 767px) {
  .mm_menus_li > a,
  .mm_menus_li > a .mm_menu_content_title {
    text-transform: none !important;
  }
}

/* ================================================================
   Production hardening overrides 2026-03-28
   Neutralize older megamenu bundle styles on prod nodes
   ================================================================ */

@media (min-width: 768px) {
  #header .kfd-header__menu .ets_mm_megamenu .mm_menus_ul > li,
  #header .kfd-header__menu .ets_mm_megamenu .mm_menus_li {
    margin: 0 15px 0 0 !important;
    padding: 0 !important;
  }

  #header .kfd-header__menu .ets_mm_megamenu .mm_menus_ul > li:last-child {
    margin-right: 0 !important;
  }

  #header .kfd-header__menu .ets_mm_megamenu .mm_menus_li > a,
  #header .kfd-header__menu .ets_mm_megamenu .mm_menus_li > a:hover,
  #header .kfd-header__menu .ets_mm_megamenu .mm_menus_li.menu_hover > a {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }

  #header .kfd-header__menu .ets_mm_megamenu .mm_menus_li > a .mm_menu_content_title {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
  }
}

.kfd-promo-card__content,
.kfd-promo-card__logo,
.kfd-promo-card__logo svg,
.kfd-promo-card__label,
.kfd-promo-card__desc,
.kfd-promo-card__footer,
.kfd-promo-card__footer > *,
.okfd-card__inner--dark .okfd-card__label,
.okfd-card__inner--dark .okfd-card__logo,
.okfd-card__inner--dark .okfd-card__logo svg,
.okfd-card__inner--dark .okfd-card__desc,
.okfd-card__inner--dark .okfd-card__badge {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.kfd-promo-card__label,
.kfd-promo-card__logo,
.kfd-promo-card__desc,
.kfd-promo-card__footer span,
.okfd-card__inner--dark .okfd-card__label,
.okfd-card__inner--dark .okfd-card__logo,
.okfd-card__inner--dark .okfd-card__desc,
.okfd-card__inner--dark .okfd-card__badge {
  color: #fff !important;
}

.kfd-promo-card__logo svg path,
.okfd-card__inner--dark .okfd-card__logo svg path {
  fill: currentColor !important;
}

.kfd-promo-card__label,
.kfd-promo-card__logo,
.kfd-promo-card__footer span,
.okfd-card__inner--dark .okfd-card__label,
.okfd-card__inner--dark .okfd-card__logo,
.okfd-card__inner--dark .okfd-card__badge {
  display: inline-block !important;
  width: auto !important;
  max-width: 100% !important;
}

.kfd-promo-card__btn {
  background: #fff !important;
  color: #011638 !important;
}

@media (max-width: 767px) {
  .mm_tabs_li > span.arrow,
  .mm_tabs_li > .arrow,
  .mm_tabs_li > .mm_tab_li_content > span.arrow,
  .mm_tabs_li > .mm_tab_li_content > .arrow,
  .mm_tabs_li > .mm_tab_li_content .mm_tab_name::before,
  .mm_tabs_li > .mm_tab_li_content .mm_tab_name::after,
  .mm_tabs_li > .mm_tab_li_content .mm_tab_has_child::before,
  .mm_tabs_li > .mm_tab_li_content .mm_tab_has_child::after {
    display: none !important;
    content: none !important;
  }
}
