pet-carnet-3d {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.42;
  overflow: visible;
  border: 0;
  background: transparent;
}
pet-carnet-3d model-viewer {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  --progress-bar-color: #ffffff;
  filter: drop-shadow(0 0 18px #54c4f742) drop-shadow(0 12px 24px #0b385324);
  transition: filter 180ms ease;
}
.carnet-3d-fallback {
  position: absolute;
  width: 88%;
  height: auto;
  left: 6%;
  top: 8%;
  border-radius: 16px;
  box-shadow: 0 15px 25px #0b38534d;
  filter: drop-shadow(0 0 14px #54c4f742);
  transform: perspective(680px) rotateY(-15deg) rotateX(4deg);
  transition: transform 280ms ease;
}
.carnet-3d-fallback.qr-zoomed {
  transform: scale(2.65) translate(-26%, -6%);
}
.carnet-3d-fallback[hidden] { display: none; }
.pet-card-entry { min-width: 0; }
#pets-grid:has(.pet-card-entry) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
}
.pet-card-select {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 20px;
}
.pet-card-select pet-carnet-3d { pointer-events: none; aspect-ratio: 1.55; }
.pet-card-select:focus-visible { outline: 3px solid #146b93; outline-offset: 4px; }
.pet-card-select:hover model-viewer,
.pet-card-select:focus-visible model-viewer {
  filter: drop-shadow(0 0 14px #54c4f766) drop-shadow(0 8px 20px #3ba0da3d);
}
@media (prefers-reduced-motion: reduce) {
  pet-carnet-3d model-viewer { transition: none; }
  .carnet-3d-fallback { transition: none; }
}
.pet-card-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  color: #0b3853;
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.pet-card-open:hover, .pet-card-open:focus-visible { background: #dcebf4; }
.product-showcase-card.product-card-carnet,
.product-showcase-card.product-card-appointment {
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  background: #ffffff;
}
.product-card-carnet .product-copy-side,
.product-card-appointment .product-copy-side {
  width: 100%;
  flex: none;
  position: relative;
  z-index: 2;
}
.product-card-carnet .product-preview-side:has(pet-carnet-3d) {
  position: relative;
  z-index: 1;
  flex: none;
  width: calc(100% + 56px);
  max-width: none;
  margin: -4px -28px 4px -28px;
}
.product-card-appointment .product-appointment-stage {
  width: 100%;
  flex: none;
  margin: 10px 0 16px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #ddecfa;
  box-shadow: 0 12px 28px -8px rgba(2, 136, 209, 0.20);
  cursor: pointer;
  aspect-ratio: 1.42;
  background: #e8f5fb;
}
.product-card-appointment .appointment-sofia-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  transition: transform 0.28s ease;
}
.product-card-appointment .product-appointment-stage:hover .appointment-sofia-img {
  transform: scale(1.03);
}
.benefit-item-interactive {
  cursor: pointer;
  user-select: none;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #7dd3fc;
  box-shadow: 0 3px 10px -2px rgba(2, 136, 209, 0.18);
  color: #0369a1;
  font-weight: 700;
  transition: all 0.18s ease;
}
.benefit-item-interactive .benefit-icon {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(2, 136, 209, 0.16);
}
.benefit-item-interactive .benefit-qr-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: #0288d1;
  color: #ffffff;
  letter-spacing: 0.2px;
  transition: background 0.18s ease, color 0.18s ease;
}
.benefit-item-interactive:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border-color: #0288d1;
  color: #075985;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -3px rgba(2, 136, 209, 0.28);
}
.benefit-item-interactive.is-active {
  background: linear-gradient(135deg, #0288d1 0%, #0369a1 100%);
  border-color: #0369a1;
  color: #ffffff;
  box-shadow: 0 6px 16px -3px rgba(2, 136, 209, 0.38);
}
.benefit-item-interactive.is-active .benefit-icon {
  background: rgba(255, 255, 255, 0.2);
}
.benefit-item-interactive.is-active .benefit-icon svg {
  stroke: #ffffff;
}
.benefit-item-interactive.is-active .benefit-qr-cta {
  background: #ffffff;
  color: #0288d1;
}

/* ===== TARJETA SHOWCASE: CHIP DIGITAL DE IDENTIFICACIÓN & ENVÍO ===== */
.product-showcase-card.product-card-microchip {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, #ffffff 0%, #f4faff 100%);
  border: 1.5px solid #cde8fa;
  padding: 30px 32px;
  display: block;
}

.product-showcase-card.product-card-microchip.is-chip-protected {
  border-color: #7dd3fc;
  box-shadow: 0 20px 50px -12px rgba(2, 136, 209, 0.22), 0 0 0 1px rgba(56, 189, 248, 0.18);
}

.microchip-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.microchip-main-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.microchip-iso-pill {
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.microchip-status-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.microchip-status-banner.banner-protected {
  background: linear-gradient(135deg, #032b44 0%, #065a82 55%, #0288d1 100%);
  color: #ffffff;
  border: 1px solid #38bdf8;
  box-shadow: 0 12px 28px -8px rgba(2, 136, 209, 0.42);
}

.microchip-status-banner.banner-pending {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #032035;
  border: 1.5px dashed #7dd3fc;
}

.status-shield-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.banner-protected .status-shield-icon {
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.55);
  color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
}

.banner-pending .status-shield-icon {
  background: #ffffff;
  border: 1px solid #bae6fd;
  color: #0288d1;
}

.status-banner-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.status-banner-text strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

.banner-protected .status-banner-text strong {
  color: #ffffff;
}

.banner-protected .status-banner-text span {
  font-size: 13px;
  color: #d9f2ff;
  line-height: 1.4;
}

.banner-pending .status-banner-text strong {
  color: #032035;
}

.banner-pending .status-banner-text span {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.microchip-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.microchip-control-box {
  background: #ffffff;
  border: 1.5px solid #ddecfa;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(10, 67, 105, 0.04);
}

.control-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.control-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.control-box-eyebrow {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.control-eyebrow-row .control-box-eyebrow {
  margin-bottom: 0;
}

.control-box-value {
  font-size: 15.5px;
  font-weight: 800;
  color: #032035;
  word-break: break-word;
  line-height: 1.3;
}

.control-address-text {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
}

.chip-addr-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
}

.chip-addr-badge.badge-confirmed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.chip-addr-badge.badge-unconfirmed {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.control-box-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-chip-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 10px;
  border: 1.5px solid #bae6fd;
  background: #f0f9ff;
  color: #0284c7;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.btn-chip-inline:hover {
  background: #e0f2fe;
  border-color: #0288d1;
  color: #0369a1;
  transform: translateY(-1px);
}

.btn-chip-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #0288d1 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px -2px rgba(2, 136, 209, 0.35);
  transition: all 0.18s ease;
}

.btn-chip-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -2px rgba(2, 136, 209, 0.48);
}

.btn-chip-confirm.is-confirmed {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
  color: #047857;
  box-shadow: none;
}

.microchip-inline-editor {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-editor-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.inline-editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-editor-input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 9px 12px;
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
}

.inline-editor-input:focus {
  outline: none;
  border-color: #0288d1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.15);
}

.btn-inline-save {
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: #0288d1;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-inline-save:hover {
  background: #0369a1;
}

.btn-inline-cancel {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Columna Visual Derecha del Chip */
.microchip-visual-col {
  display: flex;
  align-items: stretch;
}

.microchip-luxury-stage {
  width: 100%;
  border-radius: 22px;
  padding: 22px;
  background: radial-gradient(circle at 50% 35%, #0c4a6e 0%, #04253d 65%, #02182b 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: inset 0 0 32px rgba(56, 189, 248, 0.16), 0 18px 36px -10px rgba(3, 32, 53, 0.45);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.microchip-glow-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, rgba(56, 189, 248, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  pointer-events: none;
}

.microchip-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.stage-chip-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #7dd3fc;
}

.stage-chip-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.stage-chip-status.status-on {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.6);
  color: #6ee7b7;
}

.stage-chip-status.status-off {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde68a;
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.microchip-center-emblem {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 4px auto;
  display: grid;
  place-items: center;
  z-index: 2;
}

.emblem-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(125, 211, 252, 0.45);
}

.emblem-ring.ring-outer {
  inset: 0;
}

.emblem-ring.ring-inner {
  inset: 12px;
  border-style: solid;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.28);
}

.emblem-core {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0288d1 0%, #0369a1 100%);
  border: 1.5px solid #bae6fd;
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(2, 136, 209, 0.5);
}

.microchip-pet-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 9px 12px;
  position: relative;
  z-index: 2;
}

.strip-pet-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #38bdf8;
  background: #0a4369;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.strip-pet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip-pet-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.strip-pet-meta strong {
  font-size: 14.5px;
  color: #ffffff;
  line-height: 1.2;
}

.strip-pet-meta span {
  font-size: 12px;
  color: #bae6fd;
}

.microchip-code-readout {
  background: rgba(2, 18, 32, 0.68);
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.readout-label {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #7dd3fc;
  margin-bottom: 3px;
}

.readout-digits {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #ffffff;
}
@media (max-width: 900px) {
  .product-card-carnet,
  .product-card-appointment {
    flex-direction: column;
    align-items: stretch;
  }
  .product-card-carnet .product-copy-side,
  .product-card-appointment .product-copy-side {
    width: 100%;
    flex: none;
  }
  .product-card-carnet .product-preview-side:has(pet-carnet-3d) {
    flex: none;
    width: calc(100% + 40px);
    max-width: none;
    margin: -4px -20px 4px -20px;
  }
  .product-showcase-card.product-card-microchip {
    padding: 22px 20px;
  }
  .microchip-card-layout,
  .microchip-actions-grid {
    grid-template-columns: 1fr;
  }
}
@media print {
  pet-carnet-3d { display: none; }
}
