/* Inputs: fields, radio/checkbox options, choice cards, quantity, swatches, chips, select. */

.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--color-ink); }
.field i { font-style: normal; font-weight: 500; color: var(--color-muted); }
.field input, .field textarea, .select {
  width: 100%; padding: 12px 14px;
  background: #fff; border: 1px solid var(--color-line-strong); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field .select:focus { outline: none; border-color: var(--color-ink); box-shadow: 0 0 0 3px rgba(21, 23, 27, .08); }
.field .select { padding-right: 36px; background-color: #fff; }
.field [aria-invalid="true"] { border-color: var(--color-sale); box-shadow: 0 0 0 3px rgba(196, 22, 46, .08); }
.field__error { min-height: 0; color: var(--color-sale); font-size: 13px; font-weight: 500; }
.field__error:empty { display: none; }
.input--code { text-transform: uppercase; letter-spacing: .12em; font-weight: 700 !important; }
.input--code::placeholder { text-transform: none; letter-spacing: normal; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* filter radio/checkbox rows */
.filter-option {
  position: relative; /* keeps a visually-hidden input inside its chip (and inside the chip row's scroller) */
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; cursor: pointer; font-size: 15px;
}
.filter-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-ink); flex: none; cursor: pointer; }
.filter-option__label { flex: 1; color: var(--color-text); }
.filter-option__label small { color: var(--color-muted); margin-left: 4px; }
.filter-option input:checked ~ .filter-option__label { color: var(--color-ink); font-weight: 700; }

/* large selectable cards (delivery, payment) */
.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--color-line-strong); border-radius: var(--radius); cursor: pointer;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.choice:hover { border-color: var(--color-ink); }
.choice:has(input:checked) { border-color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-ink); background: #fcfbf9; }
.choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-ink); flex: none; }
.choice__text { flex: 1; display: grid; }
.choice__text b { font-weight: 700; color: var(--color-ink); font-size: 15px; }
.choice__text small { color: var(--color-muted); font-size: 13px; }
.choice__price { font-weight: 700; color: var(--color-ink); }
.choice__tag { padding: 3px 8px; border-radius: 6px; background: #e6f4ec; color: var(--color-success); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* quantity stepper */
.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--color-line-strong); border-radius: 999px; background: #fff;
}
.qty button { display: grid; place-items: center; border-radius: 50%; color: var(--color-ink); transition: background-color .2s; }
.qty button:hover { background: var(--color-surface); }
.qty output { text-align: center; font-weight: 700; color: var(--color-ink); }
.qty--md { height: 54px; }
.qty--md button { width: 46px; height: 46px; margin: 0 3px; }
.qty--md output { min-width: 28px; }
.qty--sm { height: 36px; }
.qty--sm button { width: 32px; height: 32px; margin: 0 1px; }
.qty--sm .icon { width: 16px; height: 16px; }
.qty--sm output { min-width: 22px; font-size: 14px; }

/* colour swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch__chip {
  display: block; width: 36px; height: 36px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px #fff, 0 0 0 4px var(--color-line);
  transition: box-shadow .2s;
}
.swatch:hover .swatch__chip { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px #fff, 0 0 0 4px var(--color-muted); }
.swatch input:checked + .swatch__chip { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 0 0 3px #fff, 0 0 0 5px var(--color-ink); }
.swatch input:focus-visible + .swatch__chip { outline: 2px solid var(--color-focus); outline-offset: 6px; }

/* removable filter chips */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.chips[hidden] { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 14px;
  border-radius: 999px; background: var(--color-surface); font-size: 13px; font-weight: 600; color: var(--color-ink);
  transition: background-color .2s;
}
.chip:hover { background: var(--color-surface-strong); }
.chip .icon { width: 14px; height: 14px; stroke-width: 2.2; }

/* native select styled to match */
.select, .toolbar__sort select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2315171b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}
