/* ==========================================================================
   Shop detail page — glassmorphism dark theme
   ========================================================================== */

.sd-page {
  max-width: 1100px;
  animation: sdFadeIn .45s ease-out;
}
@keyframes sdFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Back link
   ============================================================ */
.sd-back {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all .25s ease;
}
.sd-back:hover {
  color: #00e3ff;
  background: rgba(0, 196, 255, 0.1);
  border-color: rgba(0, 196, 255, 0.35);
  transform: translateX(-4px);
}

/* ============================================================
   Main card
   ============================================================ */
.sd-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   Image column
   ============================================================ */
.sd-image-col {
  position: relative;
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(0, 196, 255, 0.08) 0%, transparent 70%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
@media (max-width: 991px) {
  .sd-image-col {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 28px;
  }
}

.sd-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.sd-badge-free {
  background: linear-gradient(135deg, #ff8f00, #ffd54f);
  color: #1a1a1a;
  box-shadow: 0 4px 14px rgba(255, 143, 0, 0.5);
  animation: sdBadgePulse 2s ease-in-out infinite;
}
@keyframes sdBadgePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.sd-image-frame {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  min-height: 280px;
}
.sd-image-img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform .4s ease;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}
.sd-image-img:hover {
  transform: scale(1.08);
}
.sd-image-hint {
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   Info column
   ============================================================ */
.sd-info-col {
  padding: 32px;
}
@media (max-width: 991px) {
  .sd-info-col { padding: 24px; }
}

.sd-title {
  margin: 0 0 18px 0;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(91deg, #eef85b 5%, #7aec8d 53%, #09e5c3 91%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sd-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.sd-price {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.sd-price img {
  width: 22px;
  height: 22px;
}
.sd-price--coin {
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.35);
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.12);
}
.sd-price--point {
  color: #00c722;
  border-color: rgba(0, 199, 34, 0.35);
  box-shadow: 0 4px 14px rgba(0, 199, 34, 0.12);
}

/* ============================================================
   Limit badges (login only)
   ============================================================ */
.sd-limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
@media (max-width: 575px) {
  .sd-limits { grid-template-columns: 1fr; }
}
.sd-limit-card {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all .25s ease;
}
.sd-limit-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}
.sd-limit-label i { color: #00c4ff; }
.sd-limit-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}
.sd-limit-value strong {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
}
.sd-limit-divider { color: rgba(255, 255, 255, 0.3); }
.sd-limit-card.is-full {
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.4);
}
.sd-limit-card.is-full strong { color: #ff7e88; }

/* ============================================================
   Description
   ============================================================ */
.sd-desc-wrap {
  margin-bottom: 22px;
}
.sd-desc-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.sd-desc-label i { color: #00c4ff; }
.sd-desc {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(0, 196, 255, 0.5);
  border-radius: 12px;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  line-height: 1.65;
  max-height: 280px;
  overflow-y: auto;
}
.sd-desc::-webkit-scrollbar { width: 6px; }
.sd-desc::-webkit-scrollbar-track { background: transparent; }
.sd-desc::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
.sd-desc .text-muted { color: rgba(255, 255, 255, 0.4); font-style: italic; }
.sd-desc a {
  color: #00e3ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 227, 255, 0.4);
  transition: color .2s, border-color .2s;
}
.sd-desc a:hover {
  color: #fff;
  border-bottom-color: #fff;
}
.sd-desc img {
  max-width: 100%;
  border-radius: 8px;
  margin: 6px 0;
}

/* ============================================================
   Actions (buy / gift / disabled)
   ============================================================ */
.sd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sd-btn {
  flex: 1;
  min-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3px;
  text-decoration: none;
  cursor: pointer;
  transition: all .25s ease;
  border: none;
}
.sd-btn i { font-size: 1rem; }

.sd-btn-primary {
  background: linear-gradient(135deg, #00b09b, #96c93d);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 176, 155, 0.4);
}
.sd-btn-primary:hover {
  background: linear-gradient(135deg, #00a38f, #8cbf3c);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 176, 155, 0.55);
}

.sd-btn-secondary {
  background: linear-gradient(135deg, #ff8f00, #ffd54f);
  color: #1a1a1a;
  box-shadow: 0 6px 18px rgba(255, 143, 0, 0.4);
}
.sd-btn-secondary:hover {
  background: linear-gradient(135deg, #ff7a00, #ffca28);
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(255, 143, 0, 0.55);
}

.sd-btn-disabled {
  background: rgba(255, 71, 87, 0.12);
  border: 1px solid rgba(255, 71, 87, 0.35);
  color: rgba(255, 126, 136, 0.9);
  cursor: not-allowed;
}
.sd-btn-disabled:hover {
  transform: none;
}

/* ============================================================
   Display modal polish
   ============================================================ */
#modalDisplayImage .modal-content {
  background: rgba(20, 20, 26, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 16px;
}
#modalDisplayImage .modal-header,
#modalDisplayImage .modal-footer {
  border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   Shop buy / gift modals (sd-modal)
   ============================================================ */

/* --- Entrance / exit animation (scale + bounce) --- */
.sd-modal.fade .modal-dialog {
  transform: scale(0.88) translateY(20px);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity   0.25s ease-out;
}
.sd-modal.show .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.sd-modal .modal-backdrop,
.modal-backdrop.show {
  transition: opacity 0.25s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .sd-modal.fade .modal-dialog {
    transition: opacity 0.15s linear;
    transform: none;
  }
}

.sd-modal .modal-content {
  background: linear-gradient(160deg, rgba(28, 28, 38, 0.96), rgba(18, 18, 24, 0.96));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.sd-modal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.02);
}
.sd-modal .modal-title {
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(91deg, #eef85b 5%, #7aec8d 53%, #09e5c3 91%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sd-modal .modal-title i {
  -webkit-text-fill-color: #00e3ff;
  margin-right: 4px;
}
.sd-modal .modal-body {
  padding: 22px;
}
.sd-modal .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 22px;
  background: rgba(0, 0, 0, 0.15);
}

.sd-modal-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
  line-height: 1.5;
}
.sd-modal-text b {
  color: #fff;
  background: rgba(0, 196, 255, 0.12);
  border: 1px solid rgba(0, 196, 255, 0.3);
  border-radius: 6px;
  padding: 1px 8px;
}
.sd-modal-warn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(255, 143, 0, 0.1);
  border: 1px solid rgba(255, 143, 0, 0.35);
  border-radius: 10px;
  color: #ffc875;
  font-size: 0.88rem;
}
.sd-modal-warn i {
  color: #ffb347;
  margin-top: 2px;
}
.sd-modal-section {
  margin: 18px 0 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

/* --- Payment selector --- */
.sd-pay-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sd-pay-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all .25s ease;
  user-select: none;
}
.sd-pay-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sd-pay-card img {
  width: 26px;
  height: 26px;
}
.sd-pay-card span {
  font-weight: 700;
  font-size: 0.95rem;
}
.sd-pay-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}
.sd-pay-card--coin.is-active {
  border-color: rgba(255, 193, 7, 0.65);
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.05));
  color: #ffc107;
  box-shadow: 0 6px 18px rgba(255, 193, 7, 0.18);
}
.sd-pay-card--point.is-active {
  border-color: rgba(0, 199, 34, 0.65);
  background: linear-gradient(135deg, rgba(0, 199, 34, 0.15), rgba(0, 199, 34, 0.05));
  color: #00e83f;
  box-shadow: 0 6px 18px rgba(0, 199, 34, 0.18);
}

