/* ==========================================================
   AREXMODS PRODUCT PAGE v1.6.2
   FIX:
   - restore normal page scrolling
   - keep primary product information within first desktop screen
   - keep ALL detailed information below and accessible
   ========================================================== */

html.arx-product-v162-ready,
html.arx-product-v162-ready body.arx-product-v162{
  overflow-y:auto!important;
  overflow-x:hidden!important;
}

body.arx-product-v162 main{
  width:min(1540px,calc(100% - 48px))!important;
  max-width:1540px!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-top:12px!important;
  padding-bottom:44px!important;
}

/* Breadcrumb is compact and does not waste the first screen. */
body.arx-product-v162 .arx-product-breadcrumb-v160{
  min-height:24px!important;
  margin:0 0 8px!important;
  display:flex!important;
  align-items:center!important;
}

/*
 * PRIMARY PRODUCT CARD:
 * fit title, preview, author, stats and actions into the first viewport
 * on normal desktop displays without making the page unreadably tiny.
 */
@media(min-width:1180px){

  body.arx-product-v162 .arx-product-hero-v160{
    grid-template-columns:minmax(0,49%) minmax(0,51%)!important;
    width:100%!important;
    min-height:500px!important;
    height:min(590px,calc(100dvh - 155px))!important;
    max-height:590px!important;
    margin:0 0 16px!important;
    overflow:hidden!important;
    border-radius:14px!important;
  }

  body.arx-product-v162 .arx-product-gallery-v160{
    min-height:0!important;
    height:100%!important;
    padding:22px 26px!important;
    overflow:hidden!important;
  }

  body.arx-product-v162 .arx-product-main-image-v160{
    width:100%!important;
    height:100%!important;
    max-width:650px!important;
    max-height:430px!important;
    object-fit:contain!important;
  }

  body.arx-product-v162 .arx-product-info-v160{
    min-height:0!important;
    height:100%!important;
    padding:22px 28px 18px!important;
    overflow:hidden!important;
  }

  body.arx-product-v162 .arx-product-info-v160 h1{
    margin:7px 0 9px!important;
    font-size:clamp(29px,2vw,38px)!important;
    line-height:1.05!important;
  }

  body.arx-product-v162 .arx-product-info-v160 p{
    margin-top:3px!important;
    margin-bottom:7px!important;
    line-height:1.42!important;
  }

  body.arx-product-v162 .arx-product-author-v160{
    margin-top:8px!important;
    padding:6px 9px!important;
  }

  body.arx-product-v162 .arx-product-stats-v160{
    margin-top:11px!important;
  }

  body.arx-product-v162 .arx-product-stats-v160>*{
    padding:10px 10px!important;
  }

  body.arx-product-v162 .arx-product-action-v160{
    margin-top:11px!important;
    padding:10px!important;
    border-radius:11px!important;
  }

  body.arx-product-v162 .arx-product-action-v160
  :is(a,button){
    min-height:39px!important;
    height:39px!important;
    margin-top:4px!important;
    margin-bottom:4px!important;
    padding-top:0!important;
    padding-bottom:0!important;
    border-radius:8px!important;
  }

  body.arx-product-v162 .arx-product-action-v160
  :is(a,button):first-of-type{
    min-height:43px!important;
    height:43px!important;
  }

  /*
   * Detailed information stays BELOW the hero.
   * It is not hidden and it is not squeezed into a 200px viewport.
   */
  body.arx-product-v162 .arx-product-content-layout-v160,
  body.arx-product-v162 .arx-product-content-panel-v160{
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  body.arx-product-v162 .arx-product-tabs-v160{
    position:sticky!important;
    top:72px!important;
    z-index:20!important;
  }
}

/* Restore any v1.6.1 classes in case browser retained old DOM briefly. */
body.arx-product-v162 .arx-product-dock-v161{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  border-radius:14px!important;
}

body.arx-product-v162 .arx-product-detail-pane-v161{
  max-height:none!important;
  overflow:visible!important;
}

/* Lower product information remains full and readable. */
body.arx-product-v162 .arx-product-content-panel-v160{
  margin-bottom:16px!important;
}

body.arx-product-v162 .arx-product-description-v160{
  padding:22px 24px!important;
}

/* Tablet and mobile: normal vertical flow, no clipping. */
@media(max-width:1179px){
  body.arx-product-v162 main{
    width:calc(100% - 24px)!important;
  }

  body.arx-product-v162 .arx-product-hero-v160{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }

  body.arx-product-v162 .arx-product-info-v160,
  body.arx-product-v162 .arx-product-gallery-v160{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }

  body.arx-product-v162 .arx-product-tabs-v160{
    position:static!important;
  }
}

@media(max-width:430px){
  body.arx-product-v162 main{
    width:calc(100% - 12px)!important;
  }
}
