/* ==========================================================================
   Patiss · «Mi diseño»
   - En el configurador (oscuro): botón + modal de guardado.
   - En el tema (claro): página privada, «Mis diseños» y recuperación.
   ========================================================================== */

/* ---- Configurador: botón «Guardar mi diseño» ---------------------------- */

.pd-save-btn {
  flex: 0 0 42%;
  padding: 12px 6px;
  border-radius: 999px;
  border: 1px solid var(--accent, #c89b6a);
  background: rgba(200, 155, 106, 0.14);
  color: var(--accent, #c89b6a);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.pd-save-btn:hover {
  background: rgba(200, 155, 106, 0.24);
}

.pd-save-btn:active {
  transform: scale(0.99);
}

.pd-browse-note {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(200, 155, 106, 0.14);
  color: #e8d9c4;
  font-size: 13px;
  line-height: 1.45;
}

/* ---- Modal de guardado --------------------------------------------------- */

.pd-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 10, 14, 0.72);
}

.pd-modal {
  width: 100%;
  max-width: 430px;
  max-height: 92vh;
  overflow: auto;
  border-radius: 16px;
  background: #15181f;
  color: #f2efe9;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.pd-modal h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.pd-modal p.pd-intro {
  margin: 0 0 8px;
  color: #b9b3c0;
  font-size: 14px;
  line-height: 1.5;
}

.pd-modal label {
  display: block;
  margin: 14px 0 4px;
  font-size: 13px;
  color: #cfc9d6;
}

.pd-modal input[type="text"],
.pd-modal input[type="email"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
}

.pd-modal .pd-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #948e9e;
}

.pd-modal .pd-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #cfc9d6;
}

.pd-modal .pd-check input {
  margin-top: 3px;
}

.pd-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.pd-modal .pd-cta {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--accent, #c89b6a);
  color: #17120c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pd-modal .pd-cta[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.pd-modal .pd-ghost {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 12px 18px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.pd-error {
  margin: 10px 0 0;
  color: #ff9b9b;
  font-size: 13px;
}

.pd-success {
  text-align: center;
}

.pd-success .pd-check-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: rgba(89, 165, 163, 0.2);
  color: #7fd0cd;
  font-size: 28px;
}

.pd-success .pd-link {
  display: block;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent, #c89b6a);
  font-size: 12.5px;
  word-break: break-all;
  text-decoration: none;
}

/* ---- Página del diseño / Mis diseños (tema claro) ------------------------ */

.pd-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

.pd-page--narrow {
  max-width: 620px;
}

.pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

@media (max-width: 760px) {
  .pd-hero {
    grid-template-columns: 1fr;
  }
}

.pd-render img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(80, 40, 100, 0.18);
}

.pd-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #59a5a3;
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pd-info h1 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.15;
}

.pd-code {
  margin: 0 0 12px;
  color: #6b6675;
  font-size: 14px;
}

.pd-product {
  margin: 0 0 16px;
  font-size: 15px;
}

.pd-product a {
  color: #8b43a2;
}

.pd-ordered {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #eaf5f4;
  color: #2f6f6d;
  font-size: 14px;
}

.pd-info h2 {
  margin: 18px 0 8px;
  font-size: 17px;
}

.pd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-chips li {
  padding: 8px 13px;
  border-radius: 12px;
  background: #f3ecf6;
  font-size: 14px;
}

.pd-chips li span {
  display: block;
  color: #8b43a2;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pd-measures {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-measures li {
  padding: 7px 12px;
  border-radius: 10px;
  background: #faf7f2;
  border: 1px solid #ece4ef;
  font-size: 14px;
}

.pd-measures li span {
  color: #6b6675;
  font-size: 12px;
  margin-right: 6px;
}

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 14px;
}

.pd-btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid #8b43a2;
  background: transparent;
  color: #8b43a2;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pd-btn:hover {
  background: #f3ecf6;
}

.pd-btn--primary {
  background: #8b43a2;
  color: #fff;
}

.pd-btn--primary:hover {
  background: #74348a;
  color: #fff;
}

.pd-contact {
  margin: 6px 0 10px;
  font-size: 14px;
  color: #4a4553;
}

.pd-contact a {
  color: #8b43a2;
  font-weight: 600;
  text-decoration: none;
}

.pd-note {
  margin: 10px 0 0;
  color: #8b8494;
  font-size: 13px;
}

.pd-list-head {
  margin-bottom: 22px;
}

.pd-list-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

.pd-list-head p {
  margin: 0;
  color: #5c5766;
  font-size: 15px;
}

.pd-list-head a {
  color: #8b43a2;
}

.pd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-card {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(80, 40, 100, 0.1);
}

.pd-card--ordered {
  outline: 2px solid #59a5a3;
}

.pd-card__render img {
  width: 100%;
  height: auto;
  display: block;
}

.pd-card__body {
  padding: 14px 16px 18px;
}

.pd-card__body h2 {
  margin: 0 0 2px;
  font-size: 17px;
}

.pd-tag {
  display: inline-block;
  margin: 6px 0 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3ecf6;
  color: #8b43a2;
  font-size: 12px;
}

.pd-tag--ok {
  background: #eaf5f4;
  color: #2f6f6d;
}

.pd-empty {
  padding: 22px;
  border-radius: 14px;
  background: #faf7f2;
  color: #5c5766;
}

.pd-ok {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #eaf5f4;
  color: #2f6f6d;
}

.pd-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

.pd-form label {
  font-size: 14px;
  font-weight: 600;
}

.pd-form input[type="email"] {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #d9cfe0;
  font: inherit;
}
