.myi-box {
  border: 1px solid #ddd;
  margin-bottom: 20px;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.myi-config-section {
  border-bottom: 1px solid #e5e5e5;
}

.myi-config-section:last-child {
  border-bottom: 0;
}

.myi-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: #2271b1;
  font-size: 18px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.myi-section-header:hover {
  color: #2271b1;
  background: #f2f2f2;
}

.myi-section-header-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.myi-section-title {
  display: inline-block;
}

.myi-section-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-right: 4px;
}

.myi-select-row {
  display: flex;
  gap: 8px;
}

.myi-select-row select {
  min-width: 110px;
}

.myi-config-section.is-open .myi-section-chevron {
  transform: rotate(225deg);
}

.myi-step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  color: #2271b1;
  font-size: 14px;
  font-weight: 700;
}

.myi-section-content {
  padding: 18px;
}

.myi-subtitle {
  margin: 8px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
  font-weight: 700;
}

.myi-field {
  margin-bottom: 14px;
}

.myi-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.myi-row .myi-field {
  flex: 1 1 220px;
}

.myi-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.myi-field input,
.myi-field select {
  width: 100%;
  max-width: 260px;
}

.myi-price-box {
  padding: 18px;
  font-size: 22px;
  font-weight: 700;
}

.myi-error-box {
  padding: 0 18px 18px;
  color: #b42318;
}

.myi-swatch-group {
  margin-bottom: 18px;
}

.myi-swatch-group-title {
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ddd;
}

.myi-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.myi-swatch-item,
.myi-choice-card {
  position: relative;
}

.myi-swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9d9d9;
  background: #fff;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.myi-swatch-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
}

.myi-swatch-item span {
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
}

.myi-swatch-item:hover {
  border-color: #2271b1;
  transform: translateY(-1px);
}

.myi-swatch-item.is-active {
  border-color: #1f8f3a;
  box-shadow: 0 0 0 3px rgba(31, 143, 58, 0.18), 0 10px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.myi-choice-card.is-active::after,
.myi-swatch-item.is-active::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 24px solid #22c55e;
  border-left: 24px solid transparent;
  border-top-right-radius: 6px;
}

.myi-choice-card.is-active::before,
.myi-swatch-item.is-active::before {
  content: "✓";
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 2;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.myi-card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.myi-choice-card {
  width: 180px;
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.myi-choice-card:hover {
  border-color: #2271b1;
  transform: translateY(-1px);
}

.myi-choice-card.is-active {
  border-color: #1f8f3a;
  box-shadow: 0 0 0 3px rgba(31, 143, 58, 0.18), 0 14px 24px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px) scale(1.01);
}

.myi-choice-card-image {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: contain;
  margin-bottom: 10px;
}

.myi-choice-card-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
}

.myi-choice-card-desc {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #666;
  line-height: 1.45;
}

.myi-unit-select {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.myi-unit-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.myi-mount-guide {
  display: none;
  margin-top: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff7f7;
  border: 1px solid #f2d9d9;
  border-radius: 8px;
  align-items: flex-start;
  gap: 14px;
}

.myi-mount-guide.is-visible {
  display: flex;
}

.myi-mount-guide-media {
  flex: 0 0 86px;
}

.myi-mount-guide-media img {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.myi-mount-guide-text {
  font-size: 14px;
  line-height: 1.65;
  color: #2d2d2d;
}

.myi-mount-guide-title {
  color: #e11d48;
  margin-right: 4px;
}

.myi-measure-guides {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.myi-measure-guide-item {
  text-align: center;
}

.myi-measure-guide-image {
  display: block;
  width: 180px;
  height: auto;
  margin: 0 auto 10px;
}

.myi-measure-guide-label {
  font-weight: 700;
  color: #374151;
}

@media (max-width: 767px) {
  .myi-mount-guide.is-visible {
    flex-direction: column;
  }

  .myi-measure-guides {
    grid-template-columns: 1fr;
  }
}
