/* ── Print Shop AI – Product Page Designer ─────────────────────────────── */

#psai-print-wrap {
  margin: 16px 0;
  font-size: 14px;
}

.psai-intro-panel {
  margin-bottom: 12px;
  border: 1px solid #d7dde3;
  border-radius: 4px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f3f6f8 100%);
  padding: 14px 16px;
}
.psai-intro-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2933;
}
.psai-intro-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #52606d;
}

/* Upload area */
/* ── Print Shop AI – Product Page Designer ─────────────────────────────── */

#psai-print-wrap {
  margin: 16px 0;
  font-size: 14px;
}

/* Upload area */
.psai-upload-area {
  margin-bottom: 12px;
  border: 2px dashed #c7c7c7;
  border-radius: 4px;
  background: #f8f8f8;
  padding: 14px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.psai-upload-area:hover,
.psai-upload-area:focus {
  border-color: #6e6e6e;
  background: #f1f1f1;
  box-shadow: 0 0 0 3px rgba(220, 220, 220, 0.18);
  outline: none;
}
.psai-upload-area--drag {
  border-color: #000000;
  background: #e8e8e8;
  box-shadow: 0 0 0 4px rgba(170, 170, 170, 0.18);
}
.psai-file-input {
  display: none;
}
.psai-upload-btn {
  display: inline-block;
  padding: 8px 18px;
  background: #000000;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}
.psai-upload-btn:hover { background: #444444; }
.psai-upload-hint {
  color: #4f6674;
  font-size: 12px;
  margin: 8px 0 0;
}

.psai-thumb-hint {
  margin: 0 0 8px;
  color: #4f6674;
  font-size: 12px;
}

/* Thumbnail strip */
.psai-thumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.psai-thumb {
  position: relative;
  width: 90px;
  border: 2px solid #ccc;
  border-radius: 4px;
  padding: 4px;
  cursor: pointer;
  background: #fafafa;
  text-align: center;
  transition: border-color 0.15s;
  user-select: none;
}
.psai-thumb:hover { border-color: #000000; }
.psai-thumb--active { border-color: #000000; background: #e8f4fa; }
.psai-thumb img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.psai-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.psai-thumb-remove:hover {
  background: rgba(179, 45, 46, 0.95);
}
.psai-thumb-name {
  font-size: 10px;
  color: #333;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.psai-thumb-count {
  font-size: 10px;
  color: #000000;
  font-weight: 600;
}
.psai-thumb-incart {
  margin-top: 3px;
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid #b8e0c2;
  background: #eef8f1;
  color: #1f7a34;
}
.psai-spinner {
  width: 24px; height: 24px;
  margin: 10px auto;
  border: 3px solid #ddd;
  border-top-color: #000000;
  border-radius: 50%;
  animation: psai-spin 0.8s linear infinite;
}
@keyframes psai-spin { to { transform: rotate(360deg); } }
.psai-thumb-err { font-size: 24px; line-height: 44px; text-align: center; }

/* Bulk settings */
.psai-bulk-panel {
  border: 1px solid #d6dde3;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #f9fbfd;
}
.psai-bulk-title {
  font-weight: 700;
  font-size: 13px;
  color: #23282d;
  margin-bottom: 8px;
}
.psai-bulk-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  overflow-x: auto;
}
.psai-bulk-size,
.psai-bulk-type,
.psai-bulk-copies {
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
}
.psai-bulk-size,
.psai-bulk-type {
  min-width: 0;
  flex: 1 1 auto;
}
.psai-bulk-copies-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #444;
  font-size: 12px;
  white-space: nowrap;
}
.psai-bulk-copies {
  width: 58px;
  text-align: center;
}
.psai-bulk-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
}
.psai-bulk-remove-all {
  background: none;
  border: none;
  color: #8b5cf6;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  font-weight: 400;
  transition: color 0.15s;
}
.psai-bulk-remove-all:hover:not(:disabled) {
  color: #7c3aed;
}
.psai-bulk-remove-all:disabled {
  color: #ccc;
  cursor: not-allowed;
}
.psai-bulk-hint {
  margin: 8px 0 0;
  color: #4f6674;
  font-size: 12px;
}

/* Existing cart items */
.psai-cart-sync-panel {
  border: 1px solid #d6dde3;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fff;
}
.psai-cart-sync-title {
  font-weight: 700;
  font-size: 13px;
  color: #23282d;
  margin-bottom: 8px;
}
.psai-cart-sync-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.psai-cart-sync-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e8edf1;
  border-radius: 6px;
  padding: 6px 8px;
}
.psai-cart-sync-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #d8dde2;
  flex: 0 0 auto;
}
.psai-cart-sync-info {
  font-size: 12px;
  color: #2b2b2b;
  flex: 1 1 auto;
  min-width: 0;
}
.psai-cart-sync-note {
  display: inline-block;
  background: #eef8f1;
  color: #1f7a34;
  border: 1px solid #b8e0c2;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  white-space: nowrap;
}
.psai-cart-sync-remove {
  border: 1px solid #d5d5d5;
  background: #fff;
  color: #b32d2e;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}
.psai-cart-sync-remove:hover {
  background: #fdf0f0;
}

/* Photo panel */
.psai-photo-panel {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
}
.psai-photo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  color: #23282d;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.psai-photo-header-preview {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #d8dde2;
  background: #f3f5f7;
  flex: 0 0 auto;
}
.psai-photo-header-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.psai-photo-header-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Job rows */
.psai-job-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.psai-job-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #f7f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 6px 8px;
}
.psai-job-size,
.psai-job-type {
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  width: 49%;
  display: flex;
  min-width: 0;
}
.psai-copies-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  width:49%;
}
.psai-btn-step {
  width: 100px; height: 38px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.psai-btn-step:hover { background: #f0f0f0; }
.psai-copies-input {
  width: 46px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 3px 4px;
  font-size: 13px;
}
.psai-btn-design {
  padding: 4px 10px;
  font-size: 12px;
  background: #f0f7fb;
  border: 1px solid #aad4eb;
  border-radius: 3px;
  cursor: pointer;
  color: #000000;
  font-weight: 600;
  line-height: 29px;
  width:49%;
}
.psai-btn-design:hover,
.psai-btn-design--active {
  background: #000000;
  color: #fff;
  border-color: #000000;
}
.psai-job-price {
  font-size: 12px;
  font-weight: 600;
  color: #444444;
  white-space: nowrap;
}
.psai-job-incart {
  display: inline-block;
  margin-left: 2px;
  font-size: 10px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid #b8e0c2;
  background: #eef8f1;
  color: #1f7a34;
  white-space: nowrap;
}
.psai-btn-remove-job {
  margin-left: auto;
  background: none;
  border: none;
  color: #b32d2e;
  cursor: pointer;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 3px;
}
.psai-btn-remove-job:hover {
  background: rgba(179, 45, 46, 0.1);
}
.psai-job-warn {
  display: none;
  font-size: 12px;
  color: #d32f2f;
  margin-left: 2px;
}
.psai-job-warn-msg {
  display: none;
  font-size: 11px;
  color: #d32f2f;
  width: 100%;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #ffdddd;
}

/* Cart item rows (integrated into job list) */
.psai-job-row--cart {
  background: #f5fcf8;
  border-color: #c8e0d0;
  flex-wrap: nowrap;
}
.psai-cart-item-info {
  flex: 1;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #333;
  gap: 2px;
}
.psai-cart-item-size,
.psai-cart-item-type,
.psai-cart-item-copies {
  white-space: nowrap;
}
.psai-cart-item-sep {
  color: #999;
}
.psai-cart-sync-note {
  display: inline-block;
  margin: 0 4px;
  font-size: 10px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid #b8e0c2;
  background: #eef8f1;
  color: #1f7a34;
  white-space: nowrap;
}
.psai-cart-sync-remove {
  background: none;
  border: none;
  color: #b32d2e;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 3px;
  white-space: nowrap;
  text-decoration: underline;
}
.psai-cart-sync-remove:hover {
  background: rgba(179, 45, 46, 0.1);
}
.psai-cart-sync-remove:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.psai-btn-remove-job:hover { background: #fce8e8; }
.psai-job-warn {
  color: #d97706;
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
  cursor: help;
}
.psai-job-warn-msg {
  width: 100%;
  margin-top: 4px;
  font-size: 11px;
  color: #b45309;
}
.psai-btn-add-job {
  font-size: 12px;
  padding: 5px 12px;
}

@media (max-width: 767px) {
  .psai-intro-panel {
    padding: 12px 13px;
  }

  .psai-job-size,
  .psai-job-type,
  .psai-copies-wrap,
  .psai-btn-design {
    width: calc(50% - 3px);
  }

  .psai-job-price,
  .psai-job-warn-msg {
    width: 100%;
  }

  .psai-btn-step {
    width: 34px;
    height: 36px;
  }

  .psai-copies-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .psai-job-row--cart {
    flex-wrap: wrap;
  }

  .psai-cart-item-info {
    width: 100%;
    flex-wrap: wrap;
  }

  .psai-canvas-footer {
    justify-content: stretch;
  }

  .psai-canvas-footer .button {
    width: 100%;
  }
}

/* Canvas editor panel */
.psai-canvas-panel {
  border: 1px solid #aaaaaa;
  border-radius: 4px;
  padding: 12px;
  background: #f0f0f0;
  margin-bottom: 12px;
}
.psai-canvas-label {
  font-size: 12px;
  font-weight: 600;
  color: #444444;
  margin-bottom: 8px;
}
.psai-canvas-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 3px;
  overflow: hidden;
  padding: 10px;
}
.psai-canvas {
  display: block;
  cursor: grab;
  max-width: 100%;
}
.psai-canvas:active { cursor: grabbing; }
.psai-canvas-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.psai-canvas-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #6b7280;
}
.psai-canvas-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.psai-canvas-hint {
  margin: 10px 0 12px;
  font-size: 12px;
  color: #4f6674;
}
.psai-zoom-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #444;
}
.psai-zoom-label input[type="range"] {
  width: 120px;
}

/* Cart action row */
.psai-cart-actions {
  margin-top: 12px;
}

/* Message */
.psai-message {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 13px;
}
.psai-message--error {
  background: #fce8e8;
  color: #b32d2e;
  border: 1px solid #f5c2c2;
}
.psai-message--success {
  background: #e8e8e8;
  color: #2e7d32;
  border: 1px solid #c3c3c3;
}

/* Cart thumbnail (for cart page) */
.psai-cart-thumb {
  height: auto;
  display: block;
}

.product_list_widget .product-title {
  color:#fff;
}