/* SPACEUTICS — collections page */

.collections-page {
  background-color: #f9f6f4;
}

.collections-main {
  position: relative;
  min-height: calc(100vh - 8rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.collections-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #f9f6f4;
  background-image: url("../img/collections-bg.png");
  background-size: cover;
  background-position: center top;
  opacity: 0.85;
}

.collections-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--showcase-gutter) 0;
}

.collections-intro {
  text-align: center;
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}

.collections-intro h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  letter-spacing: 0.02em;
  color: var(--color-ink);
  line-height: 1.15;
}

.collections-intro p {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--color-ink-muted);
}

.collections-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.75rem;
}

.collections-toolbar label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  text-align: left;
}

.collections-toolbar select {
  appearance: none;
  min-width: 14rem;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-ink);
  background-color: var(--color-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%235c534f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.2' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  border: 1px solid rgba(61, 53, 50, 0.22);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out);
}

.collections-toolbar select:hover,
.collections-toolbar select:focus {
  border-color: rgba(61, 53, 50, 0.4);
  outline: none;
}

.collections-toolbar select:focus-visible {
  outline: 2px solid rgba(61, 53, 50, 0.35);
  outline-offset: 2px;
}

.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(61, 53, 50, 0.08);
  padding: 0 0 1.75rem;
  transition: box-shadow 0.25s var(--ease-out);
}

.product-card:hover {
  box-shadow: 0 12px 40px rgba(61, 53, 50, 0.08);
}

.product-card__detail {
  display: block;
  width: 100%;
  text-align: center;
  color: inherit;
}

.product-card__detail:hover {
  opacity: 1;
}

.product-card__detail:hover .product-card__title {
  opacity: 0.75;
}

.product-card__media {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #ebe6e1;
  margin-bottom: 1.25rem;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-card__title {
  margin: 0 0 0.5rem;
  padding: 0 1rem;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  letter-spacing: 0.02em;
  color: var(--color-ink);
  line-height: 1.35;
}

.product-card__price {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-ink-muted);
}

.btn--cart {
  min-height: 2.75rem;
  padding: 0 1.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

.collections-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: 1rem;
}

.collections-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-ink-muted);
  border: 1px solid transparent;
  border-radius: 50%;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.collections-pagination a:hover {
  opacity: 1;
  border-color: rgba(61, 53, 50, 0.2);
  color: var(--color-ink);
}

.collections-pagination__disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-ink-muted);
  opacity: 0.35;
  pointer-events: none;
}

.collections-pagination__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-ink);
  border: 1px solid rgba(61, 53, 50, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.collections-pagination svg,
.collections-pagination__disabled svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

@media (max-width: 768px) {
  .collections-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .collections-toolbar label {
    align-items: stretch;
  }

  .collections-toolbar select {
    min-width: 0;
    width: 100%;
  }

  .product-grid {
    grid-template-columns: 1fr;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }
}
