/* ==========================================================================
   META PEPTIDES — Reusable components
   Buttons, badges, product cards, list rows, forms, tabs, accordions,
   tables, quantity stepper, notices, toasts.
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }
.btn-purple { background: var(--purple-600); color: #fff; }
.btn-purple:hover { background: #6229b3; }
.btn-outline { border-color: var(--blue-600); color: var(--blue-600); background: var(--white); }
.btn-outline:hover { background: var(--blue-50); }
.btn-ghost-dark { border-color: var(--dark-border); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { height: 50px; font-size: 13px; }
.btn-sm { height: 30px; padding: 0 14px; font-size: 10.5px; border-radius: var(--radius-xs); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.link { color: var(--blue-600); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border: 1px solid currentColor; border-radius: var(--radius-xs);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.5;
  white-space: nowrap;
}
.badge-medical { color: var(--green-600); background: var(--green-50); }
.badge-pipeline { color: var(--blue-600); background: var(--blue-50); }
.badge-research { color: var(--purple-600); background: var(--purple-50); }
.badge-demo { color: var(--amber-600); background: var(--amber-50); }
.badge-solid { background: var(--green-600); color: #fff; border-color: var(--green-600); }

/* ---------- Product image frame ---------- */
.p-thumb { background: var(--grey-50); border-radius: var(--radius-sm); display: grid; place-items: center; overflow: hidden; }
.p-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Product card (row on mobile, card on tablet+) ---------- */
.product-grid { display: grid; grid-template-columns: 1fr; }
.product-card {
  position: relative;
  display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  background: var(--white); color: var(--text);
}
.product-card .p-thumb { width: 74px; height: 74px; background: transparent; }
.product-card .p-info { min-width: 0; }
.product-card .p-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.product-card .p-name a::after { content: ""; position: absolute; inset: 0; }
.product-card .p-strength { font-size: 12px; color: var(--text-muted); }
.product-card .p-price { font-size: 15px; font-weight: 800; margin-top: 4px; }
.product-card .p-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; align-self: stretch; padding-block: 2px; }
.product-card .p-actions { position: relative; z-index: 2; display: flex; gap: 6px; }
.product-card .p-add { display: none; }
.product-card .p-contents { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
.product-grid .empty-state { padding: 40px 0; text-align: center; color: var(--text-muted); grid-column: 1 / -1; }

/* ---------- List rows (pipeline / research / COA / related) ---------- */
.row-list { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--white); overflow: hidden; }
.row-item {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text);
}
.row-item:last-child { border-bottom: 0; }
.row-item .row-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-600); }
.row-list.is-purple .row-icon { background: var(--purple-50); color: var(--purple-600); }
.row-item .row-title { font-size: 13.5px; font-weight: 700; color: var(--blue-600); line-height: 1.3; }
.row-list.is-purple .row-title { color: var(--text); }
.row-item .row-title span { color: var(--text); font-weight: 500; }
.row-item .row-meta { font-size: 12px; color: var(--text-muted); }
.row-item .row-side { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--text-muted); }
.row-item .row-side .status { display: none; }
.row-item .row-dl { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--blue-600); }
.row-list.is-purple .row-dl { color: var(--purple-600); }
.row-item .row-dl:hover { background: var(--grey-50); }

/* ---------- Search field ---------- */
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); width: 17px; height: 17px; pointer-events: none; }
.search-field input {
  width: 100%; height: 42px; padding: 0 14px 0 38px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--grey-50);
  font-size: 13.5px;
}
.search-field input:focus { outline: none; border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 3px rgba(22, 132, 248, 0.15); }
.theme-dark .dark-band .search-field input { background: rgba(255, 255, 255, 0.06); border-color: var(--dark-border); color: #fff; }

/* ---------- Chips / filter tabs ---------- */
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 16px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 600; border: 1px solid var(--border); background: var(--white); color: var(--text-muted);
}
.chip.is-active { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.chip-dark { border-color: transparent; background: rgba(255, 255, 255, 0.06); color: #dfe7f2; }
.chip-dark.is-active { background: var(--blue-600); color: #fff; }
.is-purple .chip.is-active { background: var(--purple-600); border-color: var(--purple-600); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .field-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--white);
  font-size: 14px; color: var(--text);
}
.textarea { min-height: 90px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(22, 132, 248, 0.15); }
.input-wrap { position: relative; }
.input-wrap > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); width: 17px; height: 17px; pointer-events: none; }
.input-wrap .input { padding-left: 40px; }
.input-wrap .pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--text-faint); }
.input-wrap .pw-toggle:hover { color: var(--text); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--red-600); }
.field-error { font-size: 12px; color: var(--red-600); min-height: 0; }
.field-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-muted); }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--blue-600); flex: none; }
.form-row-2 { display: grid; gap: 14px; }

