:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  --accent: #10b981;
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-card-sub: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --border-focus: #818cf8;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background-color: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text strong {
  color: var(--primary);
}

.nav-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Hero */
.hero {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.container {
  max-width: 1150px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Main Checkout Layout */
.main-content {
  padding: 1rem 1.5rem 4rem;
  flex: 1;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.section-card {
  margin-bottom: 2rem;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-badge {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Product List */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.product-item.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.product-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-emoji {
  font-size: 2rem;
  background: var(--bg-card-sub);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-title {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

.product-price {
  color: #a5b4fc;
  font-size: 0.9rem;
  font-weight: 600;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card-sub);
  border-radius: 9999px;
  padding: 0.25rem 0.5rem;
}

.qty-btn {
  background: none;
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--primary);
}

.qty-value {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  font-size: 0.95rem;
}

/* Form */
.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #cbd5e1;
}

.req {
  color: #f43f5e;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Radio Cards */
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .payment-options {
    grid-template-columns: 1fr;
  }
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.radio-card input {
  accent-color: var(--primary);
}

.radio-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.radio-label {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1.1rem;
  font-size: 1.05rem;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* Order Summary Column */
.summary-column {
  position: sticky;
  top: 5.5rem;
}

.summary-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #fff;
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.summary-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.total-line {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.grand-total {
  color: #38bdf8;
}

.security-badge {
  margin-top: 1.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  text-align: center;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 2.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.modal-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.email-highlight {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.order-meta-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.meta-row span {
  color: var(--text-muted);
}

.status-success {
  color: var(--accent);
}

.close-modal-btn {
  width: 100%;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}
