html.catalog-inline-modal-open body{
  overflow:hidden;
}
.catalog-inline-panels:not([hidden]){
  position:fixed !important;
  inset:0 !important;
  z-index:2200 !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding:24px 16px !important;
  background:rgba(15,23,42,.46) !important;
}
.catalog-inline-panel:not([hidden]){
  display:flex !important;
  flex-direction:column;
  width:min(920px,calc(100vw - 32px));
  max-height:min(78vh,760px);
  overflow:hidden;
  border:1px solid rgba(203,213,225,.95);
  border-radius:26px;
  background:#fff;
  box-shadow:0 26px 80px rgba(15,23,42,.28);
}
.catalog-inline-panel__head{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px 14px;
  border-bottom:1px solid rgba(226,232,240,.95);
  background:#fff;
  color:#0f172a;
  font-size:18px;
  font-weight:900;
  letter-spacing:0;
}
.catalog-inline-panel__close{
  width:44px;
  height:44px;
  flex:0 0 auto;
  border:1px solid rgba(203,213,225,.95);
  border-radius:999px;
  background:#fff;
  color:#0f172a;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
.catalog-filter-chip-row--inline{
  display:block !important;
  min-height:0;
  overflow:auto;
  padding:16px 20px 22px;
}
.catalog-filter-groups{
  display:grid;
  gap:14px;
}
.catalog-filter-search{
  position:sticky;
  top:0;
  z-index:2;
  padding-bottom:2px;
  background:#fff;
}
.catalog-filter-search input{
  width:100%;
  min-height:48px;
  padding:0 16px;
  border:1px solid rgba(203,213,225,.95);
  border-radius:16px;
  background:#f8fafc;
  color:#0f172a;
  font:inherit;
  font-weight:700;
  outline:none;
}
.catalog-filter-search input:focus{
  border-color:#94a3b8;
  background:#fff;
  box-shadow:0 0 0 3px rgba(148,163,184,.18);
}
.catalog-filter-group{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid rgba(226,232,240,.95);
  border-radius:20px;
  background:#f8fafc;
}
.catalog-filter-group[hidden]{
  display:none !important;
}
.catalog-filter-group--all{
  padding:0;
  border:0;
  background:transparent;
}
.catalog-filter-group__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#334155;
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.catalog-filter-group__head span:last-child{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#e2e8f0;
  color:#475569;
  font-size:11px;
}
.catalog-filter-group__chips{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(168px,1fr));
  gap:8px;
  align-items:stretch;
}
.catalog-filter-groups--brand .catalog-filter-group__chips{
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
}
.catalog-filter-chip{
  min-width:0 !important;
}
.catalog-filter-chip--structured,
.catalog-filter-chip--all{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  min-height:42px;
  padding:9px 12px !important;
  border:1px solid rgba(203,213,225,.95) !important;
  border-radius:14px !important;
  background:#fff !important;
  color:#0f172a !important;
  text-align:left;
  font-size:13px;
  font-weight:850;
  line-height:1.2;
  box-shadow:none !important;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;
}
.catalog-filter-chip--structured:hover,
.catalog-filter-chip--all:hover{
  border-color:#94a3b8 !important;
  background:#f8fafc !important;
  transform:translateY(-1px);
}
.catalog-filter-chip--structured.is-active,
.catalog-filter-chip--all.is-active{
  border-color:#e31e24 !important;
  background:#e31e24 !important;
  color:#fff !important;
  box-shadow:0 12px 28px rgba(227,30,36,.18) !important;
}
.catalog-filter-chip--all{
  width:min(100%,260px);
  justify-content:center;
}
.catalog-filter-chip__text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.catalog-filter-chip__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.catalog-filter-chip.is-active .catalog-filter-chip__count{
  background:rgba(255,255,255,.2);
  color:#fff;
}
.catalog-filter-chip[hidden]{
  display:none !important;
}
@media (max-width:760px){
  .catalog-inline-panels:not([hidden]){
    align-items:flex-end !important;
    padding:10px !important;
  }
  .catalog-inline-panel:not([hidden]){
    width:100%;
    max-height:calc(100vh - 20px);
    border-radius:24px;
  }
  .catalog-inline-panel__head{
    padding:16px 16px 12px;
    font-size:17px;
  }
  .catalog-filter-chip-row--inline{
    padding:14px 14px 18px;
  }
  .catalog-filter-group{
    padding:10px;
    border-radius:18px;
  }
  .catalog-filter-group__chips,
  .catalog-filter-groups--brand .catalog-filter-group__chips{
    grid-template-columns:1fr;
  }
  .catalog-filter-chip--all{
    width:100%;
  }
}

