/* ====== SEARCH BOX WRAPPER ====== */
.andaxi-search-box {
  position: relative;
  width: 100%;
  z-index: 99999;
  isolation: isolate;
}

/* ====== SEARCH INPUT ====== */
.andaxi-search-box input[type="search"] {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.andaxi-search-box input[type="search"]:focus {
  outline: none;
  border-color: #4c8cff;
  box-shadow: 0 3px 10px rgba(76,140,255,0.25);
}

/* ====== BUTTON X (clear input) ====== */
.andaxi-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.andaxi-search-clear.is-visible {
  display: inline-flex;
}

.andaxi-search-clear:hover,
.andaxi-search-clear:focus-visible {
  background: #e5e7eb;
  color: #111827;
  box-shadow: 0 0 0 1px rgba(17,24,39,0.08);
  outline: none;
}

/* ====== RESULTS DROPDOWN ====== */
.andaxi-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: 420px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease;
  z-index: 2147483647;
}

.andaxi-results.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ====== SINGLE RESULT ITEM ====== */
.andaxi-result-item {
  display: flex;
  justify-content: space-between; /* titlu stânga, buton dreapta */
  align-items: center;
  padding: 12px;
  gap: 12px;
  border-bottom: 1px solid #f2f2f2;
}

.andaxi-result-item:last-child {
  border-bottom: none;
}

/* Thumbnail + Title wrapper */
.andaxi-result-item a {
  display: flex;
  align-items: center;
  gap: 12px;

  flex-grow: 0 !important;
  flex-shrink: 1 !important;
  flex-basis: auto !important;

  text-decoration: none;
  color: #1f2b3a !important;
}

/* Thumbnail */
.andaxi-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #eee;
}

/* Product title */
.andaxi-product-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

/* ====== BURGUNDY DETAILS BUTTON (right aligned) ====== */
.andaxi-product-details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 4px 10px;
  background: #7A1F32;     /* vin roșu */
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;

  color: #ffffff !important;
  text-decoration: none !important;

  transition: all .15s ease;
}

.andaxi-product-details-btn:hover {
  background: #5C1626;
  transform: translateY(-1px);
}

/* ====== NO RESULTS ====== */
.andaxi-no-results {
  padding: 12px 14px;
  font-size: 13px;
  color: #6b7280;
}

/* FORCE WHITE TEXT – highest specificity */
.andaxi-result-item .andaxi-product-details-btn,
.andaxi-result-item .andaxi-product-details-btn:link,
.andaxi-result-item .andaxi-product-details-btn:visited,
.andaxi-result-item .andaxi-product-details-btn:active {
    color: #ffffff !important;
}

/* override Divi anchor styling */
.andaxi-result-item a.andaxi-product-details-btn {
    color: #ffffff !important;
}

/* override any inherited color */
.andaxi-product-details-btn * {
    color: #ffffff !important;
}
