:root {
  --shopee-orange: #ee4d2d;
  --shopee-light: #fff5f1;
  --text-dark: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: var(--shopee-light);
}

header a{
  text-decoration: none;
  color: #fff;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 10px 80px; /* bottom padding para o sticky CTA */
}

header {
  background: var(--shopee-orange);
  color: #fff;
  padding: 20px 0;
  text-align: center;
  border-radius: 12px;
  margin-top: 15px;
}

.categories {
  display: flex;
  gap: 10px;
  padding: 10px;
  overflow-x: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee; /* Borda visível */
  margin: 15px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--shopee-orange) #fff;
}

/* Scrollbar para Chrome, Edge e Safari */
.categories::-webkit-scrollbar {
  height: 6px;
}

.categories::-webkit-scrollbar-thumb {
  background-color: var(--shopee-orange);
  border-radius: 3px;
}

.categories::-webkit-scrollbar-track {
  background: #fff;
}

.categories button {
  border: 1px solid var(--shopee-orange);
  background: #fff;
  color: var(--shopee-orange);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: all 0.2s ease;
}

.categories button:hover {
  background: var(--shopee-light);
}

.categories button.active {
  transform: scale(0.95);
  background: var(--shopee-orange);
  color: #fff;
  box-shadow: 0 3px 6px rgba(238, 77, 45, 0.35);
}

.search-box {
  display: flex;
  gap: 8px;
  padding: 10px 0;
}

.search-box input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.search-box button {
  background: var(--shopee-orange);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.products {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 15px;
}

.product {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}

.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,.15);
}

.product img {
  width: auto;          /* Mantém a largura original */
  max-width: 100%;      /* Não ultrapassa o container horizontalmente */
  height: auto;         /* Mantém a altura original */
  display: block;       /* Evita espaçamento indesejado */
  margin: 0 auto;       /* Centraliza a imagem no card */
}

.product-info {
  padding: 12px;
  text-align: center;
}

.product-title {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 8px;
  min-height: 42px;
}

.buy {
  display: block;
  text-align: center;
  background: var(--shopee-orange);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(238, 77, 45, 0.35);
  transition: all 0.2s ease;
}

.buy::before {
  content: "🛒 ";
}

.buy:hover {
  background: #d94327;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(238, 77, 45, 0.45);
}

.buy:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(238, 77, 45, 0.3);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
}

.pagination button {
  border: 1px solid #eee;
  padding: 8px 14px;
  cursor: pointer;
  background: #fff;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination button:hover {
  background: var(--shopee-light);
}

.pagination button.active {
  background: var(--shopee-orange);
  color: #fff;
  border-color: var(--shopee-orange);
  box-shadow: 0 3px 6px rgba(238, 77, 45, 0.35);
}

.pagination button:active {
  transform: scale(0.95);
}

/* Badge Mais Vendido */
.product .badge {
  display: none;
}

.product.featured {
  border: 2px solid var(--shopee-orange);
  box-shadow: 0 8px 18px rgba(238, 77, 45, 0.35);
}

.product.featured .badge {
  display: block;
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--shopee-orange);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--shopee-orange);
  color: #fff;
  padding: 15px 20px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 12px rgba(238, 77, 45, 0.35);
  transition: all 0.2s ease;
  z-index: 999;
}

.sticky-cta:hover {
  background: #d94327;
  transform: translateX(-50%) translateY(-2px);
}

/* Responsivo */
@media(min-width: 768px) {
  .products {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .product {
    flex: 1 1 calc(50% - 10px);
  }
}

@media(min-width: 1024px) {
  .container {
    max-width: 800px;
  }

  .product {
    flex: 1 1 calc(33.33% - 15px);
  }
}