/* Brand card grid — sell-laptop category page */

.brand-cards {
  --brand-card-border: rgba(229, 229, 229, 1);
  --brand-card-accent: #0064BB;
  --brand-card-name: rgba(56, 56, 56, 1);
  --brand-card-muted: #888;
  --brand-card-radius: 8px;
  --brand-card-gap: 16px;
  padding-bottom: 32px;
}

.brand-cards .section-header-text {
  text-align: left;
  color: var(--brand-card-name);
  padding-top: 30px;
  padding-bottom: 0;
  margin: 0;
}

.brand-cards-grid {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--brand-card-gap);
}

.brand-card {
  display: block;
}

.brand-card-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--brand-card-border);
  border-radius: var(--brand-card-radius);
  text-decoration: none;
  transition: transform 150ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-card-link:hover,
.brand-card-link:focus-visible {
  border-color: var(--brand-card-accent);
  box-shadow: 0 6px 16px rgba(0, 100, 187, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.brand-card-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 100, 187, 0.12);
}

.brand-card.is-popular .brand-card-link {
  border-color: var(--brand-card-accent);
}

.brand-card-badge {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #e8f1fb;
  color: var(--brand-card-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 16px;
}

.brand-card-logo {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 8px;
  border: 1px solid var(--brand-card-border); */
  border-radius: 6px;
  background: #fff;
}

.brand-card-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.brand-card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  /* stretch past the parent's align-items:center so there is height to centre within */
  align-self: self-end;
  justify-content: center;
}

.brand-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-card-name);
  line-height: 1.2;
}

.brand-card-series {
  font-size: 10px;
  color: var(--brand-card-muted);
  line-height: 1.35;
  /* reserve 2 lines so brand names stay aligned across a row
     whether the series wraps to 1 or 2 lines */
  min-height: 2.7em;
}

@media (max-width: 1199px) {
  .brand-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .brand-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .brand-cards {
    --brand-card-gap: 12px;
  }

  .brand-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
  }

  .brand-cards .section-header-text {
    font-size: 20px;
    padding-top: 20px;
  }

  .brand-card-link {
    /* flex-direction: column;
    align-items: flex-start; */
    gap: 4px;
    padding: 6px;
  }

  .brand-card-logo {
    /* flex-basis: 52px;
    width: 52px;
    height: 52px; */
  }
  .brand-card-text{
    align-self: initial;
  }

  .brand-card-name {
    font-size: 14px;
  }

  .brand-card-series {
    font-size: 11px;
  }
}
