/* ========================================= RESET ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f5f0;
  color: #222;
}

/* ========================================= APP ========================================= */
.tucesta-app {
  width: 100%;
  max-width: 1600px;
  margin: auto;
  padding-bottom: 120px;
}

/* ========================================= HERO ========================================= */
.hero {
  background: linear-gradient(135deg, #2f5d1f, #5f8f3a);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  border-radius: 0 0 30px 30px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 20px;
}

.hero input {
  width: 100%;
  max-width: 500px;
  padding: 15px;
  border: none;
  border-radius: 30px;
  background: #fff !important;
  color: #222 !important;
  font-size: 16px;
  outline: none;
}

/* ========================================= FILTERS ========================================= */
.filters {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding: 20px;
  background: #fff;
  position: sticky;
  top: 140px;
  z-index: 99;
}

.filters button {
  border: none;
  background: #eee;
  padding: 10px 18px;
  border-radius: 30px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 15px;
}

.filters button.active {
  background: #2f5d1f;
  color: #fff;
}

/* ========================================= PRODUCTS ========================================= */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  padding: 25px;
}

/* ========================================= CARD ========================================= */
.card {
  background: #fff;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* ========================================= CONTENT ========================================= */
.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  min-height: 50px;
}

.price {
  color: #2f5d1f;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
}

/* ========================================= CANTIDAD ========================================= */
.qty-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.qty-input {
  width: 80px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 16px;
  text-align: center;
}

.unit-select {
  flex: 1;
  min-width: 120px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: #222;
  font-size: 16px;
  font-weight: 600;
}

/* ========================================= BUTTON ========================================= */
.cart-btn {
  width: 100%;
  border: none;
  background: #2f5d1f;
  color: #fff;
  padding: 15px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 16px;
}

/* ========================================= FLOATING CART ========================================= */
.floating-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  border: none;
  background: #ff7a00;
  color: #fff;
  padding: 18px 25px;
  border-radius: 50px;
  font-size: 18px;
  cursor: pointer;
  z-index: 9999;
}

/* ========================================= LOADING ========================================= */
.loading {
  text-align: center;
  padding: 50px;
  font-size: 22px;
}

/* ========================================= MOBILE ========================================= */
@media (max-width: 768px) {
  .tucesta-app {
    width: 100%;
    padding: 0 10px;
  }

  .hero {
    padding: 30px 15px;
    border-radius: 0 0 20px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero input {
    padding: 12px;
    font-size: 14px;
  }

  .filters {
    padding: 15px;
    top: 120px;
  }

  .filters button {
    padding: 8px 14px;
    font-size: 14px;
  }

  .products {
    grid-template-columns: 1fr; /* Una sola columna en móvil */
    padding: 15px;
    gap: 15px;
  }

  .card img {
    height: 180px;
  }

  .card-content h3 {
    font-size: 18px;
    min-height: 40px;
  }

  .price {
    font-size: 24px;
  }

  .qty-container {
    flex-direction: column;
    gap: 8px;
  }

  .qty-input {
    width: 100%;
  }

  .unit-select {
    width: 100%;
    min-width: auto;
  }

  .cart-btn {
    padding: 12px;
    font-size: 14px;
  }

  .floating-cart {
    bottom: 15px;
    right: 15px;
    padding: 15px 20px;
    font-size: 16px;
  }
}