/* Outer configurator box */
.np-configurator {
  border: 1px solid #e0e0e0;
  padding: 12px 16px;
  margin: 12px 0;
  background: #fafafa;
  font-size: 14px;
}

.np-configurator h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.np-configurator__field {
  margin-bottom: 10px;
}

.np-configurator__field label {
  font-weight: 600;
  margin-right: 4px;
}

#np-set-select {
  min-width: 220px;
}

/* Card list container */
.np-card-list {
  margin-top: 12px;
}

.np-card-list__placeholder {
  color: #777;
  font-style: italic;
}

.np-card-list__summary {
  font-weight: 600;
  margin-bottom: 6px;
}

/* Grid of cards */
.np-card-list-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  grid-gap: 10px; /* older browsers */
}

.np-card-item {
  border: 1px solid #e0e0e0;
  background: #fff;
  padding: 4px;
  text-align: center;
  font-size: 12px;
}

/* Thumbnail sizing */
.np-configurator .np-card-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;      /* don’t let it get taller than 340 */
  object-fit: contain;    /* mostly redundant now */
  margin: 0 auto 4px;
  background: #f8f8f8;
  cursor: pointer;
}


.np-card-item-title {
  line-height: 1.3;
  margin-top: 4px;
}

/* Configurator price/selection summary */
.np-config-summary {
  margin: 10px 0;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px dashed #cccccc;
  font-size: 13px;
}

.np-config-summary__line {
  margin: 0;
  font-weight: 600;
}

.np-config-summary__note {
  margin: 2px 0 0;
  font-size: 12px;
  color: #777;
}

/* ===========================
   Deck page (hover preview)
   =========================== */

.np-deck .np-deck__layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* Mobile: preview above list */
@media (max-width: 900px) {
  .np-deck .np-deck__layout {
    grid-template-columns: 1fr;
  }

  .np-deck .np-deck__preview {
    order: 1;
  }

  .np-deck .np-deck__list {
    order: 2;
  }
}

/* Desktop: split groups across two columns inside the list area */
@media (min-width: 901px) {
  .np-deck .np-deck__list {
    display: block !important;        /* IMPORTANT: columns won't work on flex/grid */
    column-count: 2 !important;
    column-gap: 16px;
    column-fill: balance;
  }

  /* Prevent a group from splitting between columns */
  .np-deck .np-deck__group {
    display: block;
    width: auto;
    margin: 0 0 14px;

    break-inside: avoid-column;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
  }
}

/* Keep the list readable and stop theme bullets/margins */
.np-deck .np-deck__card-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e0e0e0;
  background: #fff;
}

.np-deck .np-deck__card {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #f0f0f0;
}

.np-deck .np-deck__card:last-child {
  border-bottom: none;
}

/* Group headings */
.np-deck .np-deck__group-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

/* Theme is likely styling <button> */
.np-deck .np-deck__card-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  font-size: 14px;
}

.np-deck .np-deck__card-btn:hover {
  background: #f7f7f7;
}

.np-deck .np-deck__card.is-active .np-deck__card-btn {
  background: #f0f0f0;
}

.np-deck .np-deck__card-btn:focus {
  outline: 2px solid #999;
  outline-offset: -2px;
}

/* Preview column */
.np-deck .np-deck__preview {
  position: sticky;
  top: 16px;
  border: 1px solid #e0e0e0;
  background: #fff;
  padding: 10px;
}

@media (max-width: 900px) {
  .np-deck .np-deck__preview {
    position: static;
    top: auto;
  }
}

.np-deck .np-deck__preview-title {
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 13px;
}

.np-deck .np-deck__preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 260px);
  object-fit: contain;
  background: #f8f8f8;
  cursor: pointer;
}

/* Print button under preview */
.np-deck .np-deck__preview-actions {
  margin-top: 10px;
}

.np-deck .np-deck__preview-actions .np-deck__print-button {
  width: 100%;
}
