﻿/* ============================================================
   MG Print Manager — Frontend CSS
   ============================================================ */

/* ---------- Configurator shell ---------- */
.mgpm-configurator {
  --mgpm-blue: #0d5a7f;
  --mgpm-orange: #fa803f;
  --mgpm-green: #587755;
  --mgpm-cream: #f7ecda;
  --mgpm-dark: #163447;
  --mgpm-text: #1e3a4c;
  --mgpm-muted: rgba(22, 52, 71, 0.68);
  --mgpm-border: rgba(13, 90, 127, 0.14);
  --mgpm-radius: 20px;
  --mgpm-shadow: 0 8px 32px rgba(13, 90, 127, 0.1);

  margin: 24px 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mgpm-purchase-panel {
  width: 100%;
  margin: 0;
}

.mgpm-purchase-panel__title {
  margin: 0 0 18px;
}

.mgpm-purchase-panel__form {
  display: block;
}

.mgpm-native-variation-controls {
  margin: 0 0 18px;
}

.mgpm-native-variation-controls table.variations {
  width: 100%;
  margin: 0;
}

.mgpm-native-cart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.mgpm-native-cart-controls .quantity {
  margin: 0;
}

.mgpm-cart-step__mount .single_add_to_cart_button {
  margin: 0;
}

.woocommerce-variation-add-to-cart {
  display: block;
}

.mgpm-step-shell {
  position: relative;
  overflow: hidden;
}

.mgpm-step-track {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 200%;
  transition: transform 220ms ease;
}

.mgpm-step-shell.is-step-decorated .mgpm-step-track {
  transform: translateX(calc(-50% - 10px));
}

.mgpm-step-pane {
  width: calc(50% - 10px);
  flex: 0 0 calc(50% - 10px);
}

/* ---------- Mode grid (3 cards) ---------- */
.mgpm-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .mgpm-step-track {
    display: block;
    width: 100%;
    transform: none !important;
  }

  .mgpm-step-pane {
    width: 100%;
    flex-basis: auto;
  }

  .mgpm-step-pane--decor {
    margin-top: 16px;
  }

  .mgpm-mode-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Mode card ---------- */
.mgpm-mode-card {
  display: block;
  cursor: pointer;
  min-width: 0;
  perspective: 1000px;
}

.mgpm-mode-card input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mgpm-mode-card__inner {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  padding: 22px 20px 50px;
  border: 1px solid rgba(13, 90, 127, 0.14);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(250, 251, 249, 0.94)
    ),
    radial-gradient(
      circle at top right,
      rgba(13, 90, 127, 0.08),
      transparent 38%
    );
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
  min-height: 220px;
  overflow: hidden;
}

.mgpm-mode-card__inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(13, 90, 127, 0.92),
    rgba(88, 119, 85, 0.78)
  );
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.mgpm-mode-card input[type="radio"]:checked + .mgpm-mode-card__inner {
  border-color: var(--mgpm-blue);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(247, 236, 218, 0.62)),
    radial-gradient(
      circle at top right,
      rgba(13, 90, 127, 0.12),
      transparent 42%
    );
  box-shadow: 0 16px 34px rgba(13, 90, 127, 0.16);
  transform: translateY(-4px);
  filter: saturate(1.02);
}

.mgpm-mode-card:hover .mgpm-mode-card__inner {
  border-color: rgba(13, 90, 127, 0.34);
  box-shadow: 0 12px 26px rgba(13, 90, 127, 0.1);
  transform: translateY(-2px);
}

.mgpm-mode-card:hover .mgpm-mode-card__inner::before,
.mgpm-mode-card:focus-within .mgpm-mode-card__inner::before,
.mgpm-mode-card input[type="radio"]:checked + .mgpm-mode-card__inner::before {
  opacity: 1;
  transform: scaleX(1);
}

