/* Container adjustments */
.tractor-hp-section {
  max-width: 100%;
  margin: auto;
  padding: 1.5% !important;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  box-sizing: border-box;
}

/* Header with Heading on left and Select Filter on right */
.hp-section-header {
  margin-bottom: 30px;
}

.section-title-v1 {
  font-size: 24px;
  font-weight: 700;
  color: #c92127;
  text-transform: capitalize;
  margin: 0;
}

#hp-range-select {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: #fff;
  cursor: pointer;
  min-width: 100%; /* Full width on small screens */
  box-sizing: border-box;
}

/* Wrapper to hold Navigation arrows securely */
.swiper-container-v1-wrapper {
  position: relative;
  padding: 0 20px; /* Leave small padding on mobile for arrows */
  box-sizing: border-box;
}

.tractor-hp-swiper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Tractor Card Styles */
.tractor-card-v1 {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-sizing: border-box;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  min-height: 350px;
  height: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.card-img-v1 {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-img-v1 img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.card-body-v1 {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title-v1 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.card-title-v1 a {
  color: #0b3c5d;
  text-decoration: none !important;
}

.card-title-v1 a:hover {
  text-decoration: none !important;
  color: #c92127;
}

/* Premium HP and CC Details styling */
.card-specs-v1 {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-specs-v1 .spec-item {
  display: inline-flex;
  align-items: center;
}

/* Adds a beautiful dot separator between HP and CC values dynamically */
.card-specs-v1 .spec-item + .spec-item::before {
  content: "•";
  margin-right: 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.card-price-v1 {
  font-size: 16px;
  font-weight: 800;
  color: #0b3c5d;
  margin: 0 0 20px 0;
}

/* Action Buttons Grid */
.card-actions-v1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.btn-view-details,
.btn-compare {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 2px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: all 0.2s ease;
  height: 38px;
  box-sizing: border-box;
  text-align: center;
}

.btn-view-details {
  border: 1px solid #c92127;
  color: #c92127;
  background: transparent;
}

.btn-view-details:hover {
  background: #c92127;
  color: #fff !important;
}

.btn-compare {
  border: 1px solid #323f4b;
  color: #323f4b;
  background: transparent;
}

.btn-compare:hover {
  background: #323f4b;
  color: #fff !important;
}

/* Navigation Buttons - ALWAYS Visible Now */
.swiper-button-prev-v1,
.swiper-button-next-v1 {
  display: inline-flex; /* Keeps them visible on phone/tablet/desktop */
  position: absolute;
  top: 30%; /* Shifted upward to align centered over the tractor image zone */
  width: 34px;
  height: 34px;
  background-color: #c92127;
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Positioned cleanly on side overlays */
.swiper-button-prev-v1 {
  left: 5px;
}
.swiper-button-next-v1 {
  right: 5px;
}

.swiper-button-prev-v1::after,
.swiper-button-next-v1::after {
  font-family: swiper-icons;
  font-size: 10px;
  color: #fff;
  font-weight: bold;
}

.swiper-button-prev-v1::after {
  content: "prev";
}
.swiper-button-next-v1::after {
  content: "next";
}

/* Slider pagination indicators at the bottom */
.swiper-pagination-v1 {
  text-align: center;
  margin-top: 20px;
  display: none !important;
}

/* Footer Section with "VIEW ALL TRACTORS" */
.hp-section-footer {
  text-align: center;
  margin-top: 30px;
}

.view-all-red-btn {
  display: inline-block;
  padding: 12px 28px;
  background-color: #c92127;
  color: #fff !important;
  border-radius: 4px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: background-color 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.view-all-red-btn:hover {
  background-color: #a8191e;
}

.tractor-hp-placeholder {
  padding: 40px 0;
  text-align: center;
  color: #888;
  width: 100%;
}

/* ==========================================
   MEDIA QUERIES FOR RESPONSIVE DESIGN
   ========================================== */

/* Tablet & Mobile Tweaks */
@media (max-width: 1023px) {
  .swiper-container-v1-wrapper {
    padding: 0 10px; /* Smaller padding boundaries for screen optimization */
  }
  .swiper-button-prev-v1 {
    left: 0px;
  }
  .swiper-button-next-v1 {
    right: 0px;
  }
}

/* Small Screens */
@media (min-width: 480px) {
  #hp-range-select {
    min-width: 220px;
    width: auto;
  }
  .view-all-red-btn {
    width: auto;
  }
}

/* Wide Desktop Displays */
@media (min-width: 1024px) {
  .tractor-hp-section {
    padding: 0;
  }
  .section-title-v1 {
    font-size: 28px;
  }
  .swiper-container-v1-wrapper {
    padding: 0; /* Push the viewport wide so buttons fit outside completely */
  }
  .swiper-button-prev-v1,
  .swiper-button-next-v1 {
    top: 50%; /* Center vertically on desktop layouts */
    transform: translateY(-50%);
  }
  .swiper-button-prev-v1 {
    left: 0px;
  }
  .swiper-button-next-v1 {
    right: 0px;
  }
}
