/* ======================================================================
   EMKAN v155 — geometry + search-only patch
   Changes are intentionally limited to:
   1) global desktop header/menu width
   2) one global context/back/path/rule width based on Architecture
   3) search result vertical spacing when a specific filter is selected
   ====================================================================== */

/* ----------------------------------------------------------------------
   SINGLE SOURCE OF TRUTH
   Previous desktop edge deductions:
     header:  120px -> now 360px (3x)
     context:  32px -> now  96px (3x)
   Previous laptop edge deductions:
     header:   88px -> now 264px (3x)
     context:  40px -> now 120px (3x)
   ---------------------------------------------------------------------- */
@media (min-width: 1280px) {
  :root {
    --emkan-v155-header-width: min(1296px, calc(100vw - 360px));
    
  }

  /* Mega menu / header: same width everywhere. */
  html body .page-shell > .site-header,
  html body .site-header {
    width: var(--emkan-v155-header-width) !important;
    max-width: var(--emkan-v155-header-width) !important;
    margin-left: calc((100% - var(--emkan-v155-header-width)) / 2) !important;
    margin-right: calc((100% - var(--emkan-v155-header-width)) / 2) !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  /* Architecture is the reference for every path/back/rule strip. */
  
}

@media (min-width: 901px) and (max-width: 1279px) {
  :root {
    --emkan-v155-header-width: min(1080px, calc(100vw - 264px));
    
  }

  html body .page-shell > .site-header,
  html body .site-header {
    width: var(--emkan-v155-header-width) !important;
    max-width: var(--emkan-v155-header-width) !important;
    margin-left: calc((100% - var(--emkan-v155-header-width)) / 2) !important;
    margin-right: calc((100% - var(--emkan-v155-header-width)) / 2) !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  
}

/* ----------------------------------------------------------------------
   SEARCH
   With only a few filtered results, the grid's min-height used to stretch
   the auto rows. Pin all result rows to content height so filtered views
   keep exactly the same rhythm as the "All" view.
   ---------------------------------------------------------------------- */
html body .emkan-search-results {
  align-content: start !important;
  grid-auto-rows: max-content !important;
  row-gap: 0 !important;
}

html body .emkan-search-result {
  align-self: start !important;
  min-height: 0 !important;
  margin-block: 0 !important;
}