/* Featured card */
.mgpm-mode-card--featured .mgpm-mode-card__inner {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98),
      rgba(250, 128, 63, 0.08)
    ),
    radial-gradient(
      circle at top right,
      rgba(250, 128, 63, 0.12),
      transparent 42%
    );
  border-color: rgba(250, 128, 63, 0.24);
}

.mgpm-mode-card--featured input[type="radio"]:checked + .mgpm-mode-card__inner {
  border-color: var(--mgpm-orange);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 128, 63, 0.14)),
    radial-gradient(
      circle at top right,
      rgba(250, 128, 63, 0.14),
      transparent 42%
    );
  box-shadow: 0 16px 34px rgba(250, 128, 63, 0.18);
}

/* Badge */
.mgpm-mode-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--mgpm-orange);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(250, 128, 63, 0.22);
}

/* Icon */
.mgpm-mode-card__icon {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(13, 90, 127, 0.08);
  color: var(--mgpm-blue);
  box-shadow: inset 0 0 0 1px rgba(13, 90, 127, 0.06);
}

.mgpm-mode-card--featured .mgpm-mode-card__icon {
  background: rgba(250, 128, 63, 0.1);
  color: var(--mgpm-orange);
}

.mgpm-mode-card__icon svg {
  width: 22px;
  height: 22px;
}

/* Label */
.mgpm-mode-card__label {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--mgpm-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding-right: 88px;
  max-width: 10ch;
}

/* Desc */
.mgpm-mode-card__desc {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  font-size: 0.9rem;
  color: var(--mgpm-muted);
  line-height: 1.55;
  transition:
    max-height 200ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

/* Sample price */
.mgpm-mode-card__price {
  display: inline-block;
  margin-top: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(88, 119, 85, 0.1);
  color: var(--mgpm-green);
  font-size: 0.82rem;
  font-weight: 700;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition:
    max-height 200ms ease,
    opacity 180ms ease,
    transform 180ms ease,
    padding 180ms ease;
  padding-top: 0;
  padding-bottom: 0;
}

.mgpm-mode-card:hover .mgpm-mode-card__desc,
.mgpm-mode-card:focus-within .mgpm-mode-card__desc,
.mgpm-mode-card
  input[type="radio"]:checked
  + .mgpm-mode-card__inner
  .mgpm-mode-card__desc {
  max-height: 120px;
  opacity: 1;
  transform: translateY(0);
}

.mgpm-mode-card:hover .mgpm-mode-card__price,
.mgpm-mode-card:focus-within .mgpm-mode-card__price,
.mgpm-mode-card
  input[type="radio"]:checked
  + .mgpm-mode-card__inner
  .mgpm-mode-card__price {
  max-height: 40px;
  opacity: 1;
  transform: translateY(0);
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Check mark */
.mgpm-mode-card__check {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 26px;
  height: 26px;
  color: var(--mgpm-blue);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.mgpm-mode-card__check svg {
  width: 26px;
  height: 26px;
}

.mgpm-mode-card--featured .mgpm-mode-card__check {
  color: var(--mgpm-orange);
}

.mgpm-mode-card
  input[type="radio"]:checked
  + .mgpm-mode-card__inner
  .mgpm-mode-card__check {
  opacity: 1;
  transform: scale(1);
}

@media (hover: none) {
  .mgpm-mode-card__desc,
  .mgpm-mode-card__price {
    max-height: 0;
    opacity: 0;
    transform: translateY(8px);
  }

  .mgpm-mode-card
    input[type="radio"]:checked
    + .mgpm-mode-card__inner
    .mgpm-mode-card__desc {
    max-height: 120px;
    opacity: 1;
    transform: translateY(0);
  }

  .mgpm-mode-card
    input[type="radio"]:checked
    + .mgpm-mode-card__inner
    .mgpm-mode-card__price {
    max-height: 40px;
    opacity: 1;
    transform: translateY(0);
    padding-top: 4px;
    padding-bottom: 4px;
  }
}

.mgpm-decor-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(13, 90, 127, 0.12);
  border-radius: 18px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.96),
    rgba(247, 236, 218, 0.45)
  );
  box-shadow: 0 10px 32px rgba(13, 90, 127, 0.1);
}

