/* =========================================================
   LINHAMARÉ — PÁGINA DE PEÇAS
   ========================================================= */

/* Hero do catálogo */
.catalog-hero {
  padding: calc(var(--header-h) + 92px) 0 92px;
  color: var(--white);
  background: var(--black);
  border-bottom: 8px solid var(--yellow);
}

.catalog-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: end;
  gap: 60px;
}

.catalog-hero h1 {
  max-width: 920px;
  margin: 0 0 24px;
  font-size: clamp(52px, 7vw, 100px);
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.catalog-hero p {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.75;
}

.catalog-hero-mark {
  justify-self: end;
  width: 190px;
  opacity: 0.94;
}

/* Catálogo */
.catalog-section {
  padding: 0 0 118px;
  background: var(--paper);
}

.catalog-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -34px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 14px 50px rgba(10, 10, 10, 0.08);
}

.search-field {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
}

.search-field > svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--black);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0;
  color: var(--black);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.search-field input::placeholder {
  color: #8b8b86;
}

.clear-search {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.clear-search.show {
  opacity: 0.65;
  pointer-events: auto;
}

.catalog-count {
  flex: 0 0 auto;
  margin: 0;
  color: #777;
  font-size: 12px;
  font-weight: 600;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 18px;
}

.category-filters button,
.family-filters button {
  min-height: 42px;
  padding: 0 15px;
  color: #555;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-filters button:hover,
.category-filters button.active,
.family-filters button:hover,
.family-filters button.active {
  color: var(--black);
  background: var(--yellow);
  border-color: var(--yellow);
}

.family-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0 22px;
  border-bottom: 1px solid var(--line);
}

.family-label {
  flex: 0 0 auto;
  color: #777;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.family-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.active-filter-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: #656565;
  font-size: 12px;
}

.active-filter-line button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

/* Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.product-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 10, 10, 0.3);
  box-shadow: 0 22px 44px rgba(10, 10, 10, 0.08);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f0f0eb;
  border-bottom: 1px solid var(--line);
}

.product-media img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  background: var(--white);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-media img.is-loaded {
  opacity: 1;
}

.product-media img.is-broken {
  display: none;
}

.product-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--black);
  background:
    linear-gradient(135deg, transparent 48%, rgba(10, 10, 10, 0.06) 48% 50%, transparent 50%),
    var(--yellow);
}

.product-placeholder::after {
  content: "LINHAMARÉ";
  position: absolute;
  right: -14px;
  bottom: 8px;
  color: rgba(10, 10, 10, 0.12);
  font-size: clamp(26px, 3vw, 48px);
  font-weight: 800;
  letter-spacing: -0.06em;
}

.product-placeholder svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
}

.product-tag,
.product-family {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-tag {
  color: var(--black);
  background: var(--yellow);
  border-color: var(--yellow);
}

.product-family {
  color: #6d6d67;
  background: transparent;
}

.product-card h2 {
  margin-bottom: 10px;
  color: var(--black);
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.product-card p {
  flex: 1;
  margin-bottom: 22px;
  color: #666;
  font-size: 12px;
  line-height: 1.65;
}

.product-card .btn {
  width: 100%;
  min-height: 48px;
}

/* Estado vazio */
.empty-state {
  max-width: 700px;
  margin: 76px auto 0;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-symbol {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 26px;
  color: var(--black);
  background: var(--yellow);
  font-size: 26px;
  font-weight: 800;
}

.empty-state h2 {
  margin-bottom: 12px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.empty-state p {
  margin-bottom: 26px;
  color: #686868;
  line-height: 1.75;
}

/* Ajuda */
.catalog-help {
  background: var(--yellow);
}

.catalog-help-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.68fr);
  gap: 90px;
  align-items: end;
}

.catalog-help h2 {
  margin-bottom: 0;
  font-size: clamp(44px, 5.4vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.catalog-help p {
  margin-bottom: 26px;
  color: rgba(10, 10, 10, 0.7);
  font-size: 15px;
  line-height: 1.75;
}

.compatibility-band {
  color: var(--white);
  background: var(--black);
}

.compatibility-grid {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 90px;
  align-items: end;
}

.compatibility-band h2 {
  max-width: 800px;
  margin-bottom: 0;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.compatibility-band p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.8;
}

/* Responsivo Peças */
@media (max-width: 1080px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-help-inner,
  .compatibility-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 760px) {
  .catalog-hero-grid {
    grid-template-columns: 1fr;
  }

  .catalog-hero-mark {
    display: none;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-count {
    padding-left: 42px;
  }

  .family-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .catalog-hero {
    padding-top: calc(var(--header-h) + 70px);
  }

  .catalog-hero h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .category-filters,
  .family-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .category-filters button,
  .family-filters button {
    min-height: 48px;
    padding: 8px 10px;
    text-align: left;
  }
}
