/* MAYAN RC21: Products anchor shows its final catalogue CTA beneath the sticky nav.
 * Keep the full section in normal document flow; never crop cards or hide the CTA.
 * Only affects the homepage #categories panel in both languages. */
body.site--cinema #categories.sec-cat{
  box-sizing:border-box!important;
  min-height:0!important;
  height:auto!important;
  overflow:visible!important;
  padding-block:clamp(20px,3.5svh,34px)!important;
}
body.site--cinema #categories .sec-head{margin-bottom:12px!important;}
body.site--cinema #categories .sec-title{margin:.48rem 0 .28rem!important;}
body.site--cinema #categories .sec-line{margin-top:.52rem!important;}
body.site--cinema #categories .cat-paths{margin-top:.85rem!important;}
body.site--cinema #categories .catalog-strip.mt-5{margin-top:.88rem!important;}
body.site--cinema #categories .catalog-strip{padding:.8rem 1rem!important;}

/* Match the visible space below the sticky navbar. If content is taller,
 * its natural height wins and the user can scroll normally. */
@media (min-width:768px){
  body.site--cinema #categories.sec-cat{
    display:flex!important;
    align-items:center!important;
    min-height:calc(100svh - var(--mayan-current-header,124px))!important;
  }
  body.site--cinema #categories>.container{flex:none;width:94%;}
}

/* Laptop screens often have 768px height: preserve every part of Products,
 * including the 'Open catalogue' button, rather than letting it fall below the fold. */
@media (min-width:768px) and (max-height:850px){
  body.site--cinema #categories.sec-cat{padding-block:clamp(16px,2.5svh,23px)!important;}
  body.site--cinema #categories .sec-head{margin-bottom:9px!important;}
  body.site--cinema #categories .sec-tag{padding:.28rem .85rem!important;}
  body.site--cinema #categories .sec-title{margin:.38rem 0 .18rem!important;}
  body.site--cinema #categories .sec-lead{font-size:.86rem!important;line-height:1.55!important;}
  body.site--cinema #categories .sec-line{margin-top:.45rem!important;}
  body.site--cinema #categories .cat-carousel__track .cat-card{width:clamp(158px,17vw,180px)!important;}
  body.site--cinema #categories .cat-card__media{aspect-ratio:6 / 5!important;}
  body.site--cinema #categories .cat-card__body{padding:.46rem .65rem .55rem!important;}
  body.site--cinema #categories .cat-card p{font-size:.69rem!important;line-height:1.4!important;}
  body.site--cinema #categories .cat-card__meta{padding-top:.3rem!important;}
  body.site--cinema #categories .cat-paths{margin-top:.58rem!important;}
  body.site--cinema #categories .cat-paths .btn{padding:.5rem 1rem!important;}
  body.site--cinema #categories .catalog-strip.mt-5{margin-top:.64rem!important;}
  body.site--cinema #categories .catalog-strip{padding:.65rem .9rem!important;gap:.65rem!important;}
}
/* Phones are scrollable by design. Reduce dead space but do not shrink text
 * or force a 'full viewport' height for an inevitably stacked layout. */
@media (max-width:767.98px){
  body.site--cinema #categories.sec-cat{padding-block:21px!important;}
  body.site--cinema #categories .sec-head{margin-bottom:12px!important;}
  body.site--cinema #categories .cat-paths{margin-top:.75rem!important;}
  body.site--cinema #categories .catalog-strip.mt-5{margin-top:.75rem!important;}
  body.site--cinema #categories .catalog-strip{padding:.8rem .9rem!important;}
}
