/* =========================================================
   DEKATRADE 20.14.43 — Stage 2: catalogue / hub UX hardening
   Scope: /katalog/, category hubs, listing grids, filters,
   product-list cards and pagination. Loaded after Stage 1.
   ========================================================= */

/* ---------- Shared listing safety ---------- */
:is(.deniz-catalog-special,.deniz-hub-products,.deniz-catalog-20136,.solution-products,.diameter-products,.b2b24-section,.geo24-section,.search-products,.product-standard-related){
  overflow:clip;
}
:is(.deniz-catalog-special,.deniz-hub-products,.deniz-catalog-20136,.solution-products,.diameter-products,.b2b24-section,.geo24-section,.search-products,.product-standard-related) :is(.container,.section-head,.product-grid,.ppr-showcase-grid,.ppr211-grid,.ppr-showcase__results){
  min-width:0;
}
:is(.product-card,.ppr-showcase-card,.ppr211-card){
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
}
:is(.product-card,.ppr-showcase-card,.ppr211-card) h3,
:is(.product-card,.ppr-showcase-card,.ppr211-card) h3 a,
:is(.product-card__spec,.ppr-showcase-card__meta,.ppr211-card__meta),
.catalog-category-card__head strong,
.catalog-result-head,
.deniz-results-count{
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  hyphens:auto!important;
}

/* Long catalogue names must remain readable rather than collide with price/CTA. */
[data-deniz-product-card] :is(.product-card__body,.ppr-showcase-card__body,.ppr211-card__body)>h3{
  min-height:0!important;
  font-size:clamp(15px,1.25vw,18px)!important;
  line-height:1.30!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:4!important;
  overflow:hidden!important;
  margin-bottom:9px!important;
}
[data-deniz-product-card] :is(.product-card__spec,.ppr-showcase-card__meta,.ppr211-card__meta){
  min-height:0!important;
  line-height:1.42!important;
  -webkit-line-clamp:3!important;
}
[data-deniz-product-card] :is(.product-card__price,.ppr-showcase-card__price,.ppr211-card__price){
  min-height:42px!important;
  align-content:center!important;
}
[data-deniz-product-card] :is(.product-card__price,.ppr-showcase-card__price,.ppr211-card__price) strong{
  overflow-wrap:anywhere!important;
}

/* ---------- Main /katalog/ ---------- */
.deniz-catalog-special .section-head{margin-bottom:22px!important}
.deniz-catalog-special .section-head h2{font-size:clamp(28px,3vw,42px)!important;line-height:1.08!important}
.deniz-catalog-special .section-head p{max-width:760px!important;line-height:1.55!important}

.deniz-unified-catalog-layout{
  grid-template-columns:240px minmax(0,1fr)!important;
  gap:22px!important;
}
.deniz-unified-catalog-layout>.catalog-filter.deniz-filter-standard{
  top:88px!important;
  padding:18px!important;
  border-radius:16px!important;
  box-shadow:0 8px 26px rgba(19,52,83,.055)!important;
}
.deniz-unified-catalog-layout .catalog-filter.deniz-filter-standard>label,
.deniz-unified-catalog-layout .catalog-filter__more-grid>label{
  margin:0 0 14px!important;
  line-height:1.25!important;
}
.deniz-unified-catalog-layout .catalog-filter.deniz-filter-standard :is(select,input[type="search"],input[type="text"]){
  min-height:46px!important;
  margin-top:7px!important;
  padding-left:12px!important;
  font-size:14px!important;
  line-height:1.2!important;
}
.deniz-unified-catalog-layout .catalog-filter__actions{margin-top:4px!important}
.deniz-unified-catalog-layout .filter-reset{
  min-height:38px!important;
  color:#526b82!important;
  font-size:12px!important;
  text-decoration:none!important;
}
.deniz-unified-catalog-layout .filter-reset:hover{text-decoration:underline!important}

