/* RepuestoApp v5.5 — Catálogo visible y búsqueda emergente */
.catalog-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.catalog-head h2{
  margin:7px 0 0;
  color:#3d4a99;
  font-size:28px;
}

.catalog-head-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.catalog-search-button{
  min-height:46px;
  padding:0 20px;
  border-radius:14px;
}

dialog.product-search-modal,
.modal.product-search-modal{
  width:min(820px,calc(100vw - 30px))!important;
  max-width:820px!important;
  max-height:88vh!important;
  overflow:hidden!important;
  padding:24px!important;
  border-radius:27px!important;
}

.product-search-modal-head{
  margin-bottom:18px;
}

.product-search-modal-head h2{
  margin:7px 0;
  color:#3d4a99;
  font-size:34px;
}

.product-popup-search-box{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 15px;
  border:1.4px solid #aebfe6;
  border-radius:16px;
  background:#fff;
  box-shadow:0 0 0 4px rgba(8,189,169,.05);
}

.product-popup-search-box:focus-within{
  border-color:#08bda9;
  box-shadow:0 0 0 4px rgba(8,189,169,.12);
}

.product-popup-search-box input{
  width:100%;
  min-height:54px;
  padding:0!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
}

.product-popup-help{
  margin:12px 0 14px;
  color:#6f7bb0;
  font-size:13px;
}

.product-popup-list{
  display:grid;
  gap:8px;
  max-height:54vh;
  overflow:auto;
  padding:2px 5px 2px 1px;
}

.product-search-item{
  width:100%;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) auto;
  align-items:center;
  gap:13px;
  padding:12px 14px;
  border:1px solid #c9d4eb;
  border-radius:16px;
  background:#fff;
  color:#45519a;
  text-align:left;
  cursor:pointer;
  transition:.18s ease;
}

.product-search-item[hidden]{
  display:none!important;
}

.product-search-item:hover,
.product-search-item.is-selected{
  transform:translateY(-1px);
  border-color:#08bda9;
  background:#f3fcfa;
  box-shadow:0 10px 22px rgba(8,189,169,.10);
}

.product-search-avatar{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:linear-gradient(135deg,#e9faf7,#eef3ff);
  color:#08a994;
  font-weight:900;
  font-size:17px;
}

.product-search-copy{
  min-width:0;
}

.product-search-copy strong{
  display:block;
  color:#354393;
  font-size:15px;
}

.product-search-copy small{
  display:block;
  margin-top:4px;
  color:#7985b7;
  white-space:normal;
  line-height:1.35;
}

.product-search-item>b{
  color:#09ae9a;
  font-size:16px;
  white-space:nowrap;
}

.product-search-empty{
  margin-top:14px;
  padding:28px 18px;
  border:1.35px dashed #bdc9ea;
  border-radius:20px;
  background:#fbfcfe;
  text-align:center;
}

.product-search-empty span{
  display:block;
  font-size:27px;
  margin-bottom:7px;
}

.product-search-empty strong{
  display:block;
  color:#354393;
  font-size:18px;
}

.product-search-empty small{
  display:block;
  margin-top:5px;
  color:#7884b6;
}

@media(max-width:760px){
  .catalog-head{
    display:grid;
  }

  .catalog-head-actions{
    justify-content:stretch;
  }

  .catalog-search-button{
    width:100%;
  }

  dialog.product-search-modal,
  .modal.product-search-modal{
    width:calc(100vw - 14px)!important;
    max-height:92vh!important;
    padding:17px!important;
  }

  .product-search-modal-head h2{
    font-size:28px;
  }

  .product-popup-list{
    max-height:60vh;
  }

  .product-search-item{
    grid-template-columns:44px minmax(0,1fr);
  }

  .product-search-avatar{
    width:42px;
    height:42px;
  }

  .product-search-item>b{
    grid-column:2;
    justify-self:start;
  }
}


/* RepuestoApp v5.12 · Búsqueda igual al inventario */
.product-search-category{
  color:#5260a3;
  font-weight:800;
}

.product-search-stock{
  color:#7180b6;
  font-weight:800;
}

.product-search-stock.is-empty{
  color:#d13d50;
}

.product-search-item.is-out-of-stock{
  background:#fffafb;
  border-color:#efc5cb;
}

.product-search-item.is-out-of-stock:hover,
.product-search-item.is-out-of-stock.is-selected{
  border-color:#d85a69;
  background:#fff5f6;
}

.product-search-item.is-out-of-stock>b{
  color:#a8aec9;
}
