:root {
  --creme: #F5E8E2;
  --pessego: #DFB9A6;
  --terracota: #B8684F;
  --marrom: #85351E;
  --branco: #FFFFFF;
  --texto: #40251E;
  --texto-suave: #795C52;
  --borda: #E8D2C7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--creme);
  color: var(--texto);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* CABEÇALHO */
.site-header {
  min-height: 110px;
  padding: 10px 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
}

/* ÁREA DA LOGO */
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  line-height: 1;
  color: var(--marrom);
  text-decoration: none;
}

/* IMAGEM DA LOGO */
.img-logo {
  display: block;
  width: 120px;
  height: 100px;
  padding: 0;
  margin: 0;
  object-fit: contain;
  object-position: left center;
}

/* LOGO EM TEXTO, CASO UTILIZADA NA OUTRA PÁGINA */
.brand strong {
  color: var(--terracota);
}

.brand span {
  font-size: 10px;
  letter-spacing: 4px;
  font-weight: 400;
}

/* LINK DE VOLTAR */
.back-link {
  font-size: 16px;
  color: var(--marrom);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--terracota);
  text-decoration: underline;
}

/* CONTEÚDO PRINCIPAL */
.container {
  width: min(1100px, 88%);
  margin: 0 auto;
  flex: 1;
  padding: 54px 0 70px;
}

/* INTRODUÇÃO */
.intro {
  margin-bottom: 32px;
}

.eyebrow {
  color: var(--terracota);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 12px;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  color: var(--marrom);
}

h1 span {
  color: var(--terracota);
}

.intro>p:last-child {
  margin: 0;
  color: var(--texto-suave);
  line-height: 1.6;
}

/* GRADE DE CATEGORIAS */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  min-height: 135px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--borda);
  border-radius: 12px;
  background: var(--branco);
  transition: transform 0.18s, background 0.18s;
}

.category-card:hover {
  transform: translateY(-3px);
  background: #FFF9F6;
}

.category-card h2 {
  margin: 0 0 6px;
  font-size: 25px;
  color: var(--marrom);
}

.category-card p {
  margin: 0;
  font-size: 18px;
  color: var(--texto-suave);
}

.category-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--creme);
  color: var(--marrom);
  font-size: 22px;
}

.category-arrow {
  color: var(--terracota);
  font-size: 45px;
}

/* GRADE DE PRODUTOS */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 12px;
}

/* IMAGENS DOS PRODUTOS */
.product-image {
  height: 230px;
  padding: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--branco);
  color: var(--marrom);
  font-size: 36px;
}

.product-image img {
  display: block;
  width: 70%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.25s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.04);
}

/* INFORMAÇÕES DOS PRODUTOS */
.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info h2 {
  padding-top: 0;
  padding-bottom: 0;
  margin: 0 0 8px;
  color: var(--marrom);
  font-size: 20px;
  line-height: 1.5;
}

.product-info p {
  margin: 0 0 12px;
  color: var(--texto-suave);
  font-size: 15px;
  line-height: 1.5;
}

.product-price {
  margin-top: auto;
  padding-bottom: 15px;
  color: var(--marrom);
  font-weight: 700;
}

/* BOTÃO DE OFERTA */
.offer-button {
  display: block;
  text-align: center;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--terracota);
  color: var(--branco);
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s ease;
}

.offer-button:hover {
  background: var(--marrom);
}

/* ESTADO SEM PRODUTOS */
.empty-state {
  padding: 30px 0;
  color: var(--texto-suave);
}

/* RODAPÉ */
.site-footer {
  padding: 25px 7%;
  background: var(--marrom);
  color: var(--branco);
  text-align: center;
}

.site-footer p {
  margin: 5px auto;
  max-width: 760px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--creme);
}

/* ==================================================
   BUSCA
   ================================================== */
.search {
  position: relative;
  flex: 1 1 360px;
  max-width: 560px;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 58px 0 20px;
  border: 1px solid var(--borda);
  border-radius: 999px;
  background: #FFF9F6;
  color: var(--texto);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.search input::placeholder {
  color: var(--texto-suave);
}

.search input:focus {
  border-color: var(--terracota);
  background: var(--branco);
  box-shadow: 0 0 0 3px rgba(184, 104, 79, 0.18);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search button[type="submit"] {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--terracota);
  color: var(--branco);
  cursor: pointer;
  transition: background 0.2s;
}

.search button[type="submit"]:hover {
  background: var(--marrom);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(64, 37, 30, 0.15);
}

.search-suggestions[hidden] {
  display: none;
}

.search-suggestions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
}

.search-suggestions li:hover,
.search-suggestions li.is-active {
  background: #FFF1EA;
}

.suggestion-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--texto);
  font-size: 15px;
}

.suggestion-category {
  flex-shrink: 0;
  color: var(--terracota);
  font-size: 12px;
  font-weight: 700;
}

/* RESULTADOS DA BUSCA */
.search-summary {
  margin: 0 0 22px;
  color: var(--texto-suave);
  font-size: 17px;
  line-height: 1.6;
}

.search-summary strong {
  color: var(--marrom);
}

.clear-search {
  margin-left: 6px;
  padding: 4px 12px;
  border: 1px solid var(--borda);
  border-radius: 999px;
  background: var(--branco);
  color: var(--marrom);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.clear-search:hover {
  border-color: var(--terracota);
  color: var(--terracota);
}

/* TABLETS E CELULARES */
@media (max-width: 760px) {
  .site-header {
    min-height: 90px;
    padding: 8px 5%;
    gap: 12px;
    flex-wrap: wrap;
  }

  .img-logo {
    width: 95px;
    height: 80px;
  }

  .back-link {
    font-size: 13px;
  }

  .search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .search input {
    height: 42px;
    font-size: 16px; /* evita zoom automático no iPhone */
  }

  .search button[type="submit"] {
    top: 3px;
    width: 36px;
    height: 36px;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .container {
    padding-top: 38px;
  }

  .category-card {
    padding: 16px;
    min-height: 125px;
  }

  .category-card h2 {
    font-size: 15px;
  }

  .category-card p {
    font-size: 12px;
  }

  .category-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 18px;
  }

  .product-image {
    height: 190px;
    padding: 10px;
  }

  .product-info {
    padding: 13px;
  }

  .product-info h2 {
    font-size: 15px;
  }
}

/* CELULARES PEQUENOS */
@media (max-width: 420px) {
  .site-header {
    padding: 6px 4%;
    gap: 8px;
  }

  .img-logo {
    width: 78px;
    height: 70px;
  }

  .back-link {
    font-size: 11px;
  }

  .category-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 100px;
  }

  .product-image {
    height: 210px;
    padding: 12px;
  }

  .container {
    width: 92%;
  }

  .site-footer {
    padding: 20px 5%;
  }

  .site-footer p {
    font-size: 15px;
  }
}