/* Premium Pro Styles */
.wc-cat-premium-wrap {
  position: relative;
  max-width: 520px;
  margin: 18px auto;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(250,250,250,0.9));
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 30px rgba(15,23,42,0.06);
  transition: transform .12s ease;
}
.wc-cat-input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 10px;
  background: transparent;
  outline: none;
}
.wc-cat-btn {
  background: #0b74ff;
  border: none;
  color: #fff;
  padding: 10px 14px;
  margin-left: 8px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 44px;
  min-height: 44px;
}
.wc-cat-btn:hover { background: #065fd6; }
.wc-icon { font-size: 18px; }
.wc-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wc-spin 0.9s linear infinite;
}
@keyframes wc-spin { to { transform: rotate(360deg); } }

/* Results dropdown */
.wc-cat-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.08);
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .2s ease;
}
.wc-cat-results.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.wc-cat-results li {
  padding: 10px 12px;
  border-radius: 8px;
  margin: 2px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wc-cat-results li:hover, .wc-cat-results li.active {
  background: #f6fbff;
}
.wc-cat-results .count { color: #6b7280; font-size: 13px; margin-left: 8px; }

/* Highlight matched text */
.wc-match { background: linear-gradient(90deg,#fff8c4,#fff2c6); padding: 2px 4px; border-radius: 4px; }

/* Responsive */
@media (max-width:600px) {
  .wc-cat-premium-wrap { padding: 6px; max-width: 100%; margin: 12px; }
  .wc-cat-results { top: calc(100% + 8px); left: 4px; right: 4px; }
}

/* Added styles for wc_cat_premium_tree shortcode */
.wc-cat-tree { display:flex; flex-wrap:wrap; gap:20px; }
.wc-cat-tree[data-columns="3"] .wc-cat-box { flex: 0 1 calc(33.333% - 20px); box-sizing:border-box; }
.wc-cat-tree[data-columns="4"] .wc-cat-box { flex: 0 1 calc(25% - 20px); }
.wc-cat-box { background:#fff; border:1px solid #eee; padding:18px; border-radius:10px; box-shadow:0 6px 18px rgba(0,0,0,0.03); }
.wc-cat-root-link { display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit; }
.wc-cat-root-thumb img, .wc-cat-thumb img { max-width:64px; height:auto; display:block; }
.wc-cat-root-name { font-weight:700; font-size:18px; }
.wc-cat-children { list-style:none; margin:12px 0 0 0; padding-left:18px; }
.wc-cat-children .wc-cat-item { margin-bottom:8px; }
.wc-cat-children .wc-cat-link { display:inline-flex; align-items:center; gap:8px; text-decoration:none; color:inherit; padding:8px 10px; border-radius:8px; border:1px solid rgba(0,0,0,0.04); background: #fafafa; }
.level-1 .wc-cat-link { background:#fff; }
.level-2 .wc-cat-link { margin-left:8px; }
.level-3 .wc-cat-link { margin-left:16px; font-size:90%; }
@media (max-width:768px){ .wc-cat-tree[data-columns="3"] .wc-cat-box { flex:0 1 100%; } }
