/* =====================================================
   INDEX.CSS - MIPRA
   Página inicial / vitrine
===================================================== */

/* =========================
   HERO / SLIDER
========================= */

.hero,
.hero-marketplace {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  border-radius: var(--radius-grande);
  display: flex;
  align-items: center;
  color: #fff;
  box-shadow: var(--sombra);
}

.slider-banner {
  padding: 0;
  min-height: 270px;
  background: #0b6b32;
}

.slide-banner {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 42px 120px;
  display: flex;
  align-items: center;
}

.slide-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 80, 35, .90) 0%,
      rgba(0, 100, 45, .72) 38%,
      rgba(255, 101, 0, .28) 100%
    );
}

.slide-banner.ativo {
  opacity: 1;
  visibility: visible;
}

.hero-texto {
  position: relative;
  z-index: 2;
  width: 48%;
}

.hero-texto span {
  display: block;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}

.hero-texto h1 {
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.08;
  color: #fff;
}

.hero-texto p {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,.96);
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 10px;
  background: #fff;
  color: var(--verde);
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
  transition: .2s ease;
  text-decoration: none;
}

.btn-hero:hover {
  transform: translateY(-2px);
  background: #f8f8f8;
}

/* =========================
   SETAS / BOLINHAS
========================= */

.seta-banner {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: .2s ease;
}

.seta-banner:hover {
  background: rgba(255,255,255,.34);
}

.seta-esquerda {
  left: 22px;
}

.seta-direita {
  right: 22px;
}

.hero-bolinhas {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 12;
}

.hero-bolinhas span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  cursor: pointer;
  transition: .2s ease;
}

.hero-bolinhas span:hover,
.hero-bolinhas .ativo {
  background: #fff;
}

/* ===============================
   CATEGORIAS HOME
================================ */

.categorias-home {
  width: min(96%, 1500px);
  margin: 28px auto 80px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
  position: relative;
  z-index: 5;
}

.categoria-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 18px 12px;
  min-height: 155px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
  border: 1px solid rgba(0, 128, 64, 0.10);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.categoria-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0, 128, 64, 0.18);
}

.categoria-card a {
  text-decoration: none;
  color: #123524;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.categoria-card img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #f4fff8;
  box-shadow: 0 6px 16px rgba(0, 128, 64, 0.20);
  background: #f7fff9;
}

.categoria-card strong {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  color: #10351f;
}

.categoria-icone {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, #008a3d, #ff8c00);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 6px 16px rgba(0, 128, 64, 0.20);
}

.categoria-todas {
  background: linear-gradient(135deg, #ffffff, #fff8ee);
  border: 1px solid rgba(255, 140, 0, 0.25);
}

.categoria-todas .categoria-icone {
  background: linear-gradient(135deg, #008a3d, #006b31);
}

/* ===============================
   PRODUTOS ANTIGOS / COMPATIBILIDADE
================================ */

.secao-produtos {
  margin-top: 18px;
  padding-bottom: 22px;
}

.titulo-secao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.titulo-secao h2 {
  margin: 0;
  font-size: 22px;
  color: #111;
}

.titulo-secao a {
  color: var(--verde);
  font-weight: 900;
  font-size: 14px;
}

.grid-produtos {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.produto-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: 12px;
  padding: 16px 16px 18px;
  min-height: 255px;
  box-shadow: var(--sombra);
  overflow: hidden;
  transition: .2s ease;
}

.produto-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-hover);
}

.produto-card img {
  width: 100%;
  height: 118px;
  object-fit: contain;
  margin: 6px 0 14px;
}

.produto-card h3 {
  font-size: 13px;
  line-height: 1.35;
  min-height: 36px;
  margin: 0 0 12px;
  color: #111;
}

.produto-card p {
  margin: 6px 0 0;
  color: var(--verde-escuro);
  font-size: 13px;
}

.preco {
  display: inline-block;
  font-size: 19px;
  color: var(--verde);
  margin-bottom: 4px;
  font-weight: 900;
}

.linha-preco {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preco-antigo {
  color: #9ca3af;
  text-decoration: line-through;
  font-size: 13px;
}

/* =========================
   BADGES / FAVORITO
========================= */

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 12px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
}

.badge.verde {
  background: var(--verde);
}

.badge.laranja {
  background: var(--laranja);
}

.favorito {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s ease;
}

.favorito:hover {
  color: var(--laranja);
  transform: scale(1.12);
}

/* ===============================
   PRODUTOS EM DESTAQUE - HOME
================================ */

.home-produtos-destaque {
     max-width: 1180px;
  margin: 80px auto 70px;
  padding: 0 18px;
}

