.catalog-page-v2 {
  padding-bottom: 48px;
}

.catalog-hero-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin: 8px 0 20px;
  padding-bottom: 0;
  border-bottom: 0;
}

.catalog-hero-v2 h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  position: relative;
}

.catalog-hero-v2 h1::after {
  content: none !important;
  display: none !important;
}

.catalog-hero-v2 p {
  margin: 0 auto;
  max-width: 640px;
  color: #666;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.catalog-toolbar {
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.catalog-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.catalog-search__input {
  width: 100%;
  height: 44px;
  border: 1px solid #ddd;
  background: #fff;
  padding: 0 44px 0 14px;
  font-size: 14px;
  color: #1a1a1a;
}

.catalog-search__btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}

.catalog-layout-v2 {
  align-items: flex-start;
}

.catalog-sidebar .catalog-panel {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 0;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.catalog-sidebar .heading-md {
  color: #1a1a1a !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-bottom: 12px !important;
  margin: 0 0 14px !important;
  border-bottom: 1px solid #eee;
}

.catalog-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.catalog-price-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #777;
  margin: 0;
}

.catalog-price-row .form-control {
  height: 40px;
  border-radius: 0;
  border-color: #ddd;
}

.catalog-price-hint {
  margin: 10px 0 14px;
  font-size: 12px;
  color: #888;
}

.catalog-apply-btn,
.catalog-reset-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.catalog-apply-btn {
  width: 100%;
  border: 0;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
}

.catalog-reset-link {
  width: 100%;
  border: 1px solid #ddd;
  color: #1a1a1a;
  background: #fff;
  margin-top: 4px;
}

.catalog-stock-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
}

.catalog-stock-check input {
  width: 16px;
  height: 16px;
}

.catalog-sidebar .brand-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-sidebar .brand-filter-item {
  border-radius: 0;
  border: 1px solid #ddd;
  background: #fff;
  color: #1a1a1a;
  font-size: 12px;
  padding: 8px 10px;
}

.catalog-sidebar .brand-filter-item.active,
.catalog-sidebar .brand-filter-item:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.catalog-filter-toggle {
  display: none;
}

.catalog-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

@media screen and (max-width: 991px) {
  .page-crumb:has(+ .catalog-page-v2) {
    margin-top: 0.5rem;
  }

  .page-crumb:has(+ .catalog-page-v2) .cd-breadcrumb {
    margin-bottom: 8px;
  }

  .catalog-page-v2 {
    padding-bottom: 16px;
  }

  .catalog-hero-v2 {
    gap: 6px;
    margin: 0 0 10px;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .catalog-hero-v2 h1 {
    font-size: 22px;
    margin: 0 !important;
  }

  .catalog-hero-v2 h1::after {
    content: none !important;
    display: none !important;
  }

  .catalog-hero-v2 p {
    font-size: 13px;
    line-height: 1.35;
    max-width: 100%;
    margin: 0;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 0;
  }

  .catalog-search {
    max-width: none;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .catalog-search__input {
    height: 44px;
  }

  .catalog-toolbar__actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  .catalog-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    margin: 0 !important;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff !important;
    color: #1a1a1a !important;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
  }

  .catalog-filter-toggle i {
    color: inherit;
  }

  .catalog-toolbar__actions .short-by-list {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
  }

  .catalog-toolbar__actions .short-ordering {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 100%;
    min-width: 0;
  }

  .catalog-toolbar__actions .short-ordering label {
    display: none;
  }

  .catalog-toolbar__actions .short-ordering select {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 40px;
    font-size: 13px;
  }

  /* Kill leftover sidebar height / bogus panel widths on mobile */
  .catalog-page-v2 .catalog-sidebar,
  .catalog-page-v2 .shop-panel {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    flex: 0 0 0 !important;
  }

  .catalog-sidebar__inner,
  .catalog-page-v2 .product-list-overlay {
    display: none !important;
    position: fixed !important;
    inset: 0;
    z-index: 1050;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    background: #fff;
    padding: 56px 16px 24px;
    overflow: auto;
    transform: translateX(-110%);
    transition: transform .25s ease;
  }

  .catalog-sidebar__inner.is-open,
  .catalog-page-v2 .product-list-overlay.is-open,
  .catalog-page-v2 .product-list-overlay.active {
    display: block !important;
    transform: translateX(0);
  }

  .catalog-layout-v2 {
    display: block;
  }

  .catalog-grid-wrap,
  .catalog-page-v2 .shop-col {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    margin: 0 !important;
    overflow: hidden;
  }

  /* 1 card per row on mobile — as before */
  .catalog-page-v2 .prod-grid-col3 > li {
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 20px;
  }

  .catalog-page-v2 .product-gird,
  .catalog-page-v2 .product-gird .product {
    margin: 0 !important;
    max-width: 100%;
  }

  .catalog-page-v2,
  .catalog-page-v2 .shop-wrapper,
  .catalog-page-v2 .catalog-toolbar,
  .catalog-page-v2 .catalog-search {
    max-width: 100%;
    overflow-x: clip;
  }
}

@media screen and (min-width: 992px) {
  .catalog-sidebar .product-list-overlay,
  .catalog-sidebar__inner {
    display: block !important;
    position: static !important;
    transform: none !important;
    padding: 0;
    overflow: visible;
    background: transparent;
    width: auto !important;
    height: auto !important;
  }

  .catalog-sidebar .close-filter {
    display: none;
  }
}
