/* ============================================================
   Razorpay Digital Store — Frontend Styles
   Lightweight, mobile-first, no framework dependencies
   ============================================================ */

/* ── Reset / Base ─────────────────────────────────────────── */
.rds-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
}

/* ── Product Page ─────────────────────────────────────────── */
.rds-product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 768px) {
  .rds-product-page { grid-template-columns: 1fr; gap: 24px; }
}

/* Featured Image */
.rds-product-image { position: relative; }
.rds-featured-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
}

/* Category badge */
.rds-product-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rds-cat-badge {
  display: inline-block;
  background: #f0edff;
  color: #6c63ff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.rds-cat-badge:hover { background: #6c63ff; color: #fff; }

/* Title */
.rds-product-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.2;
  color: #1a1a2e;
}

/* Price */
.rds-product-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rds-price { font-size: 28px; font-weight: 800; color: #6c63ff; }
.rds-price-regular del { font-size: 18px; color: #9ca3af; font-weight: 400; }
.rds-price-sale { font-size: 28px; font-weight: 800; color: #6c63ff; }
.rds-sale-badge {
  background: #fee2e2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

/* SKU */
.rds-sku { font-size: 13px; color: #9ca3af; margin: 0 0 12px; }
.rds-sku span { color: #6b7280; }

/* Excerpt */
.rds-product-excerpt { color: #4b5563; margin-bottom: 20px; font-size: 15px; }

/* Digital badge */
.rds-digital-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ── Buy Section ──────────────────────────────────────────── */
.rds-buy-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
}

.rds-customer-form { margin-bottom: 20px; }

.rds-form-row { margin-bottom: 16px; }
.rds-form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.rds-req { color: #ef4444; }

.rds-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #1a1a2e;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.rds-input:focus {
  outline: none;
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}

/* Coupon row */
.rds-coupon-input-group { display: flex; gap: 8px; }
.rds-coupon-input-group .rds-input { flex: 1; }
.rds-btn-secondary {
  padding: 10px 18px;
  background: #fff;
  border: 1.5px solid #6c63ff;
  color: #6c63ff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.rds-btn-secondary:hover { background: #6c63ff; color: #fff; }

.rds-coupon-msg {
  font-size: 13px;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 6px;
}
.rds-coupon-msg.rds-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.rds-coupon-msg.rds-error   { background: #fff1f2; color: #dc2626; border: 1px solid #fecaca; }

/* Price Summary */
.rds-price-summary {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.rds-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: #4b5563;
}
.rds-total-row {
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 16px;
  color: #1a1a2e;
}
.rds-green { color: #16a34a; }

/* Buy Button */
.rds-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #6c63ff 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .3px;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 4px 16px rgba(108,99,255,.35);
}
.rds-buy-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108,99,255,.45);
}
.rds-buy-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* Secure note */
.rds-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 12px;
}

/* Message */
.rds-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.rds-msg.rds-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.rds-msg.rds-error   { background: #fff1f2; color: #dc2626; border: 1px solid #fecaca; }
.rds-msg.rds-info    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* Product Description */
.rds-product-description { margin-top: 48px; }
.rds-product-description h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}
.rds-product-content { color: #374151; font-size: 15px; line-height: 1.8; }
.rds-product-content img { max-width: 100%; border-radius: 8px; }

/* ── Shop / Archive Grid ──────────────────────────────────── */
.rds-archive-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 32px;
}
.rds-shop-grid {
  display: grid;
  gap: 24px;
}
.rds-grid-1 { grid-template-columns: 1fr; }
.rds-grid-2 { grid-template-columns: repeat(2, 1fr); }
.rds-grid-3 { grid-template-columns: repeat(3, 1fr); }
.rds-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .rds-grid-3,
  .rds-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .rds-grid-2,
  .rds-grid-3,
  .rds-grid-4 { grid-template-columns: 1fr; }
}

/* ── Product Card ─────────────────────────────────────────── */
.rds-product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.rds-product-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
  transform: translateY(-3px);
}

.rds-card-link { display: block; text-decoration: none; }
.rds-card-image { position: relative; overflow: hidden; aspect-ratio: 4/3; background: #f3f4f6; }
.rds-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.rds-product-card:hover .rds-card-image img { transform: scale(1.04); }

.rds-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
}

.rds-card-sale-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.rds-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }

.rds-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}
.rds-card-title a { color: #1a1a2e; text-decoration: none; }
.rds-card-title a:hover { color: #6c63ff; }

.rds-card-excerpt { font-size: 13px; color: #6b7280; margin: 0 0 16px; flex: 1; }

.rds-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.rds-card-price-main,
.rds-card-price-new { font-size: 18px; font-weight: 800; color: #6c63ff; }
.rds-card-price-old { font-size: 13px; color: #9ca3af; display: block; }

.rds-card-btn {
  display: inline-block;
  padding: 9px 18px;
  background: #6c63ff;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.rds-card-btn:hover { background: #4f46e5; transform: translateY(-1px); color: #fff; }

/* ── Pagination ───────────────────────────────────────────── */
.rds-pagination { margin-top: 40px; text-align: center; }
.rds-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 2px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.rds-pagination .page-numbers.current,
.rds-pagination .page-numbers:hover { background: #6c63ff; color: #fff; border-color: #6c63ff; }
.rds-no-products { color: #6b7280; font-size: 15px; text-align: center; padding: 40px 0; }

/* ── Thank You Page ───────────────────────────────────────── */
.rds-thankyou-wrap {
  max-width: 560px;
  margin: 48px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.rds-thankyou-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
}
.rds-thankyou-icon { color: #16a34a; margin-bottom: 20px; }
.rds-thankyou-icon svg { width: 64px; height: 64px; }
.rds-thankyou-title { font-size: 26px; font-weight: 800; margin: 0 0 10px; color: #1a1a2e; }
.rds-thankyou-sub { font-size: 16px; color: #4b5563; margin: 0 0 28px; }

.rds-order-details {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
  text-align: left;
}
.rds-order-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #4b5563;
  border-bottom: 1px solid #e5e7eb;
}
.rds-order-detail-row:last-child { border-bottom: none; }
.rds-order-detail-row strong { color: #1a1a2e; }

.rds-download-section {
  background: linear-gradient(135deg, #f0edff, #e8f4ff);
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.rds-download-section p { font-size: 14px; color: #4b5563; margin: 0 0 16px; }

.rds-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #6c63ff, #4f46e5);
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(108,99,255,.35);
  transition: transform .15s, box-shadow .15s;
}
.rds-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108,99,255,.4);
  color: #fff;
}

.rds-expiry-note { font-size: 12px; color: #6b7280; margin: 12px 0 0; }

.rds-back-link {
  display: inline-block;
  margin-top: 20px;
  color: #6b7280;
  font-size: 14px;
  text-decoration: none;
  transition: color .15s;
}
.rds-back-link:hover { color: #6c63ff; }

/* ── My Downloads Page ─────────────────────────────── */
.rds-my-downloads-wrap { max-width:900px; margin:0 auto; padding:2rem 1rem; }

.rds-lookup-form-wrap {
  max-width:460px; margin:2rem auto; padding:2rem;
  background:#fff; border-radius:12px; box-shadow:0 4px 20px rgba(0,0,0,.08);
  text-align:center;
}
.rds-lookup-form-wrap h2 { margin:0 0 .5rem; color:#1a1a2e; }
.rds-lookup-form { text-align:left; margin-top:1.5rem; }

.rds-downloads-table {
  width:100%; border-collapse:collapse; background:#fff;
  border-radius:10px; overflow:hidden; box-shadow:0 2px 10px rgba(0,0,0,.07);
}
.rds-downloads-table th {
  background:#f9f9fb; padding:12px 16px; font-size:.82rem;
  text-transform:uppercase; letter-spacing:.04em; color:#888;
  text-align:left; border-bottom:2px solid #eee;
}
.rds-downloads-table td { padding:14px 16px; border-bottom:1px solid #f0f0f0; vertical-align:middle; font-size:.95rem; }
.rds-downloads-table tr:last-child td { border-bottom:none; }
.rds-downloads-table tr:hover td { background:#fafafa; }

.rds-dl-btn {
  display:inline-block; background:#6c63ff; color:#fff;
  padding:6px 14px; border-radius:6px; font-size:.85rem;
  font-weight:600; text-decoration:none; transition:background .2s;
}
.rds-dl-btn:hover { background:#5a52e0; color:#fff; }

.rds-no-downloads { text-align:center; padding:3rem; background:#fff; border-radius:12px; }