.mgpm-decor-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.mgpm-step-back {
  border: 0;
  border-radius: 999px;
  background: rgba(13, 90, 127, 0.1);
  color: var(--mgpm-blue);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
}

.mgpm-decor-panel__eyebrow {
  margin: 0 0 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mgpm-orange);
}

.mgpm-decor-panel__title {
  margin: 0;
  color: var(--mgpm-dark);
  font-size: 1.12rem;
  line-height: 1.3;
}

.mgpm-decor-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 720px) {
  .mgpm-decor-row {
    grid-template-columns: 1fr;
  }
}

.mgpm-field {
  display: grid;
  gap: 6px;
}

.mgpm-field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--mgpm-text);
}

.mgpm-field input,
.mgpm-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(13, 90, 127, 0.18);
  border-radius: 12px;
  background: #fff;
  font-size: 0.92rem;
  color: var(--mgpm-text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mgpm-field input:focus,
.mgpm-field select:focus {
  outline: none;
  border-color: var(--mgpm-blue);
  box-shadow: 0 0 0 3px rgba(13, 90, 127, 0.12);
}

.mgpm-decor-panel__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--mgpm-muted);
}

.mgpm-tabs {
  display: grid;
  gap: 18px;
}

.mgpm-tabs__nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(13, 90, 127, 0.1);
  padding-bottom: 8px;
}

.mgpm-tabs__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--mgpm-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.mgpm-tabs__tab.is-active {
  color: var(--mgpm-blue);
  border-bottom-color: var(--mgpm-blue);
}

.mgpm-tabs__tab.is-disabled,
.mgpm-tabs__tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mgpm-tabs__panel {
  display: block;
}

.mgpm-matrix-step,
.mgpm-decoration-step {
  display: grid;
  gap: 18px;
}

.mgpm-matrix-step__intro h4,
.mgpm-decoration-step__intro h4 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  color: var(--mgpm-dark);
}

.mgpm-matrix-step__intro p:last-child,
.mgpm-decoration-step__intro p:last-child {
  margin: 0;
  color: var(--mgpm-muted);
  line-height: 1.55;
}

.mgpm-matrix-step__eyebrow {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mgpm-orange);
}

.mgpm-matrix-step__status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.mgpm-current-color,
.mgpm-matrix-step__minimum {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(13, 90, 127, 0.07);
  color: var(--mgpm-blue);
  font-size: 0.82rem;
  font-weight: 600;
}

.mgpm-variant-matrix {
  border: 1px solid rgba(13, 90, 127, 0.14);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.mgpm-variant-matrix__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mgpm-variant-matrix__empty {
  padding: 18px;
  color: var(--mgpm-muted);
}

.mgpm-matrix-step__feedback {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(250, 128, 63, 0.12);
  color: #8a3d17;
  font-size: 0.84rem;
  font-weight: 600;
}

.mgpm-variant-matrix__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: max-content;
}

.mgpm-variant-matrix__table th,
.mgpm-variant-matrix__table td {
  width: 86px;
  min-width: 86px;
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid rgba(13, 90, 127, 0.12);
  border-right: 1px solid rgba(13, 90, 127, 0.12);
}

.mgpm-variant-matrix__table th:last-child,
.mgpm-variant-matrix__table td:last-child {
  border-right: 0;
}

.mgpm-variant-matrix__table tr:last-child td {
  border-bottom: 0;
}

.mgpm-variant-matrix__table thead th {
  height: 48px;
  background: #f3f8fa;
  color: var(--mgpm-blue);
  font-size: 0.78rem;
  line-height: 1.15;
  vertical-align: middle;
}

