/* Ensure our CSS always overrides */
.vin-block {
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  margin: 5%;
  padding: 40px;
  gap: 30px;
}

.vin-header-row {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 40px;
}

.vin-image img {
  width: 200px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.vin-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.vin-info h2 {
  font-size: 26px;
  font-weight: 600;
  color: #fff !important;
  margin: 0;
  font-family: 'Manrope';
  text-align: right!important;
}

.vin-meta {
  text-transform: uppercase;
  font-family: 'Manrope', sans-serif;
  letter-spacing: 1px;
  font-size: 13px;
  color: #ffffff;
  opacity: 0.5;
  margin-top: 10px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.vin-parts h3 {
  font-size: 15px;
  color: #93856e;
  font-family: 'Manrope';
  font-weight: 200;
  letter-spacing: 1px;
  text-align: center;
  margin-top: 30px;
  position: relative;
}

.vin-parts h3::before,
.vin-parts h3::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 37%;
  height: 1px;
  background-color: #93856e;
}

.vin-parts h3::before { left: 0; }
.vin-parts h3::after { right: 0; }

.parts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
}

.part-box {
  width: 180px;
  text-align: center;
  color: #f5f5f5;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 10px;
}

.part-box img {
  border-radius: 6px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.part-box p {
  font-family: 'Manrope';
  font-size: 11px;
  font-weight: 300;
  color: #f9f9f9;
  letter-spacing: 1px;
  text-transform: uppercase;
  min-height: 40px;
}

.part-box a.button {
  font-family: 'Manrope', sans-serif;
  background-color: transparent !important;
  border: 1px solid #93856e;
  color: #93856e;
  padding: 3px 6px;
  font-size: 8px !important;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  display: inline-block;
}

.toggle-parts-link {
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  text-align: right;
}

.toggle-parts-link.toggle-hide {
  margin-top: 20px;
}

.extra-parts {
  display: none;
}

/* === VIN Dashboard Mobile Alignment & Grid Fixes === */

/* Mobile header stack: image above info */
@media (max-width: 768px){
  .vin-header-row{
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .vin-image img{
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
  }

  .vin-info h2{
    font-size: 20px !important;
    line-height: 1.3 !important;
    text-align: left !important;
    margin: 0 !important;
  }

  .vin-meta{
    font-size: 12px !important;
    gap: 8px 16px !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

/* Parts grid: always 3 columns across mobile */
.parts-list{
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  margin-top: 20px !important;
}

.part-box{
  width: 100% !important; /* no fixed px width */
  flex: none !important;
  text-align: center;
}

/* Limit to first 3 part-box items before toggle */
.parts-list .part-box:nth-child(n+4){
  display: none;
}

/* When toggle is active, show all again */
.parts-list.show-all .part-box{
  display: block !important;
}

/* Toggle link style fix */
.toggle-parts-link{
  width: 100%;
  display: block;
  text-align: center !important;
  margin-top: 12px !important;
}
}