/* ======================================
   MODAL BACKDROP
====================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-backdrop.active {
  display: flex;
}

/* ======================================
   MODAL CARD
====================================== */
.modal-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  width: 100%;
  max-width: 520px;
  border-radius: 22px;
  padding: 28px;

  box-shadow:
    0 30px 60px rgba(0,0,0,.25),
    inset 0 0 0 1px rgba(231,70,70,.08);

  animation: popup .35s ease;
}

@keyframes popup {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======================================
   HEADER
====================================== */
.modal-header-summary h2 {
  color: var(--red-text);
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 800;
}

.modal-header-summary p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ======================================
   USER INFO
====================================== */
.modal-info {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 14px;

  background: linear-gradient(180deg, #ffffff, #fafafa);
  padding: 16px;
  border-radius: 14px;

  box-shadow:
    0 10px 24px rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(0,0,0,.04);
}

.modal-info small {
  font-size: 12px;
  color: var(--gray-600);
}

/* ======================================
   COMPARE GRID
====================================== */
.compare {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 14px;
}

/* ======================================
   PRICE CARD
====================================== */
.price-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f9fafb);
  border-radius: 20px;
  border: 1.8px solid rgba(231,70,70,.45);
  padding: 20px;
  cursor: pointer;

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;
}

.price-card:hover {
  transform: translateY(-4px);
  border-color: var(--red-secondary);
  box-shadow:
    0 18px 36px rgba(231,70,70,.25),
    0 8px 14px rgba(0,0,0,.08);
}

/* subtle glare */
.price-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(231,70,70,.15),
    transparent
  );
  opacity: 0;
  transition: opacity .3s ease;
}

.price-card:hover::after {
  opacity: 1;
}

/* ======================================
   BADGE
====================================== */
.badge {
  position: absolute;
  top: -12px;
  left: 16px;
  background: linear-gradient(135deg, var(--red-secondary), #ff7a7a);
  color: #fff;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(231,70,70,.35);
}

/* ======================================
   PRICE
====================================== */
.price {
  margin: 10px 0 6px;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.price .currency {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  line-height: 1;
}

.price .amount {
  font-weight: 800;
  line-height: 1.15;
  font-size: clamp(18px, 4.8vw, 26px);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ======================================
   FOOTER BUTTON
====================================== */
.btn-close {
  margin-top: 24px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;

  background: linear-gradient(180deg, #ffffff, #f9fafb);
  font-weight: 700;
  cursor: pointer;

  box-shadow:
    0 10px 20px rgba(0,0,0,.1),
    inset 0 0 0 1px rgba(0,0,0,.05);
}

.btn-close:hover {
  background: #fff;
}

/* ======================================
   SINGLE CARD MODE
====================================== */
.compare.single {
  grid-template-columns: 1fr;
}

/* ======================================
   MOBILE
====================================== */
@media (max-width: 420px) {
  .modal-card {
    margin: 0 10px;
    padding: 22px;
  }

  .price-card {
    padding: 16px;
  }

  .price .amount {
    font-size: clamp(17px, 4.5vw, 24px);
  }
}