/* ---------- Quantity stepper ---------- */
.qty { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--white); }
.qty button { width: 36px; height: 100%; display: grid; place-items: center; color: var(--text); }
.qty button:hover { background: var(--grey-50); }
.qty input { width: 34px; height: 100%; border: 0; text-align: center; font-weight: 600; font-size: 14px; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 30px; }
.qty-sm button { width: 28px; }
.qty-sm input { width: 26px; font-size: 13px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1 0 auto; padding: 12px 12px 11px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted);
}
.tab[aria-selected="true"] { color: var(--blue-600); border-bottom-color: var(--blue-600); }
.tab-panel { padding: 18px 0 6px; font-size: 13.5px; color: #26364d; }
.tab-panel p + p { margin-top: 10px; }

/* ---------- Check list ---------- */
.check-list { display: grid; gap: 8px; margin-top: 14px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.check-list .tick { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--blue-600); color: #fff; display: grid; place-items: center; margin-top: 1px; }
.check-list .tick .icon { width: 12px; height: 12px; stroke-width: 3; }

/* ---------- Notices ---------- */
.notice { border-radius: var(--radius-md); padding: 14px 16px; font-size: 12.5px; line-height: 1.55; }
.notice-title { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.notice-warning { background: var(--amber-50); border: 1px solid #fbe2bd; color: #4a3a22; }
.notice-warning .notice-title { color: var(--amber-600); }
.notice-info { background: var(--blue-50); border: 1px solid #cfe0fd; color: #1d3557; }
.notice-info .notice-title { color: var(--blue-600); }
.notice-demo { background: var(--amber-50); border: 1px dashed #f1b86a; color: #5b4523; }
.notice-demo .notice-title { color: var(--amber-600); }
.notice-research { background: var(--purple-50); border: 1px solid #e0d0f7; color: #3c2363; }
.notice-research .notice-title { color: var(--purple-600); }
.theme-dark .notice-research { background: rgba(116, 56, 201, 0.14); border-color: rgba(116, 56, 201, 0.4); color: #dccbf7; }

/* ---------- Accordion (native details) ---------- */
.accordion { border-bottom: 1px solid var(--border); }
.accordion > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 14px 2px; font-size: 13px; font-weight: 700; color: var(--text);
}
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary .sum-label { display: flex; align-items: center; gap: 10px; }
.accordion > summary .sum-label .icon { color: var(--text-muted); }
.accordion > summary .chev { transition: transform 0.25s var(--ease); color: var(--text-muted); }
.accordion[open] > summary .chev { transform: rotate(180deg); color: var(--blue-600); }
.accordion .acc-body { padding: 0 2px 16px; font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }
.accordion .acc-body p + p { margin-top: 8px; }
.accordion-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 14px; background: var(--white); }
.accordion-card + .accordion-card { margin-top: 10px; }
.accordion-card.accordion { border-bottom: 1px solid var(--border); }

/* ---------- Spec table ---------- */
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.spec-table th { width: 42%; font-weight: 700; color: var(--text); padding-right: 12px; }
.spec-table td { color: #33435a; }
.spec-note { margin-top: 10px; font-size: 11.5px; color: var(--amber-600); }

/* ---------- Stars ---------- */
.stars { display: inline-flex; gap: 1px; color: #f5a524; }
.stars .icon { width: 13px; height: 13px; fill: currentColor; stroke: none; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 14px); transform: translateX(-50%); z-index: 400; display: grid; gap: 8px; width: min(92vw, 380px); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg);
  font-size: 13px; pointer-events: auto;
  animation: toast-in 0.3s var(--ease);
}
.toast .icon { color: var(--cyan-400); }
.toast.is-demo .icon { color: #ffb547; }
.toast a { margin-left: auto; color: var(--cyan-400); font-weight: 700; white-space: nowrap; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: 0.25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Card shell ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; color: var(--text); }
.card-title { font-family: var(--font-head); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 14px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); padding: 14px 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--text-faint); }
.breadcrumb a:hover { color: var(--blue-600); }
.breadcrumb [aria-current] { color: var(--text); font-weight: 500; }

/* ---------- Icon feature list ---------- */
.feature-list { display: grid; gap: 16px; }
.feature-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.feature-list .f-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--blue-600); border: 1px solid var(--border); border-radius: 10px; }
.feature-list strong { display: block; font-size: 13.5px; font-weight: 700; }
.feature-list span { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Demo ribbon (small inline label) ---------- */
.demo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--amber-600); background: var(--amber-50); border: 1px dashed #f1b86a; padding: 3px 8px; border-radius: var(--radius-xs); letter-spacing: 0.03em; text-transform: uppercase; }
