/* ==========================================================
   Tony ScriptOps v2.1.5.5 — Catálogo Marketplace
   Sidebar de filtros + vitrine centralizada
   ========================================================== */

/* limita a página como no Blog, sem encostar nas laterais */
.products-container,
.products-page .products-container {
  width: min(1320px, calc(100% - 48px)) !important;
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* topo compacto */
.products-hero.catalog-v215 {
  max-width: 900px !important;
  padding: 14px 0 8px !important;
  margin: 0 auto !important;
}

.products-hero.catalog-v215 h1 {
  font-size: clamp(2rem,3vw,2.55rem) !important;
  margin: 0 0 5px !important;
}

.products-hero.catalog-v215 .hero-description {
  margin: 0 auto 8px !important;
  font-size: .9rem !important;
  line-height: 1.5 !important;
}

.products-hero.catalog-v215 .hero-stats-mini {
  gap: 28px !important;
  margin-top: 7px !important;
}

.products-hero.catalog-v215 .stat-value {
  font-size: 1.42rem !important;
}

.products-hero.catalog-v215 .stat-label {
  font-size: .62rem !important;
}

.catalog-benefits-v215 {
  max-width: 900px !important;
  margin: 7px auto 13px !important;
  padding: 7px 12px !important;
  gap: 14px !important;
  box-shadow: none !important;
}

.catalog-benefits-v215 span {
  font-size: 9.5px !important;
}

/* toolbar = somente busca e ordenação no desktop */
.products-toolbar.catalog-toolbar-v215 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 520px) 1fr auto !important;
  grid-template-areas:
    "search spacer sort"
    "count count count" !important;
  align-items: center !important;
  gap: 7px 14px !important;
}

.catalog-search-v215 {
  grid-area: search !important;
  width: 100% !important;
  max-width: 520px !important;
}

.catalog-search-v215 input {
  min-height: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  font-size: .76rem !important;
  background: #fff !important;
}

.products-toolbar.catalog-toolbar-v215 .products-sort {
  grid-area: sort !important;
  justify-self: end !important;
}

.products-toolbar.catalog-toolbar-v215 .sort-select {
  height: 38px !important;
  min-height: 38px !important;
  font-size: .72rem !important;
  border-radius: 10px !important;
}

/* chips antigos não somem do DOM; ficam ocultos no desktop */
.products-toolbar.catalog-toolbar-v215 .products-filters {
  display: none !important;
}

.catalog-result-count-v215 {
  grid-area: count !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #8491a3 !important;
  font-size: 10.5px !important;
}

/* ==========================================================
   Estrutura marketplace
   ========================================================== */
.catalog-market-layout-v2155 {
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 26px;
  align-items: start;
  margin: 4px 0 58px;
}

.catalog-market-sidebar-v2155 {
  position: sticky;
  top: 96px;
  min-width: 0;
}

.catalog-market-filterbox-v2155 {
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 7px 24px rgba(15,23,42,.04);
}

.catalog-market-filterhead-v2155 {
  padding: 15px 15px 12px;
  border-bottom: 1px solid #edf1f5;
}

.catalog-market-filterhead-v2155 strong {
  display: block;
  color: #101828;
  font-size: 14px;
}

.catalog-market-filterhead-v2155 small {
  display: block;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 10px;
}

.catalog-market-section-v2155 {
  padding: 14px 15px;
  border-bottom: 1px solid #edf1f5;
}

.catalog-market-section-v2155:last-child {
  border-bottom: 0;
}

.catalog-market-section-v2155 h3 {
  margin: 0 0 9px;
  color: #344054;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.catalog-market-options-v2155 {
  display: grid;
  gap: 2px;
}

.catalog-market-option-v2155 {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  transition: background .15s ease,color .15s ease;
}

.catalog-market-option-v2155:hover {
  background: #f5f8fc;
  color: #155eef;
}

.catalog-market-option-v2155.active {
  background: #eef5ff;
  color: #155eef;
  font-weight: 800;
}

.catalog-market-option-v2155 .count {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #8491a3;
  font-size: 9px;
  text-align: center;
}

.catalog-market-option-v2155.active .count {
  background: #fff;
  color: #155eef;
}