.home-section-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.home-section-topo h2 {
  margin: 0;
  color: #3b2418;
  font-size: 26px;
}

.home-section-topo p {
  margin: 5px 0 0;
  color: #7a5a48;
}

.link-ver-todos {
  background: #7a1f14;
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.grid-produtos-home {
      display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 320px));
  gap: 24px;
  justify-content: flex-start;
}

.produto-home-card {
  background: #fffaf3;
  border: 1px solid #ead9c5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(80, 35, 20, 0.11);
  transition: 0.2s ease;
}

.produto-home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(80, 35, 20, 0.16);
}

.produto-home-img {
  position: relative;
  display: block;
  height: 190px;
  background: #fff3e5;
  overflow: hidden;
}

.produto-home-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-desconto,
.badge-destaque {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  color: #e97007;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.badge-desconto {
  left: 10px;
  background: rgba(220, 38, 38, .18);
}

.badge-destaque {
  top: 10px;
  right: 10px;
  background: rgba(249, 115, 22, .18);
}

.badge-frete-gratis {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(22, 163, 74, .18);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
}

.produto-home-info {
  padding: 14px;
}

.produto-home-categoria {
  display: block;
  color: #9a6b4f;
  font-weight: 700;
  margin-bottom: 7px;
}

.produto-home-info h3 {
  margin: 0;
  color: #2f1b12;
  font-size: 17px;
  line-height: 1.25;
}

.produto-home-info p {
  min-height: 38px;
  margin: 8px 0 12px;
  color: #6f4e3d;
  font-size: 14px;
  line-height: 1.35;
}

.produto-home-precos {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

.produto-home-precos strong {
  color: #166534;
  font-size: 21px;
}

.produto-home-acoes {
  display: flex;
}

.btn-ver-produto {
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, #b12718, #f97316);
  color: #fff;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
}

.produto-home-loading,
.produto-home-vazio {
  grid-column: 1 / -1;
  background: #fff7ed;
  border: 1px dashed #f97316;
  color: #7c2d12;
  padding: 22px;
  border-radius: 16px;
  text-align: center;
  font-weight: 800;
}

/* =========================
   RESPONSIVO
========================= */

@media (max-width: 1200px) {
  .categorias-home {
    grid-template-columns: repeat(4, 1fr);
  }

  .grid-produtos {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 980px) {
  .hero,
  .hero-marketplace {
    min-height: 235px;
  }

  .slide-banner {
    padding: 34px 70px;
  }

  .hero-texto {
    width: 68%;
  }

  .hero-texto h1 {
    font-size: 34px;
  }

  .grid-produtos {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .categorias-home {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 80px;
  }

  .categoria-card {
    min-height: 140px;
    padding: 16px 10px;
  }

  .categoria-card img,
  .categoria-icone {
    width: 78px;
    height: 78px;
  }

  .categoria-card strong {
    font-size: 10px;
  }
}

@media (max-width: 720px) {
  .hero,
  .hero-marketplace {
    min-height: 220px;
    border-radius: 12px;
  }

  .slide-banner {
    padding: 30px 24px;
  }

  .slide-banner::before {
    background:
      linear-gradient(
        90deg,
        rgba(0, 80, 35, .92) 0%,
        rgba(0, 100, 45, .78) 55%,
        rgba(255, 101, 0, .25) 100%
      );
  }

  .hero-texto {
    width: 100%;
  }

  .hero-texto h1 {
    font-size: 29px;
  }

  .hero-texto p {
    font-size: 14px;
  }

  .seta-banner {
    display: none;
  }

  .grid-produtos,
  .grid-produtos-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .produto-card {
    padding: 12px;
    min-height: 230px;
  }

  .produto-card img {
    height: 104px;
  }

  .produto-card h3 {
    font-size: 12px;
  }

  .preco {
    font-size: 16px;
  }

  .home-section-topo {
    flex-direction: column;
    align-items: flex-start;
  }

  .produto-home-img {
    height: 145px;
  }

  .produto-home-info {
    padding: 11px;
  }

  .produto-home-info h3 {
    font-size: 15px;
  }

  .produto-home-precos strong {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .hero-texto h1 {
    font-size: 25px;
  }

  .btn-hero {
    min-height: 38px;
    padding: 0 18px;
    font-size: 13px;
  }

  .categorias-home {
    grid-template-columns: repeat(2, 1fr);
  }

  .categorias-home article,
  .categoria-card {
    min-height: 78px;
  }

  .grid-produtos,
  .grid-produtos-home {
    gap: 8px;
  }

  .produto-card,
  .produto-home-card {
    border-radius: 10px;
  }
}