/* v179 polish: tighter modal, cleaner close button, no stale flex from older fixes */
body[data-page="catalog"] .catalog-inline-panels:not([hidden]){
  position:fixed !important;
  inset:0 !important;
  z-index:2200 !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding:38px 16px 18px !important;
  margin:0 !important;
  background:rgba(15,23,42,.48) !important;
}
body[data-page="catalog"] .catalog-inline-panel:not([hidden]){
  position:relative !important;
  display:flex !important;
  flex-direction:column !important;
  width:min(560px,calc(100vw - 32px)) !important;
  max-height:min(82vh,760px) !important;
  padding:0 !important;
  overflow:hidden !important;
  border:0 !important;
  border-radius:28px !important;
  background:#fff !important;
  box-shadow:0 30px 90px rgba(15,23,42,.30),0 0 0 1px rgba(203,213,225,.92) !important;
}
body[data-page="catalog"] #catalog-brand-panel:not([hidden]){
  width:min(620px,calc(100vw - 32px)) !important;
}
body[data-page="catalog"] .catalog-inline-panel__head{
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  min-height:70px !important;
  margin:0 !important;
  padding:18px 20px 14px !important;
  border-bottom:1px solid rgba(226,232,240,.95) !important;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%) !important;
  color:#0f172a !important;
  font-size:16px !important;
  font-weight:950 !important;
  line-height:1.2 !important;
  letter-spacing:.02em !important;
  text-transform:none !important;
}
body[data-page="catalog"] .catalog-inline-panel__head span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  background:#f1f5f9;
  color:#334155;
}
body[data-page="catalog"] .catalog-inline-panel__close{
  position:relative !important;
  width:42px !important;
  height:42px !important;
  flex:0 0 42px !important;
  display:grid !important;
  place-items:center !important;
  border:1px solid rgba(203,213,225,.95) !important;
  border-radius:14px !important;
  background:#fff !important;
  color:#0f172a !important;
  font-size:0 !important;
  line-height:1 !important;
  cursor:pointer !important;
  box-shadow:0 10px 22px rgba(15,23,42,.08) !important;
  overflow:hidden !important;
}
body[data-page="catalog"] .catalog-inline-panel__close::before,
body[data-page="catalog"] .catalog-inline-panel__close::after{
  content:"";
  position:absolute;
  width:16px;
  height:2px;
  border-radius:999px;
  background:#0f172a;
}
body[data-page="catalog"] .catalog-inline-panel__close::before{transform:rotate(45deg);}
body[data-page="catalog"] .catalog-inline-panel__close::after{transform:rotate(-45deg);}
body[data-page="catalog"] .catalog-inline-panel__close:hover{
  border-color:#94a3b8 !important;
  background:#f8fafc !important;
}
body[data-page="catalog"] .catalog-filter-chip-row--inline{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  min-height:0 !important;
  padding:16px 20px 22px !important;
  overflow:auto !important;
}
body[data-page="catalog"] .catalog-filter-groups{
  width:100% !important;
  max-width:none !important;
  display:grid !important;
  gap:12px !important;
}
body[data-page="catalog"] .catalog-filter-search{
  position:sticky !important;
  top:0 !important;
  z-index:4 !important;
  padding:0 0 4px !important;
  background:#fff !important;
}
body[data-page="catalog"] .catalog-filter-search input{
  width:100% !important;
  min-height:48px !important;
  border-radius:15px !important;
  background:#f8fafc !important;
}
body[data-page="catalog"] .catalog-filter-group{
  width:100% !important;
  gap:9px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
}
body[data-page="catalog"] .catalog-filter-group__head{
  padding:2px 2px 0 !important;
  color:#475569 !important;
  font-size:12px !important;
  letter-spacing:.03em !important;
}
body[data-page="catalog"] .catalog-filter-group__head span:last-child{
  min-width:26px !important;
  min-height:24px !important;
  background:#f1f5f9 !important;
}
body[data-page="catalog"] .catalog-filter-group__chips{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px !important;
  align-items:stretch !important;
}
body[data-page="catalog"] .catalog-filter-groups--brand .catalog-filter-group__chips{
  grid-template-columns:1fr !important;
}
body[data-page="catalog"] .catalog-filter-chip--structured,
body[data-page="catalog"] .catalog-filter-chip--all{
  min-height:44px !important;
  border-radius:14px !important;
  border-color:rgba(203,213,225,.92) !important;
  background:#fff !important;
  box-shadow:0 6px 16px rgba(15,23,42,.04) !important;
}
body[data-page="catalog"] .catalog-filter-chip--all{
  width:100% !important;
  max-width:none !important;
}
body[data-page="catalog"] .catalog-filter-chip__text{
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
@media (max-width:760px){
  body[data-page="catalog"] .catalog-inline-panels:not([hidden]){
    align-items:flex-end !important;
    padding:10px !important;
  }
  body[data-page="catalog"] .catalog-inline-panel:not([hidden]),
  body[data-page="catalog"] #catalog-brand-panel:not([hidden]){
    width:100% !important;
    max-height:calc(100vh - 20px) !important;
    border-radius:24px !important;
  }
  body[data-page="catalog"] .catalog-filter-chip-row--inline{
    padding:14px 14px 18px !important;
  }
  body[data-page="catalog"] .catalog-filter-group__chips{
    grid-template-columns:1fr !important;
  }
}

