/* Enhanced Car Detail Page Styles - Conservative Approach */
:root {
  --primary-color: #003B7E;
  --secondary-color: #F7F7F7;
  --accent-color: #E4002B;
  --text-color: #333333;
  --border-color: #E5E5E5;
  --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* Base Styles */
.carlistings-detail-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  display: grid;
  grid-template-columns: calc(70% - 15px) calc(30% - 15px);
  gap: 30px;
}

/* Left Column */
.vehicle-main {
  grid-column: 1;
}

/* Right Column */
.vehicle-sidebar {
  grid-column: 2;
  position: sticky;
  top: 20px;
  align-self: start;
}

/* Header Section */
.car-title {
  font-size: 32px;
  color: var(--primary-color);
  margin: 0 0 15px 0;
  font-weight: 700;
  line-height: 1.2;
}

.vehicle-subtitle {
  color: #666;
  margin-bottom: 25px;
  font-size: 18px;
  font-weight: 500;
}

/* Price Box */
.vehicle-price-box {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  color: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: var(--box-shadow);
}

.price-label {
  font-size: 16px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.price-amount {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
  display: block;
}

.btw-info {
  font-size: 14px;
  opacity: 0.9;
  font-style: italic;
}

.lease-amount {
  font-size: 18px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.3);
  font-weight: 600;
}

/* Featured Image - Larger and Better */
.car-featured-image {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: var(--transition);
}

.car-featured-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.car-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  min-height: 450px;
  object-fit: cover;
  transition: var(--transition);
}

.car-featured-image:hover img {
  transform: scale(1.02);
}

/* Image Gallery - Improved */
.car-gallery-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  margin: 20px 0 30px;
}

.car-gallery-images .item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: var(--transition);
  cursor: pointer;
}

.car-gallery-images .item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.car-gallery-images .item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.car-gallery-images .item:hover img {
  transform: scale(1.05);
}

/* Information Sections */
.car-information {
  background: #f8f9fa;
  padding: 25px;
  margin-bottom: 25px;
  border-radius: 12px;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.car-information:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.car-information h2 {
  color: var(--primary-color);
  font-size: 24px;
  margin: 0 0 20px 0;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

/* Contact Section */
.contact-section {
  border-left-color: var(--accent-color);
}

.contact-info p {
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 16px;
}

.contact-buttons {
  margin: 20px 0;
}

.contact-btn {
  display: block;
  width: 100%;
  padding: 15px;
  margin-bottom: 12px;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(228, 0, 43, 0.2);
}

.contact-btn:hover {
  background: #c5001f;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(228, 0, 43, 0.3);
}

.contact-btn.whatsapp-btn {
  background: #25D366;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.contact-btn.whatsapp-btn:hover {
  background: #128C7E;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.opening-hours {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.8;
  border: 1px solid var(--border-color);
}

/* Accessories List */
.accessories-list {
  background: white;
  padding: 20px;
  border-radius: 8px;
  line-height: 1.8;
  border: 1px solid var(--border-color);
}

.accessories-list h5 {
  color: var(--primary-color);
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
}

.accessories-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  line-height: 1.7;
  columns: 2;
  column-gap: 30px;
  column-fill: balance;
}

.accessories-list li {
  margin-bottom: 10px;
  color: var(--text-color);
  font-size: 15px;
  break-inside: avoid;
  page-break-inside: avoid;
  position: relative;
  padding-left: 25px;
}

.accessories-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #28a745;
  font-weight: bold;
  font-size: 16px;
  width: 20px;
  height: 20px;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Lease Calculator */
.lease-calculator {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.calculator-field {
  margin-bottom: 20px;
}

.calculator-field label {
  display: block;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 15px;
}

.calculator-field input,
.calculator-field select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 15px;
  transition: var(--transition);
  background: white;
}

.calculator-field input:focus,
.calculator-field select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0,59,126,0.1);
}

.calculator-field input[readonly] {
  background-color: #f8f9fa;
  cursor: not-allowed;
  color: #6c757d;
}

.monthly-payment-result {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-top: 20px;
  border: 2px solid var(--border-color);
}

.monthly-payment-label {
  color: var(--text-color);
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

#monthly-payment {
  font-size: 28px;
  color: var(--accent-color);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Technical Specifications */
.specs-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.spec-category {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--box-shadow);
  border: 1px solid var(--border-color);
}

.spec-category:empty,
.spec-category .car-info:empty {
  display: none;
}

.spec-category .car-info tr {
  display: table-row;
}

.spec-category h3 {
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.spec-category h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-color);
}

.technical-specs .car-info {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.technical-specs .car-info tr {
  transition: var(--transition);
}

.technical-specs .car-info tr:hover {
  background: #f8f9fa;
}

.technical-specs .car-info td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.technical-specs .car-info tr:last-child td {
  border-bottom: none;
}

.technical-specs .car-info td:first-child {
  color: var(--primary-color);
  font-weight: 600;
  width: 60%;
  background: transparent;
}

.technical-specs .car-info td:last-child {
  font-weight: 500;
  text-align: right;
  width: 40%;
}

/* Remarks Content */
.remarks-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  line-height: 1.7;
  border: 1px solid var(--border-color);
}

.remarks-content p {
  color: var(--text-color);
  margin-bottom: 15px;
  font-size: 15px;
}

.remarks-content p:last-child {
  margin-bottom: 0;
}

.remarks-content strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* Button Styles */
.button-primary {
  background: linear-gradient(135deg, var(--accent-color) 0%, #c5001f 100%);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(228, 0, 43, 0.2);
  text-transform: none;
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(228, 0, 43, 0.3);
  background: linear-gradient(135deg, #c5001f 0%, var(--accent-color) 100%);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .carlistings-detail-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vehicle-main,
  .vehicle-sidebar {
    grid-column: 1;
  }

  .vehicle-sidebar {
    position: static;
  }
  
  .car-title {
    font-size: 28px;
  }
  
  .car-featured-image img {
    min-height: 350px;
  }
}

@media (max-width: 768px) {
  .carlistings-detail-content {
    padding: 15px;
  }
  
  .car-title {
    font-size: 24px;
  }
  
  .car-featured-image img {
    min-height: 250px;
  }
  
  .car-gallery-images {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .car-gallery-images .item img {
    height: 100px;
  }
  
  .accessories-list ul {
    columns: 1;
  }
  
  .technical-specs .car-info td {
    display: block;
    width: 100%;
    padding: 10px 15px;
  }
  
  .technical-specs .car-info td:first-child {
    border-bottom: none;
    padding-bottom: 5px;
    background: transparent;
    font-weight: 600;
  }
  
  .technical-specs .car-info td:last-child {
    padding-top: 5px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 480px) {
  .car-title {
    font-size: 20px;
  }
  
  .price-amount {
    font-size: 28px;
  }
  
  #monthly-payment {
    font-size: 24px;
  }
  
  .car-information {
    padding: 20px;
  }
  
  .contact-btn {
    padding: 12px;
    font-size: 15px;
  }
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.car-information {
  animation: fadeIn 0.6s ease-out;
}

.car-information:nth-child(2) { animation-delay: 0.1s; }
.car-information:nth-child(3) { animation-delay: 0.2s; }
.car-information:nth-child(4) { animation-delay: 0.3s; }

/* Print Styles */
@media print {
  .contact-buttons,
  .lease-calculator {
    display: none !important;
  }
  
  .carlistings-detail-content {
    grid-template-columns: 1fr;
  }
  
  .car-information {
    box-shadow: none;
    border: 1px solid var(--border-color);
    break-inside: avoid;
  }
}
