/* ═══════════════════════════════════════════════
   Modumesh Print Shop — Custom UI Styles
   Complements theme.json — pure custom components
═══════════════════════════════════════════════ */

/* ── Print Configurator Wrap ── */
.mmc-wrap {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2rem;
  align-items: start;
  font-family: var(--wp--preset--font-family--inter, system-ui, sans-serif);
}

@media (max-width: 1024px) {
  .mmc-wrap { grid-template-columns: 1fr; }
}

/* ── Upload Zone ── */
.mmc-upload-zone {
  border: 2px dashed #2a2f50;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #0d1022;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.mmc-upload-zone:hover,
.mmc-upload-zone.drag-over {
  border-color: #E94560;
  background: #12162a;
}

.mmc-upload-zone.drag-over {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(233,69,96,0.15);
}

.mmc-upload-icon { margin-bottom: 0.5rem; }

.mmc-upload-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.mmc-upload-sub {
  color: #6C757D;
  margin: 0;
  font-size: 0.9375rem;
}

.mmc-upload-link {
  color: #E94560;
  text-decoration: underline;
  cursor: pointer;
}

.mmc-upload-hint {
  color: #3a4060;
  font-size: 0.8125rem;
  margin: 0.5rem 0 0;
}

/* ── Viewer ── */
.mmc-viewer-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #1e2340;
  background: #0D0F1A;
}

.mmc-viewer-canvas {
  width: 100%;
  height: 380px;
}

.mmc-viewer-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.mmc-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: #0d1022;
  border-top: 1px solid #1e2340;
}

.mmc-file-name {
  flex: 1;
  color: #6C757D;
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mmc-btn-icon {
  background: #1A1F3D;
  border: 1px solid #2a2f50;
  border-radius: 6px;
  color: #9DA8B7;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.mmc-btn-icon:hover {
  background: #E94560;
  border-color: #E94560;
  color: #fff;
}

/* ── Model Stats Bar ── */
.mmc-model-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid #1e2340;
}

.mmc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.25rem;
  border-right: 1px solid #1e2340;
  font-size: 0.75rem;
  background: #0d1022;
  color: #fff;
}

.mmc-stat:last-child { border-right: none; }

.mmc-stat-label {
  color: #E94560;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.mmc-stat em {
  color: #3a4060;
  font-style: normal;
  font-size: 0.6875rem;
}

/* ── Loading Spinner ── */
.mmc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 1rem;
  color: #6C757D;
}

.mmc-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #1e2340;
  border-top-color: #E94560;
  border-radius: 50%;
  animation: mmc-spin 0.7s linear infinite;
}

@keyframes mmc-spin { to { transform: rotate(360deg); } }

