/* ============================================================
   QUART'Z — COLECOES.CSS
   Estilos exclusivos da página /colecoes
   ============================================================ */

/* ── HERO ────────────────────────────────────────────────────── */

.colecoes-hero {
  position: relative;
  width: 100%;
  height: 25vh;
  min-height: 160px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.colecoes-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.colecoes-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,13,15,0.15) 0%,
    rgba(13,13,15,0.55) 60%,
    rgba(13,13,15,0.78) 100%
  );
}

.colecoes-hero__conteudo {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 1.2rem 32px;
  text-align: center;
}

.colecoes-hero__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(244,240,232,0.75);
  margin-bottom: 6px;
}

.colecoes-hero__titulo {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.05;
  letter-spacing: 0.02em;
  font-style: italic;
  margin-bottom: 8px;
}

.colecoes-hero__sub {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 200;
  color: rgba(244,240,232,0.75);
  letter-spacing: 0.08em;
}

/* ── FILTER BAR ──────────────────────────────────────────────── */

.filter-bar {
  position: static;
  z-index: 90;
  background: var(--washi);
  border-bottom: 1px solid var(--stone);
}

/* Linha 1 — Coleções */
.filter-bar__colecoes {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.2rem;
  gap: 0;
  border-bottom: 1px solid rgba(212,197,176,0.4);
}
.filter-bar__colecoes::-webkit-scrollbar { display: none; }

/* Linha 2 — Material */
.filter-bar__materiais {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.2rem;
  gap: 8px;
  align-items: center;
  height: 44px;
}
.filter-bar__materiais::-webkit-scrollbar { display: none; }

/* Tab — coleção (underline amadeirado) */
.filter-tab {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 13px 12px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
}
.filter-tab:hover { color: var(--void); }
.filter-tab.ativo {
  color: var(--void);
  border-bottom-color: var(--amadeirado);
}

/* Pill — material (outline) */
.filter-pill {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 5px 12px;
  border: 1px solid var(--stone);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--void); color: var(--void); }
.filter-pill.ativo {
  background: var(--void);
  color: var(--washi);
  border-color: var(--void);
}

/* Ordenar — direita linha 1 */
.filter-bar__ordenar {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 13px 0 13px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.filter-bar__ordenar:hover { color: var(--void); }

/* ── GRID DE PRODUTOS ─────────────────────────────────────────── */

.produtos-secao {
  background: #fff;
  padding: 28px 1.2rem 48px;
}

.produtos-contagem {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 200;
  color: var(--ash);
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 20px;
}

.produtos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
}

/* Card — altura consistente via grid interno */
.prod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.prod-card.oculto { display: none; }

/* Imagem — quadrada, sem variação */
.prod-card__img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #F0EBE3;
  flex-shrink: 0;
}

.prod-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.prod-card:hover .prod-card__img-wrap img { transform: scale(1.05); }

/* Badges */
.prod-card__badge {
  position: absolute;
  top: 7px;
  left: 7px;
  font-family: var(--font-body);
  font-size: 6px;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 3px 6px;
  background: var(--void);
  color: var(--washi);
  line-height: 1;
  z-index: 1;
}
.prod-card__badge--novo      { background: var(--amadeirado); }
.prod-card__badge--exclusivo { background: var(--void); }
.prod-card__badge--destaque  { background: var(--amadeirado); }



/* Corpo — flex grow para alinhar entre cards */
.prod-card__corpo {
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  text-align: center;
}

/* Material/categoria — bem pequeno, uppercase */
.prod-card__meta {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 6px;
  line-height: 1.5;
}

