/* ------------------------------------------------------------------
   Products page. Sizes follow the site's 1rem = 1vw scale, with
   larger values at the 991px / 479px breakpoints like the main CSS.
------------------------------------------------------------------- */
.products-section {
  padding-top: 11rem;
  padding-bottom: 8rem;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 4rem;
  margin-bottom: 3.5rem;
}

.products-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 9rem;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.products-intro {
  max-width: 38rem;
  margin: 0;
}

.products-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.products-filter {
  font: inherit;
  color: var(--main-black);
  background: transparent;
  border: 2px solid var(--main-black);
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.products-filter:hover,
.products-filter.is-active {
  background: var(--main-black);
  color: #fff;
}

.products-filter:focus-visible {
  outline: 2px solid #5533ff !important;
  outline-offset: 3px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--main-black);
  background: #fff;
}

.product-card[hidden] {
  display: none;
}

.product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f1ee;
  border-bottom: 2px solid var(--main-black);
}

.product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border: 1px solid currentColor;
  background: #fff;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
  padding: 1.5rem;
}

.product-name {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 600;
}

.product-desc {
  margin: 0;
  flex: 1;
  color: #555;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
}

.product-preview-link {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.product-button {
  width: 100%;
  margin-top: 0.5rem;
}

.products-note {
  margin: 3rem 0 0;
  color: #555;
}

@media screen and (max-width: 991px) {
  .products-section { padding-top: 16rem; }
  .products-header { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .products-intro { max-width: none; }
  .products-title { font-size: 14rem; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; }
  .product-name { font-size: 2.6rem; }
  .product-price { font-size: 3.4rem; }
  .product-tag { font-size: 1.6rem; }
}

@media screen and (max-width: 479px) {
  .products-section { padding-top: 30rem; padding-bottom: 16rem; }
  .products-title { font-size: 20rem; }
  .products-filters { gap: 2rem; margin-bottom: 6rem; }
  .products-filter { padding: 2rem 5rem; }
  .products-grid { grid-template-columns: 1fr; gap: 6rem; }
  .product-body { padding: 5rem; gap: 3rem; }
  .product-name { font-size: 5.6rem; }
  .product-price { font-size: 7rem; }
  .product-tag { font-size: 3rem; top: 4rem; left: 4rem; padding: 1rem 2rem; }
  .product-button { margin-top: 2rem; }
  .products-note { margin-top: 8rem; }
}
