/* Responsive full-width styles for WC AJAX Search Fixed Categories */
.wc-asfc-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Input + button row: align items stretch so button matches input height */
.wc-asfc-input-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

/* Search input */
.wc-asfc-input {
  flex: 1 1 auto;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
  color: #222;
  font-size: 15px;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
  min-height: 44px;
}

/* Button: same height as input */
.wc-asfc-btn {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid #d0d7de;
  background: linear-gradient(180deg,#ffffff,#f7f9fb);
  color: #1f2937;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}

/* Results dropdown */
.wc-asfc-results {
  display: none;
  position: absolute;
  z-index: 99999;
  left: 0;
  right: 0;
  margin-top: 10px;
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17,24,39,0.08);
  max-height: 420px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 8px;
}

/* List inside results */
.wc-asfc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each item */
.wc-asfc-item {
  display: block;
  padding: 8px;
  border-radius: 8px;
  color: #0f172a;
  text-decoration: none;
  background: transparent;
  transition: background .12s ease, transform .06s ease;
  font-size: 14px;
  line-height: 1.2;
  border: 1px solid transparent;
}

/* inner layout: thumbnail + meta */
.wc-asfc-item-inner { display:flex; gap:10px; align-items:center; }
.wc-asfc-thumb { flex:0 0 56px; width:56px; height:56px; overflow:hidden; border-radius:6px; background:#fafafa; display:block; }
.wc-asfc-thumb img { width:100%; height:100%; object-fit:cover; display:block; }

/* Title area */
.wc-asfc-meta .title { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#0f172a; }

/* Hover / active states */
.wc-asfc-item:hover,
.wc-asfc-item.active {
  background: linear-gradient(90deg,#f8fafc,#ffffff);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2,6,23,0.04);
  border-color: #eef3f8;
}

/* No results */
.wc-asfc-no-results { padding: 12px; color: #6b7280; text-align: center; font-size: 14px; }

/* Adjust for mobile */
@media (max-width: 540px) {
  .wc-asfc-input-wrap { flex-direction: column; gap: 8px; }
  .wc-asfc-btn { width: 100%; height: 44px; }
  .wc-asfc-input { min-height: 44px; }
  .wc-asfc-thumb { width:48px; height:48px; flex:0 0 48px; }
}

/* Force thumbnail visibility if theme overrides images */
.wc-asfc-thumb { flex: 0 0 56px !important; width: 56px !important; height: 56px !important; overflow: hidden !important; display:block !important; }
.wc-asfc-thumb img { width:100% !important; height:100% !important; object-fit:cover !important; display:block !important; max-width:none !important; }
.wc-asfc-item img { display:block !important; opacity:1 !important; }
