/*
 * Cello Search Results V2.0 + Smart Search V2.1
 * Scope: product/search only. Uses Cello Design System + Listing Grid V2.
 */
.csv2-page {
  padding: 0 0 56px;
  background: #fff;
}

.csv2-breadcrumb { margin-bottom: 0; }

.csv2-hero {
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--cello-color-border, #e3e3e3);
}

.csv2-kicker,
.csv2-filter-eyebrow {
  color: #8b8b8b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}

.csv2-hero h1 {
  margin: 7px 0 4px;
  color: #1b1b1b;
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 650;
  line-height: 1.25;
}

.csv2-hero > p {
  margin: 0;
  color: #777;
  font-size: 14px;
}

.csv2-search-form { margin-top: 22px; }
.csv2-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: min(880px, 100%);
  height: 52px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.csv2-search-box:focus-within {
  border-color: #aaa;
  box-shadow: 0 0 0 3px rgba(245, 130, 32, .08);
}
.csv2-search-box > i {
  flex: 0 0 48px;
  color: #333;
  text-align: center;
  font-size: 16px;
}
.csv2-search-box input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 8px 0 0;
  color: #222;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}
.csv2-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 6px;
  color: #777;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.csv2-search-clear:hover { color: #111; background: #f5f5f5; text-decoration: none; }
.csv2-search-box button {
  align-self: stretch;
  min-width: 124px;
  padding: 0 20px;
  color: #fff;
  background: #111;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  transition: background .18s ease;
}
.csv2-search-box button:hover { background: #ff6600; }

.csv2-discovery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 18px 30px;
  margin-top: 24px;
}
.csv2-discovery-block { min-width: 0; }
.csv2-discovery-label {
  display: block;
  margin-bottom: 9px;
  color: #777;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.csv2-discovery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.csv2-discovery-chips a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  color: #333;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  transition: border-color .18s ease, background .18s ease;
}
.csv2-discovery-chips a:hover {
  color: #111;
  background: #fafafa;
  border-color: #bdbdbd;
  text-decoration: none;
}
.csv2-discovery-chips a span {
  color: #999;
  font-size: 10px;
}

.csv2-results { padding-top: 24px; }
.csv2-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.csv2-product-area { min-width: 0; }

.csv2-active-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.csv2-active-label {
  flex: 0 0 auto;
  padding-top: 7px;
  color: #777;
  font-size: 12px;
  font-weight: 600;
}
.csv2-active-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.csv2-active-chip,
.csv2-clear-all {
  min-height: 32px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 999px;
  color: #333;
  font-size: 11px;
  line-height: 1;
}
.csv2-active-chip:hover { border-color: #999; }
.csv2-active-chip span { margin-left: 5px; color: #888; font-size: 15px; }
.csv2-clear-all {
  color: #d95716;
  border-color: transparent;
  font-weight: 600;
}
.csv2-clear-all:hover { background: #fff6f0; }

.csv2-filter-panel {
  position: sticky;
  top: 92px;
  z-index: 2;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 12px;
}
.csv2-filter-backdrop { display: none; }
.csv2-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid #ededed;
}
.csv2-filter-header strong {
  display: block;
  margin-top: 2px;
  color: #222;
  font-size: 17px;
  font-weight: 650;
}
.csv2-filter-close { display: none; }
.csv2-filter-group {
  padding: 0 15px;
  border-bottom: 1px solid #efefef;
}
.csv2-filter-group:last-of-type { border-bottom: 0; }
.csv2-filter-group summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 18px 15px 0;
  color: #262626;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 650;
  user-select: none;
}
.csv2-filter-group summary::-webkit-details-marker { display: none; }
.csv2-filter-group summary::after {
  position: absolute;
  right: 0;
  content: '\f107';
  color: #777;
  font-family: FontAwesome;
  font-size: 13px;
  transition: transform .18s ease;
}
.csv2-filter-group:not([open]) summary::after { transform: rotate(-90deg); }
.csv2-filter-group summary > span {
  margin-left: auto;
  margin-right: 8px;
  color: #aaa;
  font-size: 10px;
  font-weight: 500;
}
.csv2-filter-options {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 270px;
  overflow: auto;
  padding: 0 1px 13px;
  scrollbar-width: thin;
}
.csv2-check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  margin: 0;
  color: #444;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
}
.csv2-check-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.csv2-check-ui,
.csv2-radio-ui {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  transition: background .15s ease, border-color .15s ease;
}
.csv2-radio-ui { border-radius: 50%; }
.csv2-check-row input:checked + .csv2-check-ui {
  background: #111;
  border-color: #111;
}
.csv2-check-row input:checked + .csv2-check-ui::after {
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  content: '';
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.csv2-check-row input:checked + .csv2-radio-ui::after {
  position: absolute;
  inset: 3px;
  content: '';
  background: #111;
  border-radius: 50%;
}
.csv2-check-name { min-width: 0; line-height: 1.35; }
.csv2-check-total { color: #aaa; font-size: 10px; }
.csv2-check-row:hover .csv2-check-name { color: #111; }

.csv2-filter-search-wrap {
  position: relative;
  margin: -2px 0 10px;
}
.csv2-filter-search-wrap > i {
  position: absolute;
  top: 50%;
  left: 10px;
  color: #aaa;
  transform: translateY(-50%);
}
.csv2-filter-search {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 30px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  outline: 0;
  font-size: 11px;
}
.csv2-filter-search:focus { border-color: #c2c2c2; background: #fff; }

.csv2-price-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: end;
  padding: 2px 0 15px;
}
.csv2-price-field span {
  display: block;
  margin-bottom: 4px;
  color: #999;
  font-size: 9px;
  text-transform: uppercase;
}
.csv2-price-field input {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 7px;
  outline: 0;
  font-size: 11px;
}
.csv2-price-field input:focus { border-color: #aaa; }
.csv2-price-divider { padding-bottom: 8px; color: #aaa; }
.csv2-price-apply {
  grid-column: 1 / -1;
  height: 34px;
  margin-top: 3px;
  color: #333;
  background: #f7f7f7;
  border: 1px solid #dedede;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
}
.csv2-price-apply:hover { background: #f1f1f1; }

.csv2-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ededed;
}
.csv2-result-count { color: #777; font-size: 12px; }
.csv2-result-count strong { color: #222; font-size: 14px; font-weight: 650; }
.csv2-sort-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #888;
  font-size: 11px;
  font-weight: 500;
}
.csv2-sort-control select {
  min-width: 170px;
  height: 38px;
  padding: 0 32px 0 12px;
  color: #333;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: 0;
  appearance: none;
  font-size: 11px;
  font-weight: 500;
}
.csv2-sort-control > i {
  position: absolute;
  right: 12px;
  color: #777;
  pointer-events: none;
}

/* Sidebar reduces available width: use four premium-sized cards instead of squeezing five. */
.csv2-product-grid.cello-product-grid-system {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.csv2-sku-match {
  margin-top: 5px;
  color: #8b8b8b;
  font-size: 10px;
  line-height: 1.2;
}

.csv2-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0 5px;
}
.csv2-progress-text { color: #888; font-size: 11px; }
.csv2-progress-text strong { color: #333; font-weight: 600; }
.csv2-progress {
  width: min(340px, 76%);
  height: 3px;
  margin: 10px 0 16px;
  overflow: hidden;
  background: #ececec;
  border-radius: 99px;
}
.csv2-progress span { display: block; height: 100%; background: #222; border-radius: inherit; transition: width .25s ease; }
.csv2-load-more {
  min-width: 230px;
  height: 42px;
  padding: 0 22px;
  color: #222;
  background: #fff;
  border: 1px solid #cfcfcf;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  transition: border-color .18s ease, background .18s ease;
}
.csv2-load-more:hover { background: #111; border-color: #111; color: #fff; }
.csv2-load-more[disabled] { opacity: .5; cursor: wait; }

.csv2-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 380px;
  padding: 62px 20px;
  text-align: center;
  border: 1px solid #ececec;
  border-radius: 12px;
}
.csv2-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  color: #777;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 20px;
}
.csv2-empty h2 { margin: 0 0 8px; color: #222; font-size: 20px; font-weight: 650; }
.csv2-empty p { max-width: 520px; margin: 0 0 16px; color: #777; font-size: 13px; }
.csv2-suggestion {
  padding: 9px 13px;
  color: #333;
  background: #fafafa;
  border: 1px solid #e4e4e4;
  border-radius: 9px;
  font-size: 12px;
}
.csv2-suggestion:hover { color: #111; border-color: #bbb; text-decoration: none; }
.csv2-empty-clear {
  margin-top: 14px;
  padding: 9px 14px;
  color: #d95716;
  background: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 600;
}

.csv2-mobile-actions,
.csv2-filter-mobile-footer { display: none; }
.csv2-loading {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  color: #333;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dedede;
  border-radius: 999px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.csv2-loading.is-active { opacity: 1; transform: translateY(0); }
.csv2-loading > span:first-child {
  width: 14px;
  height: 14px;
  border: 2px solid #ddd;
  border-top-color: #ff6600;
  border-radius: 50%;
  animation: csv2-spin .7s linear infinite;
}
@keyframes csv2-spin { to { transform: rotate(360deg); } }

@media (max-width: 1199px) {
  .csv2-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 18px; }
  .csv2-product-grid.cello-product-grid-system { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .csv2-discovery { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
  .csv2-page { padding-bottom: 34px; }
  .csv2-breadcrumb { display: none; }
  .csv2-hero { padding: 20px 0 17px; }
  .csv2-kicker { font-size: 9px; }
  .csv2-hero h1 { margin-top: 5px; font-size: 22px; }
  .csv2-hero > p { font-size: 12px; }
  .csv2-search-form { margin-top: 16px; }
  .csv2-search-box { height: 46px; border-radius: 11px; }
  .csv2-search-box > i { flex-basis: 40px; }
  .csv2-search-box button { min-width: 86px; padding: 0 12px; font-size: 11px; }
  .csv2-discovery { gap: 13px; margin-top: 18px; }
  .csv2-discovery-chips { flex-wrap: nowrap; margin-right: -20px; padding-right: 20px; overflow-x: auto; scrollbar-width: none; }
  .csv2-discovery-chips::-webkit-scrollbar { display: none; }
  .csv2-discovery-chips a { flex: 0 0 auto; }

  .csv2-results { padding-top: 13px; }
  .csv2-active-row { display: block; margin-bottom: 12px; }
  .csv2-active-label { display: none; }
  .csv2-active-chips { flex-wrap: nowrap; margin: 0 -20px; padding: 0 20px 3px; overflow-x: auto; scrollbar-width: none; }
  .csv2-active-chips::-webkit-scrollbar { display: none; }
  .csv2-active-chip,
  .csv2-clear-all { flex: 0 0 auto; }

  .csv2-mobile-actions {
    position: sticky;
    top: 0;
    z-index: 9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 -20px 12px;
    padding: 9px 20px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #eee;
    backdrop-filter: blur(8px);
  }
  .csv2-mobile-tool,
  .csv2-mobile-sort {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    margin: 0;
    color: #222;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
  }
  .csv2-mobile-sort select {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    cursor: pointer;
  }
  .csv2-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    color: #fff;
    background: #ff6600;
    border-radius: 99px;
    font-size: 9px;
  }

  .csv2-layout { display: block; }
  .csv2-toolbar { display: none; }
  .csv2-product-grid.cello-product-grid-system { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

  .csv2-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100040;
    display: block;
    visibility: hidden;
    background: rgba(0, 0, 0, .34);
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .csv2-filter-panel {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100041;
    height: min(88vh, 760px);
    max-height: 88vh;
    overflow: hidden;
    border: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 38px rgba(0, 0, 0, .16);
    transform: translateY(105%);
    transition: transform .24s ease;
  }
  body.csv2-filter-open { overflow: hidden; }
  body.csv2-filter-open .csv2-filter-backdrop { visibility: visible; opacity: 1; }
  body.csv2-filter-open .csv2-filter-panel { transform: translateY(0); }
  .csv2-filter-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 82px;
  }
  .csv2-filter-header {
    position: sticky;
    top: 0;
    z-index: 3;
    flex: 0 0 auto;
    min-height: 62px;
    background: #fff;
  }
  .csv2-filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #555;
    background: #f5f5f5;
    border: 0;
    border-radius: 50%;
    font-size: 23px;
  }
  .csv2-filter-group { padding: 0 17px; }
  .csv2-filter-group summary { padding-top: 16px; padding-bottom: 16px; font-size: 13px; }
  .csv2-filter-options { max-height: none; }
  .csv2-check-row { min-height: 38px; font-size: 12px; }
  .csv2-filter-mobile-footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: .8fr 1.4fr;
    gap: 8px;
    padding: 10px 17px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #e8e8e8;
  }
  .csv2-filter-reset,
  .csv2-filter-show {
    height: 44px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 650;
  }
  .csv2-filter-reset { color: #333; background: #fff; border: 1px solid #d7d7d7; }
  .csv2-filter-show { color: #fff; background: #111; border: 1px solid #111; }

  .csv2-progress-wrap { padding-top: 22px; }
  .csv2-load-more { width: 100%; min-width: 0; }
  .csv2-empty { min-height: 300px; padding: 42px 16px; }
  .csv2-empty h2 { font-size: 17px; }
  .csv2-loading { right: 12px; bottom: 84px; }
}

@media (min-width: 768px) and (max-width: 991px) {
  .csv2-hero h1 { font-size: 28px; }
  .csv2-filter-panel { right: auto; left: 50%; width: min(720px, 92vw); transform: translate(-50%, 105%); }
  body.csv2-filter-open .csv2-filter-panel { transform: translate(-50%, 0); }
}

@media (max-width: 767px) {
  .csv2-product-grid.cello-product-grid-system { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .csv2-loading,
  .csv2-filter-panel,
  .csv2-filter-backdrop,
  .csv2-progress span { transition: none; }
  .csv2-loading > span:first-child { animation-duration: 1.4s; }
}
