/* ORAN Store TEST r15 — PrestaShop 1.7.8.11 + r14 theme.
   Scope: ONLY category pages that currently show r14's empty-state card.
   The small repeated label observed on the left is ps_categorytree's sidebar
   current-category link; the big title is the category page's real H1.
   Do not suppress category images/headings globally.
   When products arrive, :has(.oran-r14-empty-state) stops matching and
   the normal left sidebar, filtering, grid, and pagination remain intact.
   CSS :has() is progressive enhancement; unsupported browsers retain r14.
*/

/* An empty category needs no category-tree side column. */
body#category:has(#products .oran-r14-empty-state) #left-column {
  display: none !important;
}

/* Expand the actual listing column into the space freed by the sidebar. */
body#category:has(#products .oran-r14-empty-state) #content-wrapper {
  box-sizing: border-box;
  float: none !important;
  clear: both;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  padding-left: 15px;
  padding-right: 15px;
}

/* Classic .block-category defaults to min-height:13.75rem (~220px),
   which created the excessive vertical gap before the empty-state card. */
body#category:has(#products .oran-r14-empty-state) #js-product-list-header .block-category {
  min-height: 0 !important;
  height: auto !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body#category:has(#products .oran-r14-empty-state) #js-product-list-header .block-category h1 {
  margin: 0 !important;
  padding: 0 !important;
  color: #152e5a;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: clamp(24px, 2.7vw, 33px);
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
}

/* Remove inherited inner padding on the empty-result wrapper while
   retaining the r14 announcement and accessible home link. */
body#category:has(#products .oran-r14-empty-state) #products .page-not-found {
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 26px;
  padding: 0;
  background: transparent;
  overflow: visible;
}
body#category:has(#products .oran-r14-empty-state) #products .oran-r14-empty-state {
  margin: 10px auto 22px;
}

@media (max-width: 767px) {
  body#category:has(#products .oran-r14-empty-state) #content-wrapper {
    padding-left: 10px;
    padding-right: 10px;
  }
  body#category:has(#products .oran-r14-empty-state) #js-product-list-header .block-category {
    margin-bottom: 14px !important;
  }
  body#category:has(#products .oran-r14-empty-state) #js-product-list-header .block-category h1 {
    font-size: clamp(22px, 6vw, 27px);
  }
  body#category:has(#products .oran-r14-empty-state) #products .oran-r14-empty-state {
    margin: 8px auto 18px;
  }
}
