.wvpc-configurator {
  --wvpc-accent: #2f6fd6;
  --wvpc-accent-soft: #eef5ff;
  --wvpc-border: #d9dde6;
  --wvpc-ink: #171a33;
  --wvpc-muted: #6c7281;
  --wvpc-panel: #ffffff;
  --wvpc-soft: #f7f8fb;
  color: var(--wvpc-ink);
  font-family: inherit;
}

.wvpc-product-configurator {
  align-items: stretch;
  background: var(--wvpc-panel);
  border: 1px solid var(--wvpc-border);
  border-radius: 8px;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  min-height: 620px;
  padding: 24px;
}

.wvpc-control-panel {
  align-self: start;
  background: var(--wvpc-panel);
  border: 1px solid var(--wvpc-border);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 26, 51, 0.08);
  max-height: 720px;
  overflow: auto;
  padding: 18px;
}

.wvpc-control-head {
  border-bottom: 1px solid var(--wvpc-border);
  margin-bottom: 18px;
  padding-bottom: 14px;
}

.wvpc-control-head span,
.wvpc-preview-info span {
  color: var(--wvpc-muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.wvpc-control-head h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 4px 0 0;
}

.wvpc-property-group {
  margin: 0 0 20px;
}

.wvpc-property-group h3 {
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 12px;
}

.wvpc-type-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wvpc-type-option,
.wvpc-row-option {
  background: #ffffff;
  border: 1px solid var(--wvpc-border);
  border-radius: 8px;
  color: var(--wvpc-ink);
  cursor: pointer;
  font: inherit;
  min-width: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.wvpc-type-option {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 9px;
  text-align: center;
}

.wvpc-type-option:hover,
.wvpc-row-option:hover,
.wvpc-type-option:focus,
.wvpc-row-option:focus {
  border-color: var(--wvpc-accent);
  box-shadow: 0 8px 20px rgba(47, 111, 214, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.wvpc-type-option.is-selected,
.wvpc-row-option.is-selected {
  border-color: var(--wvpc-accent);
  box-shadow: 0 0 0 1px var(--wvpc-accent);
}

.wvpc-type-image {
  align-items: center;
  aspect-ratio: 1 / 0.86;
  background: var(--wvpc-soft);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.wvpc-type-image img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.wvpc-type-title {
  display: block;
  font-size: 13px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.wvpc-row-list {
  display: grid;
  gap: 8px;
}

.wvpc-row-option {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 8px 12px 8px 8px;
  text-align: left;
}

.wvpc-row-media {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: var(--wvpc-soft);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.wvpc-row-media img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.wvpc-row-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.wvpc-row-price {
  color: var(--wvpc-ink);
  font-weight: 700;
  white-space: nowrap;
}

.wvpc-total-bar {
  align-items: center;
  background: var(--wvpc-soft);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 20px;
  padding: 14px;
}

.wvpc-total-bar span {
  color: var(--wvpc-muted);
}

.wvpc-total-bar strong {
  color: var(--wvpc-accent);
  font-size: 20px;
}

.wvpc-preview-panel {
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto auto;
  min-width: 0;
}

.wvpc-preview-stage {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 440px;
  overflow: hidden;
  padding: 28px;
}

.wvpc-preview-image {
  align-items: center;
  display: flex;
  height: min(520px, 62vw);
  justify-content: center;
  width: 100%;
}

.wvpc-preview-image img {
  display: block;
  filter: drop-shadow(0 26px 26px rgba(23, 26, 51, 0.18));
  height: 100%;
  max-height: 520px;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.wvpc-preview-info {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 4px 12px;
}

.wvpc-preview-info h3 {
  font-size: 24px;
  line-height: 1.2;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.wvpc-preview-info strong {
  color: var(--wvpc-accent);
  flex: 0 0 auto;
  font-size: 24px;
}

.wvpc-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
}

.wvpc-chip {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--wvpc-border);
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  max-width: 100%;
  padding: 7px 10px;
}

.wvpc-chip em,
.wvpc-chip strong {
  display: block;
  font-size: 13px;
  font-style: normal;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wvpc-chip em {
  color: var(--wvpc-muted);
}

.wvpc-image-fallback {
  align-items: center;
  background: repeating-linear-gradient(45deg, #e8ecf2 0, #e8ecf2 10px, #f7f9fc 10px, #f7f9fc 20px);
  border-radius: 8px;
  color: var(--wvpc-muted);
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 220px;
  width: 100%;
}

.wvpc-error,
.wvpc-empty {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  padding: 14px;
}

@media (max-width: 900px) {
  .wvpc-product-configurator {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 14px;
  }

  .wvpc-preview-panel {
    grid-row: 1;
  }

  .wvpc-control-panel {
    max-height: none;
    overflow: visible;
    padding: 14px;
  }

  .wvpc-preview-stage {
    min-height: 280px;
    padding: 16px;
  }

  .wvpc-preview-image {
    height: 280px;
  }
}

@media (max-width: 560px) {
  .wvpc-product-configurator {
    border-radius: 8px;
    gap: 14px;
    padding: 10px;
  }

  .wvpc-control-head h2 {
    font-size: 20px;
  }

  .wvpc-type-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .wvpc-type-option {
    flex: 0 0 104px;
  }

  .wvpc-row-option {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 8px;
  }

  .wvpc-row-price {
    color: var(--wvpc-muted);
    font-size: 13px;
    grid-column: 2;
    white-space: normal;
  }

  .wvpc-preview-stage {
    min-height: 230px;
  }

  .wvpc-preview-image {
    height: 230px;
  }

  .wvpc-preview-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .wvpc-preview-info h3,
  .wvpc-preview-info strong {
    font-size: 20px;
  }
}
