.compuart-pc-builder {
  border: 1px solid #e5e5e5;
  padding: 16px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 16px;
}

.compuart-pcb-preset-picker {
  grid-column: 1 / -1;
  border: 1px solid #e4e4e4;
  border-radius: 10px;
  padding: 14px;
  background: #f9f9f9;
}

.compuart-pcb-preset-picker.is-hidden {
  display: none;
}

.compuart-pc-builder__main.is-hidden,
.compuart-pc-builder__summary.is-hidden {
  display: none;
}

.compuart-pcb-preset-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.compuart-pcb-preset-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.compuart-pcb-preset-card h4 {
  margin: 0 0 8px;
}

.compuart-pcb-preset-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: #111;
  color: #fff;
}

.compuart-pcb-preset-card p {
  margin: 0 0 8px;
  color: #444;
  font-size: 13px;
}

.compuart-pcb-preset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #666;
}

.compuart-pcb-steps-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.compuart-pcb-step {
  background: #f2f2f2;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
}

.compuart-pcb-step.is-active {
  background: #111;
  color: #fff;
}

.compuart-pcb-step.is-done {
  border: 1px solid #2e7d32;
}

.compuart-pcb-presets-panel,
.compuart-pcb-global-tools,
.compuart-pc-builder__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.compuart-pcb-search {
  min-width: 260px;
}

.compuart-pc-builder__products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compuart-pcb-product-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  background: #fff;
}

.compuart-pcb-product-card.is-blocked {
  opacity: 0.55;
  background: #f8f8f8;
}

.compuart-pcb-product-card.is-warning {
  border-color: #d98600;
}

.compuart-pcb-product-card input {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}

.compuart-pcb-product-media img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.compuart-pcb-product-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.compuart-pcb-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #666;
  font-size: 12px;
}

.compuart-pcb-product-price {
  margin-top: 6px;
  font-weight: 700;
}

.compuart-pcb-price-old {
  text-decoration: line-through;
  color: #777;
  font-weight: 500;
}

.compuart-pcb-price-sale {
  color: #b71c1c;
}

.compuart-pcb-stock {
  margin-top: 4px;
  font-size: 12px;
}

.compuart-pcb-stock.instock {
  color: #2e7d32;
}

.compuart-pcb-stock.outofstock {
  color: #b71c1c;
}

.compuart-pcb-rule-msg {
  margin-top: 6px;
  font-size: 12px;
}

.compuart-pcb-rule-msg.is-block {
  color: #b71c1c;
}

.compuart-pcb-rule-msg.is-warn {
  color: #9a6d00;
}

.compuart-pcb-details-btn {
  margin-top: 8px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #d2d2d2;
  background: #fff;
  color: #333;
  cursor: pointer;
}


.compuart-pcb-debug {
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed #c8c8c8;
  border-radius: 6px;
  background: #f7f7f7;
  font-size: 11px;
  line-height: 1.4;
}

.compuart-pcb-debug-row + .compuart-pcb-debug-row {
  margin-top: 4px;
}

.compuart-pcb-compat-warning-banner {
  margin: 8px 0;
  padding: 8px 10px;
  background: #fff8e1;
  border: 1px solid #f0d18b;
  border-radius: 6px;
  font-size: 12px;
}

.compuart-pcb-compat-warning-banner ul {
  margin: 6px 0 0 18px;
}

.compuart-pcb-compat-debug-context {
  margin: 8px 0;
}

.compuart-pcb-debug-context-inner {
  padding: 8px;
  border: 1px dashed #bcbcbc;
  border-radius: 6px;
  background: #f9f9f9;
  font-size: 11px;
}

.compuart-pcb-debug-context-inner pre {
  white-space: pre-wrap;
  margin: 4px 0 8px;
  font-size: 11px;
}

.compuart-pcb-load-more-wrap {
  grid-column: 1 / -1;
  text-align: center;
}

.compuart-pcb-loading {
  animation: compuartPulse 1.2s ease-in-out infinite;
}

@keyframes compuartPulse {
  0% { opacity: 0.45; }
  50% { opacity: 1; }
  100% { opacity: 0.45; }
}

.compuart-pc-builder__controls {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.compuart-pc-builder__summary {
  border: 1px solid #ececec;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
}

.compuart-pcb-summary-list,
.compuart-pcb-warnings {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.compuart-pcb-summary-item {
  padding: 8px 0;
  border-bottom: 1px dashed #e2e2e2;
}

.compuart-pcb-summary-qty {
  margin: 4px 0 8px 0;
}

.compuart-pcb-qty-input {
  width: 72px;
  margin-left: 6px;
}

.compuart-pcb-summary-item.missing {
  color: #b71c1c;
}

.compuart-pcb-summary-item.ok {
  color: #1b5e20;
}

.compuart-pcb-summary-actions {
  margin-top: 4px;
}

.compuart-pcb-budget-wrap,
.compuart-pcb-summary-subtotal,
.compuart-pcb-summary-total,
.compuart-pcb-shipping,
.compuart-pcb-share-wrap {
  margin-bottom: 10px;
}

.compuart-pcb-budget-input,
.compuart-pcb-share-link {
  width: 100%;
}

.compuart-pcb-warnings li {
  color: #9a6d00;
  font-size: 12px;
}

.compuart-pcb-whatsapp-share.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.compuart-pcb-product-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.compuart-pcb-product-modal.is-open {
  display: block;
}

.compuart-pcb-product-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.compuart-pcb-product-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  margin: 12px auto;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
}

.compuart-pcb-product-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #222;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  line-height: 34px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.compuart-pcb-product-modal__close:hover {
  background: #f4f7ff;
  color: #2359d6;
  border-color: #b9c8f5;
}

.compuart-pcb-product-modal__close:focus {
  outline: 2px solid #4a72f0;
  outline-offset: 2px;
}

.compuart-pcb-modal-head {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.compuart-pcb-modal-head img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}

.compuart-pcb-modal-head h4 {
  margin: 0 0 8px;
}

.compuart-pcb-modal-price {
  font-weight: 700;
  margin-bottom: 8px;
}

.compuart-pcb-modal-specs {
  margin: 6px 0 14px 18px;
}

.compuart-pcb-modal-specs li {
  margin-bottom: 4px;
}

.compuart-pcb-modal-description {
  line-height: 1.6;
}

.compuart-pcb-mobile-sticky {
  display: none;
}

@media (max-width: 980px) {
  .compuart-pc-builder {
    grid-template-columns: 1fr;
  }
  .compuart-pcb-preset-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .compuart-pc-builder__products {
    grid-template-columns: 1fr;
  }

  .compuart-pcb-preset-cards {
    grid-template-columns: 1fr;
  }

  .compuart-pcb-search {
    min-width: 0;
    width: 100%;
  }

  .compuart-pcb-mobile-sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    margin-top: 8px;
    background: rgba(17, 17, 17, 0.96);
    color: #fff;
    border-radius: 10px 10px 0 0;
  }

  .compuart-pcb-mobile-meta {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.25;
    min-width: 0;
  }

  .compuart-pcb-mobile-total {
    font-size: 14px;
  }

  .compuart-pcb-mobile-nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
  }

  .compuart-pcb-mobile-nav .button {
    min-width: 92px;
    height: 38px;
    line-height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
  }

  .compuart-pcb-mobile-prev[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
  }

  .compuart-pcb-modal-head {
    grid-template-columns: 1fr;
  }

  .compuart-pcb-modal-head img {
    width: 120px;
    height: 120px;
  }
}
