.car-detail-section {
  width: 100%;
  margin: 0 auto;
}

/* Left: Carousel */
.car-carousel-container {
  width: 500px;
}

.main-swiper-wrapper {
  width: 100%;
  aspect-ratio: 500/300;
}

.main-swiper {
  width: 100%;
  height: 100%;
}

.main-swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.car-number-badge {
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.75rem;
  z-index: 10;
  pointer-events: auto;
}

.thumb-swiper {
  width: 100%;
  height: 68px;
}

.thumb-slide {
  width: 92px;
  height: 68px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s;
}

.thumb-slide.swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid var(--primary-color);
}

.thumb-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Thumbnails Navigation */
.thumb-swiper .swiper-button-next,
.thumb-swiper .swiper-button-prev {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  top: 50%;
  transform: translateY(-50%);
  margin-top: 0;
}

.thumb-swiper .swiper-button-next::after,
.thumb-swiper .swiper-button-prev::after {
  font-size: 0.625rem;
  font-weight: bold;
  color: var(--text-black);
}

.thumb-swiper .swiper-button-disabled {
  opacity: 0;
  pointer-events: none;
}

/* Right: Info Panel */
.badge-new {
  background-color: var(--green-color);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.car-title {
  font-weight: 500;
  color: var(--text-black);
  display: inline;
  line-height: 1.5em;
}

.main-price {
  color: var(--red-color);
  font-size: 1.75rem;
}

.sub-price {
  color: var(--text-gray);
  font-size: 0.75rem;
}

.tag {
  background-color: var(--tag-bg);
  color: var(--tag-text);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.delivery-text {
  color: var(--text-gray);
  font-size: 0.875rem;
}

.action-btn {
  border-color: var(--blue-color);
  color: var(--blue-color);
  font-size: 0.875rem;
}

.action-btn:hover {
  background-color: var(--blue-color);
  color: #fff;
}

.collect-btn{
  border-color: #ddd;
  color: #000;
  font-size: 0.875rem;
}

.collect-btn:hover {
  border-color: #ddd;
  color: #000;
}

.tech-params {
  background-color: var(--param-bg);
}
.tech-params .param-label{
  font-size: 0.75rem;
}
.param-item .param-value {
  font-size: 1rem;
}

.param-item .param-label {
  font-size: 0.875rem;
  color: var(--text-gray);
}

.more-link {
  color: var(--text-gray);
  font-size: 0.875rem;
  text-decoration: none;
}

/* Buttons */
.btn-buy {
  background-color: var(--primary-color);
  color: var(--text-black);
  border: none;
}
.action-buttons-group button{
  font-size: 0.75rem;
}
.btn-contact, .btn-share {
  border: 1px solid #ddd;
  background: #fff;
  color: var(--text-black);
  font-size: 0.75rem;
}
.action-buttons-group button:hover{
  background-color: var(--primary-color);
  color: var(--text-black);
}
/* Fullscreen Preview */
.fullscreen-preview {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
  justify-content: center;
  align-items: center;
}

.fullscreen-preview.active {
  display: flex;
}

.close-preview {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 10001;
}

.fullscreen-swiper {
  width: 90%;
  height: 80%;
}

.fullscreen-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Feature Image Preview Modal */
.feature-image-preview {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.feature-image-preview.active {
  display: flex;
}

.feature-modal-content {
  background: #fff;
  border-radius: 0.75rem;
  max-width: 1200px;
  width: 100%;
  overflow: hidden;
  position: relative;
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.feature-title {
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
}

.feature-img-box {
  width: 100%;
  aspect-ratio: 16/9;
  background: #f8f8f8;
}

.feature-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 车辆亮点功能 begin*/
.car-features-content {
  grid-template-columns: repeat(5, 1fr);
}
.car-features-content .car-features-item {
  cursor: pointer;
}
.car-features-content .icon{
  width: 2.5rem;
}
.car-features-content .txt{
  font-size: 0.875rem;
  text-align: center;
  word-break: break-word;
  padding: 0 1rem;
}
/* 车辆亮点功能 end*/

/* 车辆质检及车辆描述 begin*/
.list-unstyled{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.list-unstyled .car-features-item{
  border-radius: 0.25rem;
  cursor: zoom-in;
  overflow: hidden;
}
/* 车辆质检及车辆描述 end */
/* 价格计算器 begin */
.calculator-container .calc-label {
  width: 120px;
  font-size: 1rem;
  color: #000;
  flex-shrink: 0;
  word-break: break-word;
}

.calculator-container .calc-input-wrapper {
  border: 1px solid #DDDDDD;
  border-radius: 4px;
  padding: 8px 12px;
  max-width: 300px;
  width: 100%;
}

.calculator-container .calc-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.875rem;
  color: #000;
}

.calculator-container .calc-unit {
  font-size: 0.875rem;
  color: #000;
  white-space: nowrap;
}

.calculator-container .calc-result-box {
  background: #FFF9D8;
}

.calculator-container .calc-result-title {
  font-size: 1.25rem;
  font-weight: 500;
}

.calculator-container .calc-result-value {
  font-size: 1.5rem;
}

.calculator-container .calc-subtext {
  font-size: 0.75rem;
  color: #666;
}

.calculator-container .calc-unit-grey {
  font-size: 0.875rem;
  color: #9C9C9C;
  white-space: nowrap;
}

.calculator-container .calc-details-box {
  background: #F5F5F5;
}

.calculator-container .detail-name {
  font-size: 1.25rem;
  color: #000;
}

.calculator-container .detail-secondary {
  font-size: 1rem;
  color: #666;
}

.calculator-container .detail-primary {
  font-size: 1.5rem;
  color: #000;
}

.calculator-container .rate-input-wrapper {
  max-width: 240px;
}

.calculator-container .rate-input {
  text-align: right;
  padding-right: 4px;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.text-match-green {
  color: #109231 !important;
}

/* 匹配车辆对比模块 */
.match-comparison-module {
  border: 1px solid #DDDDDD;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-top: 1rem;
  display: flex;
  align-items: stretch;
  background: #fff;
}

.match-donut-side {
  width: 18.75rem;
  padding: 2.5rem;
  border-right: 1px solid #DDDDDD;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex-shrink: 0;
}

.match-donut-box {
  position: relative;
  width: 12.5rem;
  height: 12.5rem;
}

.match-donut-box svg {
  width: 12.5rem;
  height: 12.5rem;
}

.match-donut-box .percentage {
  font-size: 2.25rem;
  color: #000;
  line-height: 1;
}

.match-donut-box .label {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.2;
  margin-top: 0.5rem;
}

.match-info-side {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
}

.match-row-group {
  display: flex;
  align-items: stretch;
}

.match-row-group:last-child {
  border-bottom: none;
}

.match-row-label {
  width: 7.5rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  background: #fafafa;
  border-right: 1px solid #DDDDDD;
  border-bottom: 1px solid #DDDDDD;
  flex-shrink: 0;
  word-break: break-word;
}

.match-row-content {
  flex: 1;
  min-width: 15rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  word-break: break-word;
  border-bottom: 1px solid #DDDDDD;
}

.match-row-content.border-end {
  border-right: 1px solid #DDDDDD;
}

.match-header-group {
  display: flex;
  align-items: stretch;
  background: #fcfcfc;
  border-bottom: 1px solid #DDDDDD;
}

.match-header-label {
  width: 7.5rem;
  flex-shrink: 0;
  border-right: 1px solid #DDDDDD;
}

.match-header-title {
  flex: 1;
  min-width: 15rem;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  font-weight: bold;
  height: 3.4375rem;
}

.match-header-title.border-end {
  border-right: 1px solid #DDDDDD;
}

/* Specific heights as min-heights */
.mh-53 { min-height: 3.3125rem; }
.mh-55 { min-height: 3.4375rem; }
.mh-58 { min-height: 3.625rem; }

@media (max-width: 768px) {
  .match-comparison-module {
    flex-direction: column;
  }
  .match-donut-side {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #DDDDDD;
    padding: 1.5rem;
  }
  .match-row-label, .match-header-label {
    width: 6.25rem;
    font-size: 0.75rem;
  }
  .match-row-content, .match-header-title {
    min-width: 10rem;
    font-size: 0.75rem;
    padding: 0.5rem;
  }
}
/* 购买弹窗 begin */
.buy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: none;
}

.buy-modal.active {
  display: block;
}

.buy-modal .modal-overlay {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.buy-modal .modal-content {
  background: #fff;
  border-radius: 4px;
  max-width: 600px;
  width: 100%;
  padding: 30px;
  position: relative;
}

.buy-modal h3 {
  font-size: 1.75rem;
  font-weight: normal;
}

.buy-modal .form-label {
  width: 140px;
  font-size: 0.875rem;
  color: #000;
  flex-shrink: 0;
}

.buy-modal .form-control {
  border: 1px solid #DDDDDD;
  border-radius: 4px;
  padding: 12px;
  font-size: 0.875rem;
}

.buy-modal .upload-box {
  background: #DDDDDD;
  cursor: pointer;
  color: #666;
  font-size: 0.875rem;
  text-align: center;
  position: relative;
}
.buy-modal .upload-box #contractFile {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.buy-modal .download-link {
  font-size: 0.875rem;
  color: #007ADE;
}

.buy-modal .btn-submit-buy {
  background-color: var(--primary-color);
  border: none;
  border-radius: 4px;
  color: #000;
  font-size: 1rem;
}

.buy-modal .close-btn {
  font-size: 1.5rem;
  cursor: pointer;
}
/* 购买弹窗 end */

/* Responsive */
@media (max-width: 1200px) {
  .car-detail-section{
    max-width: 100%;
  }
  .car-carousel-container {
    width: 100%;
  }

  .main-swiper-wrapper {
    aspect-ratio: 2/1;
  }

  .car-detail-section {
    flex-direction: column;
  }

  .action-buttons-group {
    flex-wrap: wrap;
  }

  .btn-buy {
    width: 100%;
    order: 1;
  }

  .btn-contact {
    flex-grow: 1;
    order: 2;
  }

  .btn-share {
    flex-grow: 1;
    order: 3;
  }
}

@media (max-width: 768px) {
  .content-area {
    padding: 0;
    padding-bottom: 12vh !important;
  }
  .car-detail-section{
    padding-top: 0 !important;
  }
  .main-swiper-wrapper {
    aspect-ratio: 1/1;
  }
  .price-section{
    flex-direction: column;
    align-items: start !important;
    gap: 0 !important;
  }
  .param-item .param-label{
    display: none;
  }
  .car-features-content {
    grid-template-columns: repeat(3, 1fr);
  }
  .car-features-content .icon {
    width: 2rem;
  }
  .car-features-content .txt {
    font-size: 0.75rem;
    padding: 0;
  }
  .feature-title{
    font-size: 1rem;
  }
  .list-unstyled {
    grid-template-columns: repeat(2, 1fr);
  }
  .car-features-desc {
    font-size: 0.875rem;
  }
  .param-item .param-value {
    font-size: 0.875rem;
  }
  /*计算器 begin*/
  .calculator-container .calc-label{
    width: 100%;
  }
  .calculator-container .calc-input-wrapper{
    max-width: 100%;
  }
  .calculator-container .calc-input,.calculator-container .calc-result-title,.calculator-container .detail-primary{
    font-size: 1rem;
  }
  .calculator-container .detail-name{
    font-size: 0.875rem;
    max-width: 60%;
  }

  /*计算器 end*/

  /* 购买弹窗 begin */
  .buy-modal .modal-content {
    padding: 20px;
  }
  .buy-modal h3 {
    font-size: 1.25rem;
  }
  .buy-modal .form-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .buy-modal .form-label {
    width: 100%;
  }
  .buy-modal .input-wrapper {
    width: 100%;
  }
  /* 购买弹窗 end */
}
