/* Shop layout & filters */

.to-shop-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.to-shop-filters-toggle { display: none; margin-block-end: 1rem; }

.to-filters {
  background: #fff;
  border: 1px solid var(--to-line);
  border-radius: 18px;
  padding: 1rem;
  position: sticky;
  inset-block-start: calc(var(--to-header-h) + 24px);
}

.to-filters__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-block-end: 0.75rem;
}
.to-filters__head h3 { margin: 0; font-size: 1.05rem; }
.to-filters__clear { color: var(--to-accent); font-size: 0.85rem; }

.to-filter { border-block-end: 1px solid var(--to-line); padding-block: 0.65rem; }
.to-filter summary {
  cursor: pointer; font-weight: 600; list-style: none;
}
.to-filter summary::-webkit-details-marker { display: none; }
.to-filter__body { margin-block-start: 0.65rem; display: grid; gap: 0.4rem; }
.to-filter__body--scroll { max-height: 220px; overflow: auto; padding-inline-end: 0.25rem; }
.to-filter__search {
  width: 100%; min-height: 38px; border: 1px solid var(--to-line);
  border-radius: 10px; padding: 0.4rem 0.7rem; margin-block-end: 0.4rem;
}
.to-filter__price { grid-template-columns: 1fr auto 1fr; align-items: center; }
.to-filter__price input {
  width: 100%; min-height: 40px; border: 1px solid var(--to-line);
  border-radius: 10px; padding: 0.35rem 0.55rem;
}

.to-check {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 0.55rem; align-items: center; font-size: 0.92rem;
}
.to-check em { color: var(--to-muted); font-style: normal; font-size: 0.8rem; }
.to-check--sale { margin-block: 0.75rem; }

.to-shop-layout .woocommerce-result-count,
.to-shop-layout .woocommerce-ordering {
  margin-block-end: 1rem;
}

@media (max-width: 992px) {
  .to-shop-layout { grid-template-columns: 1fr; }
  .to-shop-filters-toggle { display: inline-flex; }
  .to-shop-layout__sidebar {
    display: none; position: fixed; inset: 0; z-index: 1500;
    background: rgba(0,0,0,.4); padding: 1rem;
  }
  .to-shop-layout__sidebar.is-open { display: block; }
  .to-shop-layout__sidebar .to-filters,
  .to-shop-layout__sidebar .to-shop-sidebar {
    width: min(100%, 360px); max-height: calc(100vh - 2rem);
    overflow: auto; background: #fff; border-radius: 16px;
  }
  .to-filters { position: static; }
}
