/* search modal */
.search-overlay{
  display:none;position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:900;
  backdrop-filter:blur(2px);
}
.search-overlay.is-active{display:block;}

.search-modal{
  display:none;position:fixed;top:0;left:50%;transform:translateX(-50%);
  width:100%;max-width:680px;max-height:80vh;
  background:#fff;z-index:901;
  flex-direction:column;
  box-shadow:0 8px 40px rgba(0,0,0,.18);
}
.search-modal.is-active{display:flex;}

.search-modal__head{
  display:flex;align-items:center;gap:12px;
  padding:20px 20px;border-bottom:1px solid #e8e8e8;
  flex-shrink:0;
}
.search-modal__icon{width:18px;height:18px;flex-shrink:0;color:#999;}

.search-modal__input{
  flex:1;border:none;outline:none;font-size:16px;font-family:inherit;
  background:transparent;color:#111;
}
.search-modal__input::placeholder{color:#bbb;}

.search-modal__close{
  width:32px;height:32px;border:none;background:none;cursor:pointer;
  font-size:22px;color:#999;line-height:1;padding:0;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  transition:color .15s;
}
.search-modal__close:hover{color:#111;}

.search-modal__results{overflow-y:auto;max-height:calc(80vh - 65px);}

.search-modal__hint{
  padding:32px 20px;text-align:center;color:#999;font-size:14px;margin:0;
}

.search-result{
  display:grid;grid-template-columns:64px 1fr;gap:16px;
  align-items:center;padding:14px 20px;text-decoration:none;color:inherit;
  border-bottom:1px solid #f0f0f0;transition:background .12s;
}
.search-result:hover{background:#f8f8f8;}
.search-result:last-child{border-bottom:none;}

.search-result__img{
  width:64px;height:80px;object-fit:cover;background:#eee;display:block;
}
.search-result__img--empty{background:#eee;}

.search-result__name{font-size:13px;font-weight:500;margin:0 0 4px;}
.search-result__name mark{background:none;font-weight:700;color:#000;}
.search-result__meta{font-size:11px;color:#999;margin:0 0 4px;}
.search-result__price{font-size:13px;font-weight:600;margin:0;}

@media(max-width:700px){
  .search-modal{max-width:100%;max-height:100vh;}
  .search-modal__results{max-height:calc(100vh - 65px);}
}
