
:root {
  --green: #16b86a;
  --dark: #102a20;
  --light: #f1f8f3;
  --text: #26352c;
  --muted: #758078;
  --border: #e5ece7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  color: var(--text);
  background: white;
}

button, input {
  font: inherit;
}

button, a {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}

.topbar {
  min-height: 75px;
  padding: 12px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: white;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: white;
  font-size: 25px;
  font-weight: 900;
}

.brand strong {
  display: block;
  color: var(--dark);
  font-size: 16px;
  letter-spacing: 1px;
}

.brand b {
  color: var(--green);
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}

.location {
  color: var(--muted);
  font-size: 12px;
}

.cart-button {
  padding: 11px 15px;
  border: 0;
  border-radius: 12px;
  background: var(--light);
  color: var(--dark);
  font-size: 17px;
  font-weight: bold;
}

.cart-button span {
  color: var(--green);
}

.hero {
  min-height: 400px;
  padding: 65px 9%;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 30px;
  background: linear-gradient(120deg, #effaf2, #ffffff);
}

.eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 600px;
  margin: 18px 0;
  color: var(--dark);
  font-size: clamp(35px, 5vw, 57px);
  line-height: 1.08;
  letter-spacing: -2px;
}

.hero h1 em {
  color: var(--green);
  font-style: normal;
}

.hero p {
  max-width: 470px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.hero-icon {
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
  justify-self: center;
  border-radius: 50%;
  background: #dff5e7;
  font-size: 110px;
}

.primary-btn {
  display: inline-block;
  margin-top: 22px;
  padding: 14px 21px;
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: bold;
  transition: .2s;
}

.primary-btn:hover {
  background: #109653;
  transform: translateY(-2px);
}

.search-area {
  max-width: 1000px;
  margin: 35px auto;
  padding: 0 20px;
}

.search-area input {
  width: 100%;
  height: 53px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  font-size: 13px;

}

/* Foto dos produtos cadastrados */
.product-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  padding: 10px;
}

.search-area input:focus {
  border-color: var(--green);
}

.section {
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 22px;
}

.section h2 {
  margin: 9px 0 22px;
  color: var(--dark);
  font-size: 28px;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category {
  padding: 12px 19px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: white;
  color: #526057;
  font-size: 12px;
  font-weight: bold;
  transition: .2s;
}

.category:hover,
.category.active {
  border-color: var(--green);
  background: #eaf8ef;
  color: #087d40;
}

.banner {
  max-width: 1050px;
  margin: 60px auto;
  padding: 40px;
  border-radius: 20px;
  background: var(--dark);
  color: white;
}

.banner span {
  color: #75e4a5;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
}

.banner h2 {
  max-width: 500px;
  margin: 15px 0;
  font-size: 30px;
}

.banner p {
  color: #c1d1c7;
  font-size: 13px;
  line-height: 1.7;
}

#resultCount {
  margin: -10px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: white;
  transition: .2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px #102a2012;
}

.product-visual {
  height: 170px;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eff8f1, #e2f5e8);
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 20px;
  background: white;
  color: #108b4b;
  font-size: 9px;
  font-weight: bold;
}

.product-emoji {
  font-size: 65px;
}

.product-info {
  padding: 17px;
}

.product-info small {
  color: var(--muted);
  font-size: 10px;
}

.product-info h3 {
  margin: 9px 0 17px;
  color: var(--dark);
  font-size: 15px;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price {
  color: var(--dark);
  font-size: 17px;
  font-weight: 900;
}

.add-btn {
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: #e8f8ee;
  color: #087d40;
  font-size: 10px;
  font-weight: bold;
}

.add-btn:hover {
  background: var(--green);
  color: white;
}

#emptyState {
  padding: 30px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.merchant-banner {
  margin: 60px 5%;
  padding: 35px;
  border-radius: 18px;
  background: var(--green);
  color: white;
}

.merchant-banner h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

.merchant-banner p {
  margin-bottom: 20px;
  font-size: 13px;
}

.merchant-banner a {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid white;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}

footer {
  padding: 40px 20px;
  background: var(--light);
  text-align: center;
}

footer strong {
  color: var(--dark);
  letter-spacing: 2px;
}

footer p {
  margin: 13px 0;
  color: var(--muted);
  font-size: 12px;
}

footer small {
  color: #89948c;
  font-size: 10px;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #0008;
  opacity: 0;
  visibility: hidden;
  transition: .25s;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  width: min(400px, 92vw);
  height: 100%;
  padding: 25px;
  display: flex;
  flex-direction: column;
  background: white;
  transform: translateX(105%);
  transition: .3s;
}

.drawer-open .backdrop {
  opacity: 1;
  visibility: visible;
}

.drawer-open .cart-drawer {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-head h2 {
  color: var(--dark);
}

.drawer-head button {
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 9px;
  background: var(--light);
}

#cartItems {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  font-size: 13px;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.cart-row button {
  margin-left: 8px;
  border: 0;
  background: none;
  color: #c33;
  font-size: 18px;
}

.drawer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.drawer-bottom strong {
  display: block;
  margin-bottom: 10px;
}

.drawer-bottom .primary-btn {
  width: 100%;
  text-align: center;
}

#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 30;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--dark);
  color: white;
  font-size: 12px;
  opacity: 0;
  transform: translate(-50%, 15px);
  pointer-events: none;
  transition: .2s;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .topbar {
    padding: 12px 16px;
  }

  .brand strong {
    font-size: 13px;
  }

  .location {
    font-size: 10px;
  }

  .hero {
    padding: 45px 23px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p {
    margin: auto;
  }

  .hero-icon {
    width: 180px;
    height: 180px;
    font-size: 80px;
  }

  .categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .category {
    flex-shrink: 0;
  }

  .banner {
    margin: 35px 16px;
    padding: 27px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .product-visual {
    height: 135px;
  }

  .product-emoji {
    font-size: 48px;
  }

  .product-info {
    padding: 12px;
  }

  .product-info h3 {
    font-size: 13px;
  }

  .price {
    font-size: 14px;
  }

  .add-btn {
    padding: 8px;
  }

  .merchant-banner {
    margin: 35px 16px;
    padding: 25px;
  }
}

@media (max-width: 380px) {
  .location {
    display: none;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-visual {
    height: 180px;
  }
}
