/* Compact catalog/category layout — shared by /magaza/ and every staged product-category route. */

/* The old model-count strip is intentionally removed from the template. Keep this defensive
   guard so cached/legacy markup cannot reintroduce it. */
.tc-catalog-summary{display:none!important}

/* Preserve the complete technical hierarchy while taking the catalog hero from roughly 300px
   to approximately 155px on a normal desktop route. */
.tc-catalog-hero{padding:22px 0 24px!important}
.tc-catalog-hero .tc-kicker{margin:0!important;font-size:10px!important;letter-spacing:1.15px}
.tc-catalog-crumb{gap:6px!important;margin:7px 0 6px!important;font-size:11px!important}
.tc-catalog-hero h1{margin:0 0 8px!important;font-size:44px!important;line-height:1.05!important}
.tc-catalog-hero>.shell>p:last-child{max-width:760px;margin:0!important;font-size:14px!important;line-height:1.45!important}
.tc-catalog-wrap{margin-top:20px!important}
.tc-catalog-results__head{margin:11px 0 13px!important}
.tc-catalog-results__head p{margin:0!important}

/* Long category names remain legible, but never make an uncontrolled third text line. */
.tc-catalog-chips>a,
.tc-catalog-filter__list>a>span{
  white-space:normal!important;
  overflow:hidden;
  text-overflow:ellipsis;
  overflow-wrap:anywhere;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

/* Wide desktop: all nine quick categories deliberately occupy two balanced rows. */
@media(min-width:1120px){
  .tc-catalog-chips{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    grid-auto-rows:54px;
    gap:8px!important;
    width:100%;
    margin:0 0 13px!important;
    overflow:visible!important;
  }
  .tc-catalog-chips>a{
    display:-webkit-box!important;
    box-sizing:border-box;
    width:100%!important;
    min-width:0!important;
    height:54px;
    margin:0!important;
    padding:9px 12px!important;
    font-size:12px!important;
    line-height:1.25!important;
    text-align:left;
    -webkit-line-clamp:2;
  }
  .tc-catalog-filter__list>a>span{display:-webkit-box;-webkit-line-clamp:2}
}

/* Compact desktop/tablet widths preserve readable chips rather than forcing clipped text. */
@media(min-width:821px) and (max-width:1119px){
  .tc-catalog-chips{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-rows:54px;
    gap:8px!important;
    width:100%;
    overflow:visible!important;
  }
  .tc-catalog-chips>a{
    display:-webkit-box!important;
    box-sizing:border-box;
    width:100%!important;
    min-width:0!important;
    height:54px;
    margin:0!important;
    padding:9px 12px!important;
    font-size:12px!important;
    line-height:1.25!important;
    -webkit-line-clamp:2;
  }
}

@media(max-width:820px){
  .tc-catalog-hero{padding:22px 0 24px!important}
  .tc-catalog-hero h1{margin-bottom:7px!important;font-size:32px!important;line-height:1.08!important}
  .tc-catalog-hero>.shell>p:last-child{font-size:13px!important;line-height:1.42!important}
  .tc-catalog-crumb{margin:7px 0 6px!important}
  .tc-catalog-wrap{margin-top:16px!important}
  .tc-catalog-chips>a{display:-webkit-box!important;-webkit-line-clamp:2}
  .tc-catalog-filter__list>a>span{display:-webkit-box;-webkit-line-clamp:2}
}
