/* eCommExpert | Wyszukiwarka opon i felg – styl samodzielny, bez bibliotek */
.ects, .ects * { box-sizing: border-box; }
.ects { --ects-blue: #1545d7; --ects-blue-dark: #1235ae; --ects-ink: #1d3042; --ects-soft: #e8ecf3; font-family: inherit; max-width: 1600px; width: 100%; margin: 0 auto; color: var(--ects-ink); }
.ects__tabs { display: flex; align-items: flex-end; gap: 6px; width: 100%; overflow-x: auto; scrollbar-width: thin; }
.ects__tab { -webkit-appearance: none; appearance: none; cursor: pointer; border: 0; background: #213646; color: #fff; border-radius: 20px 20px 0 0; min-height: 68px; flex: 1 1 0; min-width: 210px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 22px; text-align: center; font-family: inherit; font-size: clamp(16px,1.25vw,20px); font-weight: 750; line-height: 1.25; transition: background .18s ease, color .18s ease; white-space: nowrap; }
.ects__tab svg { width: 25px; height: 25px; flex: 0 0 auto; }
.ects__tab:hover:not(.is-active) { background: #304c61; color: #fff; }
.ects__tab.is-active { background: #fff; color: var(--ects-blue); }
.ects__tab:focus-visible, .ects__submit:focus-visible { outline: 3px solid #75a6ff; outline-offset: -3px; }
.ects__surface { background: #fff; border-radius: 0 22px 22px 22px; padding: clamp(18px,2.4vw,36px); box-shadow: 0 8px 34px rgba(15,38,67,.075); }
.ects__panel[hidden] { display: none !important; }
.ects__fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) minmax(185px,1.45fr); gap: 14px; align-items: stretch; }
.ects__field { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 83px; border: 1px solid #cfd6e2; border-radius: 7px; background: #fff; padding: 12px 44px 12px 16px; margin: 0; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.ects__field:hover { border-color: #8d9db7; }
.ects__field:focus-within { border-color: var(--ects-blue); box-shadow: 0 0 0 2px rgba(21,69,215,.15); }
.ects__caption { display: block; font-size: clamp(13px,1vw,16px); color: #5c6a79; line-height: 1.2; margin-bottom: 5px; pointer-events: none; }
.ects__selected { color: #182b3e; font-weight: 780; font-size: clamp(17px,1.3vw,22px); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.ects__field:not(.has-selection) .ects__selected { color: #8b95a0; font-size: 16px; font-weight: 500; }
.ects__arrow { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; pointer-events: none; color: #56687a; }
.ects__arrow svg { width: 100%; height: 100%; }
.ects__select { position: absolute; inset: 0; width: 100% !important; height: 100% !important; padding: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; border: 0; font-size: 16px; }
.ects__field--disabled { opacity: .55; cursor: not-allowed; }
.ects__submit { border: 0; border-radius: 7px; background: var(--ects-blue); color: #fff; padding: 16px 24px; min-height: 83px; cursor: pointer; font-family: inherit; font-size: clamp(17px,1.4vw,23px); line-height: 1.2; font-weight: 750; box-shadow: 0 5px 9px rgba(15,40,110,.16); display: flex; align-items: center; justify-content: center; gap: 12px; transition: background .18s ease, transform .18s ease; }
.ects__submit svg { width: 27px; height: 27px; flex: 0 0 auto; }
.ects__submit:hover { background: var(--ects-blue-dark); color: #fff; }
.ects__submit:active { transform: translateY(1px); }
.ects__footnote { padding-top: 15px; font-size: 13px; color: #8290a0; }
@media(max-width:1150px) { .ects__fields { grid-template-columns: repeat(4,minmax(0,1fr)); } .ects__submit { grid-column: 1 / -1; min-height: 67px; } .ects__tab { min-width: 190px; } }
@media(max-width:750px) { .ects__tab { flex: 0 0 auto; min-width: 190px; min-height: 57px; padding: 12px 14px; border-radius: 14px 14px 0 0; font-size: 15px; } .ects__tab svg { width: 21px; height: 21px; } .ects__surface { border-radius: 0 0 16px 16px; } .ects__fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } .ects__field { min-height: 74px; padding: 10px 31px 10px 11px; } .ects__arrow { right: 10px; width: 17px; height: 17px; } .ects__selected { font-size: 17px; } .ects__footnote { font-size: 12px; } }
@media(max-width:390px) { .ects__fields { grid-template-columns: minmax(0,1fr); } .ects__submit { grid-column: auto; } }

/* Ładowanie danych – nie pozwalaj na wyszukanie przed inicjalizacją. */
.ects__submit:disabled { opacity: .56; cursor: wait; box-shadow: none; }
.ects__submit:disabled:hover { background: var(--ects-blue); }
.ects__select:disabled { cursor: wait; }
.ects__field:has(.ects__select:disabled) { opacity: .7; }

/* Ciągła górna krawędź i zwarty, subtelny cień bez rozlania na kolejną sekcję. */
.ects {
  border-radius: 22px;
  box-shadow: 0 7px 16px rgba(14, 31, 54, .11), 0 2px 5px rgba(14, 31, 54, .045);
}
.ects__surface { border-radius: 0 0 22px 22px; box-shadow: none; }
.ects.ects--has-benefits .ects__surface { border-radius: 0; }

/* Edytowalny pasek informacji: nie ma własnego zewnętrznego marginesu. */
.ects__benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  background: #eff2fb;
  border-radius: 0 0 22px 22px;
  padding: 27px 18px;
  color: #182a3f;
}
.ects__benefit, a.ects__benefit {
  display: flex;
  min-width: 0;
  min-height: 65px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.ects__benefit + .ects__benefit:before {
  content: '';
  position: absolute;
  left: 0;
  top: 13%;
  height: 74%;
  width: 1px;
  background: #d2dcf5;
}
.ects__benefit-icon {
  flex: 0 0 auto;
  display: inline-flex;
  color: #1646d7;
}
.ects__benefit-icon svg { width: 39px; height: 39px; }
.ects__benefit-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ects__benefit-text strong { color: #0c1728; font-size: clamp(14px,1.35vw,22px); font-weight: 800; overflow-wrap: anywhere; }
.ects__benefit-text > span { margin-top: 3px; color: #657280; font-size: clamp(12px,1.05vw,17px); font-weight: 550; overflow-wrap: anywhere; }
a.ects__benefit:hover { background: rgba(31,71,201,.05); }
a.ects__benefit:focus-visible { outline: 2px solid #1646d7; outline-offset: -3px; border-radius: 7px; }

@media(max-width:1100px) {
  .ects__benefits { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding: 16px 8px; }
  .ects__benefit { justify-content: flex-start; padding: 12px 14px; }
  .ects__benefit-icon svg { width: 32px; height: 32px; }
}
@media(max-width:750px) {
  .ects { border-radius: 16px; }
  .ects__surface { border-radius: 0 0 16px 16px; }
  .ects__benefits { border-radius: 0 0 16px 16px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ects__benefit + .ects__benefit:before { display: none; }
  .ects__benefit { min-height: 58px; padding: 9px 10px; gap: 8px; }
  .ects__benefit-icon svg { width: 27px; height: 27px; }
  .ects__benefit-text strong { font-size: 13px; }
  .ects__benefit-text > span { font-size: 12px; }
}
@media(max-width:370px) {
  .ects__benefits { grid-template-columns: 1fr; }
}

/* 1.3 – prawdziwe SVG Font Awesome Free zamiast autorskich ikon paska korzyści. */
.ects__benefit-icon .ects-fa-svg {
  display:block;
  width:38px;
  height:38px;
  fill:currentColor;
  overflow:visible;
}
@media(max-width:1100px) { .ects__benefit-icon .ects-fa-svg { width:32px; height:32px; } }
@media(max-width:750px) { .ects__benefit-icon .ects-fa-svg { width:27px; height:27px; } }


/* 1.3.1 – poprawki mobilne */
.ects { position: relative; isolation: isolate; }
.ects__surface { position: relative; z-index: 2; }
.ects__footnote { text-align: center; }

@media (max-width: 767px) {
  .ects { overflow: hidden; }
  .ects__tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
    scrollbar-width: none;
  }
  .ects__tabs::-webkit-scrollbar { display: none; }
  .ects__tab {
    flex: none;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.2;
  }
  .ects__tab span { display: block; }
  .ects__surface {
    margin-top: 8px;
    border-radius: 16px;
  }
  .ects.ects--has-benefits .ects__surface { border-radius: 16px 16px 0 0; }
  .ects__fields { grid-template-columns: 1fr; gap: 12px; }
  .ects__submit { grid-column: auto; min-height: 72px; }
  .ects__benefits {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .ects__benefit {
    justify-content: flex-start;
    min-height: 52px;
    padding: 12px 10px;
  }
}


/* 1.3.2 — zachowanie normalnej kolejności warstw na stronie.
 * Element nie tworzy własnej, nadrzędnej warstwy nad menu, sliderami
 * ani nagłówkiem WoodMart. Pola formularza nadal działają lokalnie.
 */
.ects {
    position: static;
    isolation: auto;
    z-index: auto;
}
.ects__surface {
    position: static;
    z-index: auto;
}
@media (max-width: 767px) {
    .ects {
        overflow: visible;
    }
}


/* ============================================================
 * 1.3.4 – Wyszukiwarka wpięta między nagłówek a slider.
 * Góra: zakładki z zaokrągleniem w dół (odwrócone).
 * Dół: prosta krawędź, bez cienia/odstępu od sąsiedniego modułu.
 * Wszystko ograniczone do wariantu .ects--docked.
 * ============================================================ */
.ects.ects--docked {
  max-width: none;
  border-radius: 0;
  box-shadow: none;
  margin-top: 0;
  margin-bottom: 0;
  overflow: visible;
  isolation: auto;
  position: static;
  z-index: auto;
}
.ects.ects--docked .ects__tabs {
  background: #fff;
  gap: 6px;
  align-items: stretch;
  margin: 0;
  padding: 0;
}
.ects.ects--docked .ects__tab {
  border-radius: 0 0 18px 18px;
  margin: 0;
  box-shadow: none;
}
.ects.ects--docked .ects__tab.is-active {
  background: #fff;
  color: var(--ects-blue);
  box-shadow: inset 0 -3px 0 rgba(21,69,215,.11);
}
.ects.ects--docked .ects__surface,
.ects.ects--docked.ects--has-benefits .ects__surface {
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}
.ects.ects--docked .ects__benefits {
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}
@media (max-width: 767px) {
  /* Trzy widoczne zakładki bez poziomego przewijania. */
  .ects.ects--docked .ects__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }
  .ects.ects--docked .ects__tab {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    min-height: 88px;
    border-radius: 0 0 11px 11px;
    padding: 10px 4px 12px;
    gap: 7px;
    text-align: center;
    justify-content: center;
    white-space: normal;
    font-size: clamp(10px, 2.8vw, 13px);
    line-height: 1.17;
  }
  .ects.ects--docked .ects__tab svg {
    width: 22px;
    height: 22px;
  }
  .ects.ects--docked .ects__tab span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .ects.ects--docked .ects__surface,
  .ects.ects--docked.ects--has-benefits .ects__surface {
    border-radius: 0;
    margin-top: 0;
  }
  .ects.ects--docked .ects__benefits { border-radius: 0; }
}

/* v1.3.7 — odrysowana z przekazanego wzoru ikona opony z bieżnikiem. */
.ects__tab svg.ects__icon-tire { width: 30px; height: 30px; }
@media (max-width: 750px) {
  .ects__tab svg.ects__icon-tire { width: 25px; height: 25px; }
}
