/* style własne sklepu (poza plikami szablonu RedParts) — strona główna motokiosk (scripts/index/index.phtml) */

/*
// hero: nagłówek strony, wyszukiwarka po nazwie / numerze i przycisk katalogu pojazdów
*/
.home-hero.block-finder {
  height: auto;
  min-height: 420px;
  padding: 56px 0 84px;
}

.home-hero__body {
  width: 100%;
}

.home-hero__title.block-finder__title {
  font-size: 44px;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 12px;
}

.home-hero__subtitle.block-finder__subtitle {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 18px;
  line-height: 1.5;
}

.home-search {
  display: flex;
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.home-search:focus-within {
  box-shadow: 0 0 0 3px rgba(242, 89, 0, 0.75), 0 2px 14px rgba(0, 0, 0, 0.3);
}

.home-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 58px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: #262626;
  font-size: 17px;
}

.home-search__input:focus {
  outline: none;
}

.home-search__input::placeholder {
  color: #8c8c8c;
}

.home-search__button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  border: 0;
  background: #f25900;
  color: #fff;
  fill: currentColor;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}

.home-search__button:hover,
.home-search__button:focus {
  background: #c94a00;
}

.home-search__button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -5px;
}

.home-hero__alt {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 24px;
}

.home-hero__or {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.home-hero__or::before,
.home-hero__or::after {
  content: '';
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.home-hero__vehicle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 8px 26px 8px 20px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 3px;
  color: #fff;
  fill: currentColor;
  text-align: left;
  transition: background .2s, border-color .2s, color .2s;
}

.home-hero__vehicle svg {
  flex-shrink: 0;
}

.home-hero__vehicle:hover,
.home-hero__vehicle:focus {
  background: #fff;
  border-color: #fff;
  color: #262626;
  text-decoration: none;
}

.home-hero__vehicle:hover svg,
.home-hero__vehicle:focus svg {
  fill: #f25900;
}

.home-hero__vehicle[aria-expanded="true"] {
  background: #f25900;
  border-color: #f25900;
  color: #fff;
}

.home-hero__vehicle[aria-expanded="true"] svg {
  fill: #fff;
}

.home-hero__vehicle-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.home-hero__vehicle-title {
  font-size: 17px;
  font-weight: 500;
}

.home-hero__vehicle-hint {
  font-size: 13px;
  opacity: .8;
}

@media (max-width: 991.98px) {
  .home-hero.block-finder {
    min-height: 0;
    padding: 48px 0 72px;
  }
  .home-hero__title.block-finder__title {
    font-size: 34px;
  }
}

@media (max-width: 767.98px) {
  .home-hero.block-finder {
    padding: 32px 0 52px;
  }
  .home-hero__title.block-finder__title {
    font-size: 27px;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .home-hero__subtitle.block-finder__subtitle {
    margin-bottom: 20px;
    font-size: 15px;
  }
  .home-search__input {
    height: 52px;
    padding: 0 14px;
    font-size: 16px;
  }
  .home-search__button {
    padding: 0 18px;
  }
  .home-hero__alt {
    margin-top: 16px;
    gap: 12px;
  }
  .home-hero__or {
    width: 100%;
    justify-content: center;
  }
  .home-hero__vehicle {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 374px) {
  .home-search__button-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/*
// zalety sklepu pod wyszukiwarką — na wąskim telefonie dwie kolumny zamiast czterech wierszy
*/
@media (max-width: 399px) {
  .home-features .block-features__list {
    padding: 8px 0;
  }
  .home-features .block-features__item {
    width: 50%;
    padding: .625rem .5rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  [dir=ltr] .home-features .block-features__item-icon,
  [dir=rtl] .home-features .block-features__item-icon {
    margin: 0 0 8px;
  }
  .home-features .block-features__item-title {
    font-size: 15px;
  }
  .home-features .block-features__item-subtitle {
    font-size: 13px;
  }
}

/*
// katalog Polcar (szukaj po pojeździe) — iframe dopiero po kliknięciu
*/
.home-vehicle {
  padding-top: 32px;
  scroll-margin-top: 12px;
}

.home-vehicle__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 16px;
}

.home-vehicle__title {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
}

.home-vehicle__hint {
  margin: 0;
  color: #6c757d;
}

.home-vehicle__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  background: #fff;
  color: #262626;
  fill: currentColor;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.home-vehicle__close:hover,
.home-vehicle__close:focus {
  border-color: #f25900;
  color: #c94a00;
}

.home-vehicle .polcarsearch .card {
  overflow: hidden;
}

.polcar-frame__loading {
  margin: 0;
  padding: 48px 16px;
  color: #6c757d;
  text-align: center;
}

@media (max-width: 575.98px) {
  .home-vehicle {
    padding-top: 24px;
  }
  .home-vehicle__title {
    font-size: 20px;
  }
  .home-vehicle__close {
    width: 100%;
    justify-content: center;
  }
}

/*
// baner (slider) — obraz jako <img loading="lazy">
*/
.home-slide__image {
  border: 0;
  object-fit: cover;
  object-position: center;
}

/*
// popularne kategorie — karty o równej wysokości, na telefonie lista rozwijana
*/
.home-categories .block-categories__title-decor,
.home-categories .block-categories__title-decor span {
  display: block;
}

.home-categories .block-categories__body {
  padding: 64px 0;
}

.home-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-cat {
  display: flex;
  flex-direction: column;
  padding: 20px 22px 14px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.home-cat__head {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.home-cat__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
}

.home-cat__title a {
  color: #262626;
  transition: color .12s;
}

.home-cat__title a:hover {
  color: #c94a00;
}

.home-cat__toggle {
  display: none;
}

.home-cat__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.home-cat__children {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.home-cat__children li {
  position: relative;
  padding-left: 13px;
}

.home-cat__children li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 4px;
  height: 4px;
  background: #f25900;
  opacity: .7;
}

.home-cat__children a {
  display: block;
  padding: 5px 0;
  color: #595959;
  font-size: 15px;
  line-height: 20px;
  transition: color .12s;
}

.home-cat__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-cat__children a:hover {
  color: #c94a00;
}

.home-cat__all {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin-top: auto;
  color: #c94a00;
  font-size: 14px;
  font-weight: 500;
}

.home-cat__all::after {
  content: '';
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.home-cat__all:hover {
  color: #c94a00;
  text-decoration: underline;
}

@media (max-width: 1199.98px) {
  .home-cats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .home-categories .block-categories__body {
    padding: 56px 0 52px;
  }
  .home-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-cat__children a {
    padding: 8px 0;
  }
  .home-cat__children li::before {
    top: 17px;
  }
  .home-cat__all {
    min-height: 44px;
  }
}

@media (max-width: 575.98px) {
  .home-categories .block-categories__body {
    padding: 48px 0 44px;
  }
  .home-cats {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .home-cat {
    padding: 0;
  }
  .home-cat__head {
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }
  .home-cat__title {
    font-size: 16px;
  }
  .home-cat__title a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 4px 12px 4px 16px;
  }
  .home-cats--collapsible .home-cat__toggle {
    display: inline-flex;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0;
    border: 0;
    border-left: 1px solid #f0f0f0;
    background: transparent;
    fill: #6c757d;
    cursor: pointer;
  }
  .home-cats--collapsible .home-cat__toggle svg {
    transition: transform .2s;
  }
  .home-cat__toggle:focus {
    outline: none;
  }
  .home-cat__toggle:focus-visible {
    outline: 2px solid #f25900;
    outline-offset: -2px;
  }
  .home-cat.is-open .home-cat__toggle svg {
    transform: rotate(180deg);
  }
  .home-cat__body {
    padding: 0 16px 6px;
    border-top: 1px solid #f0f0f0;
  }
  .home-cats--collapsible .home-cat:not(.is-open) .home-cat__body {
    display: none;
  }
  .home-cat__children {
    margin-bottom: 0;
  }
  .home-cat__children li + li {
    border-top: 1px solid #f5f5f5;
  }
  .home-cat__children a {
    padding: 12px 0;
  }
  .home-cat__children li::before {
    top: 21px;
  }
}

/*
// opis sklepu
*/
.home-about__body {
  max-width: 980px;
  margin: 0 auto;
}

.home-about__body h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.home-about__body h3 {
  margin: 26px 0 8px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}

.home-about__body p {
  margin: 0 0 12px;
  color: #4d4d4d;
  font-size: 15px;
  line-height: 1.65;
}

.home-about__body .home-about__cta {
  margin-top: 20px;
  color: #262626;
}

@media (max-width: 767.98px) {
  .home-about__body h2 {
    font-size: 20px;
  }
  .home-about__body h3 {
    font-size: 16px;
  }
  .home-about__body p {
    font-size: 14px;
  }
}

/* strona główna ma własną, dużą wyszukiwarkę w sekcji głównej — ta z nagłówka (desktop) byłaby drugą tuż nad nią */
.site:has(.home-hero) .header__search {
  display: none;
}
