:root {
  --color-bg: #fff8f0;
  --color-surface: #ffffff;
  --color-dark: #4a3426;
  --color-muted: #a08a78;
  --color-mango: #ffb56b;
  --color-mango-soft: #ffe3c2;
  --color-mango-deep: #e8924a;
  --color-leaf: #cfe5cf;
  --color-blush: #fbdad5;
  --font-heading: "Jost", sans-serif;
}

body {
  font-family: var(--font-heading);
  color: var(--color-dark);
  background: var(--color-surface);
}

a {
  color: var(--color-mango-deep);
}

/* botões da marca */
.btn-mangga {
  background: var(--color-mango);
  border: 1px solid var(--color-mango);
  color: var(--color-dark);
  border-radius: 999px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-mangga:hover,
.btn-mangga:focus {
  background: var(--color-mango-deep);
  border-color: var(--color-mango-deep);
  color: #fff;
}
.btn-mangga-outline {
  background: transparent;
  border: 1px solid var(--color-mango-deep);
  color: var(--color-mango-deep);
  border-radius: 999px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-mangga-outline:hover,
.btn-mangga-outline:focus {
  background: var(--color-mango-soft);
  border-color: var(--color-mango-deep);
  color: var(--color-dark);
}

/* topbar */
.topbar {
  background-color: var(--color-dark);
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 0;
}
.topbar a {
  color: #fff;
  text-decoration: none;
  margin-right: 16px;
  opacity: 0.85;
}
.topbar a:hover {
  opacity: 1;
}
.topbar-select {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 0.8rem;
}
.topbar-select option {
  color: #000;
}

/* navbar */
.main-navbar {
  padding: 18px 0;
  background: var(--color-surface);
  border-bottom: 1px solid #f3e7da;
}
.navbar-brand {
  font-weight: 700;
  letter-spacing: 3px;
  font-size: 1.4rem;
  color: var(--color-mango-deep) !important;
}
.main-nav .nav-link {
  color: var(--color-dark);
  font-weight: 500;
  margin: 0 14px;
}
.main-nav .nav-link:hover {
  color: var(--color-mango-deep);
}
.main-nav .nav-link.active {
  color: var(--color-mango-deep);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.main-nav .dropdown-menu {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(74, 52, 38, 0.12);
  margin-top: 8px;
  min-width: 200px;
}
.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus {
  background: var(--color-mango-soft);
}
.nav-icon {
  color: var(--color-dark);
  font-size: 1.1rem;
}
.nav-icon:hover {
  color: var(--color-mango-deep);
}
.nav-icon-link {
  color: var(--color-dark);
  text-decoration: none;
  font-size: 0.9rem;
}
.guest-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
#userMenu .dropdown-menu {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(74, 52, 38, 0.12);
}
#userMenu .dropdown-item:hover {
  background: var(--color-mango-soft);
}

.search-bar {
  display: none;
  background: var(--color-bg);
  border-bottom: 1px solid #f3e7da;
}

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-mango-soft) 100%);
  display: flex;
  align-items: center;
  min-height: 440px;
}
.hero-text-wrap {
  position: relative;
  z-index: 2;
  padding: 40px 0;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  color: var(--color-mango-deep);
  font-weight: 600;
}
.hero-title {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.15;
  margin-top: 12px;
}
.hero-subtitle {
  color: var(--color-muted);
  margin: 20px 0 32px;
}
.btn-hero {
  padding: 12px 32px;
}
.hero-img-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
}
.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px 0 0 16px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%);
  mask-image: linear-gradient(to right, transparent 0%, #000 30%);
}

