.ma-mug-preview {
  width: 100%;
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ma-mug-preview__title {
  display: block;
  font-size: 1.05rem;
}

.ma-mug-preview__hint {
  margin: 0.25rem 0 0;
  color: #666;
  font-size: 0.9em;
}

.ma-mug-preview__notice {
  margin: 0.55rem 0 0;
  padding: 0.65rem 0.75rem;
  background: #f7f4ee;
  border-radius: 8px;
  color: #3a342c;
  font-size: 0.9em;
  line-height: 1.45;
}

.ma-mug-preview__notice a {
  color: #1d4f91;
  text-decoration: underline;
}

.ma-mug-preview__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ma-mug-preview__btn {
  cursor: pointer;
  margin: 0 !important;
}

.ma-mug-preview__text-tools {
  display: none;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.65rem 0.75rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid #c5d4e8;
  border-radius: 10px;
  background: #f3f7fc;
}

.ma-mug-preview__text-tools.is-active {
  display: grid;
}

.ma-mug-preview__text-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  font-size: 0.85em;
  color: #555;
}

.ma-mug-preview__text-field--grow {
  grid-column: 1 / -1;
}

.ma-mug-preview__text-field--check {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 0.35rem;
}

.ma-mug-preview__text-field textarea,
.ma-mug-preview__text-field select {
  width: 100%;
  margin: 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 0.4rem 0.5rem;
  font: inherit;
  background: #fff;
}

.ma-mug-preview__text-field input[type='color'] {
  width: 3rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 640px) {
  .ma-mug-preview__text-tools.is-active {
    grid-template-columns: 1fr 1fr;
  }
}

.ma-mug-preview__label {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.ma-mug-preview__editor-wrap,
.ma-mug-preview__stage {
  width: 100%;
}

.ma-mug-preview__editor {
  width: 100%;
  height: auto;
  max-width: 100%;
  /* Sublimation wrap: 24.1 cm × 10.8 cm */
  aspect-ratio: 241 / 108;
  display: block;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d0d0d0;
  touch-action: none;
  cursor: default;
}

.ma-mug-preview__legend {
  margin: 0.4rem 0 0;
  font-size: 0.85em;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ma-mug-preview__swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(120, 120, 120, 0.55);
  border: 1px solid #999;
  display: inline-block;
}

.ma-mug-preview__canvas {
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 420px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f2f5;
  touch-action: none;
  position: relative;
}

.ma-mug-preview__canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ma-mug-preview__status {
  margin: 0.4rem 0 0;
  font-size: 0.9em;
  color: #666;
}

/* Keep stacked with Botiga cart wrapper */
.woocommerce div.product form.cart .botiga-single-addtocart-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.75rem;
  width: 100% !important;
}
