/**
 * category-page.css
 * Página de categoria do design system (marmitissima-design, categoria.html):
 * category-banner.css + cartão .hero-banner__frame (banner.css) + grade de
 * produtos (#category-products em product-finder.css). O card de produto em
 * si vem de product-finder.css (.mm-pf .product-card).
 * Carregado só na categoria (Magento_Catalog/layout/catalog_category_view.xml
 * do tema commerce_templates). Valores em px (design em rem, raiz 16px).
 */
.category-banner {
  --color-accent: #ed3237;
  --color-accent-dark: #be282c;
  --color-accent-soft: #fde6e7;
  --color-surface: #ffffff;
  --color-primary: #201e1e;
  --color-primary-dark: #000000;
  --color-primary-soft: #ededed;
  padding: 20px 0 24px;
  font-family: 'Manrope', sans-serif;
}

/* ===== Trilha de navegação ===== */
.category-banner__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #6e6c6c;
}

.category-banner__breadcrumb a {
  color: #6e6c6c;
  text-decoration: none;
  transition: color 160ms ease;
}

.category-banner__breadcrumb a:hover {
  color: var(--color-accent-dark);
  text-decoration: none;
}

.category-banner__breadcrumb span[aria-current] {
  font-weight: 700;
  color: #201e1e;
}

/* ===== Cartão do banner ===== */
.category-banner .hero-banner__frame {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  aspect-ratio: 2000 / 450;
  border-radius: 24px;
  background:
    radial-gradient(120% 150% at 84% 30%, rgba(237, 50, 55, 0.4) 0%, rgba(237, 50, 55, 0) 60%),
    linear-gradient(135deg, #201e1e 0%, #000000 100%);
}

/* Arte decorativa (tokens redefinidos pras formas aparecerem no fundo escuro) */
.category-banner .hero-banner__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  --color-primary: rgba(255, 255, 255, 0.85);
  --color-primary-soft: rgba(237, 50, 55, 0.18);
}

.category-banner .hero-banner__media svg {
  position: absolute;
  top: 50%;
  right: -4%;
  width: 46%;
  height: auto;
  max-height: 92%;
  transform: translateY(-50%);
}

.category-banner .hero-banner__steam {
  position: absolute;
  top: 8%;
  right: 8%;
  width: 60px;
  height: 60px;
  color: var(--color-primary);
  opacity: 0.35;
}

.category-banner .hero-banner__steam svg {
  position: static;
  width: 100%;
  height: 100%;
  max-height: none;
  transform: none;
}

/* "Imagem da categoria" no lugar da arte: prato redondo à direita */
.category-banner .hero-banner__photo {
  position: absolute;
  top: 50%;
  right: 8%;
  width: auto;
  height: 84%;
  max-width: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.08), 0 20px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(-50%);
}

.category-banner .hero-banner__content {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  max-width: 520px;
  padding: 0 24px;
}

.category-banner .hero-banner__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff6b63;
}

.category-banner .hero-banner__title {
  margin: 0 0 10px;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(18px, 1vw + 16px, 28px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-transform: none;
}

.category-banner .hero-banner__description {
  max-width: 380px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

/* ===== Produtos em grade ===== */
.mm-category-products {
  /* Logo depois da trilha (o cartão do banner foi removido) */
  padding: 8px 0 64px;
}

.mm-pf .mm-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 4px 2px 10px;
  list-style: none;
}

.mm-pf .mm-category-grid .product-card {
  width: auto;
}

.mm-category-pager {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* ===== Responsivo ===== */
@media (max-width: 1024px) {
  .category-banner .hero-banner__content {
    max-width: 420px;
  }

  .category-banner .hero-banner__eyebrow {
    margin-bottom: 6px;
  }

  .category-banner .hero-banner__title {
    margin-bottom: 0;
  }

  .category-banner .hero-banner__description {
    display: none;
  }

  .category-banner .hero-banner__media svg {
    right: -8%;
    width: 52%;
  }

  .mm-pf .mm-category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .category-banner {
    padding: 16px 0 20px;
  }

  /* Ponta a ponta da tela, sem cantos (igual ao design) — o conteúdo da
     página tem 15px de respiro de cada lado, então o banner sai dele. */
  .category-banner .hero-banner__frame {
    align-items: flex-end;
    aspect-ratio: 4 / 3;
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 0;
  }

  .category-banner .hero-banner__content {
    max-width: 100%;
    padding-bottom: 8%;
  }

  .category-banner .hero-banner__title {
    margin-bottom: 10px;
    font-size: 28px;
  }

  .category-banner .hero-banner__description {
    display: block;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .category-banner .hero-banner__media svg {
    top: 30%;
    right: 50%;
    width: 78%;
    opacity: 0.9;
    transform: translate(50%, -30%);
  }

  .category-banner .hero-banner__steam {
    display: none;
  }

  .category-banner .hero-banner__photo {
    top: 30%;
    right: 50%;
    width: 62%;
    height: auto;
    transform: translate(50%, -30%);
  }

  .mm-category-products {
    padding: 4px 0 48px;
  }

  .mm-pf .mm-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .category-banner .hero-banner__frame {
    aspect-ratio: 3 / 4;
  }

  .category-banner .hero-banner__title {
    font-size: 24px;
  }

  .category-banner .hero-banner__eyebrow {
    margin-bottom: 10px;
  }

  .category-banner .hero-banner__description {
    font-size: 15px;
  }

  .mm-pf .mm-category-grid {
    gap: 12px;
  }
}
