/* ====================================================================
   SEARCH.CSS — Premium search overlay (top drawer)
   --------------------------------------------------------------------
   • backdrop με blur + ivory drawer που σλάιντει από πάνω
   • live results, κάθε row: thumb + brand·category + name + price
   • highlight pulse στην κάρτα-στόχο μετά το navigate
   ==================================================================== */

.search-overlay{
  position:fixed;inset:0;z-index:1000;
  visibility:hidden;opacity:0;
  transition:opacity .25s var(--ease-luxe), visibility .25s;
}
.search-overlay.open{visibility:visible;opacity:1}

.search-backdrop{
  position:absolute;inset:0;
  background:rgba(31,24,19,0.34);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}

.search-panel{
  position:absolute;left:50%;top:0;
  transform:translateX(-50%) translateY(-16px);
  width:min(720px, calc(100vw - 40px));
  margin-top:80px;
  background:var(--ivory);
  box-shadow:0 30px 80px -20px rgba(31,24,19,0.35);
  padding:1.5rem 1.75rem 1rem;
  transition:transform .3s var(--ease-luxe);
}
.search-overlay.open .search-panel{transform:translateX(-50%) translateY(0)}

.search-head{
  display:flex;align-items:center;gap:1rem;
  padding-bottom:1rem;
  border-bottom:1px solid rgba(31,24,19,0.1);
}
.search-icon{color:var(--gold-leaf);flex-shrink:0}

#searchInput{
  flex:1;border:0;outline:0;background:transparent;
  font-family:'Cormorant Garamond',serif;
  font-size:1.4rem;font-style:italic;
  color:var(--aubergine);
  padding:.5rem 0;
  min-width:0;
}
#searchInput::placeholder{color:var(--mauve-soft);opacity:.7;font-style:italic}
#searchInput::-webkit-search-cancel-button{display:none}

.search-close{
  background:transparent;border:0;cursor:pointer;
  font-size:1rem;color:var(--mauve-soft);
  padding:.4rem .55rem;line-height:1;
  transition:color .2s;
}
.search-close:hover{color:var(--aubergine)}

.search-results{
  max-height:60vh;overflow-y:auto;
  padding-top:.5rem;
  /* subtle scrollbar */
  scrollbar-width:thin;
  scrollbar-color:rgba(31,24,19,0.18) transparent;
}
.search-results::-webkit-scrollbar{width:6px}
.search-results::-webkit-scrollbar-thumb{background:rgba(31,24,19,0.18);border-radius:3px}

.search-empty{
  text-align:center;padding:2rem 1rem;
  color:var(--mauve-soft);font-style:italic;
  font-family:'Cormorant Garamond',serif;
  font-size:1.05rem;margin:0;
}

.search-results-list{list-style:none;margin:0;padding:0}
.search-results-list li{margin:0}

.search-result{
  width:100%;display:grid;grid-template-columns:56px 1fr auto;
  gap:1rem;align-items:center;text-align:left;
  background:transparent;border:0;cursor:pointer;
  padding:.85rem .5rem;
  border-bottom:1px solid rgba(31,24,19,0.06);
  transition:background .15s;
  font-family:inherit;color:inherit;
}
.search-result:hover,
.search-result:focus-visible{
  background:rgba(245,224,200,0.45);
  outline:none;
}

.search-result-visual{
  width:56px;height:56px;
  background:var(--champagne);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;flex-shrink:0;
}
.search-result-visual img{width:100%;height:100%;object-fit:cover}
.search-result-initial{
  font-family:'Cormorant Garamond',serif;
  font-size:1.5rem;color:var(--plum-deep);
  font-weight:600;
}

.search-result-body{
  display:flex;flex-direction:column;gap:.25rem;min-width:0;
}
.search-result-brand{
  font-size:.62rem;letter-spacing:.2em;
  text-transform:uppercase;color:var(--gold-leaf);
  font-weight:500;
}
.search-result-name{
  font-family:'Cormorant Garamond',serif;
  font-size:1.1rem;color:var(--aubergine);
  line-height:1.25;
  overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.search-result-name mark{
  background:transparent;color:var(--plum-deep);
  font-weight:500;font-style:italic;
}

.search-result-price{
  font-size:.92rem;color:var(--aubergine);
  font-weight:500;padding-left:.5rem;white-space:nowrap;
  display:flex;flex-direction:column;align-items:flex-end;gap:.18rem;
}
.search-result-price.has-offer s{
  color:#8d8088;font-weight:400;font-size:.78rem;margin-right:.25rem;opacity:.75;
}
.search-result-price.has-offer b{color:var(--aubergine);font-weight:600}

/* Sold out — μικρό label κάτω από την τιμή στα search results */
.search-result-soldout{
  font-size:.55rem;letter-spacing:.28em;text-transform:uppercase;
  font-weight:600;color:#a94a4a;
  padding:.15rem .45rem;
  background:rgba(169,74,74,0.10);
  border:1px solid rgba(169,74,74,0.28);
  border-radius:3px;line-height:1;
}
.search-result.is-soldout .search-result-price-num{opacity:.55;text-decoration:line-through;text-decoration-color:rgba(61,42,30,0.4)}
.search-result.is-soldout .search-result-name{opacity:.7}

/* highlight pulse μετά από navigate */
.search-highlight{
  animation:searchPulse 2.2s var(--ease-luxe);
  position:relative;z-index:1;
}
@keyframes searchPulse{
  0%  {box-shadow:0 0 0 0 rgba(192,133,122,0)}
  18% {box-shadow:0 0 0 4px rgba(192,133,122,0.55)}
  100%{box-shadow:0 0 0 0 rgba(192,133,122,0)}
}

/* mobile */
@media (max-width:600px){
  .search-panel{margin-top:40px;padding:1rem 1.1rem .8rem;width:calc(100vw - 24px)}
  #searchInput{font-size:1.15rem}
  .search-result{grid-template-columns:48px 1fr;gap:.8rem;padding:.7rem .3rem}
  .search-result-visual{width:48px;height:48px}
  .search-result-name{font-size:1rem}
  .search-result-price{
    grid-column:2;padding-left:0;font-size:.82rem;
    color:var(--mauve-soft);font-weight:600;
  }
}