.catalog-market-clear-v2155 {
  width: 100%;
  min-height: 36px;
  border: 1px solid #dbe3ed;
  border-radius: 9px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.catalog-market-clear-v2155:hover {
  background: #f8fafc;
}

.catalog-market-content-v2155 {
  min-width: 0;
}

.catalog-market-mobile-filter-v2155 {
  display: none;
}

/* ==========================================================
   Grid de produtos: área de conteúdo, não tela inteira
   ========================================================== */
.catalog-market-content-v2155 .products-grid-enhanced.catalog-grid-v215 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 17px !important;
  align-items: stretch !important;
}

.catalog-market-content-v2155 .catalog-empty-search-v215 {
  grid-column: 1/-1 !important;
}

/* card equilibrado como catálogo profissional */
.catalog-market-content-v2155 .product-card-premium {
  min-height: 430px !important;
  max-height: none !important;
  border-radius: 17px !important;
  border: 1px solid #e0e7f0 !important;
  box-shadow: 0 7px 22px rgba(15,23,42,.045) !important;
}

.catalog-market-content-v2155 .product-card-premium:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 13px 30px rgba(15,23,42,.08) !important;
}

.catalog-market-content-v2155 .product-image-container {
  height: 145px !important;
  min-height: 145px !important;
  max-height: 145px !important;
}

.catalog-market-content-v2155 .product-info {
  padding: 12px 13px 13px !important;
}

.catalog-market-content-v2155 .product-meta-top {
  margin-bottom: 7px !important;
}

.catalog-market-content-v2155 .product-title {
  font-size: .93rem !important;
  line-height: 1.28 !important;
  min-height: 2.4em !important;
  margin: 6px 0 !important;
}

.catalog-market-content-v2155 .product-description {
  font-size: .69rem !important;
  line-height: 1.42 !important;
  min-height: 2.85em !important;
  max-height: 2.85em !important;
  -webkit-line-clamp: 2 !important;
  margin: 0 0 9px !important;
}

.catalog-market-content-v2155 .product-footer {
  margin-top: auto !important;
  padding-top: 10px !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
}

.catalog-market-content-v2155 .price-value {
  font-size: 1.25rem !important;
}

.catalog-market-content-v2155 .btn-product {
  width: auto !important;
  min-height: 35px !important;
  padding: 7px 11px !important;
  border-radius: 9px !important;
  font-size: .69rem !important;
  box-shadow: none !important;
}

/* desktop menor */
@media (max-width: 1180px) {
  .catalog-market-layout-v2155 {
    grid-template-columns: 205px minmax(0,1fr);
    gap: 18px;
  }

  .catalog-market-content-v2155 .products-grid-enhanced.catalog-grid-v215 {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

/* mobile/tablet: sidebar vira botão */
@media (max-width: 820px) {
  .products-container,
  .products-page .products-container {
    width: calc(100% - 24px) !important;
  }

  .products-toolbar.catalog-toolbar-v215 {
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "search sort"
      "count count" !important;
  }

  .catalog-market-layout-v2155 {
    display: block;
    margin-bottom: 40px;
  }

  .catalog-market-sidebar-v2155 {
    position: static;
    display: none;
    margin-bottom: 12px;
  }

  .catalog-market-layout-v2155.filters-open .catalog-market-sidebar-v2155 {
    display: block;
  }

  .catalog-market-mobile-filter-v2155 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    margin-bottom: 10px;
    padding: 7px 12px;
    border: 1px solid #dbe3ed;
    border-radius: 9px;
    background: #fff;
    color: #344054;
    font-weight: 800;
    font-size: 11px;
    cursor: pointer;
  }

  .catalog-market-content-v2155 .products-grid-enhanced.catalog-grid-v215 {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 590px) {
  .products-toolbar.catalog-toolbar-v215 {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "search"
      "sort"
      "count" !important;
  }

  .products-toolbar.catalog-toolbar-v215 .products-sort {
    justify-self: start !important;
  }

  .catalog-market-content-v2155 .products-grid-enhanced.catalog-grid-v215 {
    grid-template-columns: 1fr !important;
  }
}
