:root {
  --pink-primary: #E6007E;
  --pink-dark: #C4006B;
  --pink-light: #FFF0F6;
  --pink-soft: #FFD6E7;
  --text-color: #2D2D2D;
  --gray-light: #F8F9FA;
  --gray-border: #EEEEEE;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--gray-light);
  color: var(--text-color);
  padding-bottom: 40px;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--pink-primary), var(--pink-dark));
  color: white;
  text-align: center;
  padding: 30px 20px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.brand-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-title span {
  font-weight: 300;
}

.brand-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-top: 5px;
}

/* Search Input */
.search-container {
  padding: 0 20px;
  margin-top: -20px;
}

#searchInput {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 0 auto;
  padding: 14px 20px;
  border: 1px solid var(--pink-soft);
  border-radius: 25px;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(230, 0, 126, 0.1);
  outline: none;
}

#searchInput:focus {
  border-color: var(--pink-primary);
}

/* Categorias / Tabs */
.categories-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  scrollbar-width: none;
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  background-color: white;
  border: 1px solid var(--pink-soft);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-btn.active, .cat-btn:hover {
  background-color: var(--pink-primary);
  color: white;
  border-color: var(--pink-primary);
}

/* Grid & Cards */
.catalog-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
}

@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.2s ease;
  height: 100%; /* Garante altura total do grid */
}

.product-card:hover {
  transform: translateY(-3px);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.disponivel {
  background-color: #E6F4EA;
  color: #137333;
}

.badge.esgotado {
  background-color: #FCE8E6;
  color: #C5221F;
}

.product-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background-color: #FAFAFA;
}

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink-primary);
  margin-bottom: 2px; /* Reduzido para aproximar da descrição */
}

/* Descrição e Parcelamento (Ajustado) */
.product-installment {
  font-size: 0.8rem;
  color: #555555;
  line-height: 1.35;
  margin-top: 2px;
  margin-bottom: 12px;
  white-space: normal;     /* Força quebra de linha */
  word-break: break-word;  /* Impede palavras longas de estourar a caixa */
}

.btn-whatsapp {
  display: block;
  width: 100%;
  background-color: var(--pink-primary);
  color: white;
  text-align: center;
  text-decoration: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: auto; /* Empurra o botão sempre para o rodapé do card */
}

.btn-whatsapp.disabled {
  background-color: #CCCCCC;
  pointer-events: none;
}
/* Botão Flutuante do Carrinho */
.floating-cart-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: var(--pink-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(230, 0, 126, 0.4);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.floating-cart-btn:active {
  transform: scale(0.9);
}

/* Animação de Pulsar quando adiciona item */
.floating-cart-btn.bounce {
  animation: cartBounce 0.4s ease-in-out;
}

@keyframes cartBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #25d366; /* Verde WhatsApp */
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* Modal do Carrinho */
.cart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  justify-content: flex-end;
}

.cart-modal-overlay.active {
  display: flex;
}

.cart-modal {
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
  animation: slideLeft 0.3s ease-out;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--gray-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 1.2rem;
  color: var(--text-color);
}

.cart-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #888;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.cart-item-img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.85rem;
  color: var(--pink-primary);
  font-weight: 700;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-qty-btn {
  background: #f0f0f0;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--gray-border);
  background: #fafafa;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin-bottom: 15px;
}

.cart-total-row strong {
  color: var(--pink-primary);
}

.btn-checkout-wa {
  width: 100%;
  background-color: #25d366;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-checkout-wa:hover {
  background-color: #1eb954;
}

.btn-add-cart {
  display: block;
  width: 100%;
  background-color: var(--pink-primary);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  transition: background-color 0.2s ease;
}

.btn-add-cart.added {
  background-color: #25d366 !important;
}
/* Tamanho e estilo da logo (Aumentado) */
.brand-logo {
  width: 80px;            /* Aumentado de 45px para 70px */
  height: 80px;           /* Aumentado de 45px para 70px */
  object-fit: contain;    /* Mantém a proporção sem distorcer */
}

/* Ajuste responsivo para celular */
@media (max-width: 480px) {
  .brand-logo {
    width: 55px;          /* Ajustado para celular */
    height: 55px;
  }
}
/* Visual especial para Produtos Indisponíveis */
.product-card.out-of-stock {
  opacity: 0.75; /* Apaga um pouco o card inteiro */
}

.product-card.out-of-stock .product-img {
  filter: grayscale(80%); /* Deixa a foto do produto em preto e branco/cinza */
}

.product-card.out-of-stock .product-price {
  color: #888888 !important; /* Muda o valor do preço de Rosa para Cinza */
}

.product-card.out-of-stock .btn-add-cart,
.btn-add-cart.disabled {
  background-color: #E0E0E0 !important; /* Botão fica cinza bem claro */
  color: #888888 !important;            /* Texto do botão em cinza */
  cursor: not-allowed;
  pointer-events: none;
}