/* Comparison Results Page Styles */

/* Theme Colors */
.text-red {
  color: #dc2626 !important;
}

.text-green {
  color: #22c55e !important;
}

.bg-primary {
  background-color: #22c55e !important;
}

.btn-primary {
  background-color: #22c55e !important;
  border-color: #22c55e !important;
}

.btn-primary:hover {
  background-color: #16a34a !important;
  border-color: #16a34a !important;
}

/* Header Styles */
.navbar {
  border-bottom: 1px solid #e5e7eb;
}

.navbar-brand img {
  height: 40px;
}

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
}

.breadcrumb-item a {
  color: #22c55e;
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: #16a34a;
}

/* Car Header Cards */
.comparison-header {
  margin-bottom: 2rem;
}

.car-header-card {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.car-image-container {
  width: 200px;
  height: 150px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 10px;
}

.car-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.car-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.car-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: black !important;
  margin: 0;
}

/* Comparison Table Container */
.comparison-table-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Section Titles */
.comparison-section {
  border-bottom: 1px solid #f1f3f4;
}

.comparison-section:last-child {
  border-bottom: none;
}

.section-title {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 15px 20px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.section-title i {
  color: white;
}

/* Comparison Table */
.comparison-table {
  margin: 0;
  border: none;
}

.comparison-table tbody tr {
  border-bottom: 1px solid #f1f3f4;
}

.comparison-table tbody tr:last-child {
  border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.comparison-table tbody tr:hover {
  background-color: #e8f5e8;
}

.spec-name {
  font-weight: 600;
  color: #374151;
  background-color: #f9fafb;
  border: none;
  padding: 15px 20px;
  width: 200px;
  min-width: 200px;
}

.spec-value {
  color: #6b7280;
  border: none;
  padding: 15px 20px;
  text-align: center;
  font-weight: 500;
}

/* Action Buttons */
.btn {
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn span {
  color: inherit;
  font-weight: inherit;
}

.btn-outline-primary {
  border-color: #22c55e !important;
  color: #22c55e !important;
}

.btn-outline-primary:hover {
  background-color: #22c55e !important;
  border-color: #22c55e !important;
  color: white !important;
}

.btn-outline-primary:hover span {
  color: white !important;
}

.btn-outline-success {
  border-color: #16a34a !important;
  color: #16a34a !important;
}

.btn-outline-success:hover {
  background-color: #16a34a !important;
  border-color: #16a34a !important;
  color: white !important;
}

.btn-outline-success:hover span {
  color: white !important;
}

.btn-primary {
  background-color: #22c55e !important;
  border-color: #22c55e !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: #16a34a !important;
  border-color: #16a34a !important;
  color: white !important;
}

.btn-primary span {
  color: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .car-header-card {
    margin-bottom: 20px;
  }

  .car-image-container {
    width: 150px;
    height: 120px;
  }

  .car-title {
    font-size: 1.25rem;
  }

  .car-price {
    font-size: 1.1rem;
  }

  .spec-name {
    width: auto;
    min-width: 150px;
    font-size: 14px;
  }

  .spec-value {
    font-size: 14px;
    padding: 12px 15px;
  }

  .section-title {
    font-size: 1rem;
    padding: 12px 15px;
  }

  .btn {
    font-size: 14px;
    padding: 8px 16px;
    margin-bottom: 10px;
  }
}

@media (max-width: 576px) {
  .comparison-table-container {
    margin: 0 -15px;
    border-radius: 0;
  }

  .car-image-container {
    width: 120px;
    height: 100px;
  }

  .car-title {
    font-size: 1.1rem;
  }

  .car-price {
    font-size: 1rem;
  }

  .spec-name {
    min-width: 120px;
    font-size: 13px;
    padding: 10px 12px;
  }

  .spec-value {
    font-size: 13px;
    padding: 10px 12px;
  }

  .section-title {
    font-size: 0.95rem;
    padding: 10px 12px;
  }

  .navbar-brand img {
    height: 35px;
  }

  .d-none.d-md-inline {
    display: none !important;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .breadcrumb,
  .btn {
    display: none !important;
  }

  .comparison-table-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .car-header-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .section-title {
    background: #f8f9fa !important;
    color: #333 !important;
    border-bottom: 2px solid #22c55e;
  }

  body {
    background: white !important;
  }
}

/* Loading Animation */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner-border {
  color: #22c55e;
}

/* Success/Error Messages */
.alert-success {
  background-color: #d1fae5;
  border-color: #22c55e;
  color: #065f46;
}

.alert-danger {
  background-color: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

/* Carousel Styles */
.popular-comparisons .comparison-item {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.popular-comparisons .comparison-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.popular-comparisons .car-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-height: 100px;
  justify-content: center;
  width: 100px;
  flex-shrink: 0;
}

.popular-comparisons .car-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.popular-comparisons .car-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  max-width: 100px;
  min-height: 17px;
}

.popular-comparisons .vs-badge {
  margin: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
}

.popular-comparisons .vs-badge .badge {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 20px;
}

/* Swiper Carousel Styles */
.swiper {
  width: 100%;
  height: 100%;
  padding: 20px 0;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0 10px;
  height: auto;
}

.swiper-slide .comparison-item {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  min-height: 200px;
}

/* Custom Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
  color: #22c55e !important;
  background: white;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: #22c55e;
  color: white !important;
  transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 18px !important;
  font-weight: bold;
}

.popular-next {
  right: -25px;
}

.popular-prev {
  left: -25px;
}