.mgpm-variant-matrix__table thead th:first-child,
.mgpm-variant-matrix__table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 74px;
  min-width: 74px;
  background: #eef5f7;
  color: var(--mgpm-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.mgpm-variant-matrix__table thead th:first-child {
  z-index: 3;
}

.mgpm-variant-matrix__subhead {
  display: block;
  margin-top: 3px;
  color: var(--mgpm-muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.1;
}

.mgpm-variant-matrix__facts {
  display: block;
  margin-top: 5px;
  color: #374151;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
}

.mgpm-variant-matrix__input {
  width: 68px;
  min-height: 38px;
  padding: 6px;
  border: 1px solid rgba(13, 90, 127, 0.2);
  border-radius: 6px;
  background: #fff;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mgpm-dark);
  box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.06);
}

.mgpm-variant-matrix__input:focus {
  outline: 2px solid rgba(13, 90, 127, 0.22);
  outline-offset: 1px;
  border-color: var(--mgpm-blue);
}

.mgpm-selected-lines {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(13, 90, 127, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.mgpm-selected-lines__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.mgpm-selected-lines__head h5 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--mgpm-dark);
}

.mgpm-selected-lines__head span {
  color: var(--mgpm-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.mgpm-selected-lines__list {
  display: grid;
  gap: 10px;
}

.mgpm-selected-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(13, 90, 127, 0.05);
}

.mgpm-selected-line__meta {
  display: grid;
  gap: 2px;
}

.mgpm-selected-line__meta strong {
  color: var(--mgpm-dark);
  font-size: 0.9rem;
}

.mgpm-selected-line__meta span {
  color: var(--mgpm-muted);
  font-size: 0.8rem;
}

.mgpm-selected-line__remove {
  border: 0;
  background: transparent;
  color: var(--mgpm-orange);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.mgpm-matrix-step__actions,
.mgpm-decoration-step__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mgpm-btn {
  appearance: none;
  min-height: 48px;
  border-radius: 14px;
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.mgpm-btn:hover {
  transform: translateY(-1px);
}

.mgpm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.mgpm-btn--ghost {
  border: 1px solid rgba(13, 90, 127, 0.22);
  background: rgba(255, 255, 255, 0.7);
  color: var(--mgpm-blue);
}

.mgpm-btn--primary {
  border: 0;
  background: linear-gradient(135deg, var(--mgpm-blue), #1a6d96);
  color: #fff;
  box-shadow: 0 12px 24px rgba(13, 90, 127, 0.16);
}

.mgpm-decor-row--details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mgpm-decor-row--stacked {
  grid-template-columns: 1fr;
}

.mgpm-field textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid rgba(13, 90, 127, 0.18);
  border-radius: 12px;
  background: #fff;
  font-size: 0.92rem;
  color: var(--mgpm-text);
  resize: vertical;
}

.mgpm-field textarea:focus {
  outline: none;
  border-color: var(--mgpm-blue);
  box-shadow: 0 0 0 3px rgba(13, 90, 127, 0.12);
}

.mgpm-decor-cart-step {
  display: grid;
  gap: 12px;
}

@media (max-width: 900px) {
  .mgpm-matrix-step__status,
  .mgpm-selected-lines__head,
  .mgpm-selected-line,
  .mgpm-matrix-step__actions,
  .mgpm-decoration-step__actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .mgpm-decor-row--details {
    grid-template-columns: 1fr;
  }

  .mgpm-variant-matrix {
    overflow-x: auto;
  }

  .mgpm-artwork-launch {
    align-items: stretch;
    flex-direction: column;
  }

  .mgpm-artwork-modal {
    padding: 10px;
  }

  .mgpm-artwork-modal__body {
    grid-template-columns: 1fr;
  }

  .mgpm-artwork-canvas-wrap {
    min-height: 300px;
  }
}

.mgpm-cart-step {
  margin-top: 18px;
}

.mgpm-cart-step__hint {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: var(--mgpm-muted);
}

.mgpm-cart-step__mount {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mgpm-cart-step__mount--stacked {
  flex-direction: column;
  align-items: stretch;
}

.mgpm-cart-step__mount .quantity,
.mgpm-cart-step__mount .single_add_to_cart_button {
  margin: 0;
}

.mgpm-cart-step__mount--stacked .quantity,
.mgpm-cart-step__mount--stacked .single_add_to_cart_button,
.mgpm-cart-step__mount--stacked .quantity .qty {
  width: 100%;
}

/* ---------- Compact purchase panel override ---------- */
.mgpm-configurator {
  --mgpm-blue: #145f80;
  --mgpm-orange: #df6f2d;
  --mgpm-green: #4e714a;
  --mgpm-cream: #fff7ec;
  --mgpm-dark: #1f2f3a;
  --mgpm-text: #253947;
  --mgpm-muted: rgba(37, 57, 71, 0.68);
  --mgpm-border: rgba(31, 47, 58, 0.16);
  --mgpm-radius: 8px;
  --mgpm-shadow: 0 10px 22px rgba(31, 47, 58, 0.08);
  margin: 14px 0 16px;
  padding: 0;
  border: 0;
  border-radius: var(--mgpm-radius);
  background: transparent;
  box-shadow: none;
}

.mgpm-step-shell {
  overflow: visible;
}

.mgpm-step-track,
.mgpm-step-shell.is-step-decorated .mgpm-step-track {
  display: grid;
  width: 100%;
  gap: 14px;
  transform: none;
}

.mgpm-step-pane {
  width: 100%;
  flex: none;
}

.mgpm-decor-panel[hidden],
.mgpm-tabs__panel[hidden],
.mgpm-selected-lines[hidden],
.mgpm-cart-step[hidden] {
  display: none;
}

.mgpm-artwork-launch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #d9dde5;
  background: #f8fafc;
  border-radius: 8px;
  margin: 16px 0;
}

.mgpm-artwork-launch p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
}

.mgpm-artwork-modal[hidden] {
  display: none !important;
}

.mgpm-artwork-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.mgpm-artwork-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.68);
}

.mgpm-artwork-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1060px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32);
}

