/*
 * Cello Listing Polish v1.0
 * Sprint 1B/1C/1D: toolbar, pagination, mobile, search and manufacturer polish.
 * Keeps current layouts and business logic unchanged.
 */
.cello-listing-polish,
.cello-category-polish {
  --listing-accent: #ff6600;
  --listing-text: #292929;
  --listing-muted: #777;
  --listing-border: #e7e7e7;
  --listing-soft: #f7f7f7;
}

/* Breadcrumb and page rhythm */
.main-breadcrumb + .cate-slider,
.main-breadcrumb + .wrapper-search,
.main-breadcrumb + .bg-brand {
  margin-top: 0;
}

.cello-category-polish {
  padding-top: 18px;
  padding-bottom: 34px;
}

.cello-category-polish .filter-nav,
.cello-listing-polish .filter-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.cello-category-polish .filter-nav .filter,
.cello-listing-polish .filter-nav .filter {
  min-width: 0;
  margin-right: 16px;
}

.cello-category-polish .listing-title,
.cello-listing-polish .filter-nav h1 {
  margin: 0;
  color: var(--listing-text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
}

.cello-category-polish .filter-nav .sort,
.cello-listing-polish .filter-nav .sort {
  flex: 0 0 auto;
}

.cello-category-polish #input-sort,
.cello-listing-polish #input-sort {
  min-width: 190px;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--listing-border);
  border-radius: 8px;
  background-color: #fff;
  color: #444;
  font-size: 13px;
  line-height: 40px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.cello-category-polish #input-sort:focus,
.cello-listing-polish #input-sort:focus {
  border-color: var(--listing-accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .10);
}

/* Banner, chips and listing spacing */
.cate-slider {
  margin-bottom: 16px;
}

.cate-slider .img,
.bg-brand,
.brands__content {
  overflow: hidden;
  border-radius: 10px;
}

.brands__content {
  margin-top: 14px;
  margin-bottom: 4px;
}

.list-brand {
  gap: 8px;
}

.list-brand-item {
  border-radius: 999px;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.list-brand-item:hover,
.list-brand-item:focus {
  border-color: var(--listing-accent);
  color: var(--listing-accent);
}

/* Load more and standard pagination
 * The legacy theme already styles .title-button as the visible green button.
 * Keep .btn-load-pagination as a layout wrapper only to avoid a double/nested button.
 */
.cello-category-polish .btn-load-pagination,
.cello-listing-polish .btn-load-pagination {
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 28px auto 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: default;
}

.cello-category-polish .btn-load-pagination:hover,
.cello-listing-polish .btn-load-pagination:hover {
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.cello-category-polish .btn-load-pagination .title-button,
.cello-listing-polish .btn-load-pagination .title-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid #16a13a;
  border-radius: 999px;
  background: #18aa43;
  background-image: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(24, 170, 67, .18);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.cello-category-polish .btn-load-pagination .title-button:hover,
.cello-listing-polish .btn-load-pagination .title-button:hover,
.cello-category-polish .btn-load-pagination .title-button:focus,
.cello-listing-polish .btn-load-pagination .title-button:focus {
  border-color: #128c32;
  background: #15983b;
  color: #fff;
  box-shadow: 0 7px 18px rgba(24, 170, 67, .24);
  transform: translateY(-1px);
  outline: none;
}

.cello-listing-polish .pagination {
  margin: 24px 0 8px;
}

.cello-listing-polish .pagination > li > a,
.cello-listing-polish .pagination > li > span {
  min-width: 38px;
  min-height: 38px;
  margin: 0 3px;
  padding: 8px 11px;
  border: 1px solid var(--listing-border);
  border-radius: 8px;
  color: #444;
}

.cello-listing-polish .pagination > .active > a,
.cello-listing-polish .pagination > .active > span,
.cello-listing-polish .pagination > li > a:hover,
.cello-listing-polish .pagination > li > span:hover {
  border-color: var(--listing-accent);
  background: var(--listing-accent);
  color: #fff;
}

/* Search page: preserve structure, improve alignment only. */
.wrapper-search {
  padding: 20px 0;
}

#content-search .row {
  display: flex;
  align-items: center;
}

#content-search .form-control {
  height: 42px;
  border: 1px solid var(--listing-border);
  border-radius: 8px;
  box-shadow: none;
}