.deniz-unified-catalog-results .product-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
}
.deniz-unified-catalog-results [data-deniz-product-card] .product-card__image{
  height:205px!important;
  min-height:205px!important;
  max-height:205px!important;
  padding:16px!important;
  background:#fff!important;
}
.deniz-unified-catalog-results [data-deniz-product-card] .product-card__image>img{
  inset:16px!important;
  width:calc(100% - 32px)!important;
  height:calc(100% - 32px)!important;
  object-fit:contain!important;
}
.deniz-unified-catalog-results [data-deniz-product-card] .product-card__body{padding:16px!important}
.deniz-unified-catalog-results .product-card__top{min-width:0!important;gap:8px!important}
.deniz-unified-catalog-results .product-card__brand{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.deniz-unified-catalog-results .stock-badge{flex:0 0 auto!important;max-width:48%!important}
.deniz-unified-catalog-results [data-deniz-product-card] .deniz-product-rating--compact{
  min-height:42px!important;
  padding:6px 8px!important;
  gap:7px!important;
}
.deniz-unified-catalog-results [data-deniz-product-card] .deniz-rating-stars{font-size:16px!important;letter-spacing:.7px!important}
.deniz-unified-catalog-results [data-deniz-product-card] .deniz-rating-label{font-size:11px!important;white-space:normal!important}
.deniz-unified-catalog-results [data-deniz-product-card] .product-card__source{min-height:16px!important;margin:0 0 6px!important}
.deniz-unified-catalog-results [data-deniz-product-card] .product-card__volume-note{display:none!important}
.deniz-unified-catalog-results [data-deniz-product-card] .product-card__details{margin:2px 0 12px!important}

/* CTA: never clip labels. WhatsApp is primary, phone remains obvious but secondary. */
.deniz-unified-catalog-results .product-card__actions{
  display:grid!important;
  grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr)!important;
  gap:8px!important;
  width:100%!important;
  height:auto!important;
  min-height:46px!important;
  max-height:none!important;
}
.deniz-unified-catalog-results .product-card__actions>.btn{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  height:auto!important;
  max-height:none!important;
  padding:9px 8px!important;
  gap:6px!important;
  border-radius:10px!important;
  font-size:12px!important;
  line-height:1.15!important;
  white-space:normal!important;
  text-align:center!important;
  overflow:visible!important;
}
.deniz-unified-catalog-results .product-card__actions>.btn>span{
  min-width:0!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
}
.deniz-unified-catalog-results .product-card__actions>.btn>svg{
  flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;
}

