/* =========================================================
   Interactive foreground / background style explorer
   ========================================================= */

.style-explorer {
  margin: 90px auto 0;
  padding: 36px;
  border: 1px solid #e3e5ea;
  border-radius: 20px;
  background: #fcfcfd;
}

.style-explorer__header {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.style-explorer__header h2 {
  margin: 8px 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.style-explorer__header p:last-child {
  margin: 0;
  color: #666;
  font-size: 16px;
  line-height: 1.65;
}

.style-explorer__layout {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(320px, 2fr) minmax(170px, 0.85fr);
  gap: 24px;
  align-items: center;
}

.style-control-panel {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.style-control-panel__title {
  margin: 0 0 14px;
  color: #31343a;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.style-option-grid {
  display: grid;
  gap: 10px;
}

.style-option-grid--background {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.style-option-grid--foreground {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.style-option {
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f3f4f6;
  color: #4b5563;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.style-option:hover {
  transform: translateY(-2px);
  border-color: #b7bac2;
}

.style-option.is-active {
  border-color: #e50914;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.13);
}

.style-option img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.style-option span {
  display: block;
  padding: 7px 5px 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.style-result-panel {
  min-width: 0;
}

.style-result-panel__top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.style-result-panel__label {
  margin: 0 0 5px;
  color: #e50914;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.style-result-panel h3 {
  margin: 0;
  color: #22252c;
  font-size: 21px;
}

.style-result-image-wrap {
  overflow: hidden;
  border: 1px solid #dde0e6;
  border-radius: 14px;
  background: #f4f5f7;
}

.style-result-image-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #f4f5f7;
}

@media (max-width: 900px) {
  .style-explorer {
    padding: 24px 18px;
  }

  .style-explorer__layout {
    grid-template-columns: 1fr;
  }

  .style-option-grid--foreground {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .style-control-panel {
    order: 2;
  }

  .style-result-panel {
    order: 1;
  }
}

@media (max-width: 600px) {
  .style-option-grid--foreground {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .style-result-panel h3 {
    font-size: 17px;
  }
}
