/* Ouro Gourmet — Colecções (og_coleccoes.css)
   Objectivo: grid editorial, cards premium, CTA dourado com hover invertido,
   responsivo 3/2/1 colunas, imagens consistentes (sem alturas fixas).

   Nota: variáveis estão SCOPEADAS ao componente (.og-collections) para não
   contaminar o resto do tema/loja.
*/

/* Wrapper do shortcode + tokens locais */
.og-collections{
  /* tokens (scope local) */
  --og-gold: #c9a23a;
  --og-black: #111111;
  --og-text: #222222;
  --og-muted: #666666;
  --og-surface: #ffffff;
  --og-border: rgba(0,0,0,.08);
  --og-shadow: 0 10px 28px rgba(0,0,0,.06);
  --og-shadow-hover: 0 16px 40px rgba(0,0,0,.10);

  max-width: 1180px;
  margin: clamp(28px, 4vw, 56px) auto clamp(56px, 6vw, 84px);
  padding: 0 clamp(16px, 2vw, 20px);

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);

  /* tipografia base para o bloco */
  color: var(--og-text);
}

@media (max-width: 980px){
  .og-collections{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px){
  .og-collections{ grid-template-columns: 1fr; }
}

/* Card */
.og-collection-card{
  background: var(--og-surface);
  border: 1px solid var(--og-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--og-shadow);
  transform: translateY(0);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;

  /* melhora a leitura/qualidade visual */
  will-change: transform;
}

.og-collection-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--og-shadow-hover);
  border-color: rgba(0,0,0,.14);
}

/* Link do card ocupa o card inteiro */
.og-collection-card__link{
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;

  color: inherit;
  text-decoration: none;
}

/* Imagem consistente */
.og-collection-image{
  background: #f4f4f4;
  position: relative;
  overflow: hidden;
}

.og-collection-image img{
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .35s ease;
}

/* Zoom subtil na imagem em hover (premium, sem exageros) */
.og-collection-card:hover .og-collection-image img{
  transform: scale(1.03);
}

/* Fallback para browsers sem aspect-ratio */
@supports not (aspect-ratio: 4 / 3){
  .og-collection-image{ height: 0; padding-top: 75%; }
  .og-collection-image img{
    position: absolute;
    inset: 0;
    height: 100%;
  }
}

/* Placeholder caso não exista imagem */
.og-collection-image__placeholder{
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(0,0,0,.04), rgba(0,0,0,.10));
}

/* Conteúdo */
.og-collection-content{
  padding: 18px 18px 22px;
  text-align: left;
  display: grid;
  gap: 10px;
}

.og-collection-content h2{
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.15;
  letter-spacing: .01em;
  margin: 0;
  color: var(--og-text);
}

.og-collection-content p{
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  color: var(--og-muted);
}

/* CTA — dourado com texto preto, hover invertido */
.og-collection-link{
  justify-self: start;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 999px;

  background: var(--og-gold);
  color: var(--og-black);

  font-weight: 650;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;

  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.og-collection-card:hover .og-collection-link{
  background: var(--og-black);
  color: var(--og-gold);
  transform: translateY(-1px);
}

/* Acessibilidade: foco visível */
.og-collection-link:focus-visible,
.og-collection-card__link:focus-visible{
  outline: 2px solid var(--og-gold);
  outline-offset: 3px;
}

/* Mobile */
@media (max-width: 640px){
  .og-collection-content{
    text-align: center;
    justify-items: center;
  }

  .og-collection-link{
    justify-self: center;
  }
}