.mgpm-artwork-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.mgpm-artwork-modal__head p {
  margin: 0 0 4px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.mgpm-artwork-modal__head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.mgpm-artwork-modal__close {
  width: 38px;
  height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.mgpm-artwork-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  padding: 22px 24px 24px;
}

.mgpm-artwork-canvas-wrap {
  display: grid;
  place-items: center;
  min-height: 420px;
  background: #eef1f5;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  overflow: hidden;
}

.mgpm-artwork-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
}

.mgpm-artwork-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fbfbfc;
}

.mgpm-artwork-tools p {
  margin: 0 0 6px;
  color: #374151;
  font-size: 14px;
}

.mgpm-artwork-modal-open {
  overflow: hidden;
}

.mgpm-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mgpm-mode-card[data-mode="sample"] {
  grid-column: 1 / -1;
}

.mgpm-mode-card__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 0;
  padding: 12px;
  border-radius: 8px;
  background: #fbfcfb;
  box-shadow: none;
}

.mgpm-mode-card__inner::before,
.mgpm-mode-card__badge {
  display: none;
}

.mgpm-mode-card input[type="radio"]:checked + .mgpm-mode-card__inner,
.mgpm-mode-card--featured input[type="radio"]:checked + .mgpm-mode-card__inner,
.mgpm-mode-card:hover .mgpm-mode-card__inner {
  transform: none;
  box-shadow: 0 0 0 2px rgba(20, 95, 128, 0.16);
  background: #f6fbfd;
}

.mgpm-mode-card--featured .mgpm-mode-card__inner {
  border-color: rgba(223, 111, 45, 0.28);
  background: #fffaf6;
}

.mgpm-mode-card--featured input[type="radio"]:checked + .mgpm-mode-card__inner {
  border-color: var(--mgpm-orange);
  background: #fff8f1;
}

.mgpm-mode-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.mgpm-mode-card__icon svg {
  width: 18px;
  height: 18px;
}