/* v184: cleaner category/manufacturer pickers */
body[data-page="catalog"] .catalog-inline-panel:not([hidden]),
body[data-page="catalog"] #catalog-brand-panel:not([hidden]){
  width:min(640px,calc(100vw - 32px)) !important;
  border-radius:18px !important;
}

body[data-page="catalog"] .catalog-inline-panel__head{
  min-height:62px !important;
  padding:14px 18px !important;
  background:#fff !important;
}

body[data-page="catalog"] .catalog-inline-panel__head span{
  padding:0 !important;
  min-height:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#0f172a !important;
  font-size:16px !important;
  font-weight:950 !important;
}

body[data-page="catalog"] .catalog-inline-panel__close{
  width:38px !important;
  height:38px !important;
  flex-basis:38px !important;
  border-radius:12px !important;
}

body[data-page="catalog"] .catalog-filter-chip-row--inline{
  padding:14px 18px 18px !important;
}

body[data-page="catalog"] .catalog-filter-groups{
  gap:10px !important;
}

body[data-page="catalog"] .catalog-filter-search{
  padding-bottom:2px !important;
}

body[data-page="catalog"] .catalog-filter-search input{
  min-height:46px !important;
  border-radius:14px !important;
}

body[data-page="catalog"] .catalog-filter-group{
  padding:10px !important;
  border:1px solid rgba(203,213,225,.82) !important;
  border-radius:16px !important;
  background:#f8fafc !important;
}

body[data-page="catalog"] .catalog-filter-group--all{
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}

body[data-page="catalog"] .catalog-filter-group__head{
  padding:0 2px 8px !important;
  font-size:12px !important;
  color:#334155 !important;
}

body[data-page="catalog"] .catalog-filter-group__chips,
body[data-page="catalog"] .catalog-filter-groups--brand .catalog-filter-group__chips{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}

body[data-page="catalog"] .catalog-filter-groups--brand .catalog-filter-group:not(.catalog-filter-group--all) .catalog-filter-group__head{
  display:none !important;
}

body[data-page="catalog"] .catalog-filter-groups--brand .catalog-filter-group:not(.catalog-filter-group--all){
  padding-top:10px !important;
}

body[data-page="catalog"] .catalog-filter-chip--structured,
body[data-page="catalog"] .catalog-filter-chip--all{
  min-height:42px !important;
  border-radius:12px !important;
  box-shadow:none !important;
}

@media (max-width:760px){
  body[data-page="catalog"] .catalog-inline-panel:not([hidden]),
  body[data-page="catalog"] #catalog-brand-panel:not([hidden]){
    border-radius:18px !important;
  }
  body[data-page="catalog"] .catalog-filter-group__chips,
  body[data-page="catalog"] .catalog-filter-groups--brand .catalog-filter-group__chips{
    grid-template-columns:1fr !important;
  }
}
