/* BATTERY FIX V17 — shared automatic latest-arrivals component */
.bf-latest-section {
  position: relative;
}

.bf-latest-section[hidden] {
  display: none !important;
}

.bf-latest-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.bf-latest-head > div {
  max-width: 760px;
}

.bf-latest-head h2 {
  margin: 5px 0 8px;
}

.bf-latest-head p {
  margin: 0;
  color: var(--muted, #6d7d80);
  line-height: 1.65;
}

.bf-latest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.bf-latest-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line, #d8e9e7);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(24, 52, 58, .045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bf-latest-card:hover {
  transform: translateY(-3px);
  border-color: #9fdad4;
  box-shadow: 0 15px 34px rgba(24, 52, 58, .09);
}

.bf-latest-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.bf-latest-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--line, #d8e9e7);
}

.bf-latest-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px;
}

.bf-latest-new-badge {
  position: absolute;
  inset-inline-start: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e7faf7;
  border: 1px solid #bcece6;
  color: #087d73;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1;
}

.bf-latest-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px 15px 15px;
}

.bf-latest-card-title {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: .95rem;
  line-height: 1.35;
}

.bf-latest-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.bf-latest-card-meta b {
  color: #087d73;
  font-size: 1.02rem;
  white-space: nowrap;
}

.bf-latest-card-meta small {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0faf4;
  color: #287a4c;
  font-size: .72rem;
  font-weight: 750;
  white-space: nowrap;
}

.bf-latest-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #176f69;
  font-size: .79rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .bf-latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .bf-latest-head {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 16px;
  }

  .bf-latest-head .btn {
    align-self: flex-start;
  }

  .bf-latest-grid {
    gap: 10px;
  }

  .bf-latest-card {
    border-radius: 16px;
  }

  .bf-latest-card-media img {
    padding: 7px;
  }

  .bf-latest-card-body {
    gap: 8px;
    padding: 10px 10px 11px;
  }

  .bf-latest-card-title {
    min-height: 2.6em;
    font-size: .83rem;
  }

  .bf-latest-card-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .bf-latest-card-meta b {
    font-size: .92rem;
  }

  .bf-latest-card-action {
    font-size: .72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bf-latest-card {
    transition: none;
  }
}