.mgpm-mode-card__label {
  max-width: none;
  padding-right: 0;
  font-size: 0.94rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.mgpm-mode-card__desc,
.mgpm-mode-card__price,
.mgpm-mode-card:hover .mgpm-mode-card__desc,
.mgpm-mode-card:focus-within .mgpm-mode-card__desc,
.mgpm-mode-card:hover .mgpm-mode-card__price,
.mgpm-mode-card:focus-within .mgpm-mode-card__price,
.mgpm-mode-card
  input[type="radio"]:checked
  + .mgpm-mode-card__inner
  .mgpm-mode-card__desc,
.mgpm-mode-card
  input[type="radio"]:checked
  + .mgpm-mode-card__inner
  .mgpm-mode-card__price {
  display: none;
}

.mgpm-mode-card__check {
  position: static;
  width: 20px;
  height: 20px;
}

.mgpm-mode-card__check svg {
  width: 20px;
  height: 20px;
}

.mgpm-decor-panel {
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mgpm-decor-panel__head {
  display: none;
}

.mgpm-step-back {
  order: 2;
  border-radius: 8px;
  padding: 9px 11px;
  background: #edf5f8;
}

.mgpm-decor-panel__eyebrow,
.mgpm-matrix-step__eyebrow,
.mgpm-tabs__tab {
  letter-spacing: 0;
}

.mgpm-decor-panel__title,
.mgpm-matrix-step__intro h4,
.mgpm-decoration-step__intro h4 {
  font-size: 1rem;
}

.mgpm-tabs {
  gap: 12px;
}

.mgpm-tabs__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(31, 47, 58, 0.12);
  border-radius: 8px;
  background: #fff;
}

.mgpm-tabs__tab {
  min-height: 36px;
  padding: 8px;
  border-radius: 6px;
  border-bottom: 0;
  font-size: 0.78rem;
}

.mgpm-tabs__tab.is-active {
  background: #eaf4f7;
}

.mgpm-matrix-step,
.mgpm-decoration-step {
  gap: 12px;
}

.mgpm-matrix-step__intro p:last-child,
.mgpm-decoration-step__intro p:last-child {
  font-size: 0.86rem;
  line-height: 1.42;
}

.mgpm-matrix-step__status {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mgpm-current-color,
.mgpm-matrix-step__minimum {
  min-height: 34px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.mgpm-variant-matrix,
.mgpm-selected-lines {
  border-radius: 8px;
  background: #fff;
}

.mgpm-variant-matrix__table th,
.mgpm-variant-matrix__table td {
  padding: 8px;
}

.mgpm-variant-matrix__input {
  width: 64px;
  border-radius: 6px;
}

.mgpm-decor-row,
.mgpm-decor-row--details {
  grid-template-columns: 1fr;
  gap: 10px;
}

.mgpm-field {
  gap: 5px;
}

.mgpm-field input,
.mgpm-field select,
.mgpm-field textarea {
  min-height: 42px;
  border-radius: 8px;
}

.mgpm-decoration-step .mgpm-decor-row--details,
.mgpm-decoration-step .mgpm-decor-row--stacked {
  display: none;
}

.mgpm-cart-step {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mgpm-cart-step__hint {
  margin: 0;
  font-size: 0.84rem;
}

.mgpm-estimate {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid rgba(31, 47, 58, 0.12);
  border-radius: 8px;
  background: #f8faf9;
}

.mgpm-estimate[hidden] {
  display: none;
}

.mgpm-estimate div {
  display: grid;
  gap: 3px;
}

.mgpm-estimate span {
  color: var(--mgpm-muted);
  font-size: 0.76rem;
}

.mgpm-estimate strong {
  color: var(--mgpm-dark);
  font-size: 0.98rem;
  line-height: 1.2;
}

.mgpm-estimate__total strong {
  color: var(--mgpm-green);
  font-size: 1.1rem;
}

.mgpm-estimate p {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--mgpm-muted);
  font-size: 0.8rem;
}

.mgpm-cart-step__mount {
  display: grid;
  grid-template-columns: minmax(96px, 0.36fr) minmax(0, 1fr);
  gap: 10px;
}

.mgpm-cart-step__mount--stacked {
  flex-direction: initial;
  align-items: stretch;
}

.mgpm-cart-step__mount--stacked .quantity,
.mgpm-cart-step__mount--stacked .single_add_to_cart_button,
.mgpm-cart-step__mount--stacked .quantity .qty {
  width: 100%;
}

.mgpm-cart-step__mount .quantity .qty {
  min-height: 48px;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
}

.mgpm-cart-step__mount .single_add_to_cart_button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  font-weight: 800;
}

.mgpm-btn {
  border-radius: 8px;
}

@media (max-width: 480px) {
  .mgpm-mode-grid,
  .mgpm-estimate,
  .mgpm-cart-step__mount {
    grid-template-columns: 1fr;
  }
}

/* ---------- Notice ---------- */
.mgpm-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--mgpm-text);
}

