/* ==========================================================================
   Winda — Hardware page composition (Copy Deck v3).
     hero · product gallery (search + filter) · in-development grid ·
     why-it-matters · catalog row · CTA
   Ported from the design export's prototype/product-hardware.html.
   Cards are rendered from data by js/hardware.js. Product photography does not
   exist yet, so each card's media is a labeled placeholder.
   ========================================================================== */

.hw-wrap {
  max-width: 1280px;
}

/* Toolbar: search + catalog button on top, filter chips below. */
.hw-toolbar {
  margin-bottom: 40px;
}

.hw-toolbar__top {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hw-search {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--w-white);
  background: var(--w-surface);
  border: 1px solid var(--w-line);
  padding: 10px 16px;
  outline: none;
  min-width: 230px;
  flex: 1;
  transition: border-color var(--dur-fast) var(--ease-engage);
}

.hw-search:focus {
  border-color: var(--w-green);
}

.hw-catalog-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 11.5px;
}

.hw-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Grid — five products per row on desktop. */
.hw-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

/* Card. */
.hw-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.hw-card--dev {
  border-style: dashed;
}

.hw-fig {
  position: relative;
  height: 150px;
  border-bottom: 1px solid var(--w-line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px 16px;
  text-align: center;
  background: var(--w-surface-2);
}

.hw-card--dev .hw-fig {
  border-bottom: 1px dashed var(--w-line-strong);
}

/* Real product/concept imagery fills the figure edge-to-edge. */
.hw-fig picture,
.hw-fig img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder caption standing in for the product photo. */
.hw-fig__ph {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--w-grey-2);
  line-height: 1.5;
}

.hw-card__num {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--w-green);
  pointer-events: none;
}

.hw-card--dev .hw-card__num {
  color: var(--w-warn);
}

.hw-card__body {
  padding: 16px 16px 18px;
}

.hw-card__title {
  font-size: 16.5px;
  line-height: 1.25;
}

.hw-card__cat {
  color: var(--w-grey-2);
  margin-top: 6px;
}

/* Hover reveal — full description over a near-opaque ground. */
.hw-hover {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 10, 0.94);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-engage);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.hw-card:hover .hw-hover,
.hw-card:focus-within .hw-hover {
  opacity: 1;
}

.hw-hover__num {
  color: var(--w-green);
}

.hw-hover__desc {
  font: 400 12.5px/1.55 var(--font-body);
  color: var(--w-grey);
}

/* "Need the full specs?" row. */
.hw-catalog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Narrow viewports — 5 → 3 → 2 columns.
   ========================================================================== */

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

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

  .hw-toolbar__top {
    flex-wrap: wrap;
  }
}

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