/* BambuLab-like category layout */

.shop-hero {
  padding: 24px 0;
  border-bottom: 1px solid #eee;
}

.shop-hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

@media (max-width: 991px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
}

.filter-card {
  position: sticky;
  top: 72px;
}

.filter-card .form-check {
  margin-bottom: .35rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.topbar .sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .sort select {
  min-width: 200px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.pcard {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.pcard .thumb {
  aspect-ratio: 1/1;
  background: #f6f8fb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pcard .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pcard .title {
  font-weight: 600;
  min-height: 44px;
}

.pcard .vendor {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pcard .price {
  font-weight: 800;
}

.pcard .badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-soft {
  background: #f1f5f9;
  color: #0b0f13;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

.swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  cursor: pointer;
  position: relative;
}

.swatch[aria-checked="true"]::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid #000;
  border-radius: 50%;
  opacity: .25;
}

.compat {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.compat .chip {
  font-size: 11px;
  background: #eef6f7;
  color: #0b8;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d8efec;
}