/* --- Gift recipient input --- */
.sd-gift-field {
  margin-top: 14px;
}
.sd-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
}
.sd-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.sd-input:focus {
  outline: none;
  border-color: rgba(0, 196, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 196, 255, 0.18);
  background: rgba(0, 0, 0, 0.4);
}
.sd-input.is-invalid {
  border-color: rgba(255, 71, 87, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15);
}
.sd-input-error {
  margin-top: 6px;
  font-size: 0.82rem;
  color: #ff7e88;
}

/* --- Modal buttons --- */
.sd-btn-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all .2s ease;
}
.sd-btn-modal-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sd-btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.sd-btn-modal-confirm {
  background: linear-gradient(135deg, #00b09b, #96c93d);
  color: #fff;
  box-shadow: 0 5px 16px rgba(0, 176, 155, 0.35);
}
.sd-btn-modal-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 176, 155, 0.5);
}
.sd-btn-modal-gift {
  background: linear-gradient(135deg, #ff8f00, #ffd54f);
  color: #1a1a1a;
  box-shadow: 0 5px 16px rgba(255, 143, 0, 0.35);
}
.sd-btn-modal-gift:hover {
  box-shadow: 0 8px 22px rgba(255, 143, 0, 0.5);
}
.sd-btn-modal:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* --- Processing modal --- */
.sd-modal-processing {
  background: rgba(20, 20, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.sd-modal-processing p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}
.sd-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #09e5c3;
  animation: sdSpin 0.9s linear infinite;
}
@keyframes sdSpin {
  to { transform: rotate(360deg); }
}

/* ── Sale ── */
.sd-badge-sale {
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  color: #fff; font-weight: 700;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(201, 24, 74, 0.45);
}
.sd-price-old { text-decoration: line-through; opacity: 0.55; margin-right: 8px; font-weight: 500; }
.sd-price-new { color: #ff4d6d; font-weight: 800; }
.sd-sale-until {
  display: inline-flex; align-items: center;
  margin-left: 10px; padding: 4px 10px;
  background: rgba(255, 77, 109, 0.12);
  color: #ff8da1; font-size: 0.85rem; border-radius: 8px;
}
