@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* ── CatDog ID Checkout — Estilo oficial ── */
:root {
  --mg: #D4006E;
  --mg2: #E8007A;
  --mg-light: #FCE4F0;
  --mg-pale: #FFF0F7;
  --pu: #7B3FA0;
  --pu-light: #F0E8F8;
  --dark: #1A1020;
  --gray: #6B6178;
  --border: #E8E0EE;
  --bg: #FAF8FC;
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
}

.cdid-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  font-family: 'Nunito', sans-serif;
  color: var(--dark);
}
.cdid-hidden { display: none !important; }

/* Logo */
.cdid-logo { text-align: center; margin-bottom: 1.5rem; }
.cdid-logo img { max-height: 64px; }
.cdid-logo-text { font-size: 22px; font-weight: 900; color: var(--dark); }
.cdid-logo-text strong { color: var(--mg); }

/* Title */
.cdid-title { font-size: 24px; font-weight: 900; text-align: center; color: var(--dark); margin-bottom: 1.5rem; line-height: 1.3; }
.cdid-title strong { color: var(--mg); }

/* Stepper */
.cdid-stepper { display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; }
.cdid-step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 60px; }
.cdid-step-circle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; border: 2.5px solid var(--border); color: var(--gray); background: var(--white); transition: all .3s; }
.cdid-step-label { font-size: 11px; font-weight: 700; color: var(--gray); transition: all .3s; }
.cdid-step.active .cdid-step-circle { background: var(--mg); border-color: var(--mg); color: #fff; }
.cdid-step.active .cdid-step-label { color: var(--mg); }
.cdid-step.done .cdid-step-circle { background: var(--mg-light); border-color: var(--mg); color: var(--mg); }
.cdid-step.done .cdid-step-label { color: var(--mg); }
.cdid-step-line { flex: 1; height: 3px; background: var(--border); margin: 0 3px; margin-bottom: 20px; border-radius: 3px; max-width: 80px; transition: background .3s; }
.cdid-step-line.done { background: var(--mg); }

/* Card */
.cdid-card { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 1.75rem 1.5rem; margin-bottom: 1rem; }
.cdid-card h2 { font-size: 17px; font-weight: 800; color: var(--dark); margin: 0 0 4px; }
.cdid-sub { font-size: 13px; color: var(--gray); font-weight: 600; margin: 0 0 1.25rem; }

/* Quantity */
.cdid-qty-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 1.25rem 0; }
.cdid-qty-input { width: 90px; height: 48px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); text-align: center; font-size: 20px; font-weight: 800; color: var(--dark); font-family: 'Nunito', sans-serif; outline: none; background: var(--white); transition: border .2s, box-shadow .2s; }
.cdid-qty-input:focus { border-color: var(--mg); box-shadow: 0 0 0 3px var(--mg-light); }
.cdid-qty-unit { font-size: 14px; color: var(--gray); font-weight: 700; margin-left: 10px; }
.cdid-price-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--mg-pale); border: 1.5px solid var(--mg-light); border-radius: 50px; padding: 7px 18px; font-size: 13px; color: var(--mg); font-weight: 800; margin: 0 auto; }
.cdid-price-pill-wrap { display: flex; justify-content: center; margin-top: 4px; }

/* Fields */
.cdid-field { margin-bottom: 1rem; }
.cdid-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 520px) { .cdid-field-row { grid-template-columns: 1fr; } }
.cdid-field label, .cdid-flabel { display: block; font-size: 11px; font-weight: 800; color: var(--gray); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.req { color: var(--mg); }
.cdid-field input,
.cdid-field select,
.cdid-field textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: 'Nunito', sans-serif; color: var(--dark); outline: none; transition: border .2s, box-shadow .2s; background: var(--white); }
.cdid-field input:focus, .cdid-field select:focus { border-color: var(--mg); box-shadow: 0 0 0 3px var(--mg-light); }
.cdid-phone-wrap { display: flex; }
.cdid-phone-pre { padding: 11px 12px; background: var(--bg); border: 1.5px solid var(--border); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: 13px; color: var(--gray); font-family: 'Nunito', sans-serif; font-weight: 700; white-space: nowrap; }
.cdid-phone-wrap input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Checkbox */
.cdid-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray); font-weight: 600; cursor: pointer; margin-top: 6px; }
.cdid-checkbox input[type=checkbox] { width: auto; accent-color: var(--mg); }

/* Pet badge & section labels */
.cdid-pet-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--pu); color: #fff; border-radius: 50px; padding: 5px 16px; font-size: 12px; font-weight: 800; margin-bottom: 1rem; font-family: 'Nunito', sans-serif; }
.cdid-section-label { font-size: 11px; font-weight: 800; color: var(--pu); text-transform: uppercase; letter-spacing: .06em; border-top: 1.5px solid var(--border); padding-top: .875rem; margin: 1.125rem 0 .75rem; }
.cdid-pet-divider { border: none; border-top: 2px dashed var(--border); margin: 1.75rem 0; }

/* Upload */
.cdid-upload { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 1.5rem; text-align: center; cursor: pointer; transition: all .2s; color: var(--gray); font-size: 13px; font-weight: 700; position: relative; overflow: hidden; }
.cdid-upload:hover { border-color: var(--mg); background: var(--mg-pale); }
.cdid-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.cdid-upload-icon { font-size: 28px; color: var(--mg); display: block; margin-bottom: 6px; }
.cdid-upload-preview { max-width: 100px; border-radius: 8px; margin-top: 10px; display: none; }

