/* ==========================================================
   Bellemann - Autos Block Styles
========================================================== */

/* Wrapper */
.bellemann-autos {
  max-width: 1200px;
  margin: 0 auto; 
}

/* Toolbar */
.bellemann-autos__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.bellemann-autos__toolbar label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Sort wrapper */
.bellemann-autos__sort-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Match filter field dropdown */
.bellemann-autos__sort {
  width: 220px;
  padding: 12px 36px 12px 12px; /* space for icon */
  border: 1px solid #ddd;
  font-size: 15px;
  font-family: inherit;
  color: #333;
  background: #fff;
  transition: border-color 0.2s ease;

  /* Hide native arrows */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none !important;
}

.bellemann-autos__sort:focus {
  outline: none;
  border-color: #FFD800;
}

/* Sorting icon */
.bellemann-autos__sort-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 14px;
  pointer-events: none;
  margin-top: -4px; /
}

/* Grid */
.bellemann-autos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* Card */
.bellemann-autos__item {
  border: 1px solid #eee;
  background: #fff;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}
.bellemann-autos__item:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  text-decoration: none; /* no underline */
  color: inherit;        /* stay same color */
}

/* Card Image */
.bellemann-autos__image {
  position: relative;
  overflow: hidden;
  height: 220px;
}
.bellemann-autos__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bellemann-autos__price {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FFD800;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 18px;
  color: #000;
}

/* Card Body */
.bellemann-autos__body {
  padding: 20px;
  flex: 1;
}
.bellemann-autos__body h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 5px;
}
.bellemann-autos__body .subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Specs */
.bellemann-autos__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  font-size: 14px;
  color: #333;
  margin: 15px 0;
}
.bellemann-autos__specs div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bellemann-autos__specs i {
  color: #999;
  font-size: 14px;
}

/* Card Footer */
.bellemann-autos__footer {
  font-size: 13px;
  color: #555;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fafafa;
  margin-top: auto;
  line-height: 1.4;
}

/* Spinner (full grid) */
.bellemann-autos__loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  width: 100%;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #eee;
  border-top: 4px solid #FFD800;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Load More Button */
.bellemann-autos__loadmore {
  display: block;
  margin: 40px auto 0;
  background: #f5f5f5;
  color: #000;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border: 1px solid #ddd;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.bellemann-autos__loadmore:hover {
  background: #FFD800;
  border-color: #FFD800;
  color: #000;
}
.bellemann-autos__loadmore:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

/* Inline Spinner inside button */
.spinner-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #eee;
  border-top: 2px solid #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

.bellemann-autos__image {
  position: relative;
}


/* Responsive */
@media (max-width: 600px) {
  .bellemann-autos__toolbar {
    justify-content: flex-end; /* keep it on the right */
  }
  .bellemann-autos__sort {
	 margin-bottom: 0.1px;
    width: auto; /* don't stretch full width */
  }
}
