/* ═══════════════════════════════════════════════════════════════
   rfq.css — RFQ Submission Page
   prefix: rfq-pg  /  rfq-  for components
═══════════════════════════════════════════════════════════════ */

:root {
  --red:    #C0272D;
  --red-dk: #8B1A1E;
  --red-lt: #E03035;
  --ink:    #0F1117;
  --ink-2:  #2E3038;
  --ink-3:  #5A5D6B;
  --rule:   #DDE0E8;
  --bg:     #F7F8FA;
  --white:  #FFFFFF;
  --gold:   #A07830;
  --nova:   #1A2E52;
}

/* ── Page header ─────────────────────────────────────────────── */
.rfq-pg-head {
  background: var(--ink);
  color: var(--white);
  padding: 52px 0 40px;
  border-bottom: 2px solid var(--red);
}
.rfq-pg-head-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}
.rfq-pg-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  color: var(--white);
  margin: 10px 0 8px;
  line-height: 1.15;
}
.rfq-pg-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  max-width: 520px;
  margin: 0;
}
.rfq-pg-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
  padding: 20px 24px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
}
.rfq-pg-stat { text-align: center; }
.rfq-pg-stat-n {
  display: block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.8rem;
  color: var(--white);
  line-height: 1;
}
.rfq-pg-stat-l {
  display: block;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-top: 3px;
}
.rfq-pg-stat-sep {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,.12);
}

/* ── Error banner ────────────────────────────────────────────── */
.rfq-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 4px;
  margin: 20px 0 0;
  font-size: .875rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* ── Body layout ─────────────────────────────────────────────── */
.rfq-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 36px 0 60px;
  align-items: start;
}

/* ── Sections (left column) ──────────────────────────────────── */
.rfq-section {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 16px;
}
.rfq-section:last-child { margin-bottom: 0; }
.rfq-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.rfq-section-title {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0;
}
.rfq-section-count {
  font-size: .75rem;
  color: var(--ink-3);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 20px;
}
.rfq-section-opt {
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Empty state ─────────────────────────────────────────────── */
.rfq-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
}
.rfq-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.rfq-empty p { margin: 0 0 20px; font-size: .9rem; }
.rfq-empty-btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 2px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ── Item list ───────────────────────────────────────────────── */
.rfq-items { display: flex; flex-direction: column; gap: 12px; }

.rfq-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  transition: border-color .15s;
}
.rfq-item:hover { border-color: #c4c8d4; }

.rfq-item-img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rfq-item-img img { width: 100%; height: 100%; object-fit: contain; }
.rfq-item-img-placeholder { font-size: 1.4rem; color: var(--ink-3); }

.rfq-item-body { flex: 1; min-width: 0; }
.rfq-item-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rfq-item-meta {
  display: flex;
  gap: 10px;
  font-size: .75rem;
  color: var(--ink-3);
  margin-bottom: 3px;
}
.rfq-item-mfr {
  font-family: monospace;
  font-size: .7rem;
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 2px;
}
.rfq-item-cat {
  font-size: .7rem;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.rfq-item-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.rfq-item-qty-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.rfq-item-qty-lbl {
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rfq-item-qty {
  width: 56px;
  padding: 4px 6px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: .8rem;
  text-align: center;
  background: var(--white);
}
.rfq-item-unit {
  padding: 4px 6px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: .75rem;
  background: var(--white);
  color: var(--ink-2);
}
.rfq-item-note {
  flex: 1;
  min-width: 120px;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: .78rem;
  background: var(--white);
}
.rfq-item-note::placeholder { color: var(--ink-3); }

.rfq-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 4px;
  border-radius: 2px;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.rfq-item-remove:hover { color: var(--red); background: #fef2f2; }

/* ── Manual item ─────────────────────────────────────────────── */
.rfq-section-manual { border-style: dashed; }
.rfq-manual-row {
  display: flex;
  gap: 10px;
}
.rfq-manual-title { flex: 1; }
.rfq-manual-qty   { width: 80px; flex-shrink: 0; }

/* ── Right column cards ──────────────────────────────────────── */
.rfq-right { position: sticky; top: 24px; }
.rfq-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 22px;
  margin-bottom: 16px;
}
.rfq-card:last-child { margin-bottom: 0; }
.rfq-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.rfq-prefill-badge {
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #059669;
  font-weight: 600;
}

/* ── Form fields ─────────────────────────────────────────────── */
.rfq-field { margin-bottom: 14px; }
.rfq-field:last-child { margin-bottom: 0; }
.rfq-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rfq-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.rfq-req { color: var(--red); font-weight: 700; margin-left: 2px; }
.rfq-opt { font-size: .62rem; color: var(--ink-3); font-weight: 400; text-transform: none; letter-spacing: 0; }

.rfq-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: .875rem;
  color: var(--ink);
  background: var(--white);
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.rfq-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,39,45,.08);
}
.rfq-input[readonly] {
  background: var(--bg);
  color: var(--ink-3);
  cursor: default;
}
.rfq-input-err { border-color: var(--red) !important; }

.rfq-select { cursor: pointer; }

.rfq-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}
.rfq-textarea-sm {
  resize: vertical;
  min-height: 56px;
  line-height: 1.5;
}