#content-search .form-control:focus {
  border-color: var(--listing-accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .10);
}

#content-search #search-form {
  margin: 0 -5px;
}

#content-search #search-form .form-group {
  margin-bottom: 0;
  padding-right: 5px;
  padding-left: 5px;
}

#content-search #button-search {
  height: 42px;
  border: 1px solid var(--listing-accent);
  border-radius: 8px;
  background: var(--listing-accent);
  color: #fff;
  font-weight: 600;
}

/* Manufacturer tabs/chips: spacing and states only. */
.cello-manufacturer-polish {
  padding-top: 18px;
}

.bg-brand {
  margin-bottom: 16px;
}

.cello-tabList .item a {
  border-radius: 8px;
  transition: background-color .2s ease, color .2s ease;
}

.cello-tabList .item.active a,
.cello-tabList .item a:hover {
  color: var(--listing-accent);
}

/* Mobile polish */
@media (max-width: 767px) {
  .cello-category-polish,
  .cello-listing-polish {
    padding-top: 10px;
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 24px;
  }

  .cello-category-polish .filter-nav,
  .cello-listing-polish .filter-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 48px;
    margin: 0 -10px 12px;
    padding: 6px 10px;
    border-bottom: 1px solid #ededed;
    background: rgba(255,255,255,.96);
    box-shadow: 0 4px 12px rgba(0,0,0,.035);
    backdrop-filter: blur(7px);
  }

  .cello-category-polish .listing-title,
  .cello-listing-polish .filter-nav h1 {
    max-width: 52vw;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cello-category-polish #input-sort,
  .cello-listing-polish #input-sort {
    width: 142px;
    min-width: 142px;
    height: 36px;
    padding-left: 9px;
    font-size: 12px;
    line-height: 36px;
  }

  .cate-slider {
    margin-bottom: 10px;
  }

  .cate-slider .container,
  .bg-brand .container,
  .brands__content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .cello-category-polish .row.no-gutters,
  .cello-listing-polish .row.no-gutters {
    margin-right: -5px;
    margin-left: -5px;
  }

  .cello-category-polish .row.no-gutters > [class*="col-"],
  .cello-listing-polish .row.no-gutters > [class*="col-"] {
    padding-right: 5px;
    padding-left: 5px;
  }

  .wrapper-search {
    padding: 12px 0;
  }

  #content-search .row {
    display: block;
  }

  #content-search .col-sm-3,
  #content-search .col-sm-9 {
    width: 100%;
    margin-bottom: 8px;
  }

  #content-search #search-form .form-group.col-xs-9 {
    width: 70%;
  }

  #content-search #search-form .form-group.col-xs-3 {
    width: 30%;
  }

  .cello-listing-polish .pagination > li > a,
  .cello-listing-polish .pagination > li > span {
    min-width: 34px;
    min-height: 34px;
    margin: 0 1px;
    padding: 6px 9px;
    border-radius: 7px;
  }
}

@media (max-width: 767px) {
  .cello-category-polish .btn-load-pagination,
  .cello-listing-polish .btn-load-pagination {
    margin-top: 22px;
    margin-bottom: 8px;
  }

  .cello-category-polish .btn-load-pagination .title-button,
  .cello-listing-polish .btn-load-pagination .title-button {
    min-width: 132px;
    min-height: 42px;
    padding-right: 22px;
    padding-left: 22px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .cello-category-polish .listing-title,
  .cello-listing-polish .filter-nav h1 {
    max-width: 43vw;
    font-size: 15px;
  }

  .cello-category-polish #input-sort,
  .cello-listing-polish #input-sort {
    width: 132px;
    min-width: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cello-category-polish #input-sort,
  .cello-listing-polish #input-sort,
  .cello-category-polish .btn-load-pagination,
  .cello-listing-polish .btn-load-pagination,
  .list-brand-item {
    transition: none;
  }
}
