/* ============================================================
   GSP Silver Packages — کارت‌های بسته‌ی آماده + مودال افزودن به سبد
   ============================================================ */
.gsp-packages {
  --gsp-accent: #386af6;
  --gsp-accent-dark: #2557e0;
  font-family: YekanBakh, Vazirmatn, sans-serif;
  direction: rtl;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .gsp-packages { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* موبایل: دو ستونه و جمع‌تر */
@media (max-width: 560px) {
  .gsp-packages { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gsp-pkg-card {
    padding: 16px 12px;
    gap: 14px;
    border-radius: 12px;
  }
  .gsp-pkg-title { font-size: 17px; }
  .gsp-pkg-desc { font-size: 11px; line-height: 1.6; min-height: 0; }
  .gsp-pkg-btn { font-size: 13px; padding: 10px 8px; }
}

.gsp-pkg-card {
  background: linear-gradient(180deg, rgb(255 255 255 / 87%) 0%, rgba(255, 255, 255, 0) 100%), rgb(201 204 209 / 50%);
  border: 2px solid rgb(255 255 255 / 84%);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-sizing: border-box;
  -webkit-backdrop-filter: blur(70px);
  backdrop-filter: blur(70px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gsp-pkg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(56, 106, 246, 0.12);
}

.gsp-pkg-title {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  color: #1a1f2e;
}

.gsp-pkg-desc {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.7;
  min-height: 22px;
}

/* ─── دکمه قیمت ─── */
.gsp-pkg-btn {
  width: 100%;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--gsp-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  padding: 12px 12px;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
}

.gsp-pkg-btn:hover:not(:disabled) {
  background: var(--gsp-accent-dark);
  box-shadow: 0 6px 18px rgba(56, 106, 246, 0.35);
}
.gsp-pkg-btn:active:not(:disabled) { transform: translateY(1px); }
.gsp-pkg-btn:disabled { opacity: 0.6; cursor: progress; }

.gsp-pkg-price { font-variant-numeric: tabular-nums; }

/* ============================================================
   مودال «افزوده شد»
   ============================================================ */
.gsp-pkg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: YekanBakh, Vazirmatn, sans-serif;
  direction: rtl;
  animation: gsp-pkg-fade 0.2s ease;
}
.gsp-pkg-modal-overlay[hidden] { display: none !important; }

@keyframes gsp-pkg-fade { from { opacity: 0; } to { opacity: 1; } }

.gsp-pkg-modal {
  background: #fff;
  color: #1a1a2e;
  border-radius: 20px;
  padding: 34px 30px 26px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  animation: gsp-pkg-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

@keyframes gsp-pkg-pop {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.gsp-pkg-modal-icon { margin-bottom: 10px; }

.gsp-pkg-modal-title {
  font-size: 19px;
  font-weight: 800;
  color: #2ecc8f;
  margin: 0 0 16px;
}

.gsp-pkg-modal-summary {
  font-size: 14px;
  line-height: 1.9;
  color: #374151;
  margin: 0 0 18px;
}

.gsp-pkg-modal-details {
  border-top: 1.5px solid #f1f3f9;
  border-bottom: 1.5px solid #f1f3f9;
  padding: 6px 0;
  margin-bottom: 16px;
  text-align: right;
}
.gsp-pkg-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 2px;
}
.gsp-pkg-detail-row + .gsp-pkg-detail-row { border-top: 1px solid #f1f3f9; }
.gsp-pkg-detail-label { font-size: 14px; color: #6b7280; }
.gsp-pkg-detail-value { font-size: 15px; font-weight: 700; color: #0f172a; }

.gsp-pkg-modal-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fffbf0;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  text-align: right;
}
.gsp-pkg-modal-warning p {
  font-size: 13px;
  line-height: 1.7;
  color: #78350f;
  margin: 0;
}

.gsp-pkg-modal-actions {
  display: flex;
  gap: 12px;
}
.gsp-pkg-btn-cart,
.gsp-pkg-btn-continue {
  flex: 1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.gsp-pkg-btn-cart {
  background: var(--gsp-accent);
  color: #fff;
  border: none;
}
.gsp-pkg-btn-cart:hover { background: var(--gsp-accent-dark); }
.gsp-pkg-btn-continue {
  background: #fff;
  color: #374151;
  border: 1.5px solid #d9dde4;
}
.gsp-pkg-btn-continue:hover { background: #f3f4f6; }

/* ─── مودال خطا ─── */
.gsp-pkg-error-modal { padding: 38px 30px 30px; }
.gsp-pkg-error-icon { margin-bottom: 22px; }
.gsp-pkg-error-icon img {
  width: 150px;
  height: auto;
  display: inline-block;
}
.gsp-pkg-error-title {
  font-size: 21px;
  font-weight: 800;
  color: #ef4444;
  margin: 0 0 26px;
  line-height: 1.6;
}
.gsp-pkg-error-actions {
  display: flex;
  justify-content: center;
}
.gsp-pkg-btn-back {
  min-width: 180px;
  background: var(--gsp-accent, #3457f5);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 24px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.gsp-pkg-btn-back:hover { background: var(--gsp-accent-dark, #2745d8); }