.catalog-result-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:8px 18px!important;
  margin:0 0 16px!important;
  padding:0 0 12px!important;
  border-bottom:1px solid #e5edf4!important;
}
.catalog-result-head strong{font-size:15px!important;color:#173653!important}
.catalog-result-head span{max-width:520px!important;color:#6b8094!important;font-size:12px!important;line-height:1.4!important;text-align:right!important}

/* Active filters: useful on desktop, swipeable on narrow screens. */
.catalog-active-filters{margin:0 0 14px!important;gap:7px!important}
.catalog-active-filters>a{max-width:100%!important;min-height:34px!important;padding:5px 9px!important}
.catalog-active-filters>a span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

/* Catalogue categories: reduce visual wall, preserve links/SEO. */
.catalog-groups-section{padding-top:44px!important;padding-bottom:44px!important}
.catalog-category-grid{gap:12px!important}
.catalog-category-card{padding:14px!important;min-height:118px!important}
.catalog-category-card__head{font-size:16px!important;line-height:1.25!important}
.catalog-category-card__subs{gap:5px!important;margin-top:10px!important}
.catalog-category-card__subs a{padding:5px 8px!important;font-size:11px!important}
.catalog-category-more>summary{min-height:46px!important}

/* Pagination: compact and explanatory. */
.catalog-pagination,.deniz-pagination{
  max-width:100%!important;
  overflow:visible!important;
}
.catalog-pagination{margin-top:26px!important;padding-top:18px!important}
.catalog-pagination__status{font-size:12px!important;line-height:1.4!important}
.catalog-pagination .page-numbers,.deniz-pagination .page-numbers{
  min-width:40px!important;
  min-height:40px!important;
  height:auto!important;
  padding:7px 10px!important;
  border-radius:9px!important;
  font-size:13px!important;
  line-height:1.15!important;
  box-sizing:border-box!important;
}
.deniz-pagination{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;margin-top:24px!important}

/* ---------- Category hubs / listings ---------- */
.ppr-showcase__layout,.ppr211-catalog__layout{
  grid-template-columns:240px minmax(0,1fr)!important;
  gap:22px!important;
  align-items:start!important;
}
.ppr-showcase-filter,.ppr211-filter.ppr-showcase-filter{
  width:100%!important;
  min-width:0!important;
  top:88px!important;
  border-radius:16px!important;
  padding:18px!important;
  box-shadow:0 8px 26px rgba(19,52,83,.05)!important;
}
.ppr-showcase__head{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:14px!important;
  margin-bottom:18px!important;
}
.ppr-showcase__head>div{min-width:0!important}
.ppr-showcase__head h2{overflow-wrap:anywhere!important;line-height:1.12!important}
.ppr-showcase__head>label{flex:0 0 220px!important;min-width:0!important}
.ppr-showcase__head select{width:100%!important;min-height:42px!important}

.ppr-showcase-grid,
.deniz-catalog-20136 .ppr-showcase-grid,
.ppr211-grid:not(.ppr211-grid--diameters){
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;
}
.ppr211-grid--fittings{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

/* Full-width related/product listing sections use readable 3-column cards. */
:is(.deniz-hub-products,.solution-products,.diameter-products,.b2b24-section,.geo24-section,.search-products,.product-standard-related) .product-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
}

/* Category card imagery and fallback remain visibly intentional. */
[data-deniz-product-card] :is(.ppr-showcase-card__image,.ppr211-card__image){
  height:205px!important;
  min-height:205px!important;
  max-height:205px!important;
  padding:16px!important;
  background:#fff!important;
}
[data-deniz-product-card] :is(.ppr-showcase-card__image,.ppr211-card__image)>img{
  inset:16px!important;
  width:calc(100% - 32px)!important;
  height:calc(100% - 32px)!important;
  object-fit:contain!important;
  object-position:center!important;
}
/* The verified generic placeholder is an information panel, not a product cut-out:
   do not crop it through the normalisation canvas. */
[data-deniz-product-card] :is(.ppr-showcase-card__image,.ppr211-card__image) img[src*="product-placeholder"]{
  position:static!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  opacity:.92!important;
}

:is(.ppr-showcase-card__body,.ppr211-card__body){padding:16px!important}
:is(.ppr-showcase-card__stock,.ppr211-card__stock){max-width:100%!important;white-space:normal!important;line-height:1.3!important}
:is(.ppr-showcase-card__actions,.ppr211-card__actions){min-width:0!important;gap:8px!important}
.ppr-showcase-card__request{
  min-width:0!important;
  min-height:46px!important;
  padding:9px 12px!important;
  white-space:normal!important;
  text-align:center!important;
  line-height:1.15!important;
}
.ppr-showcase-card__details{
  flex:0 0 46px!important;
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  min-height:46px!important;
}
.ppr211-card__actions .btn{min-width:0!important;white-space:normal!important;text-align:center!important}
.ppr211-card__actions .text-link{min-width:0!important;white-space:normal!important}

/* Filter controls are finger-friendly and visually identical across hubs. */
.ppr-showcase-filter fieldset,.ppr211-filter fieldset{min-width:0!important}
.ppr-showcase-filter label,.ppr211-filter label{min-width:0!important}
.ppr-showcase-filter input[type="checkbox"],.ppr-showcase-filter input[type="radio"],
.ppr211-filter input[type="checkbox"],.ppr211-filter input[type="radio"]{
  flex:0 0 18px!important;
  width:18px!important;
  height:18px!important;
}
.ppr-showcase-filter :is(select,input[type="search"],input[type="text"]),
.ppr211-filter :is(select,input[type="search"],input[type="text"]){
  max-width:100%!important;
  min-height:44px!important;
}
.deniz-catalog-filter>summary{font-weight:800!important;color:#173653!important}

/* Empty-state panel must span the whole product grid instead of becoming a tiny card. */
.product-grid>.empty-panel,.ppr-showcase-grid>.empty-panel,.ppr211-grid>.empty-panel{
  grid-column:1/-1!important;
  width:100%!important;
  min-width:0!important;
}
.empty-panel{overflow-wrap:anywhere!important}
.empty-panel .btn{white-space:normal!important;text-align:center!important}

/* ---------- Tablet ---------- */
@media(max-width:1100px){
  .deniz-unified-catalog-layout,.ppr-showcase__layout,.ppr211-catalog__layout{
    grid-template-columns:220px minmax(0,1fr)!important;
    gap:18px!important;
  }
  .deniz-unified-catalog-results .product-grid,
  .ppr-showcase-grid,
  .deniz-catalog-20136 .ppr-showcase-grid,
  .ppr211-grid:not(.ppr211-grid--diameters),
  :is(.deniz-hub-products,.solution-products,.diameter-products,.b2b24-section,.geo24-section,.search-products,.product-standard-related) .product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .ppr211-grid--fittings{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:920px){
  .deniz-unified-catalog-layout,.ppr-showcase__layout,.ppr211-catalog__layout{grid-template-columns:1fr!important}
  .deniz-unified-catalog-layout>.catalog-filter.deniz-filter-standard,
  .ppr-showcase-filter,.ppr211-filter.ppr-showcase-filter{position:static!important;top:auto!important}

  /* Main catalogue filter becomes a compact two-column panel. */
  .deniz-unified-catalog-layout .catalog-filter.deniz-filter-standard{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
    padding:16px!important;
  }
  .deniz-unified-catalog-layout .catalog-filter__more,
  .deniz-unified-catalog-layout .catalog-filter__actions{grid-column:1/-1!important}
  .deniz-unified-catalog-layout .catalog-filter__more>summary{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    min-height:42px!important;
    padding:0 2px!important;
    list-style:none!important;
    cursor:pointer!important;
    color:#173653!important;
    font-weight:800!important;
  }
  .deniz-unified-catalog-layout .catalog-filter__more>summary::-webkit-details-marker{display:none!important}
  .deniz-unified-catalog-layout .catalog-filter__more>summary:after{content:"+";font-size:20px!important;line-height:1!important;color:#145aa6!important}
  .deniz-unified-catalog-layout .catalog-filter__more[open]>summary:after{content:"−"}
  .deniz-unified-catalog-layout .catalog-filter__more-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
    padding-top:10px!important;
  }
  .deniz-unified-catalog-layout .catalog-filter__more-grid>label{margin:0!important}

  /* Hub filter details use their summary on tablet/mobile. */
  .deniz-catalog-filter{display:block!important;border:1px solid #dbe4ed!important;border-radius:14px!important;background:#fff!important;overflow:hidden!important}
  .deniz-catalog-filter>summary{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:48px!important;padding:0 16px!important;cursor:pointer!important;list-style:none!important}
  .deniz-catalog-filter>summary::-webkit-details-marker{display:none!important}
  .deniz-catalog-filter>summary:after{content:"+";font-size:20px!important;color:#145aa6!important}
  .deniz-catalog-filter[open]>summary:after{content:"−"}
  .deniz-catalog-filter>.ppr-showcase-filter{border:0!important;border-top:1px solid #e6edf4!important;border-radius:0!important;box-shadow:none!important;margin:0!important}

  .ppr-showcase__head{align-items:flex-start!important}
  .ppr-showcase__head>label{flex-basis:200px!important}
  .catalog-result-head span{text-align:left!important}
}

/* ---------- Mobile ---------- */
@media(max-width:620px){
  .catalog-groups-section{padding-top:30px!important;padding-bottom:30px!important}
  .catalog-category-grid{grid-template-columns:1fr!important}
  .catalog-category-card{min-height:0!important;padding:13px!important}
  .catalog-category-card__subs{max-height:none!important;overflow:visible!important}
  .catalog-category-grid--primary .catalog-category-card__subs a:nth-child(n+5){display:none!important}

  .deniz-unified-catalog-layout .catalog-filter.deniz-filter-standard,
  .deniz-unified-catalog-layout .catalog-filter__more-grid{grid-template-columns:1fr!important}
  .deniz-unified-catalog-layout .catalog-filter.deniz-filter-standard{gap:9px!important;padding:14px!important}
  .deniz-unified-catalog-layout .catalog-filter.deniz-filter-standard>label{margin:0!important}

  .deniz-unified-catalog-results .product-grid,
  .ppr-showcase-grid,
  .deniz-catalog-20136 .ppr-showcase-grid,
  .ppr211-grid:not(.ppr211-grid--diameters),
  .ppr211-grid--fittings,
  :is(.deniz-hub-products,.solution-products,.diameter-products,.b2b24-section,.geo24-section,.search-products,.product-standard-related) .product-grid{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }
  .deniz-unified-catalog-results [data-deniz-product-card] .product-card__image,
  [data-deniz-product-card] :is(.ppr-showcase-card__image,.ppr211-card__image){
    height:190px!important;min-height:190px!important;max-height:190px!important;
  }
  [data-deniz-product-card] :is(.product-card__body,.ppr-showcase-card__body,.ppr211-card__body)>h3{
    -webkit-line-clamp:5!important;
    font-size:16px!important;
  }
  .deniz-unified-catalog-results .product-card__actions{
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;
  }
  .deniz-unified-catalog-results .product-card__actions>.btn{font-size:12px!important;padding-inline:7px!important}

  .ppr-showcase__head{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .ppr-showcase__head>label{width:100%!important;flex-basis:auto!important}

  .catalog-result-head{flex-direction:column!important;gap:4px!important}
  .catalog-result-head span{text-align:left!important}
  .catalog-active-filters{overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:4px!important;scrollbar-width:none!important}
  .catalog-active-filters::-webkit-scrollbar{display:none!important}
  .catalog-active-filters>a{flex:0 0 auto!important;max-width:86vw!important}

  .catalog-pagination{align-items:flex-start!important;flex-direction:column!important;gap:10px!important}
  .catalog-pagination .page-numbers,.deniz-pagination{max-width:100%!important}
  .catalog-pagination .page-numbers{gap:5px!important}
  .catalog-pagination a,.catalog-pagination span.page-numbers,.deniz-pagination .page-numbers{min-width:38px!important;min-height:38px!important;padding:6px 9px!important}
}

@media(max-width:390px){
  .deniz-unified-catalog-results .product-card__actions{grid-template-columns:1fr!important}
  .deniz-unified-catalog-results .product-card__actions>.btn{width:100%!important}
  .ppr-showcase-card__actions{display:grid!important;grid-template-columns:minmax(0,1fr) 46px!important}
  .ppr211-card__actions{display:grid!important;grid-template-columns:1fr!important}
  .ppr211-card__actions>*{width:100%!important;justify-content:center!important}
}

/* v20.14.43 second-pass: keep pagination status text separate from legacy page-number pills. */
.catalog-pagination__status{
  display:block!important;
  min-width:0!important;
  min-height:0!important;
  width:auto!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  line-height:1.45!important;
}
.catalog-pagination>ul.page-numbers{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  flex-wrap:wrap!important;
  margin:0!important;
  padding:0!important;
  list-style:none!important;
}
.catalog-pagination>ul.page-numbers>li{margin:0!important;padding:0!important;list-style:none!important}
.catalog-pagination>ul.page-numbers>li>a.page-numbers,
.catalog-pagination>ul.page-numbers>li>span.page-numbers{
  display:grid!important;
  place-items:center!important;
  min-width:40px!important;
  min-height:40px!important;
  width:auto!important;
  height:auto!important;
  padding:7px 10px!important;
}
