/* =========================================================
   Resultados de busca / catálogo — desktop + mobile
   ========================================================= */

.os-search-page {
  padding-top: 0;
}

/* Alinha com o header e o .kd-shell (1440px) */
.os-search-page.container-fluid,
.os-search-page.page.content,
.os-search-page.container-fluid.page {
  max-width: 1440px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

.os-search-page .page_inner,
.os-search-page.page.content .page_inner {
  margin-top: 0 !important;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 24px 2rem !important;
  box-sizing: border-box;
}

/* Colunas: bordas externas alinhadas ao breadcrumb; gap só entre sidebar e conteúdo */
.os-search-page > .page_inner > .row-fluid,
.os-search-page .page_inner > .row-fluid {
  display: flex !important;
  align-items: flex-start;
  column-gap: 1.75rem;
  row-gap: 0;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

/* Clearfix do Bootstrap vira item flex fantasma e desalinha com o breadcrumb */
.os-search-page .page_inner > .row-fluid::before,
.os-search-page .page_inner > .row-fluid::after {
  content: none !important;
  display: none !important;
}

.os-search-page .sidebar.span3,
.os-search-page aside.sidebar {
  float: none !important;
  width: 260px !important;
  max-width: 260px;
  flex: 0 0 260px;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.os-search-page .span9 {
  float: none !important;
  width: auto !important;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.os-search-page #promotions_left:empty {
  display: none;
}

.os-search-breadcrumb-nav {
  width: 100%;
  margin: 0;
  padding: 0;
}
.os-search-breadcrumb.breadcrumb,
.os-search-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  width: 100%;
  margin: 0 0 1.35rem;
  padding: 0.15rem 0 0.85rem;
  box-sizing: border-box;
  list-style: none;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid #e4e8ee;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #5c6b7a;
}

.os-search-breadcrumb > li {
  float: none !important;
  display: inline;
  margin: 0;
  padding: 0;
  text-shadow: none;
  color: inherit;
}

.os-search-breadcrumb > li > a {
  color: #444;
  text-decoration: none;
  font-weight: 500;
}

.os-search-breadcrumb > li > a:hover,
.os-search-breadcrumb > li > a:focus {
  color: var(--secundario, #d0121a);
  text-decoration: underline;
}

.os-search-breadcrumb .divider {
  padding: 0 0.15rem;
  color: #c5ced6;
}

.os-search-breadcrumb > li.active {
  color: #5c6b7a;
  font-weight: 400;
}

.os-search-header {
  margin: 0 0 1.15rem;
  padding: 0;
  border: none !important;
  border-bottom: none !important;
  background: transparent;
}

.os-search-query {
  color: var(--secundario, #d0121a);
  font-weight: 700;
}

.os-search-count {
  margin: 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.35;
}

.os-search-suggestion {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
}

.os-search-suggestion a {
  font-weight: 700;
  color: var(--secundario, #d0121a);
  text-decoration: underline;
}

.os-search-aside .nav-header {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #888;
}

/* ---- Filtros de categoria (desktop: bolhas) ---- */
.os-search-aside--desktop {
  position: sticky;
  top: 1rem;
  margin: 0;
  padding: 0;
}

.os-cat-filters {
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.os-cat-filters__title {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.os-cat-filters__list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}

.os-cat-filters__group {
  flex: none;
  width: 100%;
  margin: 0;
  border: 1px solid #e4e8ee;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.os-cat-filters__group[open] {
  border-radius: 14px;
}

.os-cat-filters__summary {
  list-style: none;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #10243f;
  user-select: none;
  background: #f4f7fb;
  line-height: 1.3;
}

.os-cat-filters__summary::-webkit-details-marker {
  display: none;
}

.os-cat-filters__summary::after {
  content: "+";
  float: right;
  color: #999;
  font-weight: 700;
}

.os-cat-filters__group[open] > .os-cat-filters__summary::after {
  content: "–";
}

.os-cat-filters__children {
  margin: 0;
  padding: 0;
  list-style: none;
}

.os-cat-filters__link,
.os-cat-filters__leaf {
  display: block;
  width: 100%;
  padding: 0.5rem 0.9rem;
  color: #444;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.3;
  box-sizing: border-box;
}

.os-cat-filters__children .os-cat-filters__link {
  border-top: 1px solid #e4e8ee;
  border-radius: 0;
}

.os-cat-filters__leaf {
  border: 1px solid #e4e8ee;
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  color: #10243f;
}

.os-cat-filters__link:hover,
.os-cat-filters__link:focus,
.os-cat-filters__leaf:hover,
.os-cat-filters__leaf:focus {
  background: #f4f7fb;
  color: var(--secundario, #d0121a);
  text-decoration: none;
}

.os-cat-filters__link.is-active,
.os-cat-filters__leaf.is-active {
  color: var(--secundario, #d0121a);
  font-weight: 700;
  background: #fdecee;
  border-color: #f0c4c7;
}

.os-cat-filters__empty {
  margin: 0;
  font-size: 0.9rem;
  color: #888;
}

/* Mobile sheet: mantém lista em caixas (como antes) */
.os-filter-sheet__body .os-cat-filters__list {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.55rem;
}

.os-filter-sheet__body .os-cat-filters__group {
  flex: none;
  border-radius: 8px;
}

.os-filter-sheet__body .os-cat-filters__group[open] {
  border-radius: 8px;
}

.os-filter-sheet__body .os-cat-filters__summary {
  padding: 0.8rem 0.95rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

.os-filter-sheet__body .os-cat-filters__leaf {
  display: block;
  padding: 0.72rem 0.95rem;
  font-size: 0.88rem;
  line-height: 1.4;
  border-radius: 8px;
}

.os-filter-sheet__body .os-cat-filters__children .os-cat-filters__link {
  padding: 0.72rem 0.95rem;
  font-size: 0.88rem;
}

/* Botão Filtrar — só mobile */
.os-filter-bar {
  display: none;
}

.os-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.65rem 1rem;
  border: 1px solid #e4e8ee;
  border-radius: 8px;
  background: #fff;
  color: #10243f;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.os-filter-trigger i {
  color: var(--secundario, #d0121a);
  font-size: 0.85rem;
}

.os-filter-trigger:hover,
.os-filter-trigger:focus {
  border-color: #d9d2c8;
  background: #f4f7fb;
}

/* Bottom sheet */
.os-filter-sheet {
  display: none;
}

.os-filter-sheet.is-open,
.os-filter-sheet:not([hidden]) {
  display: block;
}

.os-filter-sheet__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(37, 40, 39, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.os-filter-sheet.is-open .os-filter-sheet__backdrop {
  opacity: 1;
}

.os-filter-sheet__panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.os-filter-sheet.is-open .os-filter-sheet__panel {
  transform: translateY(0);
}

.os-filter-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e4e8ee;
}

.os-filter-sheet__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #10243f;
}

.os-filter-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f7fb;
  color: #555;
  cursor: pointer;
}

.os-filter-sheet__body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.85rem 1.1rem 1.5rem;
}

.os-filter-sheet__body .os-cat-filters__title {
  display: none;
}

html.os-filter-sheet-open,
html.os-filter-sheet-open body {
  overflow: hidden;
}

.os-search-results .mod.result {
  overflow: visible;
}

.os-search-results .os-search-grid,
.os-search-results .products.three {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  float: none !important;
  align-items: stretch;
}

/* Clearfix legado (.products:before) vira “card fantasma” no CSS grid */
.os-search-results .products::before,
.os-search-results .products::after,
.os-search-results .products.three::before,
.os-search-results .products.three::after,
.os-search-results .os-search-grid::before,
.os-search-results .os-search-grid::after {
  content: none !important;
  display: none !important;
  clear: none !important;
}

.os-search-results .os-search-grid > li,
.os-search-results .products.three > li {
  display: flex !important;
  float: none !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0;
  box-sizing: border-box;
}

/* Card — padrão estável (não exagerar tipografia/padding) */
.os-search-results .product_pod {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0;
  text-align: left;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.os-search-results .product_pod .product_description {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0;
}

.os-search-results .product_pod .image_container {
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  aspect-ratio: 1 / 1;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden;
  border-radius: 0;
  background: #f4f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center / 48px no-repeat;
}

.os-search-results .product_pod .image_container a {
  display: block;
  width: 100%;
  height: 100%;
}

.os-search-results .product_pod .image_container img,
.os-search-results .product_pod .image_container .thumbnail {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  object-position: center;
  margin: 0;
  padding: 0;
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
}

.os-search-results .product_pod h3,
.os-search-results .product_pod .titulo-produto {
  display: block;
  overflow: visible;
  margin: 1rem 1rem 0.45rem !important;
  padding: 0 !important;
  font-size: 1.05rem !important;
  line-height: 1.35 !important;
  min-height: 0;
  max-height: none;
  white-space: normal;
}

.os-search-results .product_pod h3 a {
  color: #10243f !important;
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: 700;
}

.os-search-results .product_pod .star {
  flex: 0 0 auto;
  margin: 0 1rem 0.85rem !important;
}

.os-search-results .product_pod .product_price {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-height: 10.5rem;
  max-height: none !important;
  margin-top: auto;
  padding: 0.85rem 1rem 1rem !important;
  background: #f4f7fb !important;
  border-top: 1px solid #e4e8ee;
  border-radius: 0 0 10px 10px;
}

.os-search-results .product_pod .price_color {
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 0.65rem !important;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
  color: #10243f;
}

.os-search-results .product_pod .oferta {
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 0 0.5rem;
}

.os-search-results .product_pod .oferta .badge,
.os-search-results .product_pod .badge-warning {
  display: inline-block;
  margin: 0;
  padding: 0.25rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 3px;
  vertical-align: middle;
  background: var(--secundario, #d0121a);
  color: #fff;
}

.os-search-results .product_pod .from,
.os-search-results .product_pod .to,
.os-search-results .product_pod .divide {
  display: block;
  position: relative;
  margin: 0 0 0.25rem;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #555;
}

.os-search-results .product_pod .from,
.os-search-results .product_pod .oferta ~ .from {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 2px 0 0;
  color: #888;
  text-decoration: none !important;
  position: relative;
}

.os-search-results .product_pod .from strong,
.os-search-results .product_pod .oferta ~ .from strong {
  text-decoration: none !important;
  font-weight: 600;
  color: #888;
}

.os-search-results .product_pod .oferta ~ .from::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 0;
  border-top: 2px solid #d0121a;
  transform: rotate(-3deg);
  transform-origin: 0% 50%;
  pointer-events: none;
}

.os-search-results .product_pod .to {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.15rem;
}

.os-search-results .product_pod .to strong,
.os-search-results .product_pod .divide .yellow,
.os-search-results .product_pod .yellow {
  color: var(--secundario, #d0121a) !important;
  font-size: 1.15rem !important;
  font-weight: 700;
}

.os-search-results .product_pod .divide {
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #444;
}

.os-search-results .product_pod .product_price form {
  margin: 0;
}

.os-search-results .product_pod .btn-full,
.os-search-results .product_pod .btn {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px !important;
  margin-top: 0.4rem;
  padding: 0.65rem 0.75rem !important;
  font-weight: 700;
  background: #d0121a !important;
  border-color: #d0121a !important;
  color: #fff !important;
  text-shadow: none !important;
  box-shadow: none;
}

.os-search-results .product_pod .btn-full:hover,
.os-search-results .product_pod .btn:hover {
  background: #a30d14 !important;
  border-color: #a30d14 !important;
  filter: none;
}

.os-search-page .btn-success,
.os-search-results .btn-success {
  text-shadow: none !important;
}
.os-search-pagination {
  margin-top: 1.25rem;
  clear: both;
}

.os-search-empty {
  text-align: center;
  padding: 2.25rem 1rem 2.5rem;
  background: #f4f7fb;
  border: 1px solid #e4e8ee;
  border-radius: 12px;
}

.os-search-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  background: #fff;
  color: #999;
  font-size: 1.25rem;
  border: 1px solid #e4e8ee;
}

.os-search-empty h2 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
  color: #10243f;
}

.os-search-empty p {
  margin: 0 auto 1.15rem;
  max-width: 420px;
  color: #666;
  line-height: 1.45;
}

.os-search-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

/* ---- Catálogo / categorias ---- */
.os-catalog-header.page-header,
.os-catalog-header {
  margin: 0 0 1rem !important;
  padding: 0 !important;
  border: none !important;
  border-bottom: none !important;
  background: transparent !important;
}

.os-catalog-title,
.os-catalog-header h1,
.os-search-page .page-header h1 {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 700;
  line-height: 1.35 !important;
  color: #10243f;
  font-family: inherit !important;
}

.os-catalog-description {
  margin: 0 0 1.25rem;
  color: #555;
  line-height: 1.5;
  font-size: 0.95rem;
}

.os-catalog-description__image {
  display: block;
  max-width: 100%;
  height: auto;
  margin-top: 0.75rem;
  border-radius: 8px;
}

/* ---- Tablet ---- */
@media (max-width: 991px) {
  .os-search-page .sidebar.span3,
  .os-search-page aside.sidebar {
    width: 220px !important;
    max-width: 220px;
    flex: 0 0 220px;
  }

  .os-search-page > .page_inner > .row-fluid,
  .os-search-page .page_inner > .row-fluid {
    gap: 1.25rem;
    column-gap: 1.25rem;
  }

  .os-search-results .os-search-grid,
  .os-search-results .products.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

/* ---- Mobile: resultados primeiro + Filtrar ---- */
@media (max-width: 767px) {
  .os-search-page .page_inner,
  .os-search-page.page.content .page_inner {
    margin-top: 0 !important;
    padding: 1rem 1rem 1.5rem !important;
  }

  .os-search-page > .page_inner > .row-fluid,
  .os-search-page .page_inner > .row-fluid {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }

  .os-search-page aside.sidebar,
  .os-search-page .sidebar.span3,
  .os-search-aside--desktop {
    display: none !important;
  }

  .os-search-page .span9 {
    width: 100% !important;
    flex: 1 1 auto !important;
    margin-left: 0 !important;
    float: none !important;
  }

  .os-search-header {
    margin-bottom: 0.75rem;
    padding: 0;
    border: none !important;
  }

  .os-catalog-title,
  .os-catalog-header h1,
  .os-search-page .page-header h1 {
    font-size: 1.1rem !important;
  }

  .os-filter-bar {
    display: block;
  }

  .os-filter-trigger {
    margin-bottom: 1.15rem;
  }

  .os-search-results .os-search-grid,
  .os-search-results .products.three {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .os-search-results .product_pod .image_container {
    aspect-ratio: 1 / 1;
  }

  .os-search-results .product_pod h3,
  .os-search-results .product_pod .titulo-produto {
    margin: 1rem 1rem 0.45rem !important;
    min-height: 0;
    font-size: 1.05rem !important;
  }

  .os-search-results .product_pod .star {
    margin: 0 1rem 0.85rem !important;
  }

  .os-search-results .product_pod .product_price {
    min-height: 0;
    padding: 0.85rem 1rem 1rem !important;
  }

  .os-search-results .product_pod h3 a {
    padding: 0 !important;
  }

  .os-search-breadcrumb.breadcrumb,
  .os-search-breadcrumb {
    font-size: 0.78rem;
    margin: 0 0 1.1rem;
    padding: 0.1rem 0 0.75rem;
    gap: 0.15rem 0.3rem;
    line-height: 1.5;
  }

  .os-search-breadcrumb .divider {
    padding: 0 0.1rem;
  }

  .os-search-empty {
    padding: 2rem 1.1rem 2.25rem;
  }

  .os-search-pagination {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Sheet só no mobile */
@media (min-width: 768px) {
  .os-filter-bar,
  .os-filter-sheet {
    display: none !important;
  }
}
