/* ===================== Gaddigo navbar + search ===================== */
.gnav { z-index: 1045; padding: 0; } /* above the offcanvas backdrop */
.gnav-top { min-height: 56px; padding-top: 4px; padding-bottom: 4px; }
.gnav-logo { height: 50px; width: auto; }

/* ---------- search box (shared) ---------- */
.gsearch { position: relative; width: 100%; }
.gsearch-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #d5d9e0; border-radius: 50px;
  height: 46px; padding: 0 14px 0 6px;
}
.gsearch-box:focus-within { box-shadow: 0 0 0 3px rgba(255,193,7,.55); }
.gsearch-scope { position: relative; flex: 0 0 auto; }
.gsearch-scope-btn {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent;
  font-weight: 500; font-size: 1rem; color: #1b1f24; padding: 6px 8px 6px 12px; white-space: nowrap;
}
.gsearch-scope-btn .bi { font-size: .6rem; color: #6b7280; }
.gsearch-scope-menu {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; z-index: 1060;
  min-width: 150px; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.gsearch-scope-menu.show { display: block; }
.gsearch-scope-menu li { padding: 9px 12px; border-radius: 8px; cursor: pointer; color: #1b1f24; font-size: .95rem; }
.gsearch-scope-menu li:hover, .gsearch-scope-menu li.active { background: #eef3ff; color: #0e45c4; }
.gsearch-sep { width: 1px; align-self: stretch; margin: 8px 0; background: #d5d9e0; flex: 0 0 auto; }
.gsearch-ico { color: #4b5563; font-size: 1.1rem; flex: 0 0 auto; }
.gsearch-input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 1rem; color: #1b1f24; height: 100%;
}
.gsearch-input::placeholder { color: #8a9099; font-weight: 500; }
.gsearch-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gsearch-mic { border: 0; background: transparent; color: #8a9099; font-size: 1.35rem; padding: 0 2px; line-height: 1; }
.gsearch-mic.listening { color: #dc3545; animation: gsPulse 1s infinite; }
@keyframes gsPulse { 50% { opacity: .35; } }

/* ---------- suggestions panel ---------- */
.gsearch-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 1055;
  background: #fff; color: #1b1f24; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.22);
  max-height: 70vh; overflow-y: auto; padding: 6px 0;
}
.gsearch-panel[hidden] { display: none; }
.gs-group { padding: 8px 16px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; }
.gs-item { display: flex; align-items: center; gap: 12px; padding: 8px 16px; color: inherit; text-decoration: none; cursor: pointer; }
.gs-item:hover, .gs-item.is-active { background: #eef3ff; color: inherit; }
.gs-thumb { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 8px; background: #f1f3f6; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #6b7280; }
.gs-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gs-text { min-width: 0; }
.gs-title { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-title mark { background: #fff3bf; padding: 0; color: inherit; }
.gs-sub { font-size: .8rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { padding: 14px 16px; color: #6b7280; font-size: .92rem; }
.gs-all { border-top: 1px solid #eef0f3; margin-top: 4px; color: #0e45c4; font-weight: 600; }
.gs-recent .bi { color: #9aa1ab; }

/* ---------- desktop (>= lg) ---------- */
@media (min-width: 992px) {
  .gnav-offcanvas { flex-grow: 1; }
  .gnav-off-body { display: flex; align-items: center; flex-grow: 1; padding: 0; overflow: visible; }
  .gnav-link { color: #fff !important; }
  .gsearch-desktop { max-width: 460px; }
  .gsearch-desktop .gsearch-box { height: 38px; padding-right: 12px; }
  .gsearch-desktop .gsearch-scope-btn { font-size: .9rem; padding-left: 10px; }
  .gsearch-desktop .gsearch-input { font-size: .92rem; }
}
/* narrow desktops: drop the "All" scope to save room */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .gsearch-desktop .gsearch-scope, .gsearch-desktop .gsearch-sep { display: none; }
  .gsearch-desktop .gsearch-box { padding-left: 14px; }
}

/* ---------- mobile (< lg) : CarDekho style ---------- */
@media (max-width: 991.98px) {
  .gnav-top { flex-wrap: nowrap; justify-content: flex-start; gap: 14px; }
  .gnav-logo { height: 42px; }
  .gnav .navbar-brand { margin-right: auto; }

  .gnav-burger { border: 0; background: transparent; padding: 8px 4px; display: flex; flex-direction: column; gap: 6px; }
  .gnav-burger span { display: block; height: 2.5px; border-radius: 2px; background: #fff; width: 26px; }
  .gnav-burger span:nth-child(2) { width: 20px; }

  .gnav-icons { display: flex; align-items: center; gap: 6px; }
  .gnav-icon { position: relative; border: 0; background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; padding: 6px; text-decoration: none; }
  .gnav-dot { position: absolute; top: 6px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #ffc107; border: 2px solid #0e45c4; }

  .gnav-searchrow { padding-top: 4px; padding-bottom: 12px; }

  /* slide-in menu */
  .gnav-offcanvas { width: 82%; max-width: 330px; background: #fff; }
  .gnav-off-head { background: #0e45c4; }
  .gnav-off-body { padding: 8px 0 24px; }
  .gnav-off-body .navbar-nav { padding: 0; }
  .gnav-link { display: flex; align-items: center; gap: 14px; padding: 13px 22px !important; color: #1b1f24 !important; font-weight: 500; border-bottom: 1px solid #f0f2f5; }
  .gnav-link .bi { font-size: 1.15rem; color: #0e45c4; width: 22px; text-align: center; }
  .gnav-link:hover { background: #eef3ff; }
  .gnav-auth { margin-top: 10px; }
  .gnav-auth .btn { margin: 12px 22px 0; display: block; }
}
