html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* 首页行布局: 封面图 + 信息列 */
.listing-row {
  display: flex;
  gap: 16px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  transition: box-shadow .15s ease-in-out;
}

.listing-row:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  color: inherit;
  text-decoration: none;
}

.listing-cover {
  position: relative;
  flex: 0 0 280px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #e9ecef;
}

.listing-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-cover .no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-weight: bold;
}

.listing-badge {
  position: absolute;
  left: 8px;
  top: 8px;
}

.listing-badges-right {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  z-index: 2;
}

/* 首页幻灯: 轮播图铺满封面框 */
.listing-cover .carousel,
.listing-cover .carousel-inner,
.listing-cover .carousel-item {
  height: 100%;
}

.listing-cover .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listing-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
}

.listing-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0d6efd;
}

.listing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.listing-meta {
  color: #495057;
}

.gallery-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}

@media (max-width: 767px) {
  .listing-row {
    flex-direction: column;
  }

  .listing-cover {
    flex: none;
    width: 100%;
  }
}
