/* ================================
   MAGA-SEARCH.CSS — maga.css-ის ბოლოს ჩასვი
   ================================ */

/* header ღილაკი */
.ms-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 2px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #ff7a00;
  cursor: pointer;
  transition: background 0.2s;
}
.ms-open:hover {
  background: rgba(255,122,0,0.1);
}

.ms-open svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.menu-toggle {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  font-size: 1.75rem;
  line-height: 1;
}
@media (min-width: 1024px) {
  .ms-open { order: 99; margin-left: 12px; }
}

/* overlay */
.ms-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10,14,26,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
}
.ms-overlay.open { display: flex; }

.ms-panel {
  width: 100%;
  max-width: 640px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  overflow: hidden;
}

.ms-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1.5px solid #e8eaed;
}
.ms-ico { width: 22px; height: 22px; flex: none; fill: none; stroke: #ff7a00; stroke-width: 2.2; stroke-linecap: round; }

.ms-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font-family: 'Sora', sans-serif;
  font-size: 16px; /* iOS zoom-ის თავიდან ასაცილებლად */
  font-weight: 600;
  color: #0f1117;
  background: transparent;
}
.ms-input::-webkit-search-cancel-button { display: none; }

.ms-close {
  flex: none;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
}
.ms-close:hover { background: #e5e7eb; color: #0f1117; }

.ms-results { overflow-y: auto; padding: 6px; }

.ms-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: #0f1117;
}
.ms-item:hover, .ms-item.on { background: #fff4ea; border-left-color: #ff7a00; }
.ms-item img { width: 52px; height: 52px; object-fit: contain; background: #f7f8fa; border-radius: 8px; }
.ms-name { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; line-height: 1.35; }
.ms-price { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 900; color: #c85e00; white-space: nowrap; }
.ms-price.ms-out { font-size: 12px; font-weight: 700; color: #6b7280; }

.ms-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 10px; font-size: 12px; color: #6b7280; }
.ms-chip {
  border: 1.5px solid #e8eaed;
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #0f1117;
  cursor: pointer;
}
.ms-chip:hover { border-color: #ff7a00; color: #ff7a00; }

.ms-empty { padding: 22px 16px; text-align: center; }
.ms-empty p { font-family: 'Sora', sans-serif; font-weight: 700; color: #0f1117; margin: 0 0 6px; }
.ms-empty .ms-empty-sub { font-weight: 400; font-size: 13px; color: #6b7280; margin-bottom: 14px; }
.ms-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
}

@media (max-width: 599px) {
  .ms-overlay { padding: 0; }
  .ms-panel { max-width: none; max-height: 85vh; border-radius: 0 0 14px 14px; }
}
