/* PBC Swiss — collection browse grid (7-up category cells, 2 rows) */

/* Reshuffle button in the Collection section header. Mirrors the chronology
   reshuffle button styling — small, monochrome, with a rotating arrow that
   spins while the AJAX request is in flight. */
.sec-collection .sec-head .meta { position: relative; }
.sec-collection .sec-head .meta-actions { margin-top: 10px; }
.collection-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.collection-refresh:hover,
.collection-refresh:focus-visible {
  background: var(--ink);
  color: #fff;
  outline: none;
}
.collection-refresh-icon {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transform-origin: center;
}
.sec-collection.is-loading .collection-refresh { pointer-events: none; opacity: .55; }
.sec-collection.is-loading .collection-refresh-icon {
  animation: pbc-collection-spin .8s linear infinite;
}
@keyframes pbc-collection-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


.browse-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}

.b-cell {
  padding: var(--s-5) 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  transition: background .15s;
  background: #fff;
}
.b-cell:last-child { border-right: none; }
/* Strip the right border on every 7th cell so column 7 sits flush with the
   outer grid border, on both rows of the 7x2 layout. */
.b-cell:nth-child(7n) { border-right: none; }
/* Add a horizontal divider between row 1 and row 2 (cells 1-7 get a bottom
   border at the desktop 7-col width). */
.b-cell:nth-child(-n+7) { border-bottom: 1px solid var(--line); }
.b-cell:hover { background: #fafafa; }

.b-cell .n {
  font-weight: 700;
  font-size: var(--t-meta);
  letter-spacing: .06em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.b-cell h4 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.02em;
  margin: auto 0 12px;
  line-height: 1.1;
}
.b-cell .row {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--hair);
  padding-top: 14px;
}
.b-cell .swatch {
  width: 20px;
  height: 20px;
  display: inline-block;
}

@media (max-width: 1100px) {
  .browse-grid { grid-template-columns: repeat(2, 1fr); }
  .b-cell { border-bottom: 1px solid var(--line); }
  /* In 2-col mode, only the right column (every 2nd cell) lacks a right border. */
  .b-cell:nth-child(odd) { border-right: 1px solid var(--line); }
  .b-cell:nth-child(2n) { border-right: none; }
  .b-cell:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 600px) {
  .browse-grid { grid-template-columns: 1fr; }
  .b-cell { border-right: none; }
}
