/* ===============================
   Popup Card
   =============================== */
.wcsp-popup {
  position: fixed;
  bottom: 20px;
  left: 20px;

  background: #ffffff;
  padding: 10px;
  display: flex;
  gap: 10px;

  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);

  z-index: 9999;
  font-size: 13px;
  color: #222;

  cursor: pointer;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;

  max-width: 320px;
}

/* Hover affordance */
.wcsp-popup:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.18);
}

/* Fade in */
.wcsp-popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* Fade out */
.wcsp-popup.hide {
  opacity: 0;
  transform: translateY(10px);
}

/* ===============================
   Product Image (PERFORMANCE FIX)
   =============================== */
.wcsp-popup img {
  width: 48px;
  height: 48px;

  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;

  background: #f2f2f2;     /* placeholder */
  opacity: 0;              /* fade-in */
  transition: opacity .25s ease;
}

/* ===============================
   Text spacing
   =============================== */
.wcsp-popup strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.25;
}

.wcsp-popup div {
  line-height: 1.35;
}

.wcsp-popup small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #777;
}

/* ===============================
   Close Button (outside card)
   =============================== */
.wcsp-close {
  position: absolute;
  top: -10px;
  right: -10px;

  width: 22px;
  height: 22px;
  line-height: 22px;

  text-align: center;
  cursor: pointer;

  font-size: 14px;
  font-weight: bold;

  color: #444;
  background: #ffffff;

  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);

  transition:
    background .2s ease,
    color .2s ease,
    transform .15s ease;
}

.wcsp-close:hover {
  background: #f0f0f0;
  color: #000;
  transform: scale(1.1);
}

/* ===============================
   Mobile safety
   =============================== */
@media (max-width: 600px) {
  .wcsp-popup {
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .wcsp-close {
    top: -12px;
    right: -6px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    font-size: 16px;
  }
}
