/*
 * jetamobileheader - kompaktowy nagłówek mobilny jeta.pl
 * Działa tylko gdy JS doda klasę html.jmh (czyli gdy moduł jest aktywny dla odwiedzającego)
 * i tylko na ekranach <= 767 px. Desktop i tablet bez zmian.
 */
@media (max-width: 767px) {
  /* #header nie klei się już w całości: klei się tylko górny pasek (sticky Elementora) */
  html.jmh #header { position: relative !important; top: auto !important; }

  /* 1. Górny pasek 56 px (i jego niewidoczny klon-spacer Elementora) */
  html.jmh #header .elementor-element-74c449e5 {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transition: height .2s ease, box-shadow .2s ease;
  }
  html.jmh #header .elementor-element-74c449e5 > .elementor-container {
    min-height: 55px !important;
    height: 55px; /* + 1 px dolnej ramki = 56 px */
    transition: height .2s ease, min-height .2s ease;
  }
  html.jmh #header .elementor-element-74c449e5 .elementor-menu-toggle {
    padding: 6px !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
  html.jmh #header .elementor-element-74c449e5 img[src*="logo"] {
    transition: width .2s ease;
    width: 123px !important;  /* jak dziś: 123 x 39 px */
    max-width: none !important;
    height: auto !important;
  }
  /* Rozwijane menu zawsze przyklejone pod paskiem (56 px / 44 px), z przewijaniem gdy długie */
  html.jmh #header .elementor-element-74c449e5 nav.elementor-nav--dropdown {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 0 !important;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  html.jmh.jmh-slim #header .elementor-element-74c449e5.elementor-sticky--active nav.elementor-nav--dropdown {
    top: 44px !important;
    max-height: calc(100vh - 44px);
  }

  /* 2. Stary obrazkowy baner (9,6 px wysokości) i pusty Spacer 30 px */
  html.jmh.jmh-ready #header .elementor-element-bb3a4e6,
  html.jmh #header .elementor-element-fec9903 { display: none !important; }

  /* 3. Nowy pasek tekstowy 36 px */
  html.jmh .jmh-strip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 36px;
    padding: 0 40px;
    background: #f3e9df;
    border-bottom: 1px solid rgba(138,109,59,.18);
    box-sizing: border-box;
    overflow: hidden;
    font-family: Montserrat, sans-serif;
    transition: height .2s ease, opacity .2s ease;
  }
  html.jmh .jmh-strip a.jmh-strip__link {
    display: flex; align-items: center; gap: 10px;
    color: #4a3a22 !important;
    text-decoration: none !important;
    font-size: 13px; font-weight: 600; line-height: 1;
    white-space: nowrap;
  }
  html.jmh .jmh-strip__link strong { font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #3f2f18; }
  html.jmh .jmh-strip__cta {
    font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #fff; background: #8a6d3b; padding: 5px 8px; border-radius: 2px;
  }
  html.jmh .jmh-strip__close {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; padding: 0; margin: 0;
    border: 0; border-radius: 50%;
    background: transparent; color: #4a3a22;
    font-size: 20px; line-height: 28px; text-align: center; cursor: pointer;
  }
  html.jmh .jmh-strip.jmh-strip--hidden { display: none !important; }

  /* 4. Zwinięty pasek 44 px po przewinięciu w dół */
  html.jmh.jmh-slim #header .elementor-element-74c449e5.elementor-sticky--active > .elementor-container {
    min-height: 43px !important;
    height: 43px; /* + 1 px ramki = 44 px */
  }
  html.jmh.jmh-slim #header .elementor-element-74c449e5.elementor-sticky--active img[src*="logo"] { width: 95px !important; } /* ok. 95 x 30 px */
  html.jmh.jmh-slim #header .elementor-element-74c449e5.elementor-sticky--active {
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
  }
  html.jmh.jmh-slim #header .elementor-element-74c449e5.elementor-sticky--active .elementor-icon,
  html.jmh.jmh-slim #header .elementor-element-74c449e5.elementor-sticky--active i { font-size: 24px; }

  /* 5. Mniej pustego miejsca wokół „KATEGORIE” (tylko strona główna) */
  body#index .elementor-element-e3dc997 { display: none !important; }
  body#index .elementor-element-4de770a .elementor-column-wrap { padding: 4px 10px !important; }
  body#index .elementor-element-4de770a .elementor-widget-divider { margin-bottom: 0 !important; }
  body#index .elementor-element-4de770a .elementor-divider { padding-top: 6px !important; padding-bottom: 6px !important; }
  body#index .elementor-element-4de770a .elementor-widget-heading { margin: 10px 0 !important; }
  body#index .elementor-element-e1de15c { padding-top: 12px !important; }
}
