/**
 * c2m-configurator.css  v3.1
 * Style reference: package-box UI (digifeel/onecard style)
 * Brand: var(--purple-3) primary, #00BFA5 accent, #1A122F dark
 */

.quantity {
  display: none !important;
}
/* ── Wrapper ─────────────────────────────────────────────── */
.c2m-configurator {
  margin: 12px 0;
  font-family: var(--secondary-font-family);
  font-size: 14px;
  color: var(--body-color);
}

/* ── Bundle card ─────────────────────────────────────────── */
.c2m-bundle-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-radius: 16px;
  border: 2px solid #fff;
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.c2m-bundle-card:hover {
  border-color: #cbbbfe;
}

.c2m-bundle-card.c2m-card-active {
  border-color: #cbbbfe;
  background-color: #f0eaff;
}

/* ── Checkbox ────────────────────────────────────────────── */
.c2m-card-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 2px solid #c8c8d8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.c2m-bundle-card.c2m-card-active .c2m-card-check {
  background: var(--purple-3);
  border-color: var(--purple-3);
}

.c2m-check-icon {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s;
}

.c2m-bundle-card.c2m-card-active .c2m-check-icon {
  opacity: 1;
}

/* ── Card body ───────────────────────────────────────────── */
.c2m-card-body {
  flex: 1;
  min-width: 0;
}

.c2m-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.c2m-card-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 10px;
}

.c2m-card-info {
  display: flex;
  flex-flow: column nowrap;
  gap: 4px;
}

.c2m-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.4em;
}

.c2m-card-subtitle {
  font-size: 14px;
  color: var(--light-text);
  line-height: 1.3em;
}

/* Preview dots */
.c2m-card-dots {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.c2m-preview-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

/* ── Discount badge ──────────────────────────────────────── */
.c2m-discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ddfdf7;
  color: #00896e;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1em;
  vertical-align: middle;
}

/* ── Prices ──────────────────────────────────────────────── */
.c2m-card-right {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-flow: column nowrap;
  align-items: flex-end;
  gap: 8px;
}

.c2m-price-original {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  opacity: 0.7;
  line-height: 1em;
}

.c2m-price-sale {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1em;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.c2m-price-per {
  font-size: 14px;
  color: var(--light-text);
  font-weight: 500;
  line-height: 1em;
}

/* ── Config panel ────────────────────────────────────────── */
.c2m-config-panel {
  flex-basis: 100%;
  width: 100%;
  border-top: 1px solid #e4d9fe;
  padding-top: 20px;
  margin-top: 6px;
  display: flex;
  flex-flow: column nowrap;
  gap: 20px;
}

/* ── Section ─────────────────────────────────────────────── */

.c2m-section + .c2m-section {
  padding-top: 18px;
  border-top: 1px solid #e4d9fe;
}

.c2m-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--heading-color);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.c2m-qty-badge {
  font-size: 14px;
  font-weight: 400;
  color: #888;
}

.c2m-subsection-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* ── Colour swatches ─────────────────────────────────────── */
.c2m-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button.c2m-swatch {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 8px;
  border: 2px solid #e8e8f0;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  font-size: 14px;
  color: var(--body-color);
  font-family: inherit;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

button.c2m-swatch:hover:not(.c2m-out-of-stock) {
  border-color: #cbbbfe;
  box-shadow: 0 0 0 3px rgba(203, 187, 254, 0.3);
  background: #fff;
}

button.c2m-swatch.c2m-selected {
  border-color: var(--purple-3);
  box-shadow: 0 0 0 3px rgba(98, 36, 251, 0.12);
  color: var(--purple-3);
  font-weight: 600;
  background: #fff;
}

.c2m-swatch-dot {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.c2m-swatch-x {
  display: none;
  font-size: 10px;
  color: #bbb;
}

button.c2m-swatch.c2m-out-of-stock {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
  background: #f8f8fb;
  box-shadow: none;
}

button.c2m-swatch.c2m-out-of-stock .c2m-swatch-x {
  display: block;
}
button.c2m-swatch.c2m-out-of-stock:hover {
  border-color: #e8e8f0;
  box-shadow: none;
}

/* ── Label pills ─────────────────────────────────────────── */
.c2m-label-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.c2m-label-pill input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.c2m-label-pill {
  cursor: pointer;
  margin: 0;
}

.c2m-label-pill span {
  display: inline-block;
  padding: 7px 16px;
  border: 2px solid #e8e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  color: var(--body-color);
  transition:
    border-color 0.14s,
    background 0.14s,
    color 0.14s;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  line-height: 1.4;
}

.c2m-label-pill:hover span {
  border-color: #cbbbfe;
  background: #fff;
}

.c2m-label-pill input:checked + span {
  border-color: var(--purple-3);
  box-shadow: 0 0 0 3px rgba(98, 36, 251, 0.12);
  color: var(--purple-3);
  font-weight: 600;
  background: #fff;
}

.c2m-label-pill.c2m-out-of-stock {
  cursor: not-allowed;
}
.c2m-label-pill.c2m-out-of-stock span {
  opacity: 0.35;
  text-decoration: line-through;
  background: #f8f8fb;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Error message ───────────────────────────────────────── */
.c2m-error-msg {
  margin-top: 16px;
  padding: 10px 14px;
  background: #fff0f0;
  border-left: 3px solid #c00;
  border-radius: 6px;
  color: #c00;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.c2m-swatch-dot--image {
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .c2m-bundle-card {
    padding: 14px;
    gap: 10px;
  }
  .c2m-card-top {
    flex-wrap: wrap;
  }
  .c2m-card-right {
    text-align: left;
    align-items: flex-start;
  }
  .c2m-price-sale {
    font-size: 16px;
  }
  .c2m-config-panel {
    padding-top: 16px;
  }
  button.c2m-swatch {
    padding: 5px 10px 5px 7px;
    font-size: 12px;
  }
  .c2m-swatch-dot {
    width: 16px;
    height: 16px;
  }
}
