.template-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding: 40px 0;
  align-items: start;
}

.details-left {
  min-width: 0;
}

.description {
  line-height: 1.7;
}

.details-right {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* ✅ LIGHT THEME (default) */
.purchase-card {
  position: static;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  color: #111827;
}

/* ✅ DARK THEME */
[data-theme="dark"] .purchase-card,
.dark .purchase-card,
body.dark-mode .purchase-card {
  background: #10152a;
  border: 1px solid rgba(104,120,255,0.2);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  color: #ffffff;
}

.purchase-card h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

[data-theme="dark"] .purchase-card h2 small,
.dark .purchase-card h2 small,
body.dark-mode .purchase-card h2 small {
  color: rgba(255,255,255,0.35);
}

.purchase-card h2 small {
  color: rgba(0,0,0,0.4);
}

.main-preview {
  width: 100%;
  border-radius: 8px;
  display: block;
  margin-bottom: 16px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.buy-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.buy-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.preview-btn {
  display: block;
  text-align: center;
  padding: 12px;
  border: 2px solid #16a34a;
  border-radius: 8px;
  text-decoration: none;
  color: #16a34a;
  transition: background 0.2s;
}

.preview-btn:hover {
  background: rgba(22,163,74,0.1);
}

/* ✅ HR */
.purchase-card hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}

[data-theme="dark"] .purchase-card hr,
.dark .purchase-card hr,
body.dark-mode .purchase-card hr {
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ✅ META */
.meta {
  margin-top: 15px;
  padding-left: 18px;
  line-height: 2;
  font-size: 14px;
  color: #374151;
}

[data-theme="dark"] .meta,
.dark .meta,
body.dark-mode .meta {
  color: rgba(255,255,255,0.7);
}

/* YOUTUBE VIDEO */
#tplVideo {
  margin-top: 16px;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

/* MOBILE */
@media (max-width: 900px) {
  .template-details {
    grid-template-columns: 1fr;
  }
  .details-right {
    position: static;
  }
}


/* =====================================================
   LOGIN PROMPT MODAL
===================================================== */
.login-prompt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.login-prompt-box {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popIn 0.25s ease;
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.login-prompt-box .prompt-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.login-prompt-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary, #111);
}

.login-prompt-box p {
  font-size: 14px;
  color: var(--text-muted, #666);
  margin-bottom: 24px;
  line-height: 1.6;
}

.login-prompt-box .prompt-btns {
  display: flex;
  gap: 10px;
}

.login-prompt-box .btn-login {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.login-prompt-box .btn-login:hover {
  opacity: 0.9;
}

.login-prompt-box .btn-cancel {
  flex: 1;
  padding: 12px;
  background: transparent;
  color: var(--text-muted, #666);
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.login-prompt-box .btn-cancel:hover {
  background: rgba(0,0,0,0.05);
}

/* ✅ Custom Design & Deploy Buttons */
.custom-design-btn,
.deployed-btn {
   display: block;
   width: 100%;
   padding: 12px;
   border-radius: 8px;
   font-size: 15px;
   font-weight: 600;
   cursor: pointer;
   border: none;
   margin-top: 10px;
   transition: opacity 0.2s ease, transform 0.1s ease;
}

.custom-design-btn:hover,
.deployed-btn:hover {
   opacity: 0.88;
   transform: translateY(-1px);
}

.custom-design-btn {
   background-color: #6c47ff;
   color: #fff;
}

.deployed-btn {
   background-color: #0ea76a;
   color: #fff;
}
/* =====================================================
   PREMIUM DEPLOY MODAL
===================================================== */

.modal-overlay{
   display:none;
   position:fixed;
   inset:0;
   background:rgba(0,0,0,0.65);
   backdrop-filter:blur(6px);
   z-index:9999;
   align-items:center;
   justify-content:center;
   padding:20px;
}

/* MODAL CARD */
.modal-box{
   background:#ffffff;
   border-radius:16px;
   padding:40px 10px;
   max-width:540px;
   width:100%;
   position:relative;
   max-height:85vh;
   overflow-y:auto;
   box-shadow:0 25px 80px rgba(0,0,0,.35);
   animation:modalPop .25s ease;
}

/* DARK MODE */
[data-theme="dark"] .modal-box,
.dark .modal-box,
body.dark-mode .modal-box{
   background:#10152a;
   border:1px solid rgba(104,120,255,0.2);
   color:#e5e7eb;
}

/* ANIMATION */
@keyframes modalPop{
   from{
      transform:translateY(20px) scale(.95);
      opacity:0;
   }
   to{
      transform:translateY(0) scale(1);
      opacity:1;
   }
}

/* CLOSE BUTTON */
.modal-close{
   position:absolute;
   top:14px;
   right:16px;
   background:none;
   border:none;
   font-size:22px;
   cursor:pointer;
   color:#6b7280;
   transition:.2s;
}

.modal-close:hover{
   color:#111827;
}

[data-theme="dark"] .modal-close{
   color:#9ca3af;
}

/* TITLE */
.modal-box h2{
   font-size:24px;
   font-weight:700;
   margin-bottom:18px;
}

/* CONTENT TEXT */
.modal-content{
   line-height:1.7;
   font-size:15px;
}

/* FEATURE LIST */
.modal-content ul{
   margin:18px 0;
   padding-left:18px;
}

.modal-content li{
   margin-bottom:10px;
}

/* HIGHLIGHT BOX */
.deploy-highlight{
   background:rgba(16,185,129,0.08);
   border-left:4px solid #16a34a;
   padding:12px 14px;
   border-radius:8px;
   margin:18px 0;
   font-weight:500;
}

[data-theme="dark"] .deploy-highlight{
   background:rgba(22,163,74,0.15);
}

/* WHATSAPP */
.deploy-contact{
   margin-top:15px;
   font-weight:600;
}

/* SCROLLBAR CLEAN */
.modal-box::-webkit-scrollbar{
   width:6px;
}

.modal-box::-webkit-scrollbar-thumb{
   background:rgba(0,0,0,.2);
   border-radius:10px;
}

.warning{
  margin:18px 0;
  padding:12px 15px;
  border-radius:8px;
  background:rgba(255,0,0,0.08);
  border-left:4px solid #ef4444;
  color:#dc2626;
  font-weight:700;
}