/* ============================================
   CATÁLOGO — estilos
   ============================================ */

.catalog-hero {
  background: var(--leaf);
  color: var(--paper);
  padding-block: clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}

.catalog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 50%, rgba(242, 201, 76, 0.14), transparent 55%),
    radial-gradient(ellipse at 10% 100%, rgba(143, 71, 36, 0.30), transparent 55%);
  pointer-events: none;
}

.catalog-hero .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: end;
  position: relative;
}

.catalog-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  color: var(--paper);
}

.catalog-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--banana);
}

.catalog-hero .lead {
  color: rgba(255, 247, 232, 0.78);
  margin-top: 18px;
}

.catalog-hero .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 24px;
  background: rgba(255, 247, 232, 0.06);
  border: 1px solid rgba(255, 247, 232, 0.14);
  border-radius: var(--r-lg);
  backdrop-filter: blur(6px);
}

.catalog-hero .stat {
  text-align: center;
}

.catalog-hero .stat .n {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--banana);
  line-height: 1;
}

.catalog-hero .stat .l {
  display: block;
  margin-top: 6px;
  color: rgba(255, 247, 232, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----- Toolbar (busca, ordenação, view toggle) ----- */
.catalog-toolbar {
  position: sticky;
  top: 76px;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-block: 18px;
}

.catalog-toolbar .container {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
}

.catalog-search {
  position: relative;
}

.catalog-search input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 46px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  font-size: 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.catalog-search input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px var(--copper-soft);
}

.catalog-search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  fill: none; stroke: var(--muted);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}

.catalog-sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 50px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}

.catalog-sort select {
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.view-toggle {
  display: inline-flex;
  height: 50px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--white);
}

.view-toggle button {
  width: 50px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.view-toggle button svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6;
}

.view-toggle button.on {
  background: var(--leaf);
  color: var(--banana);
}

/* ----- Filtros (chips) ----- */
.catalog-filters {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 144px;
  z-index: 19;
}

.catalog-filters .container {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--copper-soft) transparent;
  padding-bottom: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 16px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 200ms ease;
  white-space: nowrap;
}

.chip:hover { border-color: var(--copper); }

.chip.on {
  background: var(--leaf);
  color: var(--banana);
  border-color: var(--leaf);
}

.chip .count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--milk);
  color: var(--muted);
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 800;
  transition: background 200ms ease, color 200ms ease;
}

.chip.on .count {
  background: var(--banana);
  color: var(--leaf-deep);
}

/* ----- Grid de produtos ----- */
.catalog-grid {
  padding-block: clamp(36px, 5vw, 64px);
  background: var(--paper);
}

.product-grid.loading { opacity: 0.5; pointer-events: none; }

.product-grid.list-view {
  grid-template-columns: 1fr;
  max-width: 880px;
  margin-inline: auto;
}

.product-grid.list-view .product-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 200px;
}

.product-grid.list-view .pc-image {
  aspect-ratio: 1;
  width: 200px;
  flex: 0 0 200px;
}

.product-grid.list-view .pc-body {
  padding: 22px 22px 0;
}

.product-grid.list-view .pc-actions {
  padding: 0 22px 22px;
}

.empty-state {
  text-align: center;
  padding: 64px 18px;
  color: var(--muted);
}

.empty-state svg {
  width: 64px; height: 64px;
  fill: none; stroke: var(--whisper);
  stroke-width: 1.4;
  margin: 0 auto 18px;
  display: block;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
  color: var(--ink);
}

/* ----- Card de produto: animações na entrada ----- */
.product-grid .product-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.product-grid .product-card.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .catalog-toolbar .container {
    grid-template-columns: 1fr;
  }
  .catalog-toolbar { top: 64px; }
  .catalog-filters { top: 268px; }

  .product-grid.list-view .product-card { flex-direction: column; }
  .product-grid.list-view .pc-image { width: 100%; }

  .catalog-hero .container {
    grid-template-columns: 1fr;
  }

  .catalog-hero .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}
