/* Naše Hračkářství — bezpečné globální opravy V69 */

/* Čitelné názvy podkategorií bez lámání uprostřed slov. */
html body.type-category .subcategories.with-image > li > a .text {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

/* Na počítači musí být cena a nákupní tlačítko vidět bez prvního rolování. */
@media (min-width: 992px) {
  html body.type-product .p-detail .p-data-wrapper {
    display: flex !important;
    flex-direction: column !important;
  }

  html body.type-product .p-data-wrapper > .p-detail-inner-header {
    order: 1 !important;
  }

  html body.type-product .p-data-wrapper > form.pr-action {
    order: 2 !important;
    margin-top: 14px !important;
  }

  html body.type-product .p-data-wrapper > .p-short-description {
    order: 3 !important;
    margin-top: 24px !important;
  }

  html body.type-product .p-data-wrapper > .nh-product-help {
    order: 4 !important;
  }

  html body.type-product .p-data-wrapper > .position--benefitProduct {
    order: 5 !important;
  }

  html body.type-product .p-data-wrapper > .buttons-wrapper {
    order: 6 !important;
  }

  html body.type-product .p-detail .p-image-wrapper {
    position: sticky !important;
    top: 86px !important;
    align-self: flex-start !important;
  }
}

/* V69 — plná navigační lišta v košíku, stejně pevná jako na NašeNářadí. */
@media (min-width: 768px) {
  html body.in-kosik #header .header-bottom {
    width: 100% !important;
    background: #172033 !important;
    border-bottom: 0 !important;
  }

  html body.in-kosik #header #navigation {
    width: 100% !important;
    max-width: 1178px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    background: #172033 !important;
  }
}

/* V69 — kompaktní kategorie, hledání a detail produktu na telefonu. */
@media (max-width: 767px) {
  html body.type-category .category-top {
    margin-bottom: 16px !important;
  }

  html body.type-category .category-perex.nh-category-intro {
    box-sizing: border-box !important;
    max-width: none !important;
    max-height: 112px !important;
    margin: 0 !important;
    padding: 13px 14px !important;
    overflow: hidden !important;
    border: 1px solid #f0d77b !important;
    border-radius: 14px !important;
    background: #fffaf0 !important;
    color: #6f5111 !important;
    font-size: 13px !important;
    line-height: 1.48 !important;
    box-shadow: none !important;
  }

  html body.type-category .category-perex.nh-category-intro.is-expanded {
    max-height: none !important;
  }

  html body.type-category .category-perex.nh-category-intro > div {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    box-shadow: none !important;
  }

  html body.type-category .category-perex.nh-category-intro > div > span {
    float: left !important;
    margin: 1px 9px 2px 0 !important;
    font-size: 24px !important;
    line-height: 1.2 !important;
  }

  html body.type-category .nh-category-intro-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    margin: 6px 0 12px auto !important;
    padding: 8px 14px !important;
    border: 1px solid #d9dee7 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #27364d !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  html body.type-category .subcategories.with-image > li > a {
    min-height: 92px !important;
    padding-right: 22px !important;
  }

  html body.type-category .subcategories.with-image > li > a .text {
    display: -webkit-box !important;
    max-height: none !important;
    overflow: hidden !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 4 !important;
  }

  html body.type-search .search-results-groups {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    height: auto !important;
  }

  html body.type-search .search-results-group {
    box-sizing: border-box !important;
    width: 100% !important;
    height: auto !important;
    padding: 14px !important;
    border: 1px solid #dfe5ed !important;
    border-radius: 14px !important;
    background: #fff !important;
  }

  html body.type-search .search-results-group h4 {
    margin: 0 0 10px !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
  }

  html body.type-search #search-group-categories .search-results-group-list > ul {
    display: grid !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body.type-search #search-group-categories .search-results-group-list li {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body.type-search #search-group-categories:not(.nh-search-expanded) .search-results-group-list li:nth-child(n+5) {
    display: none !important;
  }

  html body.type-search #search-group-categories.nh-search-expanded .search-results-group-list li {
    display: block !important;
  }

  html body.type-search #search-group-categories .search-results-group-list a {
    box-sizing: border-box !important;
    display: -webkit-box !important;
    min-height: 64px !important;
    padding: 10px !important;
    overflow: hidden !important;
    border: 1px solid #e3e7ee !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    color: #172033 !important;
    font-size: 12.5px !important;
    font-weight: 750 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  html body.type-search #search-group-categories .display-results-group {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    margin-top: 10px !important;
    border: 1px solid #d7dee8 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #27364d !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
  }

  html body.type-search #search-group-articles .search-results-group-list li {
    margin: 0 !important;
    padding: 0 !important;
  }

  html body.type-search #search-group-articles .search-results-group-list a {
    display: block !important;
    padding: 10px 0 !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  html body.type-product .breadcrumbs {
    box-sizing: border-box !important;
    height: 34px !important;
    margin-bottom: 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    color: #667085 !important;
    line-height: 26px !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
  }

  html body.type-product .breadcrumbs::-webkit-scrollbar {
    display: none !important;
  }

  html body.type-product .p-detail-inner-header-mobile {
    margin-bottom: 8px !important;
  }

  html body.type-product .p-detail-inner-header-mobile .h1,
  html body.type-product .p-detail-inner-header-mobile h1 {
    margin-bottom: 8px !important;
    font-size: 22px !important;
    line-height: 1.16 !important;
  }

  html body.type-product .p-image-wrapper .p-image {
    height: 270px !important;
    min-height: 270px !important;
  }

  html body.type-product .p-image-wrapper > .row,
  html body.type-product .p-thumbnails {
    height: 88px !important;
    min-height: 88px !important;
  }

  html body.type-product .p-data-wrapper > form.pr-action {
    order: 2 !important;
    margin-top: 0 !important;
  }

  html body.type-product .p-data-wrapper > .p-short-description {
    order: 3 !important;
    margin-top: 16px !important;
  }
}

