/* Modal cross-sell (collier / laisse / médaille) — aligné sur la version Next */

.crosssell-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: crossFadeIn 0.25s ease;
}

.crosssell-modal[hidden] {
  display: none !important;
}

.crosssell-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.crosssell-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: crossSlideIn 0.3s ease;
}

.crosssell-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
}

.crosssell-modal__head {
  background: linear-gradient(135deg, var(--primary-50, #f0f9ff) 0%, var(--primary-100, #e0f2fe) 100%);
  padding: 1.75rem 1.5rem 1.25rem;
  text-align: center;
}

.crosssell-modal__head h3 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.crosssell-modal__head p {
  margin: 0;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

.crosssell-modal__body {
  padding: 0 1.5rem;
}

.crosssell-modal__body--medaille {
  padding-top: 0;
}

.crosssell-modal__preview {
  padding: 1rem 0;
  display: flex;
  justify-content: center;
}

.crosssell-modal__preview-inner {
  width: 100%;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid #f3f4f6;
  background: #f9fafb;
  display: flex;
  justify-content: center;
  align-items: center;
}

.crosssell-modal__preview-inner img {
  width: 220px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

/* Nicer medal preview (epoxy) */
.crosssell-medal {
  position: relative;
  width: 220px;
  height: 180px;
  display: grid;
  place-items: center;
}

.crosssell-medal__base {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.16);
  border: 10px solid rgba(255,255,255,0.92);
  background-image: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.55), rgba(255,255,255,0) 45%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,0.10), rgba(0,0,0,0) 55%);
}

.crosssell-medal__hole {
  position: absolute;
  top: 26px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.18);
}

.crosssell-modal__leashes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 0 10px;
}

.crosssell-chip {
  border: 2px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
}

.crosssell-chip.is-active {
  border-color: var(--primary-500, #0ea5e9);
  color: var(--primary-700, #0369a1);
  background: var(--primary-50, #f0f9ff);
}

.crosssell-modal__colors {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-size: 0.8125rem;
  color: #6b7280;
  padding: 0 0 1rem;
}

.crosssell-modal__colors-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crosssell-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.crosssell-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 1.5rem 1.5rem;
}

.crosssell-modal__cta {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary-500, #0ea5e9) 0%, var(--primary-700, #0369a1) 100%);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.crosssell-modal__cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.crosssell-modal__cta-icon {
  flex-shrink: 0;
}

.crosssell-modal__ghost {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 500;
  font-size: 0.875rem;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
}

.crosssell-modal__loading {
  width: 220px;
  height: 180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crosssell-modal__loading[hidden] {
  display: none !important;
}

.crosssell-modal__spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary-500, #0ea5e9);
  animation: crossSellSpin 0.8s linear infinite;
}

/* Aperçu collier (masques) */
.crosssell-collar-wrap {
  position: relative;
  width: 220px;
  height: 150px;
  margin: 0 auto;
}

.crosssell-collar-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
}

/* Aperçu laisse (calques) */
.crosssell-leash-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.crosssell-leash-fallback {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.crosssell-leash-fallback img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.crosssell-leash-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.22;
}

@keyframes crossFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes crossSlideIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes crossSellSpin {
  to { transform: rotate(360deg); }
}
