/* PASS 6: search/category presentation only. Osclass search logic remains unchanged. */
body#body-search #header-line {
  display: none !important;
}

body#body-search #sub-nav {
  position: relative !important;
  z-index: 40 !important;
  margin: 0 !important;
  padding: 8px 0 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#body-search #sub-nav .inside {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: calc(100% - 32px) !important;
  max-width: 1280px !important;
  min-height: 40px !important;
  margin: 0 auto !important;
  padding: 0 0 6px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-width: none;
}

body#body-search #sub-nav .inside::-webkit-scrollbar {
  display: none;
}

body#body-search #sub-nav .turgus-search-category-scroll {
  display: contents;
}

body#body-search #sub-nav a#cat-link {
  flex: 0 0 auto !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 8px 13px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}

body#body-search #sub-nav a#cat-link.active span,
body#body-search #sub-nav a#cat-link:hover span {
  color: inherit !important;
}

body#body-search #sub-nav .control {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
  padding: 0 !important;
  overflow: visible !important;
}

body#body-search #sub-nav .sort-it {
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#body-search #sub-nav .sort-it::before,
body#body-search #sub-nav .sort-it::after {
  display: none !important;
}

body#body-search #show-filters,
body#body-search #sub-nav .sort-title,
body#body-search #sub-nav .list-grid a.lg {
  min-height: 36px !important;
  margin: 0 !important;
}

body#body-search #sub-nav .sort-it .sort-title {
  display: flex !important;
  align-items: center !important;
  min-width: 150px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body#body-search #sub-nav .sort-title .title-keep {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
}

body#body-search #sub-nav .sort-title .title-keep span {
  color: inherit !important;
  font-weight: 800 !important;
}

body#body-search #sub-nav .sort-it #sort-wrap {
  top: calc(100% + 7px) !important;
  right: 0 !important;
  left: auto !important;
  min-width: 220px !important;
  padding: 7px !important;
  border: 1px solid var(--turgus-border) !important;
  border-radius: 12px !important;
  background: var(--turgus-panel) !important;
  box-shadow: 0 18px 44px rgba(47, 82, 45, .15) !important;
}

body#body-search #sub-nav .sort-it #sort-wrap a {
  display: block !important;
  padding: 9px 10px !important;
  border-radius: 8px !important;
  color: var(--turgus-muted) !important;
  background: transparent !important;
}

body#body-search #sub-nav .sort-it #sort-wrap a.current,
body#body-search #sub-nav .sort-it #sort-wrap a:hover {
  color: var(--turgus-green-dark) !important;
  background: var(--turgus-green-soft) !important;
}

body#body-search #sub-nav .list-grid {
  display: flex !important;
  gap: 5px !important;
}

body#body-search #sub-nav .list-grid a.lg {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  padding: 0 !important;
}

body#body-search #sub-nav .list-grid a.lg.active {
  font-weight: 800 !important;
}

body#body-search .content.list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  align-items: start !important;
  gap: 18px !important;
  width: calc(100% - 32px) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 8px 0 32px !important;
  box-sizing: border-box !important;
}

body#body-search.turgus-search-empty .content.list {
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
}

body#body-search.turgus-search-empty #sidebar {
  display: none !important;
}

body#body-search #main.search {
  grid-column: 1 !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body#body-search #sidebar {
  grid-column: 2 !important;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body#body-search .turgus-search-heading {
  margin: 0 0 10px;
  padding: 16px 18px;
  border: 1px solid var(--turgus-border);
  border-radius: 12px;
  background: var(--turgus-panel);
  box-shadow: var(--turgus-shadow);
}

body#body-search .turgus-search-breadcrumb {
  margin: 0 0 11px;
  color: var(--turgus-muted);
  font-size: 11px;
  line-height: 1.5;
}

body#body-search .turgus-search-breadcrumb a {
  color: var(--turgus-muted);
  text-decoration: none;
}

body#body-search .turgus-search-breadcrumb .bread-arrow {
  margin: 0 6px;
  color: #a5afa8;
}

body#body-search .turgus-search-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

