/* ==========================================================================
   Tipo-produto (tax) — Catálogo
   ========================================================================== */

.type-product-catalog { margin-top: 42px; }

/* Layout principal: sidebar + conteúdo */
.type-product-catalog__layout{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:56px;
  align-items:start;
}

/* Sidebar sticky (desktop) */
.type-product-catalog__sidebar{
  position:sticky;
  top:var(--catalog-sticky-top,24px);
  align-self:start;
  max-height:calc(100vh - var(--catalog-sticky-top,24px) - 24px);
  overflow:auto;
  padding-right:10px;
}

.type-product-catalog__sidebar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(0,0,0,.10);
  margin-bottom:16px;
}

.type-product-catalog__sidebar-title{
  margin:0;
  font-size:12px;
  letter-spacing:.10em;
  text-transform:uppercase;
  font-weight:600;
}

.type-product-catalog__sidebar-close{
  display:none;
  background:none;
  border:1px solid rgba(0,0,0,.25);
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

/* Grupos de filtros */
.type-product-catalog__groups{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.catalog-filter{
  border-bottom:1px solid rgba(0,0,0,.08);
  padding-bottom:12px;
}

.catalog-filter:last-child{ border-bottom:0; padding-bottom:0; }

.catalog-filter__summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  padding:3px 0;
  margin:0;
  font-size:12px;
  letter-spacing:.10em;
  text-transform:uppercase;
  font-weight:600;
}

.catalog-filter__summary::-webkit-details-marker{ display:none; }
.catalog-filter__summary::after{ content:"+"; font-size:18px; line-height:1; }
.catalog-filter[open] .catalog-filter__summary::after{ content:"–"; }

.catalog-filter__body{ padding-top:6px; padding-left: 10px; }

.catalog-filter__list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.catalog-filter__link{
  text-decoration:none;
  color:inherit;
  font-size:13px;
  line-height:1.3;
  display:inline-flex;
  align-items:center;
  gap:10px;
}

.catalog-filter__link:hover{ color: rgba(0, 0, 0, 0.8); text-decoration:underline; }
.catalog-filter__link.is-active{ font-weight:700; }

/* Categorias (markup vindo do get_categories_sidebar) */
.type-product-catalog .sidebar__list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.type-product-catalog .sidebar__parent-name,
.type-product-catalog .sidebar__item a{
  text-decoration:none;
  color:inherit;
  font-size:14px;
  line-height:1.35;
}

.type-product-catalog .sidebar__item a.active,
.type-product-catalog .sidebar__parent-name.sidebar__parent-name--active{
  font-weight:700;
}

.type-product-catalog .sidebar__parent ul{
  list-style:none;
  padding-left:14px;
  margin:8px 0 0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* Conteúdo */
.type-product-catalog__topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(0,0,0,.10);
  margin-bottom:16px;
}

.type-product-catalog__count{
  margin:0;
  font-size:11px;
  letter-spacing:.10em;
  text-transform:uppercase;
}

/* Botão de abrir filtros (mobile) */
.type-product-catalog__open{
  display:none;
  background:none;
  border:1px solid rgba(0,0,0,.25);
  border-radius:999px;
  padding:10px 14px;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

/* Filter tags */
.type-product-catalog__tags{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.filter-tags{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.filter-tag{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:inherit;
  border:1px solid rgba(0,0,0,.25);
  border-radius:999px;
  padding:8px 12px;
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.filter-tag__icon{ font-size:14px; line-height:1; }

.filter-tags__clear{
  text-decoration:underline;
  color:inherit;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

/* Grid de produtos: respiro vertical */
.type-product-catalog__grid > .type-product-catalog__item{ margin-bottom:34px; }

/* Acessibilidade: foco visível */
.type-product-catalog a:focus-visible,
.type-product-catalog button:focus-visible,
.type-product-catalog summary:focus-visible{
  outline:2px solid currentColor;
  outline-offset:3px;
}

/* ==========================================================================
   Mobile — filtros off-canvas + overlay
   ========================================================================== */
@media (max-width: 991px){
  .type-product-catalog__layout{ grid-template-columns:1fr; gap:0; }

  .type-product-catalog__open{ display:inline-flex; }

  .type-product-catalog__sidebar{
    position:fixed;
    top:0; left:0; bottom:0;
    width:min(86vw,360px);
    max-height:none;
    height: 100%;
    overflow:auto;
    background:#fff;
    padding:18px 18px 24px;
    transform:translateX(-110%);
    transition:transform .25s ease;
    z-index:10002;
  }

  .type-product-catalog__sidebar-close{ display:inline-flex; }

  .type-product-catalog.is-filters-open .type-product-catalog__sidebar{
    transform:translateX(0);
  }

  .type-product-catalog__overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.40);
    opacity:0;
    pointer-events:none;
    transition:opacity .25s ease;
    z-index:10001;
  }

  .type-product-catalog.is-filters-open .type-product-catalog__overlay{
    opacity:1;
    pointer-events:auto;
  }

  body.type-product-filters-open{ overflow:hidden; }

  .filter-tags__clear{ width:100%; }
}

.sidebar__parent {
  position: relative;
}

.sidebar__toggle {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  margin-left: auto;
  line-height: 1;
}

.sidebar__toggle::before {
  content: "−";
  display: inline-block;
  font-size: 18px;
}

/* Quando fechado, vira “+” */
.sidebar__parent:not(.is-open) > .sidebar__toggle::before {
  content: "+";
}

.sidebar__parent > ul {
  margin-top: 8px;
  padding-right: 6px;
}

.sidebar__toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* sticky sidebar filters */
@media (max-width: 991px){
   .type-product-catalog__topbar{
     position: sticky;
     top: calc(var(--jomo-sticky-offset, 0px) + env(safe-area-inset-top, 0px));
    z-index: 999;
     background: #fff;
    margin-bottom: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,.10);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