/* animação de aparição ao rolar */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* products */
.products-section {
  padding: 80px 0;
  background: var(--color-surface);
}
.section-title {
  font-weight: 600;
  letter-spacing: 1px;
}
.busca-subheader {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 24px 0 4px;
}
.btn-category {
  border: 1px solid var(--color-mango-deep);
  background: transparent;
  color: var(--color-mango-deep);
  border-radius: 999px;
  padding: 6px 20px;
  margin: 0 6px 10px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.btn-category.active,
.btn-category:hover {
  background: var(--color-mango);
  border-color: var(--color-mango);
  color: var(--color-dark);
}
.anuncio-banner {
  display: inline-block;
}
.anuncio-banner img {
  max-height: 120px;
  border-radius: 12px;
}

.product-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}
.product-image {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}
.product-card:hover .product-image {
  transform: scale(1.04);
}
.btn-ver-mais {
  position: absolute;
  left: 50%;
  bottom: -50px;
  transform: translateX(-50%);
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 8px 20px;
  white-space: nowrap;
  transition: bottom 0.25s ease;
  background: var(--color-dark);
  border: none;
  color: #fff;
}
.btn-ver-mais:hover {
  background: var(--color-mango-deep);
  color: #fff;
}
.product-image-wrapper:hover .btn-ver-mais {
  bottom: 16px;
}
.btn-favorito {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--color-dark);
  transition: transform 0.15s ease;
  z-index: 2;
}
.btn-favorito:hover {
  transform: scale(1.1);
}
.btn-favorito i.bi-heart-fill {
  color: #e0574c;
}
.product-name {
  margin: 14px 0 4px;
  color: var(--color-muted);
}
.product-price {
  font-weight: 600;
  color: var(--color-mango-deep);
}

/* promo */
.promo-card {
  min-height: 320px;
  display: flex;
  align-items: center;
  padding: 40px;
}
.promo-primeira {
  background: var(--color-leaf);
}
.promo-segunda {
  background: var(--color-blush);
}
.promo-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  color: var(--color-dark);
  opacity: 0.6;
}
.promo-content h3 {
  font-weight: 600;
  margin: 14px 0 24px;
}

/* footer */
.site-footer {
  background: var(--color-dark);
  color: #fff;
  font-size: 0.85rem;
}

/* back to top */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.back-to-top.show {
  display: flex;
}

/* modais */
.modal-content {
  border: none;
  border-radius: 16px;
}
.modal-sm-plus {
  max-width: 420px;
}
.form-control,
.form-select {
  border-radius: 10px;
  border-color: #ecdccb;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--color-mango);
  box-shadow: 0 0 0 0.2rem rgba(255, 181, 107, 0.25);
}
.form-label {
  font-weight: 500;
  font-size: 0.9rem;
}

/* filtros + busca (sem !important para não brigar com jQuery show/hide) */
.filtros-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

/* busca de produtos na home */
.search-produtos input {
  min-width: 220px;
  border-radius: 999px;
}

/* checkboxes de categorias (cadastro / minha conta) */
.categorias-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.categorias-checkboxes .cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-mango-deep);
  color: var(--color-mango-deep);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}
.categorias-checkboxes .cat-chip input {
  display: none;
}
.categorias-checkboxes .cat-chip.ativo {
  background: var(--color-mango);
  border-color: var(--color-mango);
  color: var(--color-dark);
}

/* termos de uso */
.termos-texto {
  white-space: pre-wrap;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--color-dark);
}

/* meus produtos / admin */
.produto-linha:last-child {
  border-bottom: none !important;
}
.produto-linha-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  margin-right: 12px;
}

/* produto clicável / detalhe */
.product-image,
.product-name {
  cursor: pointer;
}

/* perfil do artesão */
.perfil-artesao-info {
  max-width: 560px;
  margin: 24px auto 0;
  text-align: center;
}
.perfil-artesao-info .avatar-iniciais,
.perfil-artesao-info img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  font-size: 2rem;
}
.perfil-artesao-info .contatos a {
  margin: 0 8px;
  font-size: 1.2rem;
}

/* cards de artesãos */
.artesao-card {
  cursor: pointer;
}
.avatar-iniciais {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  font-weight: 600;
  border-radius: 14px;
  letter-spacing: 2px;
}
.artesao-card .product-name {
  color: var(--color-dark);
  font-weight: 500;
}
.np-imagem-row .input-group-text {
  background: #fff;
}
#pdGaleria img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
}

@media (max-width: 991px) {
  .hero {
    display: block;
    min-height: 0;
  }
  .hero-text-wrap {
    padding: 48px 0;
  }
  .hero-img-wrap {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .main-nav .nav-link {
    margin: 6px 0;
  }
}
