/* ============================================================
   nav-search.css — modal de busca da navbar (compartilhada).
   Classes .nsm-* (nomes próprios p/ não colidir com o .nav-search-*
   antigo do style.css/shop.css). Usa os tokens do tema (café).
   ============================================================ */
.nsm {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
}
.nsm.is-open { display: flex; }

.nsm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 30, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nsm-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: var(--paper-pale, #fff);
  border-radius: var(--r-lg, 12px);
  box-shadow: var(--shadow-xl, 0 30px 80px rgba(0, 0, 0, .3));
  overflow: hidden;
  animation: nsm-in .28s var(--ease, cubic-bezier(.16, 1, .3, 1));
}
@keyframes nsm-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.nsm-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line, #e6dccb);
}
.nsm-icon { width: 22px; height: 22px; color: var(--gold, #a86b3c); flex-shrink: 0; }
.nsm-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 1.05rem;
  color: var(--ink, #1e1e1e);
}
.nsm-input::placeholder { color: var(--text-soft, #888); }
.nsm-close {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--text-mute, #666);
  cursor: pointer;
  transition: background .25s, color .25s;
}
.nsm-close:hover { background: var(--line-soft, #f0e7d6); color: var(--ink, #1e1e1e); }
.nsm-close svg { width: 18px; height: 18px; }

.nsm-results { overflow-y: auto; padding: 8px; }
.nsm-empty { padding: 28px 20px; text-align: center; color: var(--text-mute, #666); }
.nsm-empty p { margin: 0 0 6px; }
.nsm-sub { font-size: 13px; color: var(--text-soft, #999); }
.nsm-sub kbd {
  font-family: var(--font-body, sans-serif);
  font-size: 11px;
  background: var(--paper-warm, #eee);
  border: 1px solid var(--line, #ddd);
  border-radius: 4px;
  padding: 1px 5px;
}

.nsm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md, 8px);
  text-decoration: none;
  color: inherit;
  transition: background .2s;
}
.nsm-item:hover { background: var(--paper-warm, #f3ead9); }
.nsm-item-img {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line, #e6dccb);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.nsm-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.nsm-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nsm-item-body strong {
  font-size: 14px; font-weight: 600; color: var(--ink, #1e1e1e);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nsm-item-sku { font-size: 12px; color: var(--text-soft, #999); }
.nsm-item-price { flex-shrink: 0; font-size: 14px; font-weight: 800; color: var(--gold-dk, #8a5530); }

@media (max-width: 560px) {
  .nsm { padding: 0; align-items: stretch; }
  .nsm-panel { max-width: none; max-height: 100vh; height: 100%; border-radius: 0; }
}
