.woo-cpo-step-wizard {
  margin: 28px 0;
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  background: #fffaf4;
}

form.cart.woo-cpo-purchase-configurator {
  display: block;
}

form.cart.woo-cpo-purchase-configurator .woo-cpo-step-wizard {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.woo-cpo-purchase-configurator .woo-cpo-step-wizard__body {
  grid-template-columns: 1fr;
}

.woo-cpo-purchase-configurator .woo-cpo-step-wizard__summary {
  position: static;
  max-height: 240px;
  overflow-y: auto;
}

.woo-cpo-purchase-configurator .woo-cpo-step-wizard__bottom-bar {
  position: static;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-top: 0;
}

.woo-cpo-purchase-configurator .quantity {
  display: block;
  margin: 0;
}

.woo-cpo-purchase-configurator .quantity .qty {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  text-align: center;
}

.woo-cpo-purchase-configurator .single_add_to_cart_button {
  width: 100%;
  min-height: 50px;
  border-radius: 999px;
}

.woo-cpo-configurator-launcher {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 20px;
  border: 2px solid rgba(227, 9, 47, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7f0 0%, #fff 100%);
  box-shadow: 0 14px 34px rgba(227, 9, 47, 0.10);
}

.woo-cpo-step-wizard.is-configured .woo-cpo-configurator-launcher {
  border-color: rgba(24, 130, 76, 0.28);
  background: #f5fff9;
}

.woo-cpo-step-wizard.is-configured .woo-cpo-configurator-launcher__button {
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
}

.woo-cpo-configurator-launcher__eyebrow {
  margin: 0 0 6px;
  color: #e3092f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.woo-cpo-configurator-launcher strong,
.woo-cpo-configurator-launcher span {
  display: block;
}

.woo-cpo-configurator-launcher__status {
  margin-bottom: 4px;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 800;
}

.woo-cpo-price-breakdown {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.woo-cpo-price-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #666;
  font-size: 13px;
}

.woo-cpo-price-breakdown strong {
  color: #1a1a1a;
  font-size: 13px;
  white-space: nowrap;
}

.woo-cpo-price-breakdown .woocommerce-Price-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  white-space: nowrap;
}

.woo-cpo-price-breakdown__total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.10);
  font-weight: 800;
}

.woo-cpo-price-breakdown__total span,
.woo-cpo-price-breakdown__total strong {
  color: #e3092f;
  font-size: 15px;
}

.woo-cpo-configurator-launcher__button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #e3092f;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.woo-cpo-launcher-selections {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 48px;
  justify-content: start;
  gap: 8px;
  overflow-x: auto;
}

.woo-cpo-launcher-selections:empty {
  display: none;
}

.woo-cpo-launcher-selection {
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  overflow: hidden;
}

.woo-cpo-launcher-selection__thumb {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.08);
  object-fit: cover;
}

.woo-cpo-launcher-selection--more {
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.woo-cpo-launcher-selection strong,
.woo-cpo-launcher-selection em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.woo-cpo-launcher-selection strong {
  color: #1a1a1a;
  font-size: 12px;
  font-style: normal;
}

.woo-cpo-launcher-selection em {
  color: #666;
  font-size: 12px;
  font-style: normal;
}

.woo-cpo-add-to-cart-notice {
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(227, 9, 47, 0.07);
  color: #9a2132;
  font-size: 13px;
  font-weight: 700;
}

.woo-cpo-purchase-configurator .single_add_to_cart_button:disabled {
  opacity: 0.45;
  filter: grayscale(1);
  cursor: not-allowed;
}

.woo-cpo-purchase-configurator:not(.is-cpo-configured) .quantity {
  opacity: 0.45;
}

.woo-cpo-purchase-configurator.is-cpo-configured .single_add_to_cart_button {
  opacity: 1;
  filter: none;
}

body.woo-cpo-step-wizard-active .hds-sticky-add-to-cart {
  display: none !important;
}

.woo-cpo-configurator-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: none;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.woo-cpo-configurator-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483647;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  width: min(820px, 94vw);
  padding: 22px;
  background: #fffaf4;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.22);
  transform: translateX(105%);
  transition: transform 0.28s ease;
}

body.woo-cpo-configurator-open {
  overflow: hidden;
}

.woo-cpo-step-wizard.is-configurator-open .woo-cpo-configurator-overlay {
  display: block;
}

.woo-cpo-step-wizard.is-configurator-open .woo-cpo-configurator-drawer {
  transform: translateX(0);
}

.woo-cpo-configurator-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}

.woo-cpo-configurator-drawer__header strong {
  display: block;
  color: #1a1a1a;
  font-size: 18px;
}

.woo-cpo-configurator-drawer__header h4 {
  margin: 4px 0 4px;
  color: #1a1a1a;
  font-size: 22px;
  font-weight: 800;
}

.woo-cpo-configurator-drawer__progress-bar {
  height: 6px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: rgba(227, 9, 47, 0.10);
  overflow: hidden;
}

.woo-cpo-configurator-drawer__progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #e3092f;
  transition: width 0.25s ease;
}

.woo-cpo-configurator-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.woo-cpo-step-wizard__header {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.woo-cpo-step-wizard__eyebrow {
  margin: 0;
  color: #e3092f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.woo-cpo-step-wizard__progress {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.woo-cpo-step-wizard__progress-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.woo-cpo-step-wizard__progress-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(227, 9, 47, 0.08);
  color: #e3092f;
  font-size: 12px;
}

.woo-cpo-step-wizard__progress-item.is-active {
  border-color: #e3092f;
  background: #e3092f;
  color: #fff;
}

.woo-cpo-step-wizard__progress-item.is-active span {
  background: #fff;
}

.woo-cpo-step-wizard__panel {
  display: none;
  min-height: 220px;
}

.woo-cpo-step-wizard__panel.is-active {
  display: block;
}

.woo-cpo-step-wizard__panel-title {
  margin: 0 0 18px;
  color: #1a1a1a;
  font-size: 22px;
  font-weight: 800;
}

.woo-cpo-step-wizard__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  overflow-y: auto;
  padding-right: 4px;
}

