/* ArmorXElite Live Search - search.css */

/* ── Trigger button (auto-injected or via shortcode) ── */
.axe-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 22px;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  padding: 7px 16px 7px 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.axe-search-trigger svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.axe-search-trigger:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

/* Light header variant */
.axe-search-trigger--light {
  border-color: #ddd;
  color: #333;
}
.axe-search-trigger--light:hover {
  border-color: #e07820;
  color: #e07820;
  background: #fff3e8;
}

/* Inline shortcode variant */
.axe-search-trigger--inline {
  border-color: #ddd;
  color: #333;
  border-radius: 22px;
}

/* Wrapper for auto-injected trigger */
.axe-search-trigger-wrap {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9998;
  padding: 0;
  pointer-events: none;
  opacity: 0;
}

/* ── Overlay backdrop ── */
.axe-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  backdrop-filter: blur(2px);
}
.axe-search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Search modal card ── */
.axe-search-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 620px;
  margin: 0 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  overflow: visible;
  transform: translateY(-12px);
  transition: transform 0.2s ease;
}
.axe-search-overlay.is-open .axe-search-modal {
  transform: translateY(0);
}

/* ── Search header (input row) ── */
.axe-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid #f0ece6;
}

.axe-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.axe-search-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.axe-search-input {
  width: 100%;
  border: 1.5px solid #e8e4de;
  border-radius: 8px;
  padding: 10px 40px 10px 40px;
  font-size: 15px;
  color: #111;
  background: #f9f7f5;
  outline: none;
  transition: border-color 0.2s;
}
.axe-search-input:focus {
  border-color: #e07820;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(224,120,32,0.1);
}
.axe-search-input::placeholder {
  color: #bbb;
  font-size: 14px;
}

.axe-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.axe-search-clear svg {
  width: 13px;
  height: 13px;
}

.axe-search-close {
  background: none;
  border: none;
  color: #e07820;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  padding: 0 4px;
}
.axe-search-close:hover { opacity: 0.75; }

/* ── Results area ── */
.axe-search-results {
  max-height: 460px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 0 0 14px 14px;
  background: #fff;
}

/* Hint / empty state */
.axe-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: #bbb;
  font-size: 14px;
}
.axe-search-empty svg {
  width: 44px;
  height: 44px;
  opacity: 0.5;
}
.axe-search-empty p { margin: 0; }

/* Spinner */
.axe-search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  color: #aaa;
  font-size: 13px;
}
.axe-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #f0ece6;
  border-top-color: #e07820;
  border-radius: 50%;
  animation: axeSpin 0.7s linear infinite;
}
@keyframes axeSpin { to { transform: rotate(360deg); } }

/* Results list */
.axe-results-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.axe-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.axe-result-item:hover,
.axe-result-item.is-focused {
  background: #fff3e8;
}

.axe-result-thumb {
  width: 56px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f0ede8;
  border: 1px solid #e8e4de;
  display: flex;
  align-items: center;
  justify-content: center;
}
.axe-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.axe-result-info {
  flex: 1;
  min-width: 0;
}
.axe-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px;
}
.axe-result-title em {
  color: #e07820;
  font-style: normal;
  font-weight: 600;
}
.axe-result-cat {
  font-size: 11px;
  color: #aaa;
  margin: 0;
}

.axe-result-price {
  font-size: 14px;
  font-weight: 500;
  color: #e07820;
  white-space: nowrap;
  flex-shrink: 0;
}
.axe-result-price .woocommerce-Price-currencySymbol { font-size: 12px; }

/* Divider between results */
.axe-result-item + .axe-result-item {
  border-top: 1px solid #f9f7f5;
}

/* No results */
.axe-no-results {
  padding: 32px 20px;
  text-align: center;
  color: #888;
  font-size: 14px;
}
.axe-no-results p { margin: 0 0 14px; }
.axe-no-results strong { color: #333; }

.axe-view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e07820;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 7px;
  transition: background 0.2s;
}
.axe-view-all:hover { background: #c96a15; color: #fff; }

/* ── Footer "View all results" row ── */
.axe-results-footer {
  padding: 12px 20px;
  border-top: 1px solid #f0ece6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.axe-results-footer span {
  font-size: 12px;
  color: #aaa;
}
.axe-results-footer a {
  font-size: 13px;
  color: #e07820;
  text-decoration: none;
  font-weight: 500;
}
.axe-results-footer a:hover { text-decoration: underline; }

/* ── Keyboard hint ── */
.axe-kbd-hint {
  padding: 8px 20px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #f0ece6;
}
.axe-kbd-hint span {
  font-size: 11px;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 4px;
}
kbd {
  background: #f5f3ef;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  color: #888;
  font-family: inherit;
}

/* ── Section labels (Boat Brands / Products) ── */
.axe-section-label {
  list-style: none;
  padding: 10px 20px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.axe-section-label span {
  font-size: 11px;
  font-weight: 600;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.axe-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #f0ece6;
}

/* ── Category result row ── */
.axe-result-item--cat {
  background: #fffaf5;
}
.axe-result-item--cat:hover,
.axe-result-item--cat.is-focused {
  background: #fff3e8;
}

.axe-result-thumb--cat {
  background: #fff !important;
  border: 1px solid #e8e4de;
}
.axe-result-thumb--cat img {
  object-fit: contain !important;
  padding: 4px;
}

.axe-result-arrow {
  font-size: 12px;
  font-weight: 500;
  color: #e07820;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Divider between sections */
.axe-section-label + .axe-section-label {
  margin-top: 4px;
  border-top: 1px solid #f0ece6;
  padding-top: 14px;
}


.axe-search-results::-webkit-scrollbar { width: 4px; }
.axe-search-results::-webkit-scrollbar-track { background: transparent; }
.axe-search-results::-webkit-scrollbar-thumb { background: #e0dbd4; border-radius: 4px; }

/* ── Mobile ── */
@media (max-width: 600px) {
  .axe-search-overlay { padding-top: 0; align-items: flex-end; }
  .axe-search-modal { border-radius: 16px 16px 0 0; max-width: 100%; margin: 0; }
  .axe-search-results { max-height: 55vh; }
}