body#body-search .turgus-search-heading h1 {
  margin: 0;
  color: var(--turgus-text);
  font-size: 26px;
  line-height: 1.18;
  font-weight: 900;
}

body#body-search .turgus-search-heading p {
  margin: 5px 0 0;
  color: var(--turgus-muted);
  font-size: 13px;
  line-height: 1.4;
}

body#body-search .turgus-search-subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--turgus-border);
}

body#body-search .turgus-search-subcategories a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

body#body-search #sidebar-search {
  padding: 14px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--turgus-border) !important;
  border-radius: 12px !important;
  background: var(--turgus-panel) !important;
  box-shadow: var(--turgus-shadow) !important;
}

body#body-search #sidebar-search > div,
body#body-search #sidebar-search > form,
body#body-search #sidebar-search .side-cat,
body#body-search #sidebar-search .search-side-form .wrap {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#body-search #sidebar-search .side-cat {
  margin-bottom: 12px !important;
  padding-bottom: 11px !important;
  border-bottom: 1px solid var(--turgus-border) !important;
}

body#body-search #sidebar-search h3,
body#body-search .search-side-form h3.head {
  margin: 0 0 11px !important;
  padding: 0 !important;
  color: var(--turgus-text) !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 900 !important;
}

body#body-search .side-cat .inside {
  display: grid !important;
  gap: 5px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body#body-search .side-cat .inside a {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--turgus-muted) !important;
  background: var(--turgus-panel-strong) !important;
  font-size: 12px !important;
  text-decoration: none !important;
}

body#body-search .side-cat .inside a.active,
body#body-search .side-cat .inside a:hover {
  color: var(--turgus-green-dark) !important;
  background: #f2f6f1 !important;
}

body#body-search .search-side-form fieldset {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body#body-search .search-side-form .row,
body#body-search .filters-advanced .row {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body#body-search .search-side-form h4 {
  margin: 0 0 5px !important;
  color: var(--turgus-muted) !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
}

body#body-search .search-side-form .input-box,
body#body-search .search-side-form .box,
body#body-search .search-side-form input[type="text"],
body#body-search .search-side-form select {
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border: 1px solid var(--turgus-border) !important;
  border-radius: 9px !important;
  color: var(--turgus-text) !important;
  background: var(--turgus-panel-strong) !important;
  box-shadow: none !important;
}

body#body-search .search-side-form .button-wrap {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  margin-top: 14px !important;
}

body#body-search .search-side-form .btn,
body#body-search #search-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body#body-search #search-button {
  border-style: solid !important;
}

body#body-search #sidebar-search .clear-search {
  border-style: solid !important;
}

body#body-search #search-items,
body#body-search #search-items .white,
body#body-search .search-items-wrap,
body#body-search .search-items-wrap .block {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#body-search .search-items-wrap .wrap,
body#body-search #search-items .white.gallery .wrap {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body#body-search .search-items-wrap .simple-prod {
  height: 100% !important;
  align-self: stretch !important;
}

body#body-search .search-items-wrap .simple-prod .simple-wrap {
  height: auto !important;
  min-height: 100% !important;
  align-self: stretch !important;
}

body#body-search .search-items-wrap .simple-prod {
  min-height: 0 !important;
}

/* Listing card presentation is shared with homepage in turgus-telegram.css. */

body#body-search #search-items .white.list .search-items-wrap .wrap {
  grid-template-columns: 1fr !important;
}

body#body-search #search-items .white.list .simple-prod .simple-wrap {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto 1fr !important;
  min-height: 210px !important;
}

body#body-search #search-items .white.list .simple-prod .item-img-wrap {
  grid-column: 1 !important;
  grid-row: 1 / -1 !important;
  height: 100% !important;
}

body#body-search #search-items .white.list .simple-prod a.title,
body#body-search #search-items .white.list .simple-prod .middle,
body#body-search #search-items .white.list .simple-prod .category,
body#body-search #search-items .white.list .simple-prod .description,
body#body-search #search-items .white.list .simple-prod .bottom {
  grid-column: 2 !important;
}

body#body-search .list-empty {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 15px !important;
  min-height: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 22px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--turgus-border) !important;
  border-radius: 14px !important;
  color: var(--turgus-muted) !important;
  background: var(--turgus-panel) !important;
  box-shadow: var(--turgus-shadow) !important;
  text-align: left !important;
}

