/**
 * Tractor Archive Grid Layout & Card Styles
 */

/* Container Layout Framework */
.td-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 15px;
  background-color: #ffffff;
}

/* 3-Column Responsive Grid Layout */
.tractor-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

/* Individual Card Architecture */
.tractor-card-item {
  background: #ffffff;
  border: 1px solid #edf0f2;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

/* Card Image block with light gray tint background */
.tractor-card-media {
  background-color: white;
  width: 100%;
  height: 180px;
  position: relative;
  border-bottom: 1px solid #edf0f2;
}

.tractor-card-media a,
.tractor-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Prevents tractor images from stretching or clipping */
}

.media-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
}

/* Card Information text area padding */
.tractor-card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Tractor Brand / Model Title Styling */
.tractor-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.tractor-card-title a {
  color: #1a202c;
  text-decoration: none;
}

.tractor-card-title a:hover {
  color: #e53e3e; /* Accent hover state color */
}

/* Inline specs metrics display row layout */
.tractor-card-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  color: #4a5568;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Custom Price formatting rules */
.tractor-card-price-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 16px;
  margin-top: auto; /* Keeps price row aligned even with varying title heights */
}

/* Left-aligned custom action tools links */
.tractor-card-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Base button rules */
.action-link-btn {
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 3px;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

/* View Details link color configurations */
.view-link {
  color: #e53e3e;
  border: 1px solid transparent;
  padding-left: 0; /* Aligns flush with text column edge */
}

.view-link:hover {
  text-decoration: underline;
}

/* Compare button structural border setup */
.compare-link {
  color: #2d3748;
  border: 1px solid #cbd5e0;
  background: #ffffff;
}

.compare-link:hover {
  background: #f7fafc;
  border-color: #a0aec0;
}

/* --- Responsive Media Viewport Breaks --- */
@media (max-width: 991px) {
  .tractor-grid-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .tractor-grid-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