@media (min-width: 768px) {
  html body.type-category .nh-category-intro-toggle {
    display: none !important;
  }
}

/* Mobilní výhody: text nesmí být useknutý výpustkou. */
@media (max-width: 767px) {
  html body.type-index .position--benefitHomepage .benefitBanner__item {
    min-height: 92px !important;
  }

  html body.type-index .position--benefitHomepage .benefitBanner__data {
    -webkit-line-clamp: 3 !important;
  }
}

/* Mobilní LeadHub popup jako kompaktní spodní panel. */
@media (max-width: 767px) {
  /* Galerie zůstává v jedné čitelné řadě a posouvá se pouze uvnitř. */
  html body.type-product .p-thumbnails {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  html body.type-product .p-thumbnails::-webkit-scrollbar {
    display: none;
  }

  html body.type-product .p-thumbnails a {
    scroll-snap-align: start;
  }

  /* Pevný teaser nesmí zakrývat ovládací prvky, obsah ani mobilní nákupní lištu. */
  html body #lh-go-to-popup-page {
    display: none !important;
  }

  html body .lh-popup--root {
    box-sizing: border-box !important;
    padding: 12px !important;
    align-items: flex-end !important;
  }

  html body .lh-popup-container {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 430px !important;
    max-height: 82vh !important;
    max-height: 82svh !important;
    margin: 0 auto !important;
    overflow: auto !important;
    border-radius: 20px 20px 14px 14px !important;
    box-shadow: 0 20px 55px rgba(23, 32, 51, .28) !important;
  }

  html body .lh-popup-close {
    box-sizing: border-box !important;
    display: grid !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    place-items: center !important;
  }

  html body #lh-go-to-popup-page {
    right: 10px !important;
    bottom: 10px !important;
    max-width: 150px !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

}