.woo-cpo-step-wizard__summary {
  position: sticky;
  top: 24px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.woo-cpo-step-wizard__summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.woo-cpo-step-wizard__summary-header h4 {
  margin: 0 0 2px;
  color: #1a1a1a;
  font-size: 17px;
  font-weight: 800;
}

.woo-cpo-step-wizard__summary-header span {
  color: #666;
  font-size: 13px;
}

.woo-cpo-step-wizard__summary-close,
.woo-cpo-step-wizard__summary-overlay {
  display: none;
}

.woo-cpo-step-wizard__summary-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

.woo-cpo-field {
  margin: 0 0 20px;
}

.woo-cpo-field:not(.is-active) {
  display: none;
}

.woo-cpo-field.is-active {
  display: block;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  background: #fff;
}

.woo-cpo-step-wizard__field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  color: #666;
  font-size: 13px;
  font-weight: 700;
}

.woo-cpo-step-wizard__field-meta strong {
  color: #e3092f;
}

.woo-cpo-field-label {
  margin: 0 0 10px;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 800;
}

.woo-cpo-field-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.woo-cpo-option {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 3px;
  min-height: 53px;
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.woo-cpo-option-image,
.woo-cpo-option-text {
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.woo-cpo-option-image {
  aspect-ratio: 1 / 1;
  width: 100%;
}

.woo-cpo-option-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.woo-cpo-option-text {
  min-width: 96px;
  padding: 10px 14px;
  font-weight: 700;
}

.woo-cpo-option.selected .woo-cpo-option-image,
.woo-cpo-option.selected .woo-cpo-option-text {
  border-color: #111;
  box-shadow: 0 0 0 2px #111 inset;
}

.woo-cpo-option.selected {
  border-color: rgba(227, 9, 47, 0.55);
  box-shadow: 0 12px 28px rgba(227, 9, 47, 0.12);
}

.woo-cpo-option.selected::after {
  content: "✓";
  position: absolute;
  top: 3px;
  right: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e3092f;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
}

.woo-cpo-option-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 14px;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #555;
  font-size: 9px;
  font-weight: 700;
}

.woo-cpo-field--invalid .woo-cpo-field-label {
  color: #e3092f;
}

.woo-cpo-field--invalid .woo-cpo-field-options {
  padding: 10px;
  border: 1px solid rgba(227, 9, 47, 0.30);
  border-radius: 16px;
  background: rgba(227, 9, 47, 0.04);
}

.woo-cpo-step-wizard__review-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.woo-cpo-step-wizard__review-item span {
  color: #666;
}

.woo-cpo-step-wizard__review-item strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1a1a1a;
}

.woo-cpo-step-wizard__review-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.woo-cpo-step-wizard__empty {
  color: #666;
  font-size: 14px;
}

.woo-cpo-total-price {
  display: none;
  margin-top: 18px;
  font-weight: 800;
}

.woo-cpo-step-wizard__bottom-bar {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 12px;
  border-radius: 999px;
  background: #1f1714;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.woo-cpo-step-wizard__bar-status {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.woo-cpo-step-wizard__bar-status span {
  color: rgba(255, 255, 255, 0.70);
  font-size: 12px;
}

.woo-cpo-step-wizard__bar-status strong {
  color: #fff;
  font-size: 15px;
}

.woo-cpo-step-wizard__bar-button {
  min-width: 96px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.woo-cpo-step-wizard__bar-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.woo-cpo-step-wizard__bar-button--next {
  background: #e3092f;
}

.woo-cpo-step-wizard__bar-button--summary {
  background: rgba(255, 255, 255, 0.20);
}

.single_add_to_cart_button.woo-cpo-add-to-cart-focus {
  box-shadow: 0 0 0 4px rgba(227, 9, 47, 0.25);
}

@media (max-width: 767px) {
  body.single-product.woo-cpo-step-wizard-active {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .woo-cpo-step-wizard {
    padding: 18px;
  }

  .woo-cpo-configurator-drawer {
    width: 100vw;
    padding: 16px;
  }

  .woo-cpo-field-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  form.cart.woo-cpo-purchase-configurator {
    position: static;
    padding: 16px;
  }

  .woo-cpo-step-wizard__body {
    display: block;
  }

  .woo-cpo-step-wizard__summary-overlay {
    position: fixed;
    inset: 0;
    z-index: 29;
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
  }

  .woo-cpo-step-wizard__summary {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    z-index: 30;
    max-height: min(76vh, 520px);
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    transform: translateY(105%);
    transition: transform 0.25s ease;
  }

  .woo-cpo-step-wizard.is-summary-open .woo-cpo-step-wizard__summary {
    transform: translateY(0);
  }

  .woo-cpo-step-wizard.is-summary-open .woo-cpo-step-wizard__summary-overlay {
    display: block;
  }

  .woo-cpo-step-wizard__summary-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .woo-cpo-step-wizard__bottom-bar {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 24px;
  }

  .woo-cpo-purchase-configurator .woo-cpo-step-wizard__bottom-bar {
    position: static;
    right: auto;
    bottom: auto;
    left: auto;
  }

  .woo-cpo-step-wizard__bar-status {
    grid-column: 1 / -1;
  }

  .woo-cpo-step-wizard__bar-button {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
  }
}
