/* ==========================================================================
   MR. GADIWALA - CHECKOUT & INVOICE CLAYMORPHIC STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Mukta:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Refined Cool Automotive Luxury Palette */
  --clay-brand: #2563EB;
  --clay-brand-light: #EFF6FF;
  --clay-brand-shadow: rgba(37, 99, 235, 0.22);

  --clay-orange: #2563EB;
  --clay-orange-light: #EFF6FF;
  --clay-orange-shadow: rgba(37, 99, 235, 0.22);

  --clay-yellow: #F59E0B;
  --clay-yellow-light: #FEF3C7;
  --clay-blue: #0284C7;
  --clay-blue-light: #E0F2FE;
  --clay-green: #10B981;
  --clay-green-light: #D1FAE5;
  --clay-purple: #8B5CF6;
  --clay-pink: #F43F5E;

  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-secondary: #F1F5F9;

  --text-main: #0F172A;
  --text-muted: #475569;

  --clay-shadow-sm: 4px 6px 16px rgba(15, 23, 42, 0.05), 
                    -3px -3px 12px rgba(255, 255, 255, 0.95), 
                    inset 1px 1px 2px rgba(255, 255, 255, 0.8), 
                    inset -1px -1px 2px rgba(15, 23, 42, 0.03);

  --clay-shadow-md: 8px 14px 26px rgba(15, 23, 42, 0.07), 
                    -6px -6px 18px rgba(255, 255, 255, 0.95), 
                    inset 2px 2px 4px rgba(255, 255, 255, 0.8), 
                    inset -2px -2px 4px rgba(15, 23, 42, 0.04);

  --clay-shadow-lg: 14px 22px 38px rgba(15, 23, 42, 0.09), 
                    -8px -8px 24px rgba(255, 255, 255, 0.95), 
                    inset 3px 3px 6px rgba(255, 255, 255, 0.85), 
                    inset -3px -3px 6px rgba(15, 23, 42, 0.05);

  --clay-btn-orange: 6px 8px 18px rgba(37, 99, 235, 0.28),
                     inset 1px 1px 2px rgba(255, 255, 255, 0.4),
                     inset -1px -1px 2px rgba(0, 0, 0, 0.1);

  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-xl: 40px;
  --radius-pill: 9999px;

  --font-main: 'Mukta', 'Fredoka', sans-serif;
  --font-display: 'Fredoka', 'Mukta', sans-serif;
}

[data-theme="dark"] {
  --bg-body: #0E131F;
  --bg-surface: #171E2E;
  --bg-surface-secondary: #1F293D;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;

  --clay-shadow-sm: 6px 8px 18px rgba(0, 0, 0, 0.45), inset 2px 2px 4px rgba(255, 255, 255, 0.08);
  --clay-shadow-md: 12px 16px 32px rgba(0, 0, 0, 0.6), inset 3px 3px 6px rgba(255, 255, 255, 0.1);
  --clay-shadow-lg: 18px 24px 44px rgba(0, 0, 0, 0.7), inset 4px 4px 8px rgba(255, 255, 255, 0.12);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  font-weight: 500;
  padding-bottom: 60px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Announcement Strip */
.checkout-topbar {
  background: linear-gradient(90deg, #1E293B 0%, #0F172A 100%);
  color: #F8FAFC;
  font-size: 0.86rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.topbar-security-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #CBD5E1;
  font-size: 0.84rem;
  font-weight: 600;
}
.topbar-security-tag svg {
  color: var(--clay-brand);
}

/* Back to Home Button (Positioned Under Navbar Section at Top Left) */
.back-home-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 22px;
  margin-top: -6px;
}
.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--clay-brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--clay-shadow-sm);
  border: 1.5px solid rgba(37, 99, 235, 0.2);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}
.back-home-btn:hover {
  background: var(--clay-brand);
  color: #FFFFFF;
  transform: translateX(-4px);
  box-shadow: var(--clay-btn-brand);
  border-color: var(--clay-brand);
}
.back-home-btn svg {
  transition: transform 0.2s ease;
}
.back-home-btn:hover svg {
  transform: translateX(-3px);
}

/* Header */
.checkout-header {
  background: var(--bg-surface);
  box-shadow: var(--clay-shadow-sm);
  padding: 14px 0;
  margin-bottom: 30px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid rgba(15, 23, 42, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checkout-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}
.checkout-brand-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}
.checkout-brand-info {
  display: flex;
  flex-direction: column;
}
.checkout-brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
}
.checkout-brand-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clay-orange);
}
.checkout-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-secondary);
  box-shadow: var(--clay-shadow-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--clay-orange);
  transition: all 0.2s;
  text-decoration: none;
}
.checkout-support-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--clay-shadow-md);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-secondary);
  box-shadow: var(--clay-shadow-sm);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s;
}
.back-btn:hover {
  transform: translateX(-3px);
  color: var(--clay-orange);
}

