/* BDStall — pages/pc-builder.css  (main builder + selection) */

/* ── Shared page shell ── */
.pcb-page,
.pcbs-page {
  background: #F7F6F2;
  min-height: 60vh;
  padding: 24px 16px 56px;
}

.pcb-inner  { max-width: 1200px; margin: 0 auto; }
.pcbs-inner { max-width: 1200px; margin: 0 auto; }

/* ══════════════════════════════════════
   PC BUILDER — main page
   ══════════════════════════════════════ */

/* ── Header row ── */
.pcb-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.pcb-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1C1C1A;
  margin: 0 0 6px;
}

.pcb-intro {
  font-size: 0.9375rem;
  color: #6B6558;
  margin: 0;
  max-width: 520px;
  line-height: 1.5;
}

/* ── Action buttons ── */
.pcb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pcb-total-pill {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0D7A3E;
  background: #EAF8EE;
  border: 1px solid #B9EDD0;
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}

.pcb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-family: inherit;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.pcb-btn--primary {
  background: #149A49;
  color: white;
  border-color: #149A49;
}
.pcb-btn--primary:hover { background: #0D7A3E; border-color: #0D7A3E; color: white; }

.pcb-btn--ghost {
  background: white;
  color: #3A3A38;
  border-color: #D3D1C7;
}
.pcb-btn--ghost:hover { background: #F7F6F2; border-color: #149A49; color: #149A49; }

.pcb-btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: #E0DED8;
  color: #3A3A38;
}

.pcb-lang-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #FF9000;
  color: white;
  text-decoration: none;
  transition: background 0.15s;
}
.pcb-lang-btn:hover { background: #E07D00; color: white; }

/* ── Component list card ── */
.pcb-list {
  background: white;
  border-radius: 12px;
  border: 1px solid #E8E8E4;
  overflow: hidden;
  margin-bottom: 16px;
}

.pcb-list-head {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #F7F6F2;
  border-bottom: 1px solid #ECEAE4;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B6558;
  gap: 12px;
}

.pcb-list-head-comp { flex: 1; }
.pcb-list-head-price { width: 110px; text-align: right; }
.pcb-list-head-btn   { width: 88px; }

/* ── Component row (also the form) ── */
.pcb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #F0EFE9;
  background: white;
  transition: background 0.1s;
  margin: 0;
}