.rfq-field-err {
  font-size: .72rem;
  color: var(--red);
  margin-top: 4px;
  display: block;
  line-height: 1.4;
}

/* ── Sign in nudge ───────────────────────────────────────────── */
.rfq-signin-nudge {
  font-size: .78rem;
  color: var(--ink-3);
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 3px;
  line-height: 1.5;
  margin-top: 12px;
}
.rfq-signin-nudge a { color: var(--red); font-weight: 600; }

/* ── Submit button ───────────────────────────────────────────── */
.rfq-submit-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s;
  margin-bottom: 12px;
}
.rfq-submit-btn:hover:not(:disabled) { background: var(--red-dk); }
.rfq-submit-btn:disabled {
  background: var(--rule);
  color: var(--ink-3);
  cursor: not-allowed;
}
.rfq-submit-note {
  font-size: .75rem;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* ── Success page ────────────────────────────────────────────── */
.rfq-success-pg { padding: 60px 0 80px; background: var(--bg); min-height: 60vh; }
.rfq-success-wrap { max-width: 760px; margin: 0 auto; text-align: center; }
.rfq-success-icon { font-size: 3rem; margin-bottom: 16px; }
.rfq-success-h {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--ink);
  margin: 12px 0 8px;
}
.rfq-success-ref {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--ink-3);
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.rfq-success-sub {
  font-size: .95rem;
  color: var(--ink-3);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 40px;
}
.rfq-success-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
  text-align: left;
}
.rfq-success-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 20px;
}
.rfq-success-card-cta { border-color: var(--red); }
.rfq-success-card-icon { font-size: 1.5rem; margin-bottom: 10px; }
.rfq-success-card-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.rfq-success-card p {
  font-size: .83rem;
  color: var(--ink-3);
  line-height: 1.6;
  margin: 0 0 12px;
}
.rfq-success-card p:last-child { margin-bottom: 0; }
.rfq-success-card a { color: var(--red); }
.rfq-success-register-btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 2px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 4px;
}
.rfq-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.rfq-success-btn-outline {
  padding: 11px 28px;
  border: 1.5px solid var(--ink-2);
  color: var(--ink-2);
  border-radius: 2px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.rfq-success-btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.rfq-success-btn-wa {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: #25d366;
  color: var(--white);
  border-radius: 2px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
}
.rfq-success-btn-wa:hover { background: #1ebe5d; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .rfq-body { grid-template-columns: 1fr; }
  .rfq-right { position: static; }
  .rfq-pg-head-inner { flex-direction: column; gap: 20px; }
  .rfq-pg-stats { align-self: stretch; justify-content: center; }
  .rfq-success-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rfq-pg-head { padding: 32px 0 28px; }
  .rfq-section, .rfq-card { padding: 16px; }
  .rfq-field-row { grid-template-columns: 1fr; }
  .rfq-item-foot { flex-direction: column; align-items: flex-start; }
  .rfq-item-note { width: 100%; }
  .rfq-manual-row { flex-direction: column; }
  .rfq-manual-qty { width: 100%; }
}