/* ── Right Panel ── */
.mmc-right {
  background: #0d1022;
  border: 1px solid #1e2340;
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mmc-config-title {
  font-family: var(--wp--preset--font-family--poppins, sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid #1e2340;
}

.mmc-section {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.mmc-section--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.mmc-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #9DA8B7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mmc-label strong {
  color: #fff;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Material Grid ── */
.mmc-material-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.mmc-material-btn {
  background: #12162a;
  border: 1px solid #1e2340;
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mmc-material-btn strong {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
}

.mmc-material-btn span {
  color: #3a4060;
  font-size: 0.7rem;
  line-height: 1.3;
}

.mmc-material-btn:hover {
  border-color: #E94560;
  background: #1a0f1e;
}

.mmc-material-btn.active {
  border-color: #E94560;
  background: rgba(233,69,96,0.08);
}

.mmc-material-btn.active strong { color: #E94560; }

/* ── Color Grid ── */
.mmc-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mmc-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  outline: none;
}

.mmc-color-swatch:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.mmc-color-swatch.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px #E94560;
}

.mmc-color-name {
  font-size: 0.8125rem;
  color: #6C757D;
  min-height: 1.2em;
}

/* ── Range Slider ── */
.mmc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #1e2340;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.mmc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E94560;
  box-shadow: 0 0 0 3px rgba(233,69,96,0.2);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.mmc-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 6px rgba(233,69,96,0.25);
}

.mmc-range-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #3a4060;
}

/* ── Quality / Layer height ── */
.mmc-quality-grid {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.mmc-quality-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #1e2340;
  cursor: pointer;
  transition: all 0.15s;
  background: #12162a;
}

.mmc-quality-opt input { display: none; }

.mmc-quality-opt:hover { border-color: #E94560; }

.mmc-quality-opt.active {
  border-color: #E94560;
  background: rgba(233,69,96,0.08);
}

.mmc-quality-label {
  flex: 1;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
}

.mmc-quality-opt.active .mmc-quality-label { color: #E94560; }

.mmc-quality-label em {
  font-style: normal;
  color: #FFD700;
  margin-left: 4px;
}

.mmc-quality-sub {
  color: #3a4060;
  font-size: 0.75rem;
}

/* ── Finish ── */
.mmc-finish-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.mmc-finish-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #1e2340;
  cursor: pointer;
  transition: all 0.15s;
  background: #12162a;
}

.mmc-finish-opt input { display: none; }

.mmc-finish-opt:hover { border-color: #E94560; }

.mmc-finish-opt.active {
  border-color: #E94560;
  background: rgba(233,69,96,0.08);
}

.mmc-finish-label {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
}

.mmc-finish-opt.active .mmc-finish-label { color: #E94560; }

.mmc-finish-sub {
  color: #6C757D;
  font-size: 0.75rem;
}

.mmc-finish-price {
  color: #FFD700;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-top: 2px;
}

/* ── Quantity ── */
.mmc-qty-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #1e2340;
  border-radius: 8px;
  overflow: hidden;
}

.mmc-qty-btn {
  background: #12162a;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mmc-qty-btn:hover { background: #E94560; }

.mmc-qty-input {
  width: 52px;
  text-align: center;
  background: #0d1022;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0;
  height: 36px;
  border-left: 1px solid #1e2340;
  border-right: 1px solid #1e2340;
  outline: none;
}

/* ── Price Box ── */
.mmc-price-box {
  background: #060810;
  border: 1px solid #1e2340;
  border-radius: 12px;
  overflow: hidden;
}

.mmc-price-breakdown {
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.mmc-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #6C757D;
}

.mmc-price-row span:last-child { color: #9DA8B7; }

.mmc-price-row--unit {
  color: #9DA8B7;
  font-weight: 600;
  padding-top: 0.375rem;
  border-top: 1px solid #1e2340;
  margin-top: 0.25rem;
}

.mmc-price-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  background: #0d1022;
  border-top: 1px solid #1e2340;
}

.mmc-price-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #9DA8B7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mmc-price-amount {
  font-family: var(--wp--preset--font-family--poppins, sans-serif);
  font-size: 1.625rem;
  font-weight: 700;
  color: #E94560;
}

/* ── Hint Text ── */
.mmc-hint-text {
  font-size: 0.8125rem;
  color: #3a4060;
  margin: 0;
}

/* ── Actions ── */
.mmc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.mmc-btn-primary {
  background: #E94560;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.mmc-btn-primary:hover:not(:disabled) {
  background: #c73650;
  transform: translateY(-1px);
}

.mmc-btn-primary:disabled {
  background: #1e2340;
  color: #3a4060;
  cursor: not-allowed;
  transform: none;
}

.mmc-btn-secondary {
  background: transparent;
  color: #9DA8B7;
  border: 1px solid #1e2340;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.mmc-btn-secondary:hover {
  border-color: #9DA8B7;
  color: #fff;
}

.mmc-disclaimer {
  font-size: 0.75rem;
  color: #3a4060;
  margin: 0;
  line-height: 1.5;
  text-align: center;
}

/* ─────────────────────────────────────────────
   How It Works Section
───────────────────────────────────────────── */
.mmc-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.mmc-step {
  text-align: center;
  padding: 2rem 1.5rem;
  background: #0d1022;
  border-radius: 16px;
  border: 1px solid #1e2340;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.mmc-step:hover {
  border-color: #E94560;
  transform: translateY(-4px);
}

.mmc-step-num {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #E94560;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mmc-step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.mmc-step-title {
  font-family: var(--wp--preset--font-family--poppins, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.mmc-step-desc {
  font-size: 0.875rem;
  color: #6C757D;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────
   Materials Showcase
───────────────────────────────────────────── */
.mmc-materials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.mmc-material-card {
  background: #0d1022;
  border: 1px solid #1e2340;
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}

.mmc-material-card:hover {
  border-color: #E94560;
  transform: translateY(-3px);
}

.mmc-material-card-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.mmc-material-card-name {
  font-family: var(--wp--preset--font-family--poppins, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.mmc-material-card-temp {
  font-size: 0.75rem;
  color: #E94560;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.mmc-material-card-desc {
  font-size: 0.8125rem;
  color: #6C757D;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   Homepage: Spec Bar
───────────────────────────────────────────── */
.mmc-spec-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: #1e2340;
  border-radius: 12px;
  overflow: hidden;
}

.mmc-spec {
  background: #0d1022;
  padding: 1.25rem;
  text-align: center;
}

.mmc-spec-val {
  font-family: var(--wp--preset--font-family--poppins, sans-serif);
  font-size: 1.5rem;
  font-weight: 800;
  color: #E94560;
  display: block;
}

.mmc-spec-label {
  font-size: 0.8125rem;
  color: #6C757D;
}

/* ─────────────────────────────────────────────
   Print Request page override
───────────────────────────────────────────── */
.page-template-page-custom-print .entry-content {
  max-width: 100%;
}