.pcb-row:last-of-type { border-bottom: none; }
.pcb-row:hover { background: #FAFAF9; }

.pcb-row--selected {
  background: #F4FBF7;
  border-left: 3px solid #149A49;
  padding-left: 13px;
}
.pcb-row--selected:hover { background: #EDF7F2; }

.pcb-row-thumb {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 6px;
  border: 1px solid #EEE9DC;
  background: #F8F7F3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.pcb-row-thumb img {
  max-width: 50px;
  max-height: 50px;
  object-fit: contain;
  display: block;
}

.pcb-row-info { flex: 1; min-width: 0; }

.pcb-row-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6B6558;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.pcb-required { color: #C0392B; font-size: 0.875rem; line-height: 1; }

.pcb-row-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #063971;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcb-row-empty {
  font-size: 0.8125rem;
  color: #B0ACA4;
  margin: 0;
}

.pcb-row-price {
  width: 110px;
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0D7A3E;
  flex-shrink: 0;
}

.pcb-row-price--empty { color: #D3D1C7; font-weight: 400; }

.pcb-row-btn { width: 88px; flex-shrink: 0; }

.pcb-btn-choose,
.pcb-btn-remove {
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pcb-btn-choose {
  background: #149A49;
  color: white;
  border-color: #149A49;
}
.pcb-btn-choose:hover { background: #0D7A3E; border-color: #0D7A3E; }

.pcb-btn-remove {
  background: white;
  color: #C0392B;
  border-color: #E0D0CE;
}
.pcb-btn-remove:hover { background: #FEF2F0; border-color: #C0392B; }

/* ── Grand total row ── */
.pcb-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-top: 2px solid #ECEAE4;
  background: #F7F6F2;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1C1C1A;
}

.pcb-total-row-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0D7A3E;
}

/* ── Footer bar ── */
.pcb-footer-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin: 12px 0 24px;
  flex-wrap: wrap;
}

.pcb-print-btn { color: #6B6558; border-color: #D3D1C7; }
.pcb-print-btn:hover { background: #F7F6F2; border-color: #149A49; color: #149A49; }

/* ── SEO guide ── */
.pcb-guide {
  background: white;
  border-radius: 12px;
  border: 1px solid #E8E8E4;
  padding: 20px 24px;
}

.pcb-guide-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1C1C1A;
  margin: 0 0 12px;
}

.pcb-guide-body {
  font-size: 0.875rem;
  color: #3A3A38;
  line-height: 1.75;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .pcb-list-head-price,
  .pcb-list-head-btn { display: none; }

  .pcb-row { flex-wrap: wrap; }

  .pcb-row-info { min-width: calc(100% - 68px); }

  .pcb-row-price {
    width: auto;
    flex: 1;
    text-align: left;
    font-size: 0.875rem;
  }

  .pcb-row-btn { width: auto; }

  .pcb-btn-choose,
  .pcb-btn-remove { padding: 7px 14px; width: auto; }
}

/* ══════════════════════════════════════
   PC BUILDER — selection page
   ══════════════════════════════════════ */

.pcbs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6B6558;
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.pcbs-back:hover { color: #1C1C1A; }

.pcbs-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1C1C1A;
  margin: 0 0 20px;
}

/* ── Product grid ── */
.pcbs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 560px)  { .pcbs-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 860px)  { .pcbs-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

/* ── Product card ── */
.pcbs-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #E8E8E4;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.pcbs-card:hover {
  border-color: #B9EDD0;
  box-shadow: 0 4px 16px rgba(20,154,73,0.1);
}

.pcbs-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: #F8F7F3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}

.pcbs-card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.pcbs-card-body {
  padding: 10px 12px 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pcbs-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1C1C1A;
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.pcbs-card-pricing { margin-top: auto; }

.pcbs-card-original {
  font-size: 0.75rem;
  color: #B0ACA4;
  text-decoration: line-through;
}

.pcbs-card-discount {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: white;
  background: #C0392B;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

.pcbs-card-price {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #0D7A3E;
  margin-top: 2px;
}

.pcbs-card-date {
  font-size: 0.6875rem;
  color: #B0ACA4;
  margin-top: 3px;
}

.pcbs-card-action { padding: 8px 12px 12px; }

.pcbs-btn-add {
  display: block;
  width: 100%;
  padding: 9px 0;
  background: #149A49;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.pcbs-btn-add:hover { background: #0D7A3E; }

/* ── Pagination ── */
.pcbs-pagination {
  margin-top: 28px;
}

/* ══════════════════════════════════════
   PC BUILDER — saved build list
   ══════════════════════════════════════ */

.pcbl-head-name    { flex: 1; }
.pcbl-head-price   { width: 130px; text-align: right; }
.pcbl-head-quotes  { width: 110px; text-align: center; }
.pcbl-head-actions { width: 180px; }

/* ── Build row ── */
.pcbl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #F0EFE9;
  background: white;
  transition: background 0.1s;
}
.pcbl-row:last-of-type { border-bottom: none; }
.pcbl-row:hover { background: #FAFAF9; }

.pcbl-row-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #EAF8EE;
  border: 1px solid #B9EDD0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #149A49;
}

.pcbl-row-info { flex: 1; min-width: 0; }

.pcbl-row-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1C1C1A;
}

.pcbl-row-price {
  width: 130px;
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0D7A3E;
  flex-shrink: 0;
}

.pcbl-row-quotes {
  width: 110px;
  text-align: center;
  flex-shrink: 0;
}

.pcbl-quote-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #063971;
  background: #EAF0FB;
  border: 1px solid #C3D4F4;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.pcbl-quote-empty {
  font-size: 0.8125rem;
  color: #B0ACA4;
}

/* ── Row action buttons ── */
.pcbl-row-actions {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.pcbl-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.pcbl-action-btn--edit {
  background: white;
  color: #063971;
  border-color: #C3D4F4;
}
.pcbl-action-btn--edit:hover { background: #EAF0FB; border-color: #063971; color: #063971; }

.pcbl-action-btn--quote {
  background: #149A49;
  color: white;
  border-color: #149A49;
}
.pcbl-action-btn--quote:hover { background: #0D7A3E; border-color: #0D7A3E; color: white; }

.pcbl-action-btn--remove {
  background: white;
  color: #C0392B;
  border-color: #E0D0CE;
}
.pcbl-action-btn--remove:hover { background: #FEF2F0; border-color: #C0392B; }

/* ── Empty state ── */
.pcbl-empty {
  background: white;
  border-radius: 12px;
  border: 1px solid #E8E8E4;
  padding: 56px 24px;
  text-align: center;
}

.pcbl-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #F0EFE9;
  border: 1px solid #E0DED8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9B978E;
  margin-bottom: 18px;
}

.pcbl-empty-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #1C1C1A;
  margin: 0 0 8px;
}

.pcbl-empty-sub {
  font-size: 0.9rem;
  color: #6B6558;
  margin: 0 0 24px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .pcbl-head-price,
  .pcbl-head-quotes  { display: none; }

  .pcbl-row { flex-wrap: wrap; }

  .pcbl-row-price,
  .pcbl-row-quotes { display: none; }

  .pcbl-row-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ══════════════════════════════════════
   PC BUILDER — quote request page
   ══════════════════════════════════════ */

.pcbq-build-tag {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #149A49;
  background: #EAF8EE;
  border: 1px solid #B9EDD0;
  border-radius: 6px;
  padding: 2px 9px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Two-column layout ── */
.pcbq-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 760px) {
  .pcbq-layout { grid-template-columns: 1fr; }
}

/* ── Section heading ── */
.pcbq-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6B6558;
  margin-bottom: 10px;
}

.pcbq-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #EAF8EE;
  color: #149A49;
  flex-shrink: 0;
}

/* ── Build item rows ── */
.pcbq-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #F0EFE9;
}
.pcbq-item-row:last-of-type { border-bottom: none; }

.pcbq-item-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid #EEE9DC;
  background: #F8F7F3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pcbq-item-thumb img {
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  display: block;
}

.pcbq-item-info { flex: 1; min-width: 0; }

.pcbq-item-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1C1C1A;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcbq-item-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0D7A3E;
  flex-shrink: 0;
  white-space: nowrap;
}

.pcbq-date-note {
  font-size: 0.8125rem;
  color: #9B978E;
  margin: 10px 0 0;
  text-align: right;
}

/* ── Seller note ── */
.pcbq-seller-note {
  font-size: 0.875rem;
  color: #6B6558;
  margin: 0 0 14px;
  line-height: 1.55;
}

/* ── Seller card ── */
.pcbq-seller-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #E8E8E4;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pcbq-seller-card:last-child { margin-bottom: 0; }
.pcbq-seller-card:hover {
  border-color: #B9EDD0;
  box-shadow: 0 2px 10px rgba(20,154,73,0.08);
}

.pcbq-seller-body { flex: 1; min-width: 0; }

.pcbq-seller-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #063971;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcbq-seller-addr,
.pcbq-seller-phone {
  font-size: 0.8125rem;
  color: #6B6558;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.pcbq-seller-action { flex-shrink: 0; }

.pcbq-request-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: #149A49;
  color: white;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.pcbq-request-btn:hover { background: #0D7A3E; color: white; }

.pcbq-submitted-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: #EAF8EE;
  color: #0D7A3E;
  border: 1px solid #B9EDD0;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.pcbq-no-sellers {
  background: white;
  border-radius: 10px;
  border: 1px solid #E8E8E4;
  padding: 32px 20px;
  text-align: center;
  color: #9B978E;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .pcbq-seller-card { flex-direction: column; align-items: flex-start; }
  .pcbq-seller-action { width: 100%; }
  .pcbq-request-btn { width: 100%; justify-content: center; }
  .pcbq-submitted-badge { width: 100%; justify-content: center; }
}
