/* ─────────────────────────────────────────
   CraftStore — Buttons & Forms
   ───────────────────────────────────────── */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: none;
  border: none;
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: #040f08;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.35), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-md);
}
.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--green);
  background: var(--green-glow);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-md);
  background: var(--surface-2);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

.btn-sm {
  padding: 7px 16px;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 15px 36px;
  font-size: 0.95rem;
}
.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
}
.btn-icon-sm {
  width: 32px; height: 32px;
  padding: 0;
}

/* ── Search Bar ── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.08);
}
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
  padding: 0 18px;
  height: 100%;
  background: var(--green);
  border: none;
  color: #040f08;
  font-weight: 700;
  cursor: none;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.search-bar button:hover { background: var(--green-light); }

/* ── Form inputs ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-input {
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-input:focus {
  border-color: rgba(74, 222, 128, 0.4);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.08);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input {
  resize: vertical;
  min-height: 100px;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238896aa' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ── Range slider ── */
.form-range {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  outline: none;
}
.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green);
  cursor: none;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--green);
  color: #040f08;
}
