/* all bikes grid style layout */

.views-field-field-picture {
  width: 180px;
  height: 150px;
  overflow: hidden;
  margin: 0 auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff; /* white */
}

img.image-field {
  height: auto;
  min-height: 90px;
}

.views-field.views-field-field-picture {
    width: auto;
    max-width: 220px;
}

.views-view-responsive-grid {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.views-view-responsive-grid__item {
  flex: 1 1 calc(33.333% - 1rem);
  margin: 0.5rem;
  display: flex;
  flex-direction: row;
  min-width: 0;
  max-width: 250px;
}

.views-view-responsive-grid__item-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  width: 100%;
}

.views-field-field-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 3px;
  display: block;
  transform: scale(1.25); /* zoom in */
  transition: transform 0.3s ease;
}

.views-field-field-picture img:hover {
  transform: scale(1.3); /* more zoom on hover */
  border-radius: 12px;
}

.views-view-responsive-grid__item-inner {
	flex: 1 1 calc(25% - 1rem);
  height: 100%;
  max-width: none;
  min-height: 220px;
  box-sizing: border-box;
  padding: 12px;
  background-color: #ffffff;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #e0e7db;
  margin: 10px auto;
}

/* New inner wrapper for content */
.views-view-responsive-grid__item-inner > .content-wrapper {
  padding: 12px 10px;
  background-color: #374a36;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

.views-field-field-title,
.views-field-field-serial-number,
.views-field-field-year {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.2;
  word-wrap: break-word;
  width: 100%;
  color: #301934; /*purple works for year, but title and serial have 
                    this style overwritten by their <a> tags */
}



.region-content-bottom .block {
	background-color: #f6fcdf;
}


form#views-exposed-form-bike-grid-page-1 {
  display: flex;
}

select#edit-sort-order {
  margin-left: 50px;
}

/* below styles are for the sorting */

.js-form-item.form-item.form-type-select.js-form-type-select.form-item-field-type-value.js-form-item-field-type-value {
  margin-right: 20px;
}

.js-form-item.form-item.form-type-select.js-form-type-select.form-item-sort-order.js-form-item-sort-order {
	margin-right: 20px;
	width: 110px;
}

/* Hide the "Sort by" label and dropdown */
label[for="edit-sort-by"],
select#edit-sort-by {
  display: none;
}

/* Hide the original "Order" label text */
label[for="edit-sort-order"] {
  color: transparent;    /* Hide original text */
  position: relative;
}

/* Insert new label text visually */
label[for="edit-sort-order"]::before {
  content: "Sort by Year";
  position: absolute;
  left: 0;
  top: 0;
  color: black;          /* Your desired label color */
  font-weight: bold;
}

.form-item-sort-by {
  display: none !important;
  /* hiding this year dropdown becuase it only had one field option */
}

/* Layout the form filters horizontally and wrap if needed */
.view-filters form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

/* Consistent layout for each filter */
.view-filters .form-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

/* Labels inline */
.view-filters .form-item label {
  display: inline-block;
  white-space: nowrap;
  margin: 0;
}

/* Dropdowns consistent width */
.view-filters .form-item select {
  min-width: 160px;
}

/* Ensure search button doesn't get overrun */
.view-filters .form-actions {
  margin-left: 150px;
  flex-shrink: 0;
}

/* Optional: style the select box to align visually */
.view-filters .form-item select {
  flex: 1 1 auto;
  min-width: 160px;
}


/*below are responsive breakpoints in the bike grid for various 
screensizes with 4 bikes at the widest, down to 2 for mobile*/

@media (max-width: 1024px) {
  .views-view-responsive-grid__item {
    flex: 1 1 calc(33.333% - 1rem); /* 3-wide on medium screens */
  }
}

@media (max-width: 768px) {
  .views-view-responsive-grid__item {
    flex: 1 1 calc(50% - 1rem); /* 2-wide on tablets & mobile */
  }
}

/*dropbutton - add repair*/

.js .dropbutton-widget .dropbutton {
	margin:1rem;
	padding:.5rem;
	border-radius:12px;
	background-color:#859f3d;
}

.js .dropbutton a {
	color:white;
}