body#body-search .list-empty img {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
}

body#body-search .list-empty .turgus-empty-content {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

body#body-search .list-empty .turgus-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body#body-search .list-empty .turgus-empty-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--turgus-border);
  border-radius: 8px;
  color: var(--turgus-green-dark);
  background: #f5f6f4;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

body#body-search .list-empty .turgus-empty-actions .turgus-empty-publish {
  color: #fff;
  border-color: var(--turgus-green);
  background: var(--turgus-green);
}

@media (max-width: 600px) {
  body#body-search .list-empty {
    align-items: flex-start !important;
    padding: 17px !important;
  }

  body#body-search .list-empty .turgus-empty-actions a {
    flex: 1 1 130px;
  }
}

body#body-search .paginate {
  clear: both !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

body#body-search .paginate a,
body#body-search .paginate span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 36px !important;
  min-height: 36px !important;
  margin: 0 4px 4px 0 !important;
}

@media (max-width: 1180px) {
  body#body-search .content.list {
    grid-template-columns: minmax(0, 1fr) 270px !important;
  }

  body#body-search .search-items-wrap .wrap,
  body#body-search #search-items .white.gallery .wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body#body-search #sub-nav .inside {
    width: calc(100% - 20px) !important;
  }

  body#body-search #show-filters {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 13px !important;
  }

  body#body-search .content.list {
    display: block !important;
    width: calc(100% - 20px) !important;
    padding-top: 10px !important;
  }

  body#body-search #sidebar {
    display: none !important;
  }

  body#body-search .turgus-search-heading {
    padding: 17px !important;
  }

  body#body-search .turgus-search-heading h1 {
    font-size: 23px !important;
  }
}

@media (max-width: 600px) {
  body#body-search #sub-nav .inside {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  body#body-search #sub-nav .turgus-search-category-scroll {
    display: flex !important;
    grid-row: 1;
    gap: 6px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
  }

  body#body-search #sub-nav .turgus-search-category-scroll::-webkit-scrollbar {
    display: none;
  }

  body#body-search #sub-nav .turgus-search-category-scroll > a {
    flex: 0 0 auto !important;
  }

  body#body-search #sub-nav .control {
    grid-row: 2;
    width: 100%;
    margin-left: 0 !important;
    justify-content: flex-end;
  }

  body#body-search #sub-nav .sort-title {
    min-width: 118px !important;
    max-width: 150px !important;
  }

  body#body-search #sub-nav .list-grid {
    display: none !important;
  }

  body#body-search .turgus-search-heading {
    margin-bottom: 11px !important;
    padding: 15px !important;
    border-radius: 12px !important;
  }

  body#body-search .turgus-search-heading h1 {
    font-size: 21px !important;
  }

  body#body-search .turgus-search-subcategories {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  body#body-search .turgus-search-subcategories::-webkit-scrollbar {
    display: none !important;
  }

  body#body-search .turgus-search-subcategories a {
    flex: 0 0 auto !important;
  }

  body#body-search .search-items-wrap .wrap,
  body#body-search #search-items .white.gallery .wrap {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body#body-search .search-items-wrap .simple-prod,
  body#body-search .search-items-wrap .simple-prod .simple-wrap {
    align-self: start !important;
  }

  body#body-search .search-items-wrap .simple-prod {
    height: 185px !important;
    min-height: 185px !important;
  }

  body#body-search .search-items-wrap .simple-prod .simple-wrap {
    height: 183px !important;
    min-height: 183px !important;
  }

  body#body-search #search-items .white.list .simple-prod .simple-wrap {
    display: flex !important;
    min-height: 0 !important;
  }

  body#body-search #search-items .white.list .simple-prod .item-img-wrap {
    height: 220px !important;
  }
}

.search-filters-box,
.search-filters-box #sidebar-search {
  width: min(380px, calc(100vw - 20px)) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 16px !important;
  background: var(--turgus-panel) !important;
}

.search-filters-box #sidebar-search {
  padding: 16px !important;
  overflow-y: auto !important;
}
