/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans); font-weight: 500; font-size: 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: all var(--duration-base) var(--ease);
  border: 1px solid transparent; outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 2px var(--bg-root), 0 0 0 4px var(--border-focus); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.btn-sm  { padding: 6px 12px; font-size: 13px; }
.btn-md  { padding: 8px 16px; }
.btn-lg  { padding: 11px 22px; font-size: 15px; }

.btn-primary { background: var(--text-primary); color: #000; }
.btn-primary:hover { background: #d4d4d4; }
.btn-primary:active { transform: scale(0.98); }

.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn-outline:hover { background: var(--bg-hover); border-color: var(--border-strong); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-blue {
  background: var(--accent-blue); color: #fff;
  box-shadow: var(--shadow-glow-blue);
}
.btn-blue:hover { background: #2479e8; }

.btn-full { width: 100%; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500; border: 1px solid;
}
.badge::before { content:''; display:block; width:5px; height:5px; border-radius:50%; background:currentColor; }
.badge-default { background: var(--bg-elevated); color: var(--text-secondary); border-color: var(--border-default); }
.badge-green   { background: rgba(80,227,194,0.1); color: var(--accent-green); border-color: rgba(80,227,194,0.25); }
.badge-amber   { background: rgba(245,166,35,0.1); color: var(--accent-amber); border-color: rgba(245,166,35,0.25); }
.badge-red     { background: rgba(255,68,68,0.1);  color: var(--accent-red);   border-color: rgba(255,68,68,0.25); }
.badge-blue    { background: rgba(50,145,255,0.1); color: #60a5fa;             border-color: rgba(50,145,255,0.25); }

/* ── INPUT ── */
.input {
  width: 100%; background: var(--bg-surface);
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  color: var(--text-primary); font-family: var(--font-sans); font-size: 14px;
  padding: 8px 12px; outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.input::placeholder { color: var(--text-tertiary); }
.input:hover { border-color: var(--border-strong); }
.input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(255,255,255,0.06); }

.input-icon-wrap { position: relative; }
.input-icon-wrap .input { padding-left: 36px; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); font-size: 14px; pointer-events: none;
}

.select {
  width: 100%; background: var(--bg-surface);
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  color: var(--text-primary); font-family: var(--font-sans); font-size: 14px;
  padding: 8px 36px 8px 12px; outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  transition: border-color var(--duration-fast);
}
.select:hover { border-color: var(--border-strong); }
.select:focus { border-color: var(--border-focus); outline: none; }

/* ── CARD ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); overflow: hidden;
  transition: border-color var(--duration-base), box-shadow var(--duration-base);
  cursor: pointer;
}
.card:hover { border-color: var(--border-default); box-shadow: var(--shadow-glow-white); }

.card-img {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-bottom: 1px solid var(--border-subtle);
}
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.card-img-ph {
  width: 48px; height: 48px; background: var(--bg-overlay);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: 22px;
}

.card-body  { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.card-meta  { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-brand { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }
.card-name  { font-size: 13px; font-weight: 500; color: var(--text-primary); line-height: 1.4;
              display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-cat   { font-size: 11px; color: var(--text-tertiary); }

.card-footer {
  padding: 10px 14px; border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.card-price { font-family: var(--font-mono); font-size: 16px; font-weight: 600; }

/* ── CHIP / SPEC ── */
.chip {
  display: inline-block; background: var(--bg-elevated);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 2px 7px; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary);
}

/* ── CALLOUT ── */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid; font-size: 13px;
}
.callout-info    { background: rgba(50,145,255,0.06); border-color: rgba(50,145,255,0.2); color: #93c5fd; }
.callout-success { background: rgba(80,227,194,0.06); border-color: rgba(80,227,194,0.2); color: #5eead4; }
.callout-error   { background: rgba(255,68,68,0.06);  border-color: rgba(255,68,68,0.2);  color: #fca5a5; }

/* ── SKELETON ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-overlay) 50%, var(--bg-elevated) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: var(--radius-sm);
}

/* ── DIVIDER ── */
.divider { border: none; border-top: 1px solid var(--border-subtle); }

/* ── TOAST ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 10px 16px;
  font-size: 13px; color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: toast-in 0.2s var(--ease);
  pointer-events: auto;
}
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 24px;
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: 20px;
  animation: modal-in 0.2s var(--ease);
}
@keyframes modal-in { from { opacity:0; transform:scale(0.96); } to { opacity:1; transform:scale(1); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-title  { font-size: 16px; font-weight: 600; }
.modal-close  { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 18px; }
.modal-close:hover { color: var(--text-primary); }