/* Summary */
.cdid-summary-card { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.125rem; margin-bottom: .875rem; }
.cdid-sum-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cdid-sum-header h3 { font-size: 14px; font-weight: 800; color: var(--pu); margin: 0; }
.cdid-modify-btn { font-size: 12px; color: var(--mg); background: none; border: 1.5px solid var(--mg-light); border-radius: 50px; padding: 3px 12px; cursor: pointer; font-weight: 700; font-family: 'Nunito', sans-serif; transition: background .15s; }
.cdid-modify-btn:hover { background: var(--mg-light); }
.cdid-sum-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.cdid-sum-row:last-child { border-bottom: none; }
.cdid-sum-row span { color: var(--gray); font-weight: 600; }
.cdid-sum-row strong { color: var(--dark); font-weight: 700; }
.cdid-sum-total { display: flex; justify-content: space-between; font-size: 19px; font-weight: 900; color: var(--mg); padding-top: 10px; margin-top: 4px; }

/* Payment options */
.cdid-pay-option { display: flex; align-items: flex-start; gap: 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; margin-bottom: 10px; transition: all .2s; }
.cdid-pay-option:has(input:checked) { border-color: var(--mg); background: var(--mg-pale); }
.cdid-pay-option input[type=radio] { accent-color: var(--mg); flex-shrink: 0; margin-top: 2px; }
.cdid-pay-title { font-size: 14px; font-weight: 800; color: var(--dark); }
.cdid-pay-sub { font-size: 12px; color: var(--gray); font-weight: 600; }

/* Buttons */
.cdid-btn-row { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; gap: 10px; }
.cdid-btn-primary { background: var(--mg); color: #fff; border: none; border-radius: 50px; padding: 13px 32px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: 'Nunito', sans-serif; transition: background .15s, transform .1s; display: inline-flex; align-items: center; gap: 8px; }
.cdid-btn-primary:hover { background: var(--mg2); }
.cdid-btn-primary:active { transform: scale(.97); }
.cdid-btn-primary:disabled { background: #E8A0C0; cursor: not-allowed; }
.cdid-btn-secondary { background: var(--white); color: var(--dark); border: 2px solid var(--border); border-radius: 50px; padding: 12px 24px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: 'Nunito', sans-serif; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.cdid-btn-secondary:hover { border-color: var(--mg); color: var(--mg); }

/* Error / Loading */
.cdid-error { background: #FCE4F0; color: #8C0045; border: 1.5px solid var(--mg-light); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; font-weight: 700; margin-top: 12px; }
.cdid-loading { text-align: center; font-size: 14px; color: var(--mg); font-weight: 800; padding: 14px; }

/* Transfer confirmation */
.cdid-transfer-card { text-align: center; padding: 0.5rem 0; }
.cdid-check-icon { font-size: 52px; color: var(--mg); margin-bottom: 12px; display: block; }
.cdid-transfer-card h2 { font-size: 22px; font-weight: 900; color: var(--dark); margin-bottom: 8px; }
.cdid-transfer-data { background: var(--pu-light); border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin: 1rem 0; text-align: left; font-size: 14px; }
.cdid-transfer-data p { margin: 6px 0; font-weight: 600; color: var(--dark); }
.cdid-transfer-data p strong { color: var(--pu); }
.cdid-transfer-note { font-size: 13px; color: var(--gray); font-weight: 600; margin-top: .75rem; }
.cdid-transfer-note strong { color: var(--mg); }

/* Contact footer */
.cdid-contact { text-align: center; font-size: 13px; color: var(--gray); font-weight: 600; margin-top: 1.5rem; }
.cdid-contact a { color: var(--mg); text-decoration: none; font-weight: 800; }

/* Pay label */
.cdid-pay-label { font-size: 11px; font-weight: 800; color: var(--gray); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; margin-top: 1.25rem; display: block; }

/* ── Tarjeta de producto (paso 1) — imagen centrada ── */
.cdid-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--mg-pale);
  border: 1.5px solid var(--mg-light);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 1.25rem;
  gap: 10px;
}
.cdid-product-img {
  width: 100% !important;
  max-width: 380px !important;
  height: 200px !important;
  object-fit: cover;
  border-radius: 12px;
  border: 1.5px solid var(--mg-light);
  display: block;
  margin: 0 auto;
}
.cdid-product-img-placeholder {
  width: 100% !important;
  max-width: 380px !important;
  height: 200px !important;
  background: var(--mg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto;
}
.cdid-product-name { font-size: 16px; font-weight: 800; color: var(--dark); }
.cdid-product-desc { font-size: 13px; color: var(--gray); font-weight: 600; }
.cdid-product-price { font-size: 18px; font-weight: 900; color: var(--mg); }

/* Preview de fotos multiples */
.cdid-preview-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; justify-content: center; }
.cdid-preview-wrap .cdid-upload-preview { max-width: 80px; max-height: 80px; border-radius: 8px; display: block; }

/* Boton agregar otra imagen */
.cdid-add-foto-btn {
  margin-top: 10px;
  background: var(--white);
  color: var(--mg);
  border: 1.5px dashed var(--mg-light);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all .15s;
}
.cdid-add-foto-btn:hover { background: var(--mg-pale); border-color: var(--mg); }