.mgpm-notice svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.mgpm-notice--info {
  background: rgba(13, 90, 127, 0.07);
  color: var(--mgpm-blue);
}

.mgpm-notice--success {
  background: rgba(88, 119, 85, 0.12);
  color: #2f5c2c;
}

.mgpm-notice--error {
  background: rgba(250, 128, 63, 0.14);
  color: #7a3010;
}

.mgpm-notice--warning {
  background: rgba(247, 236, 218, 0.8);
  color: #7a5010;
}

/* ============================================================
   Review page
   ============================================================ */
body.mgpm-review-page {
  margin: 0;
  background: linear-gradient(180deg, #f7ecda, #eef5f8);
  color: #173247;
  font-family: system-ui, sans-serif;
}

.mgpm-review {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 420px);
}

.mgpm-review__viewer,
.mgpm-review__panel {
  padding: 24px;
}

.mgpm-review__viewer {
  display: grid;
  align-items: stretch;
}

.mgpm-review__viewer-shell,
.mgpm-model-viewer {
  width: 100%;
  height: min(92vh, 960px);
}

.mgpm-review__viewer-shell {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 60px rgba(13, 90, 127, 0.12);
}

.mgpm-review__panel {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(8px);
  overflow: auto;
}

.mgpm-review__eyebrow,
.mgpm-hotspot-panel__eyebrow {
  color: #0d5a7f;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mgpm-review__facts {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.mgpm-review__facts div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
}

.mgpm-review__copy,
.mgpm-hotspot-panel,
.mgpm-review__actions,
.mgpm-review__versions {
  margin-top: 20px;
}

.mgpm-hotspot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mgpm-hotspot-tab {
  border: 1px solid rgba(13, 90, 127, 0.14);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
}

.mgpm-hotspot-tab.is-active {
  background: #0d5a7f;
  color: #fff;
}

.mgpm-hotspot {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
}

.mgpm-hotspot span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(var(--mgpm-hotspot-rgb, 255, 255, 255), 0.92);
  border: 4px solid var(--mgpm-hotspot-color, #fff);
  box-shadow: 0 0 0 6px rgba(var(--mgpm-hotspot-rgb, 255, 255, 255), 0.24);
}

.mgpm-hotspot.is-active span {
  transform: scale(1.08);
}

.mgpm-hotspot-panel__logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}

.mgpm-hotspot-panel__facts,
.mgpm-review__versions ul,
.mgpm-file-list {
  padding-left: 18px;
}

.mgpm-hotspot-panel__colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mgpm-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
}

.mgpm-swatch i {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.mgpm-review-form,
.mgpm-review-form__reject,
.mgpm-otp-row {
  display: grid;
  gap: 10px;
}

.mgpm-review-form textarea,
.mgpm-otp-row input {
  width: 100%;
}

.mgpm-print-option-summary {
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.92);
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .mgpm-review {
    grid-template-columns: 1fr;
  }

  .mgpm-review__viewer-shell,
  .mgpm-model-viewer {
    height: 52vh;
  }
}
