/* =================================================================== */
/* PRODUCT PAGE — Type-Specific Options UI                             */
/* =================================================================== */

.options-section {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* ── Option Group (one step) ──────────────────────────────────────── */
.option-group {
  padding: 1.1rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.option-group:last-of-type { border-bottom: none; }
.option-group.hidden { display: none !important; }
.option-group.dimmed { opacity: 0.38; pointer-events: none; }

.option-group-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.option-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.option-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #111827;
  margin: 0;
  flex: 1;
}

.selected-value {
  font-weight: 500;
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.82rem;
}

.optional-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0;
  margin-left: auto;
}

.option-sublabel {
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-left: auto;
}

.size-guide-link {
  font-size: 0.72rem;
  color: #6b7280;
  text-decoration: underline;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-left: auto;
}

.selected-indicator {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: #6b7280;
}

/* ── Pill Selector ────────────────────────────────────────────────── */
.pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s ease;
  line-height: 1.2;
  min-width: 44px;
  font-family: inherit;
}
.pill-btn:hover { border-color: #9ca3af; background: #f9fafb; }
.pill-btn.active { border-color: #111827; background: #111827; color: #fff; }

.pill-main { display: block; }
.pill-sub {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 0.1rem;
  display: block;
}
.pill-btn.active .pill-sub { opacity: 0.8; }

/* ── Radio Cards ──────────────────────────────────────────────────── */
.radio-card-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
}
.radio-card:hover { border-color: #9ca3af; background: #f9fafb; }
.radio-card.active { border-color: #111827; background: #fafafa; }

.radio-card input[type="radio"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: #111827;
  cursor: pointer;
}

.radio-card-body { display: flex; flex-direction: column; gap: 0.15rem; }
.radio-card-title { font-size: 0.87rem; font-weight: 600; color: #111827; }
.radio-card-desc  { font-size: 0.76rem; color: #6b7280; line-height: 1.5; }

/* ── Upload Area ──────────────────────────────────────────────────── */
.upload-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.btn-upload:hover { border-color: #9ca3af; background: #f9fafb; }

.upload-hint { font-size: 0.76rem; color: #9ca3af; }

/* ── Quantity Controls ────────────────────────────────────────────── */
.bulk-entry-row {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 1.1rem 0 0;
}

.simple-qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0 0;
}

.qty-block { display: flex; flex-direction: column; gap: 0.35rem; }

.qty-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #374151;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  width: 34px;
  height: 36px;
  border: none;
  background: #f9fafb;
  cursor: pointer;
  font-size: 1.05rem;
  color: #374151;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.qty-btn:hover { background: #e5e7eb; }

#quantity-input {
  width: 52px;
  height: 36px;
  border: none;
  border-left: 1.5px solid #e5e7eb;
  border-right: 1.5px solid #e5e7eb;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  outline: none;
  padding: 0;
  font-family: inherit;
}

.btn-add-combo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 1rem;
  height: 36px;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-add-combo:hover { border-color: #9ca3af; background: #f9fafb; }

/* ── Combinations Table ───────────────────────────────────────────── */
.combinations-wrapper { margin-top: 0.75rem; }
.combinations-wrapper.hidden { display: none; }

.combinations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.combinations-table th {
  background: #111827;
  color: #fff;
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.combinations-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.combinations-table tbody tr:last-child td { border-bottom: none; }

.combo-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  margin-right: 0.35rem;
  vertical-align: middle;
}
.qty-in-table {
  width: 50px;
  padding: 0.25rem 0.35rem;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  text-align: center;
  font-size: 0.83rem;
  font-family: inherit;
}
.remove-combo-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.2rem;
  transition: color 0.15s;
  font-family: inherit;
}
.remove-combo-btn:hover { color: #b91c1c; }

.combinations-total {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-align: right;
}

/* ── Product Actions ──────────────────────────────────────────────── */
.product-actions { padding: 1rem 0 0.5rem; }
.product-actions .btn.btn-primary {
  width: 100%;
  padding: 0.95rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 6px;
}

/* ── Custom Additions ─────────────────────────────────────────────── */
.custom-additions { display: flex; flex-direction: column; gap: 0.65rem; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.87rem;
  color: #374151;
}
.checkbox-row input[type="checkbox"] {
  accent-color: #111827;
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.addon-price { color: #9ca3af; font-size: 0.78rem; }

.custom-request-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #374151;
}
#custom-request {
  width: 100%;
  padding: 0.7rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  font: inherit;
  font-size: 0.87rem;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
#custom-request:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.1);
}

/* ── Accessories: branding text input ────────────────────────────── */
.branding-text-input {
  width: 100%;
  padding: 0.7rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 6px;
  font: inherit;
  font-size: 0.87rem;
  transition: all 0.15s;
  box-sizing: border-box;
  margin-bottom: 0.65rem;
}
.branding-text-input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.1);
}

/* ── Thread swatches (smaller) ────────────────────────────────────── */
.thread-swatches { gap: 6px !important; }
.thread-swatches .color-swatch { width: 26px !important; height: 26px !important; }

/* ── Loading placeholder ──────────────────────────────────────────── */
.options-loading {
  color: #9ca3af;
  font-size: 0.9rem;
  padding: 2rem 0;
  text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .bulk-entry-row { flex-direction: column; align-items: stretch; }
  .bulk-entry-row .btn-add-combo { width: 100%; justify-content: center; }
  .radio-card { padding: 0.65rem 0.85rem; }
}
