/* CrossBorder Motors - Global Car Dealership */
:root {
  --primary: #1a365d;
  --primary-light: #2c5282;
  --secondary: #ed8936;
  --secondary-dark: #dd6b20;
  --success: #38a169;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #f7fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
header {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.logo svg {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
}

.logo-tagline {
  font-size: 0.75rem;
  opacity: 0.8;
  display: block;
}

/* Currency Selector */
.currency-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.currency-selector label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.currency-selector select {
  background: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  min-width: 180px;
}

/* Main Content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* Car Grid */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.car-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.car-card.featured {
  border: 2px solid var(--secondary);
}

.car-image {
  width: 100%;
  height: 200px;
  background: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.car-card:hover .car-image img {
  transform: scale(1.05);
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--secondary);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.car-details {
  padding: 1.25rem;
}

.car-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.car-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.car-spec {
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.car-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-local {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.price-eur {
  font-size: 0.875rem;
  color: var(--text-light);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
}

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

.btn-secondary {
  background: var(--primary);
  color: var(--white);
}

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

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Car Detail Page */
.car-detail {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
}

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

.car-detail-image {
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}

.car-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.car-detail-info {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.car-detail-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.car-detail-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.car-detail-price .eur {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: normal;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spec-item {
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
}

.spec-value {
  font-weight: 600;
  color: var(--text);
}

.car-description {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Checkout Page */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
}

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

.checkout-form {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.checkout-form h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.order-summary {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 100px;
}

.order-summary h3 {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.order-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.order-total {
  border-top: 2px solid var(--border);
  margin-top: 1rem;
  padding-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Payment Methods */
.payment-methods {
  margin: 1.5rem 0;
}

.payment-method {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.payment-method:hover {
  border-color: var(--primary-light);
}

.payment-method.selected {
  border-color: var(--primary);
  background: rgba(26, 54, 93, 0.05);
}

.payment-method input {
  margin-right: 1rem;
  width: 20px;
  height: 20px;
}

.payment-method-info h4 {
  margin-bottom: 0.25rem;
}

.payment-method-info p {
  font-size: 0.875rem;
  color: var(--text-light);
}

.tm-badge {
  background: linear-gradient(135deg, #00a651 0%, #007a3d 100%);
  color: var(--white);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* Payment Instructions */
.payment-instructions {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}

.payment-instructions h2 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.payment-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0;
  text-align: center;
}

.bank-details {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.bank-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.bank-detail-row:last-child {
  border-bottom: none;
}

.bank-detail-label {
  color: var(--text-light);
}

.bank-detail-value {
  font-weight: 600;
  font-family: monospace;
}

.reference-box {
  background: var(--secondary);
  color: var(--white);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin: 1.5rem 0;
}

.reference-box span {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 2px;
}

.instructions-list {
  margin: 1.5rem 0;
}

.instructions-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.instructions-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

/* Success Page */
.success-container {
  text-align: center;
  padding: 3rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 2rem auto;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

.success-container h1 {
  color: var(--success);
  margin-bottom: 1rem;
}

/* TransferMate Branding */
.tm-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-light);
}

.tm-logo {
  height: 24px;
}

/* Loading */
.loading {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Footer */
footer {
  background: var(--primary);
  color: var(--white);
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}

footer a {
  color: var(--secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .car-grid {
    grid-template-columns: 1fr;
  }

  main {
    padding: 1rem;
  }
}