/* Nome */
.prod-card__nome {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  color: var(--void);
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: calc(1.6em * 2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Origem */
.prod-card__origem {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 200;
  color: var(--stone);
  margin-top: 2px;
  letter-spacing: 0.06em;
}

/* Separador fino antes do preço */
.prod-card__sep {
  width: 24px;
  height: 1px;
  background: var(--stone);
  margin: 10px auto;
}

/* Preço */
.prod-card__preco {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--void);
  letter-spacing: 0.06em;
}

/* Parcela */
.prod-card__parcela {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 200;
  color: var(--ash);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ── LOAD MORE ───────────────────────────────────────────────── */

.load-more {
  background: #fff;
  padding: 0 1.2rem 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.load-more__btn {
  width: 100%;
  max-width: 400px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 24px;
  background: transparent;
  color: var(--void);
  border: 1px solid var(--void);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.load-more__btn:hover { background: var(--void); color: var(--washi); }

.load-more__texto {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 200;
  color: var(--ash);
  letter-spacing: 0.06em;
}

/* ── VISTO RECENTEMENTE ──────────────────────────────────────── */

.visto-recentemente {
  background: var(--washi);
  padding: 48px 1.2rem 52px;
  border-top: 1px solid var(--stone);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.visto-recentemente__titulo {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 32px;
}

.visto-card {
  width: 100%;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.visto-card__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #F0EBE3;
  margin-bottom: 18px;
}

.visto-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.visto-card:hover .visto-card__img-wrap img { transform: scale(1.04); }

.visto-card__meta {
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 200;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 6px;
  text-align: center;
}

.visto-card__nome {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--void);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 10px;
}

.visto-card__sep {
  width: 24px;
  height: 1px;
  background: var(--stone);
  margin-bottom: 10px;
}

.visto-card__preco {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--void);
  letter-spacing: 0.06em;
  text-align: center;
}

.visto-card__parcela {
  font-family: var(--font-body);
  font-size: 7.5px;
  font-weight: 200;
  color: var(--ash);
  letter-spacing: 0.04em;
  margin-top: 2px;
  text-align: center;
}

/* ============================================================
   DESKTOP — COLEÇÕES (≥1024px)
   Sidebar de filtros fixa à esquerda + grid de produtos
   ============================================================ */
@media (min-width: 1024px) {

  /* ── SIDEBAR DE FILTROS ──────────────────────────────────── */
  #filter-bar {
    float: left;
    width: 260px;
    border-right: 1px solid var(--stone);
    border-bottom: none;
    position: sticky;
    top: 64px; /* altura do header fixo */
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 28px 0 40px;
    scrollbar-width: thin;
  }

  /* Cada linha de filtro vira lista vertical */
  .filter-bar__colecoes,
  .filter-bar__materiais {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    overflow: visible;
    padding: 0 1.6rem;
    gap: 2px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212,197,176,0.4);
  }
  .filter-bar > .filter-bar__materiais:last-child { border-bottom: none; margin-bottom: 0; }

  /* Títulos dos grupos — inseridos via CSS, sem mexer no HTML */
  #filter-bar > div:nth-child(1)::before { content: 'Coleção'; }
  #filter-bar > div:nth-child(2)::before { content: 'Material'; }
  #filter-bar > div:nth-child(3)::before { content: 'Pedra'; }
  #filter-bar > div:nth-child(4)::before { content: 'Categoria'; }

  #filter-bar > div::before {
    display: block;
    font-family: var(--font-body);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ash);
    margin-bottom: 10px;
  }

  /* Tabs de coleção — vertical, com indicador lateral */
  .filter-tab {
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border-bottom: none;
    border-left: 2px solid transparent;
  }
  .filter-tab.ativo {
    border-left-color: var(--amadeirado);
    border-bottom-color: transparent;
    background: rgba(160,98,42,0.05);
  }
  .filter-bar__ordenar {
    margin-left: 0;
    padding: 9px 10px;
    justify-content: flex-start;
  }

  /* Pills — vertical, sem caixa, indicador lateral ao ativar */
  .filter-pill {
    width: 100%;
    text-align: left;
    border: none;
    padding: 8px 10px;
  }
  .filter-pill:hover {
    border: none;
    background: rgba(212,197,176,0.15);
    color: var(--void);
  }
  .filter-pill.ativo {
    background: rgba(160,98,42,0.08);
    color: var(--void);
    border: none;
    border-left: 2px solid var(--amadeirado);
  }

  /* ── ÁREA DE PRODUTOS ────────────────────────────────────── */
  .produtos-secao {
    margin-left: 260px;
    padding: 28px 2.5rem 48px;
  }

  .produtos-contagem { text-align: left; }

  .produtos-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
  }

  .load-more {
    margin-left: 260px;
    padding: 0 2.5rem 48px;
  }

  /* Quebra o float antes da próxima seção full-width */
  .visto-recentemente { clear: both; }
}

/* Telas bem largas — 4 colunas no grid de produtos */
@media (min-width: 1440px) {
  .produtos-secao { margin-left: 280px; }
  .load-more { margin-left: 280px; }
  #filter-bar { width: 280px; }
  .produtos-grid { grid-template-columns: repeat(4, 1fr); }
}