/* Clay Cards */
.clay-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--clay-shadow-md);
  border: 4px solid #FFF;
  padding: 28px;
  margin-bottom: 28px;
}
[data-theme="dark"] .clay-card {
  border-color: rgba(255, 255, 255, 0.08);
}

.card-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--clay-orange);
  color: #FFF;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--clay-btn-orange);
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Step 1 GPS */
.gps-box {
  background: var(--clay-blue-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-detect-gps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--clay-blue);
  color: #FFF;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: 0 6px 18px var(--clay-blue-shadow);
  transition: all 0.2s;
}
.btn-detect-gps:hover {
  transform: translateY(-2px) scale(1.02);
}
.gps-result-badge {
  display: none;
  background: var(--clay-green-light);
  color: #065F46;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-weight: 700;
  margin-top: 14px;
}

/* Vehicle Configuration Grid */
.product-preview-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
}
.product-preview-img-box {
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  height: 240px;
  overflow: hidden;
  box-shadow: var(--clay-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-preview-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Select, Inputs */
.clay-select, .clay-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-secondary);
  box-shadow: var(--clay-shadow-sm);
  border: 2px solid transparent;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.clay-select:focus, .clay-input:focus {
  border-color: var(--clay-orange);
  background: #FFF;
}

/* Color Chips */
.color-chips-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.color-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-secondary);
  box-shadow: var(--clay-shadow-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.color-chip.active {
  border-color: var(--clay-orange);
  background: var(--clay-orange-light);
  color: var(--clay-orange);
}

/* Pricing Breakdown Table */
.price-breakdown-card {
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--clay-shadow-sm);
  padding: 22px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  font-size: 0.95rem;
}
.price-row-total {
  border-bottom: none;
  border-top: 2px solid var(--clay-orange);
  margin-top: 8px;
  padding-top: 14px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--clay-orange);
}

/* Payment Mode Radios */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.payment-option-card {
  background: var(--bg-surface-secondary);
  box-shadow: var(--clay-shadow-sm);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}
.payment-option-card.active {
  border-color: var(--clay-green);
  background: var(--clay-green-light);
}

/* Submit Button */
.btn-pay-complete {
  width: 100%;
  padding: 18px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFF;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  margin-top: 24px;
}
.btn-pay-complete:hover {
  transform: translateY(-2px) scale(1.02);
}

/* ==========================================================================
   OFFICIAL TAX INVOICE RECEIPT COMPONENT
   ========================================================================== */
.receipt-section {
  display: none;
  margin-top: 40px;
}
.receipt-section.active {
  display: block;
}
.tax-invoice-paper {
  background: #FFF;
  color: #0F172A;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-lg);
  box-shadow: var(--clay-shadow-lg);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.invoice-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0F172A;
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.invoice-brand-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0F172A;
}
.paid-stamp {
  border: 3px solid #10B981;
  color: #10B981;
  padding: 6px 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  border-radius: 8px;
  transform: rotate(-6deg);
}

.invoice-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  font-size: 0.92rem;
}
.invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.invoice-table th {
  background: #F1F5F9;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid #CBD5E1;
}
.invoice-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #E2E8F0;
}
.invoice-footer-auth {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #E2E8F0;
}

.btn-download-receipt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--clay-orange);
  color: #FFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--clay-btn-orange);
  cursor: pointer;
  margin: 24px auto 0;
  transition: all 0.2s;
}
.btn-download-receipt:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   5-STAR REVIEW POPUP MODAL
   ========================================================================== */
.review-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.review-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.review-modal-card {
  background: var(--bg-surface);
  box-shadow: var(--clay-shadow-lg);
  border: 6px solid #FFF;
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 36px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.review-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface-secondary);
  box-shadow: var(--clay-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.stars-rating-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 2.2rem;
  color: #CBD5E1;
  cursor: pointer;
  margin: 8px 0;
}
.stars-rating-row span {
  transition: transform 0.2s, color 0.2s;
}
.stars-rating-row span.hovered, .stars-rating-row span.active {
  color: #FFB703;
  transform: scale(1.15);
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  .receipt-section, .receipt-section * {
    visibility: visible;
  }
  .receipt-section {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
  }
  .btn-download-receipt, .review-modal-overlay {
    display: none !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .product-preview-grid {
    grid-template-columns: 1fr;
  }
  .tax-invoice-paper {
    padding: 24px 16px;
  }
  .invoice-details-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-security-tag {
    font-size: 0.76rem;
    gap: 5px;
  }
  .topbar-inner {
    justify-content: center;
  }
  .checkout-header {
    padding: 10px 0;
    margin-bottom: 20px;
  }
  .checkout-brand-img {
    height: 38px;
  }
  .checkout-brand-title {
    font-size: 1.05rem;
  }
  .checkout-brand-tag {
    font-size: 0.68rem;
  }
  .checkout-support-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

